SuprSync
Developer Portal
Sign In

Shifts

GET /external/v1/shifts

Returns shift slots (templates) for a company. Optionally retrieves a single shift by ID.

Query Parameters

ParameterTypeRequiredDescription
shiftIdstringNoIf provided, returns a single shift instead of slot list
branchIdstringNoFilter slots by branch/location ID
jobRoleIdstringNoFilter slots by job role ID

Response: Slot List (default)

When called without shiftId, returns shift slot templates:

[
  {
    "id": "slot-uuid-1",
    "startTime": "09:00",
    "endTime": "17:00",
    "dayOfWeek": 1,
    "maxStaffRequired": 5,
    "timeZone": "Africa/Lagos",
    "hours": 8,
    "shiftName": "Morning Shift",
    "shiftColor": "#00AD57",
    "openShift": false,
    "isOncall": false,
    "unpaidBreak": 30,
    "swappable": true,
    "branch": {
      "id": "branch-uuid-1",
      "name": "Downtown Office"
    },
    "jobRole": {
      "id": "role-uuid-1",
      "title": "Cashier"
    }
  }
]

Slot Fields

FieldTypeDescription
idstringSlot template ID
startTimestringStart time in HH:mm format
endTimestringEnd time in HH:mm format
dayOfWeeknumberDay of week (0 = Sunday, 6 = Saturday)
maxStaffRequirednumberMaximum staff for this slot
timeZonestringIANA time zone
hoursnumberSlot duration in hours
shiftNamestringDisplay name for this shift
shiftColorstringHex color code
openShiftbooleanWhether this is an open shift
isOncallbooleanWhether this is an on-call shift
unpaidBreaknumberUnpaid break time in minutes
swappablebooleanWhether shift swaps are allowed
branchobjectAssociated branch { id, name }
jobRoleobjectAssociated job role { id, title }

Response: Single Shift

When called with shiftId, returns a sanitized shift record:

{
  "id": "shift-uuid-1",
  "slotId": "slot-uuid-1",
  "branchId": "branch-uuid-1",
  "userId": "user-uuid-1",
  "status": "confirmed",
  "start": "2026-02-10T09:00:00.000Z",
  "end": "2026-02-10T17:00:00.000Z",
  "clockedIn": "2026-02-10T08:58:00.000Z",
  "clockedOut": "2026-02-10T17:02:00.000Z",
  "totalBreakTime": 30
}

See Schedules for field descriptions.

Examples

List all shift slots

curl -X GET "https://api.suprsync.com/external/v1/shifts" \
  -H "x-api-key: api_your_client_id" \
  -H "x-api-secret: sec_your_client_secret"

Get a single shift

curl -X GET "https://api.suprsync.com/external/v1/shifts?shiftId=shift-uuid-here" \
  -H "x-api-key: api_your_client_id" \
  -H "x-api-secret: sec_your_client_secret"

Filter by branch

curl -X GET "https://api.suprsync.com/external/v1/shifts?branchId=branch-uuid-here" \
  -H "x-api-key: api_your_client_id" \
  -H "x-api-secret: sec_your_client_secret"

Create Shift Slot

POST /external/v1/shifts/slots

Creates a new shift slot and the initial shift booking.

Request Body

FieldTypeRequiredDescription
branchIdstringYesBranch/location ID
jobRoleIdstringYesJob role ID
startTimestringYesStart time HH:mm
endTimestringYesEnd time HH:mm
bookDatestringYesDate YYYY-MM-DD
dayOfWeeknumberYesDay of week (0-6)
maxStaffRequirednumberYesMax staff count
timeZonestringYesIANA time zone
shiftNamestringYesDisplay name
shiftColorstringYesHex color
openShiftbooleanYesWhether open shift
isOncallbooleanYesWhether on-call
unpaidBreaknumberYesBreak time (minutes)
hoursnumberNoDuration override
writeUpstringNoNotes
curl -X POST "https://api.suprsync.com/external/v1/shifts/slots" \
  -H "x-api-key: api_your_client_id" \
  -H "x-api-secret: sec_your_client_secret" \
  -H "Content-Type: application/json" \
  -d '{
    "branchId": "branch-uuid-1",
    "jobRoleId": "role-uuid-1",
    "startTime": "09:00",
    "endTime": "17:00",
    "bookDate": "2026-02-15",
    "dayOfWeek": 0,
    "maxStaffRequired": 3,
    "timeZone": "America/New_York",
    "shiftName": "Morning Shift",
    "shiftColor": "#00AD57",
    "openShift": false,
    "isOncall": false,
    "unpaidBreak": 30
  }'

Response

{
  "slotId": "slot-uuid-new",
  "shift": {
    "id": "shift-uuid-new",
    "slotId": "slot-uuid-new",
    "branchId": "branch-uuid-1",
    "userId": "user-uuid-1",
    "status": "pending",
    "start": "2026-02-15T09:00:00.000Z",
    "end": "2026-02-15T17:00:00.000Z",
    "clockedIn": null,
    "clockedOut": null,
    "totalBreakTime": 30
  }
}

Book Shift

POST /external/v1/shifts/book

Books/assigns staff to an existing shift slot.

Request Body

FieldTypeRequiredDescription
slotIdstringYesSlot ID to book
datestringYesDate YYYY-MM-DD
assigneesarrayNo[{ userId, userName }]
remindersarrayNo[{ minutesBefore }]
curl -X POST "https://api.suprsync.com/external/v1/shifts/book" \
  -H "x-api-key: api_your_client_id" \
  -H "x-api-secret: sec_your_client_secret" \
  -H "Content-Type: application/json" \
  -d '{
    "slotId": "slot-uuid-1",
    "date": "2026-02-15",
    "assignees": [{ "userId": "user-uuid-1", "userName": "john.doe" }],
    "reminders": [{ "minutesBefore": 30 }]
  }'

Response (200 OK)

Returns the booked shift details.

Error Response (400 Bad Request)

{
  "error": {
    "code": 400,
    "message": "Shift slot is not available on the selected day"
  }
}

Cancel Shift

DELETE /external/v1/shifts/:id

Cancels a specific shift booking.

curl -X DELETE "https://api.suprsync.com/external/v1/shifts/shift-uuid-1" \
  -H "x-api-key: api_your_client_id" \
  -H "x-api-secret: sec_your_client_secret"

Response

{
  "message": "Shift cancelled"
}