> ## Documentation Index
> Fetch the complete documentation index at: https://integrations.stationwise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Department API

`GET /api/integrations/external/department/`

Returns basic information about the department associated with your API key: its name and the list of its battalions. Use the battalion `id`s returned here to filter the [Shift Schedule API](shift-schedule-api.md) by `battalion`.

> See [Basics](../api-basics.md) for the base URL and authentication, and [Error Handling](../api-error-handling.md) for error responses.

## Query parameters

None.

## Response — `200 OK`

| Field               | Type    | Description                                                             |
| ------------------- | ------- | ----------------------------------------------------------------------- |
| `name`              | string  | The department's name.                                                  |
| `battalions`        | array   | The department's battalions, ordered by their internal sort order.      |
| `battalions[].id`   | integer | Stable battalion id — pass to the shift-schedule `battalion` parameter. |
| `battalions[].name` | string  | Battalion name.                                                         |

### Example

Request:

```bash
curl -i 'https://api.stationwise.com/api/integrations/external/department/' \
  -H 'X-API-Key: FE6vaHi4.qAAr87yrcjdO31a0WAYPbexilDcwt8ut'
```

Response:

```json
{
  "name": "Demo Fire Department",
  "battalions": [
    {"id": 142, "name": "Battalion 1"},
    {"id": 143, "name": "Battalion 2"}
  ]
}
```