FansquareAPI reference
Open the app

Planning

List the absences

GET/v1/absences

The 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 scoperead:planning
Rate 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-Versionstringrequired

    API version to pin. Accepts the mineral name or the release date of a version.

Query

  • start_datestringrequired

    First day.

    pattern ^\d{4}-\d{2}-\d{2}$
  • end_datestringrequired

    Last day.

    pattern ^\d{4}-\d{2}-\d{2}$
  • employee_idsstring

    Only these employees. Comma-separated, 50 max.

Response

OK, application/json

  • timezonestringrequired

    The agency time zone (IANA): every date and time of this answer is read in it.

  • dataarray of objectsrequired
    • idstringrequired

      Absence id.

    • employee_idstringrequired

      Fansquare user id.

    • datestringrequired

      Day (YYYY-MM-DD), in the agency time zone.

    • kindstringrequired

      absence or day_off.

      Valuesabsenceday_off
    • replacement_idstring | nullrequired

      Who takes their shifts that day.

    • declared_by_selfbooleanrequired

      The 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
    }
  ]
}