v1

latestOpenAPI 3.1.02026-07-26294215839.4 KB
Scheduling
Public API

List Shifts

Lists shifts matching the given filters. Either provide ids (ignores all other filters) or provide start, end, and at least one of employeeIds or scheduleIds. The time window must be no longer than 1 month. Defaults to returning planned and published shifts.

OAuth Scopes: scheduling:shifts, time_tracking

get/api/v1/scheduling/shifts

Query parameters

idsstring[]

Filter by shift IDs. If provided, other filters are ignored.

startstring date-time

Start datetime for the shift window (ISO-8601 datetime string). Required if ids not provided.

endstring date-time

End datetime for the shift window (ISO-8601 datetime string). Required if ids not provided.

employeeIdsstring[]

Filter by employee IDs. Use the string "null" as a value to include unassigned shifts (e.g. employeeIds[]=10&employeeIds[]=null).

scheduleIdsstring[]

Filter by schedule IDs.

statusesstring[]

Filter by shift statuses.

pageinteger

The starting page for pagination.

pageSizeinteger

The number of items to be returned.

Response

Shifts retrieved successfully

Example response

{
  "data": [
    {
      "id": "019aa09f-0712-74cb-9186-8ad0eb6038dc_20240101T093000",
      "scheduleId": "0199de9b-6bcb-77e7-941d-3caf74b9a372",
      "name": "Morning Shift",
      "color": "00FFAA",
      "capacity": 1,
      "start": "2025-01-01T06:00:00Z",
      "end": "2025-01-01T14:00:00Z",
      "timezone": "America/Denver",
      "recurrenceRule": "FREQ=WEEKLY;INTERVAL=1",
      "recurrenceId": "20240101T090000",
      "recurrenceDtstart": "2024-01-01T09:00:00Z",
      "recurrenceDtend": "2024-12-31T23:59:59Z",
      "recurrenceUntil": "2024-12-31T23:59:59Z",
      "employeeIds": [
        10,
        20
      ],
      "createdAt": "2025-01-01T06:00:00Z",
      "updatedAt": "2025-01-01T06:00:00Z",
      "deletedAt": "2025-01-01T06:00:00Z"
    }
  ]
}