v1

latestOpenAPI 3.1.02026-07-26294215839.4 KB
Scheduling
Public API

Publish Shifts

Publishes one or more planned shifts, making them visible to employees. Shifts with scheduling conflicts are skipped and reported as failures. Returns 200 if all shifts succeed, 207 if some shifts failed due to conflicts, or 409 if all shifts failed due to conflicts.

OAuth Scopes: scheduling:shifts.write, time_tracking.write

post/api/v1/scheduling/shifts/publish

Request body

shiftIdsstring[] required

Shift IDs to publish.

Response

All shifts published successfully

Example response

{
  "published": [
    {
      "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"
    }
  ],
  "failed": [
    {
      "shiftId": "019aa09f-0712-74cb-9186-8ad0eb6038dc",
      "reason": "Employee is already assigned to a published shift that overlaps with this shift."
    }
  ]
}