FansquareAPI reference
Open the app

Planning

List the named shifts

GET/v1/named-shifts

The named shifts of the agency (« Matin, 08:00 to 14:00 »), set in Settings › Planning of the app.

Required scoperead:planning
Rate limit30 requests per minute
curl 'https://api.fansquare.so/v1/named-shifts' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "timezone": "Europe/Paris",
  "data": [
    {
      "id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
      "name": "Lena",
      "start_time": "string",
      "end_time": "string",
      "color": "#FFD900"
    }
  ]
}

Parameters

Headers

  • Fansquare-Versionstringrequired

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

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

      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.

    • colorstringrequired

      Color key in the app.

curl 'https://api.fansquare.so/v1/named-shifts' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "timezone": "Europe/Paris",
  "data": [
    {
      "id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
      "name": "Lena",
      "start_time": "string",
      "end_time": "string",
      "color": "#FFD900"
    }
  ]
}