FansquareAPI reference
Open the app

Planning

List the shifts

GET/v1/shifts

The 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.

Required scoperead:planning
Rate limit30 requests per minute
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"
}

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, 31 days at most after the first.

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

    Only these creators. Comma-separated, 50 max.

  • employee_idsstring

    Only the shifts of these employees, planned or replacing someone. Comma-separated, 50 max.

  • cursorstring

    Opaque cursor from the previous page (next_cursor).

  • limitinteger

    Page size (1-100).

    Default 50min 1max 100

Response

OK, application/json

  • timezonestringrequired

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

  • dataarray of objectsrequired
    • shift_idstringrequired

      The series this shift belongs to: path parameter of PATCH, DELETE /v1/shifts/{shift_id}.

    • occurrence_datestringrequired

      Key of this shift on this day: pass it as occurrence_date to change or remove this day only (it can differ from date for an old series).

    • 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
    • creator_idstringrequired

      Fansquare creator id.

    • creator_namestringrequired

      Name of the creator.

    • employee_idstringrequired

      The planned employee.

    • employee_namestringrequired

      Display name.

    • named_shift_idstring | nullrequired

      The named shift it comes from, if any.

    • named_shift_namestring | nullrequired

      Its name.

    • repeatstringrequired

      The rule of the series.

      Valuesnonedailyweeklybiweeklymonthlyyearly
    • week_daysarray of strings | nullrequired

      Days of a weekly series.

    • until_datestring | nullrequired

      Last day of the series, null without end.

    • from_work_profilebooleanrequired

      Made by the work profile of the employee.

    • one_day_changebooleanrequired

      A change made for this day only.

    • absentbooleanrequired

      The planned employee is absent that day.

    • replaced_by_idstring | nullrequired

      Who replaces them that day.

    • replaced_by_namestring | nullrequired

      Its display name.

  • next_cursorstring | nullrequired

    Pass it back as cursor for 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"
}