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

Parameters: list_shifts
NameTypeDescription
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
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"
Python
result = client.call("deputy", "list_shifts", {"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"})
Node.js
const result = await cotlet.call('deputy', 'list_shifts', {"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"});
CLI
cotlet call deputy list_shifts --data '{"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"}'

Example response

JSON

{
  "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"
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.