Skip to main content

Synced shifts

Returns the shifts that exist in both Stafflion and your agency's systems, with their current status. Use it to confirm which shifts are synchronized and what state they are in.

Call it with a valid Bearer token. Filter with the query parameters in the reference below. Pages are numbered from 1; use page and limit (maximum 500) to read through the results and check pagination.has_next_page.

Shift fields​

FieldTypeDescription
shift_idintegerStafflion shift ID.
scheduled_shift_idinteger or nullStafflion scheduled shift ID. null when there is no scheduled shift.
partner_shift_idstringPartner shift ID.
partner_secondary_shift_idstring or nullSecondary partner shift ID.
partner_facility_idstringPartner facility ID.
facility_namestringFacility name.
shift_positionsarray of stringsPositions for the shift.
date, start_time, end_timestringShift date (Y-m-d) and times (H:i).
clinicianobject or nullClinician assigned to the shift, or null when none.
is_openbooleantrue when no clinician is assigned.
is_called_outbooleantrue when the shift was called out.
is_play_modebooleantrue when the shift exists only within Stafflion's system.
is_deletedbooleantrue when the shift was removed.

Request and responses​

Query parameters​

NameTypeDescription
shift_idintegerStafflion shift ID.
partner_shift_idstringPartner shift ID.
partner_secondary_shift_idstringPartner secondary shift ID.
partner_facility_idstringPartner facility ID.
datedateShift date (Y-m-d).
start_timestringShift start time (H:i).
end_timestringShift end time (H:i).
positionstringPosition, for example CNA.
is_openbooleanFilter by open status.
is_called_outbooleanFilter by called-out status.
is_play_modebooleanFilter by play mode. true returns shifts that exist only within Stafflion's system.
is_deletedbooleanFilter by deleted status.
pageintegerPage number. Defaults to 1.
limitintegerItems per page. Defaults to 100. Maximum 500.
curl --request GET \
--url 'https://staging.stafflion.com/api/v1/partners/synced-shifts?date=2026-07-24&is_open=false&page=1&limit=100' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Accept: application/json'

Responses​

200 OK​

OK

Synchronized shifts

{
"data": [
{
"shift_id": 4582625,
"scheduled_shift_id": 10624927,
"partner_shift_id": "deb1b3c4-72a8-493a-ba34-46eebb81ef94",
"partner_secondary_shift_id": null,
"partner_facility_id": "efa61cc1-caf8-4544-9f3a-a8946d51026b",
"facility_name": "Example Facility",
"shift_positions": [
"CNA"
],
"date": "2026-07-24",
"start_time": "07:00",
"end_time": "15:00",
"clinician": {
"id": 139898,
"partner_clinician_id": "a98600a7-6c73-4095-ab17-7c5d8c02870c",
"fname": "Jane",
"lname": "Doe",
"email": "jdoe@example.com",
"phone": "000-000-0000",
"position": "CNA"
},
"is_open": false,
"is_called_out": false,
"is_play_mode": false,
"is_deleted": false
}
],
"pagination": {
"current_page": 1,
"per_page": 100,
"total_items": 1,
"total_pages": 1,
"from": 1,
"to": 1,
"has_next_page": false,
"has_previous_page": false
}
}

No shifts synchronized yet

{
"data": [],
"pagination": {
"current_page": 1,
"per_page": 100,
"total_items": 0,
"total_pages": 0,
"from": 0,
"to": 0,
"has_next_page": false,
"has_previous_page": false
}
}

401 Missing, invalid or expired Bearer token​

Missing, invalid or expired Bearer token. Illustrative body, confirm against staging.

Missing or invalid token

{
"message": "Unauthenticated."
}

403 The token is valid but the client is not an agency client​

The token is valid but the client is not an agency client.

Not an agency client

{
"message": "Forbidden"
}

422 Validation failed​

Validation failed. Illustrative body, confirm which parameters are validated.

Invalid date

{
"message": "The given data was invalid.",
"errors": {
"date": [
"The date must be a valid date in the format Y-m-d."
]
}
}