Shift Schedule API

GET /api/integrations/external/shift-schedule/

Returns the position assignments for a given date in the department associated with your API key.

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

Query parameters

ParamRequiredDescription
dateyesThe shift date in YYYY-MM-DD (e.g. 2026-05-07).
battalionconditionalA battalion id (from the Department API) or a 1-based index (1, 2, …), used to filter the results. Required for departments with more than 3 battalions; optional otherwise. See Battalion selection.

Response — 200 OK

A JSON array. Each item describes one position assignment:

FieldTypeDescription
employeeIdstringThe employee's payroll ID.
employeeFullNamestringFull name (<first> <last>).
shiftStartstringISO local-time start, format YYYY-MM-DDTHH:MM (department's local timezone, no zone suffix).
shiftEndstringISO local-time end, same format.
unitstringThe unit name (e.g. Engine 1), or Floater when the employee is assigned without a unit.
stationNamestringStation name, or empty string for floaters.
rankobject | nullThe employee's rank as of the requested date (resolved from promotion history), or null if the employee has no rank on record.
rank.codestringShort rank code (e.g. FF, CAPT).
rank.namestringHuman-readable rank name (e.g. Firefighter).
payCodesarrayThe pay codes attached to the assignment. Every assignment has at least one.
payCodes[].codestringThe pay code's code (e.g. REG).
payCodes[].namestringHuman-readable name (e.g. Regular Shift).
payCodes[].extCodestring | nullThe external code configured for payroll exports, or null if not set.

Each item is one position assignment, not one employee. An employee with partial-day time off appears in both endpoints on the same date: their working segments here and their off segment in the Off Roster API.

If there's no shift on the requested date (e.g. a future or past date with no schedule), the endpoint returns 200 OK with an empty array [].

Example

Request:

curl -i 'https://api.stationwise.com/api/integrations/external/shift-schedule/?date=2026-05-07&battalion=1' \
  -H 'X-API-Key: FE6vaHi4.qAAr87yrcjdO31a0WAYPbexilDcwt8ut'

Response (truncated):

[
  {
    "employeeId": "EMP-0042",
    "employeeFullName": "Alice Smith",
    "shiftStart": "2026-05-07T08:00",
    "shiftEnd": "2026-05-08T08:00",
    "unit": "Engine 1",
    "stationName": "Station 1",
    "rank": {"code": "CPT", "name": "Captain"},
    "payCodes": [{"code": "REG", "name": "Regular Shift", "extCode": "101"}]
  },
  {
    "employeeId": "EMP-0099",
    "employeeFullName": "Bob Jones",
    "shiftStart": "2026-05-07T08:00",
    "shiftEnd": "2026-05-08T08:00",
    "unit": "Floater",
    "stationName": "",
    "rank": {"code": "FF", "name": "Firefighter"},
    "payCodes": [{"code": "OT", "name": "Overtime Shift", "extCode": "203"}]
  }
]

Battalion selection

The battalion query parameter accepts either a battalion id or a 1-based index:

  • If the value matches the id of one of your department's battalions (see the Department API), it is resolved by id. This is the recommended, unambiguous form.
  • Otherwise, it is treated as a 1-based index into the department's battalions ordered by their internal sort order.

The two forms never collide: battalion ids are always ≥ 100, while indices are small. If the value is neither a known id nor a valid index, the request returns 400 Bad Request.

Filter semantics when battalion is set:

  • Assignments where the unit's station belongs to the requested battalion → included.
  • Assignments on units in other battalions → excluded.
  • Floaters (assignments without a unit) → always included, regardless of the requested battalion.

When battalion is omitted (allowed only for departments with ≤3 battalions), the response includes every battalion in the department.


Did this page help you?