Planning
List the shifts
/v1/shiftsThe shifts over 31 days at most, one item per shift on a day, in order of time: the series (shift_id), the day key to change one day (occurrence_date), hours, creator, employee, rule, and the absence that touches it.
read:planningcurl 'https://api.fansquare.so/v1/shifts?start_date=2026-10-12&end_date=2026-10-12T21%3A14%3A00.000Z' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste"{
"timezone": "Europe/Paris",
"data": [
{
"shift_id": "e2ec62cd-6d60-4c5f-a1db-4112ca9ddc1a",
"occurrence_date": "2026-10-12T21:14:00.000Z",
"date": "2026-10-12",
"start_time": "string",
"end_time": "string",
"end_date": "2026-10-12T21:14:00.000Z",
"starts_at": "2026-10-12T21:14:00.000Z",
"ends_at": "2026-10-12T21:14:00.000Z",
"creator_id": "m81IhLxdhzDGYs54rNp2",
"creator_name": "string",
"employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
"employee_name": "string",
"named_shift_id": "5afc7856-2404-4a6c-a7e5-5042b84bf795",
"named_shift_name": "string",
"repeat": "none",
"week_days": [
"string"
],
"until_date": "2026-10-12T21:14:00.000Z",
"from_work_profile": true,
"one_day_change": true,
"absent": true,
"replaced_by_id": "6fabe734-d5f0-4dab-ad3c-d72bc015ea39",
"replaced_by_name": "string"
}
],
"next_cursor": "KI7cfD0OLcWfeXZb1FTusJpz0nfKiYXPwHCZe-VXBaeQSX1w5BvO5UH-ua-dzNpXOTixzw"
}Parameters
Headers
Fansquare-VersionstringrequiredAPI version to pin. Accepts the mineral name or the release date of a version.
Query
start_datestringrequiredFirst day (YYYY-MM-DD, agency time zone).
pattern ^\d{4}-\d{2}-\d{2}$end_datestringrequiredLast day, 31 days at most after the first.
pattern ^\d{4}-\d{2}-\d{2}$creator_idsstringOnly these creators. Comma-separated, 50 max.
employee_idsstringOnly the shifts of these employees, planned or replacing someone. Comma-separated, 50 max.
cursorstringOpaque cursor from the previous page (
next_cursor).limitintegerPage size (1-100).
Default50min 1max 100
Response
OK, application/json
timezonestringrequiredThe agency time zone (IANA): every date and time of this answer is read in it.
dataarray of objectsrequiredshift_idstringrequiredThe series this shift belongs to: path parameter of PATCH, DELETE /v1/shifts/{shift_id}.
occurrence_datestringrequiredKey of this shift on this day: pass it as
occurrence_dateto change or remove this day only (it can differ fromdatefor an old series).datestringrequiredDay the shift starts (YYYY-MM-DD).
start_timestringrequiredStart, HH:mm.
end_timestringrequiredEnd, HH:mm (the next day when
end_dateis set).end_datestring | nullrequiredDay the shift ends when it ends after midnight, else null.
starts_atstringrequiredStart (ISO 8601).
format date-timeends_atstringrequiredEnd (ISO 8601).
format date-timecreator_idstringrequiredFansquare creator id.
creator_namestringrequiredName of the creator.
employee_idstringrequiredThe planned employee.
employee_namestringrequiredDisplay name.
named_shift_idstring | nullrequiredThe named shift it comes from, if any.
named_shift_namestring | nullrequiredIts name.
repeatstringrequiredThe rule of the series.
Valuesnonedailyweeklybiweeklymonthlyyearlyweek_daysarray of strings | nullrequiredDays of a weekly series.
until_datestring | nullrequiredLast day of the series, null without end.
from_work_profilebooleanrequiredMade by the work profile of the employee.
one_day_changebooleanrequiredA change made for this day only.
absentbooleanrequiredThe planned employee is absent that day.
replaced_by_idstring | nullrequiredWho replaces them that day.
replaced_by_namestring | nullrequiredIts display name.
next_cursorstring | nullrequiredPass it back as
cursorfor the next page.
curl 'https://api.fansquare.so/v1/shifts?start_date=2026-10-12&end_date=2026-10-12T21%3A14%3A00.000Z' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste"{
"timezone": "Europe/Paris",
"data": [
{
"shift_id": "e2ec62cd-6d60-4c5f-a1db-4112ca9ddc1a",
"occurrence_date": "2026-10-12T21:14:00.000Z",
"date": "2026-10-12",
"start_time": "string",
"end_time": "string",
"end_date": "2026-10-12T21:14:00.000Z",
"starts_at": "2026-10-12T21:14:00.000Z",
"ends_at": "2026-10-12T21:14:00.000Z",
"creator_id": "m81IhLxdhzDGYs54rNp2",
"creator_name": "string",
"employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
"employee_name": "string",
"named_shift_id": "5afc7856-2404-4a6c-a7e5-5042b84bf795",
"named_shift_name": "string",
"repeat": "none",
"week_days": [
"string"
],
"until_date": "2026-10-12T21:14:00.000Z",
"from_work_profile": true,
"one_day_change": true,
"absent": true,
"replaced_by_id": "6fabe734-d5f0-4dab-ad3c-d72bc015ea39",
"replaced_by_name": "string"
}
],
"next_cursor": "KI7cfD0OLcWfeXZb1FTusJpz0nfKiYXPwHCZe-VXBaeQSX1w5BvO5UH-ua-dzNpXOTixzw"
}