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 ids returned here to filter the Shift Schedule API by battalion.

See Basics for the base URL and authentication, and Error Handling for error responses.

Query parameters

None.

Response — 200 OK

FieldTypeDescription
namestringThe department's name.
battalionsarrayThe department's battalions, ordered by their internal sort order.
battalions[].idintegerStable battalion id — pass to the shift-schedule battalion parameter.
battalions[].namestringBattalion name.

Example

Request:

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

Response:

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