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
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:
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"}
]
}