FansquareAPI reference
Open the app

Planning

Read the gaps of the planning

GET/v1/planning/coverage

The planning of the team over 14 days at most, on one platform: the slots nobody holds (a creator, a day and a named shift), who was planned there and why it does not hold (absent, no access, role without the platform), up to 3 employees free to take each gap, and the absences of the period. Start here to check or build a planning, then confirm every change with the user before writing it.

Required scoperead:planning
Rate limit20 requests per minute
curl 'https://api.fansquare.so/v1/planning/coverage?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",
  "platform": "string",
  "platforms": [
    "string"
  ],
  "start_date": "2026-10-12T21:14:00.000Z",
  "end_date": "2026-10-12T21:14:00.000Z",
  "named_shifts": [
    {
      "id": "5afc7856-2404-4a6c-a7e5-5042b84bf795",
      "name": "Lena",
      "start_time": "string",
      "end_time": "string"
    }
  ],
  "slots_total": 1,
  "gaps_total": 1,
  "gaps": [
    {
      "creator_id": "m81IhLxdhzDGYs54rNp2",
      "creator_name": "string",
      "named_shift_id": "5afc7856-2404-4a6c-a7e5-5042b84bf795",
      "named_shift_name": "string",
      "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",
      "planned": [
        {
          "employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
          "employee_name": "string",
          "problem": "absent",
          "replacement_id": "03cef609-3d3c-42bd-a9e5-04182baf2362",
          "replacement_name": "string"
        }
      ],
      "available": [
        {
          "employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
          "employee_name": "string",
          "planned_hours": 12
        }
      ]
    }
  ],
  "absences": [
    {
      "id": "88bd19bf-d104-4593-abd4-ce4145aba3ca",
      "employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
      "employee_name": "string",
      "date": "2026-10-12",
      "kind": "absence",
      "declared_by_self": true,
      "replacement_id": "03cef609-3d3c-42bd-a9e5-04182baf2362",
      "replacement_name": "string",
      "shifts": 12,
      "uncovered": 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 (YYYY-MM-DD, agency time zone).

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

    Last day, 14 days at most after the first.

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

    Only these creators (Fansquare ids from GET /v1/creators). Comma-separated, 50 max.

  • platformstring

    Platform to check (default: MYM, or the only platform of the agency).

    Valuesmymtelegramfanslysnapchat

Response

OK, application/json

  • timezonestringrequired

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

  • platformstringrequired

    The platform read (each platform has its own coverage).

  • platformsarray of stringsrequired

    The platforms where the agency has accounts.

  • start_datestringrequired

    First day read.

  • end_datestringrequired

    Last day read.

  • named_shiftsarray of objectsrequired

    The named shifts of the agency, in the order of the day.

    • idstringrequired

      Named shift id (Settings › Planning of the app).

    • namestringrequired

      Name of the shift, such as « Matin ».

    • start_timestringrequired

      Start, HH:mm.

    • end_timestringrequired

      End, HH:mm; before the start means the next day.

  • slots_totalintegerrequired

    Slots read: creators × days × named shifts (or × days without named shift).

  • gaps_totalintegerrequired

    Slots nobody holds. gaps lists 40 at most: read fewer days or creators to see them all.

  • gapsarray of objectsrequired

    The slots nobody holds, in order of time.

    • creator_idstringrequired

      Fansquare creator id.

    • creator_namestringrequired

      Name of the creator.

    • named_shift_idstring | nullrequired

      The named shift of this slot; null when the agency has none (one slot per day).

    • named_shift_namestring | nullrequired

      Its name.

    • datestringrequired

      Day the shift starts (YYYY-MM-DD).

    • start_timestringrequired

      Start, HH:mm.

    • end_timestringrequired

      End, HH:mm (the next day when end_date is set).

    • end_datestring | nullrequired

      Day the shift ends when it ends after midnight, else null.

    • starts_atstringrequired

      Start (ISO 8601).

      format date-time
    • ends_atstringrequired

      End (ISO 8601).

      format date-time
    • plannedarray of objectsrequired

      Who was planned on this slot but does not hold it.

      • employee_idstringrequired

        Fansquare user id.

      • employee_namestringrequired

        Display name.

      • problemstringrequired

        absent: absent that day (and nobody valid replaces them); no_access: no access to the creator (the planning never gives access); no_platform: their role does not open the platform.

        Valuesabsentno_accessno_platform
      • replacement_idstring | nullrequired

        The replacement of an absent employee, who cannot hold the slot either.

      • replacement_namestring | nullrequired

        Its display name.

    • availablearray of objectsrequired

      Up to 3 employees free at that time who could hold it (access to the creator, the platform, not absent, no other shift): people who already work on this creator first, then the least busy. The owner is never listed here.

      • employee_idstringrequired

        Fansquare user id.

      • employee_namestringrequired

        Display name.

      • planned_hoursnumberrequired

        Hours already planned over the period read.

  • absencesarray of objectsrequired

    The absences of the period.

    • idstringrequired

      Absence id, for PATCH or DELETE /v1/absences/{absence_id}.

    • employee_idstringrequired

      Fansquare user id.

    • employee_namestringrequired

      Display name.

    • datestringrequired

      Day of the absence (YYYY-MM-DD).

    • kindstringrequired

      absence or day_off.

      Valuesabsenceday_off
    • declared_by_selfbooleanrequired

      The employee declared it themselves.

    • replacement_idstring | nullrequired

      Who takes their shifts that day, if anyone.

    • replacement_namestring | nullrequired

      Its display name.

    • shiftsintegerrequired

      Their shifts that day.

    • uncoveredbooleanrequired

      Shifts stay without anyone: no replacement.

curl 'https://api.fansquare.so/v1/planning/coverage?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",
  "platform": "string",
  "platforms": [
    "string"
  ],
  "start_date": "2026-10-12T21:14:00.000Z",
  "end_date": "2026-10-12T21:14:00.000Z",
  "named_shifts": [
    {
      "id": "5afc7856-2404-4a6c-a7e5-5042b84bf795",
      "name": "Lena",
      "start_time": "string",
      "end_time": "string"
    }
  ],
  "slots_total": 1,
  "gaps_total": 1,
  "gaps": [
    {
      "creator_id": "m81IhLxdhzDGYs54rNp2",
      "creator_name": "string",
      "named_shift_id": "5afc7856-2404-4a6c-a7e5-5042b84bf795",
      "named_shift_name": "string",
      "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",
      "planned": [
        {
          "employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
          "employee_name": "string",
          "problem": "absent",
          "replacement_id": "03cef609-3d3c-42bd-a9e5-04182baf2362",
          "replacement_name": "string"
        }
      ],
      "available": [
        {
          "employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
          "employee_name": "string",
          "planned_hours": 12
        }
      ]
    }
  ],
  "absences": [
    {
      "id": "88bd19bf-d104-4593-abd4-ce4145aba3ca",
      "employee_id": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
      "employee_name": "string",
      "date": "2026-10-12",
      "kind": "absence",
      "declared_by_self": true,
      "replacement_id": "03cef609-3d3c-42bd-a9e5-04182baf2362",
      "replacement_name": "string",
      "shifts": 12,
      "uncovered": true
    }
  ]
}