Planning
Change an absence
PATCH
/v1/absences/{absence_id}Sets or removes the replacement, the kind or the reason of an absence of today or later. Needs a key for all creators. Confirm with the user first.
Required scope
write:planningRate limit30 requests per minute
curl -X PATCH 'https://api.fansquare.so/v1/absences/88bd19bf-d104-4593-abd4-ce4145aba3ca' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"kind": "absence",
"reason": "string",
"replacement_id": "03cef609-3d3c-42bd-a9e5-04182baf2362"
}'{
"id": "88bd19bf-d104-4593-abd4-ce4145aba3ca",
"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.
Path
absence_idstringrequiredAbsence id.
format uuid
Body
application/json
kindstringabsenceorday_off.Valuesabsenceday_offreasonstring | nullReason, null to remove it.
max length 200replacement_idstring | nullWho takes their shifts, null for nobody.
min length 1
Response
OK, application/json
idstringrequiredAbsence 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 -X PATCH 'https://api.fansquare.so/v1/absences/88bd19bf-d104-4593-abd4-ce4145aba3ca' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste" \
-H "Content-Type: application/json" \
-d '{
"kind": "absence",
"reason": "string",
"replacement_id": "03cef609-3d3c-42bd-a9e5-04182baf2362"
}'{
"id": "88bd19bf-d104-4593-abd4-ce4145aba3ca",
"employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
"date": "2026-10-12",
"kind": "absence",
"replacement_id": "03cef609-3d3c-42bd-a9e5-04182baf2362",
"declared_by_self": true
}