Planning
List the absences
GET
/v1/absencesThe absences of the team between two days (400 days at most), with their replacement. Absences belong to the agency: the creator scope of the key does not apply, like employees. Their reason is never returned: it may be health data, and planning does not need it.
Required scope
read:planningRate limit30 requests per minute
curl 'https://api.fansquare.so/v1/absences?start_date=2026-10-12T21%3A14%3A00.000Z&end_date=2026-10-12T21%3A14%3A00.000Z' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste"{
"timezone": "Europe/Paris",
"data": [
{
"id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
"employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
"date": "2026-10-12",
"kind": "absence",
"replacement_id": "03cef609-3d3c-42bd-a9e5-04182baf2362",
"declared_by_self": true
}
]
}Parameters
Headers
Fansquare-VersionstringrequiredAPI version to pin. Accepts the mineral name or the release date of a version.
Query
start_datestringrequiredFirst day.
pattern ^\d{4}-\d{2}-\d{2}$end_datestringrequiredLast day.
pattern ^\d{4}-\d{2}-\d{2}$employee_idsstringOnly these employees. Comma-separated, 50 max.
Response
OK, application/json
timezonestringrequiredThe agency time zone (IANA): every date and time of this answer is read in it.
dataarray of objectsrequiredidstringrequiredAbsence id.
employee_idstringrequiredFansquare user id.
datestringrequiredDay (YYYY-MM-DD), in the agency time zone.
kindstringrequiredabsenceorday_off.Valuesabsenceday_offreplacement_idstring | nullrequiredWho takes their shifts that day.
declared_by_selfbooleanrequiredThe employee declared it themselves.
curl 'https://api.fansquare.so/v1/absences?start_date=2026-10-12T21%3A14%3A00.000Z&end_date=2026-10-12T21%3A14%3A00.000Z' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste"{
"timezone": "Europe/Paris",
"data": [
{
"id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
"employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
"date": "2026-10-12",
"kind": "absence",
"replacement_id": "03cef609-3d3c-42bd-a9e5-04182baf2362",
"declared_by_self": true
}
]
}