List shifts
Shifts of a location between two dates, draft, open and published.
GET https://cotlet.dev/api/v1/deputy/locations/{location_id}/shifts
read
Returns shifts (Deputy calls them rosters) of one location between two dates, in start order. Each shift says whether it is published, open (no employee yet) or a draft only managers see. Without dates, Deputy returns its default window around now, so pass both dates to read a week.
Parameters
| Name | Type | Description |
|---|---|---|
| location_id integer required | integer | Location ID from list_locations. |
| date_from date required | date | First day, YYYY-MM-DD. |
| date_to date required | date | Last day, YYYY-MM-DD. |
| employee_id integer | integer | Only this employee's shifts. |
Request
curl "https://cotlet.dev/api/v1/deputy/locations/1/shifts?date_from=2026-10-01&date_to=2026-10-01" \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("deputy", "list_shifts", {"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"}) const result = await cotlet.call('deputy', 'list_shifts', {"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"}); cotlet call deputy list_shifts --data '{"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"}' Example response
{
"shifts": [
{
"shift_id": 714,
"date": "2026-10-19",
"start": "09:00",
"end": "17:00",
"employee": "Ana Lopez",
"state": "published"
},
{
"shift_id": 715,
"date": "2026-10-19",
"start": "12:00",
"end": "20:00",
"employee": null,
"state": "open"
}
]
}