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
| Field | Type | Description |
|---|---|---|
shift_id | integer | Stafflion shift ID. |
scheduled_shift_id | integer or null | Stafflion scheduled shift ID. null when there is no scheduled shift. |
partner_shift_id | string | Partner shift ID. |
partner_secondary_shift_id | string or null | Secondary partner shift ID. |
partner_facility_id | string | Partner facility ID. |
facility_name | string | Facility name. |
shift_positions | array of strings | Positions for the shift. |
date, start_time, end_time | string | Shift date (Y-m-d) and times (H:i). |
clinician | object or null | Clinician assigned to the shift, or null when none. |
is_open | boolean | true when no clinician is assigned. |
is_called_out | boolean | true when the shift was called out. |
is_play_mode | boolean | true when the shift exists only within Stafflion's system. |
is_deleted | boolean | true when the shift was removed. |
Request and responses
Query parameters
| Name | Type | Description |
|---|---|---|
shift_id | integer | Stafflion shift ID. |
partner_shift_id | string | Partner shift ID. |
partner_secondary_shift_id | string | Partner secondary shift ID. |
partner_facility_id | string | Partner facility ID. |
date | date | Shift date (Y-m-d). |
start_time | string | Shift start time (H:i). |
end_time | string | Shift end time (H:i). |
position | string | Position, for example CNA. |
is_open | boolean | Filter by open status. |
is_called_out | boolean | Filter by called-out status. |
is_play_mode | boolean | Filter by play mode. true returns shifts that exist only within Stafflion's system. |
is_deleted | boolean | Filter by deleted status. |
page | integer | Page number. Defaults to 1. |
limit | integer | Items per page. Defaults to 100. Maximum 500. |
- curl
- PHP
- JavaScript
- Python
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'
<?php
$url = 'https://staging.stafflion.com/api/v1/partners/synced-shifts?' . http_build_query([
'date' => '2026-07-24',
'is_open' => 'false',
'page' => 1,
'limit' => 100,
]);
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_ACCESS_TOKEN',
'Accept: application/json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
curl_close($ch);
$shifts = json_decode($response, true);
const url = new URL('https://staging.stafflion.com/api/v1/partners/synced-shifts');
url.search = new URLSearchParams({
"date": "2026-07-24",
"is_open": "false",
"page": "1",
"limit": "100"
});
const response = await fetch(url, {
headers: {
Authorization: 'Bearer YOUR_ACCESS_TOKEN',
Accept: 'application/json',
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://staging.stafflion.com/api/v1/partners/synced-shifts',
params={
'date': '2026-07-24',
'is_open': 'false',
'page': 1,
'limit': 100,
},
headers={
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Accept': 'application/json',
},
timeout=30,
)
print(response.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."
]
}
}