FansquareAPI reference
Open the app

Planning

Read the team as the planning sees it

GET/v1/planning/team

Each active member: role, work platforms and the platforms the role opens, how many creators they reach, and their work profile (weekly hours that make their recurring shifts). The named shifts of the agency too.

Required scoperead:planning
Rate limit30 requests per minute
curl 'https://api.fansquare.so/v1/planning/team' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "timezone": "Europe/Paris",
  "named_shifts": [
    {
      "id": "5afc7856-2404-4a6c-a7e5-5042b84bf795",
      "name": "Lena",
      "start_time": "string",
      "end_time": "string"
    }
  ],
  "data": [
    {
      "id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
      "name": "Lena",
      "role_name": "string",
      "is_owner": true,
      "platforms": [
        "string"
      ],
      "role_platforms": [
        "string"
      ],
      "all_creators": true,
      "creators_count": 12,
      "creator_ids": [
        "m81IhLxdhzDGYs54rNp2"
      ],
      "work_profile": {
        "slots": [
          {
            "named_shift_id": "5afc7856-2404-4a6c-a7e5-5042b84bf795",
            "start_time": "string",
            "end_time": "string",
            "week_days": [
              "string"
            ],
            "named_shift_name": "string"
          }
        ],
        "creators_count": 12,
        "creator_ids": [
          "m81IhLxdhzDGYs54rNp2"
        ]
      }
    }
  ]
}

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.

  • named_shiftsarray of objectsrequired

    The named shifts of the agency.

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

  • dataarray of objectsrequired

    The active members of the agency.

    • idstringrequired

      Fansquare user id.

    • namestringrequired

      Display name.

    • role_namestring | nullrequired

      Name of their agency role.

    • is_ownerbooleanrequired

      The owner of the agency.

    • platformsarray of stringsrequired

      The platforms they work on (the coverage counts them there).

    • role_platformsarray of stringsrequired

      The platforms their role opens.

    • all_creatorsbooleanrequired

      Reaches every creator (owner, Associate).

    • creators_countintegerrequired

      Number of creators they reach.

    • creator_idsarray of strings

      The creators they reach (GET /v1/planning/team/{employee_id} only).

    • work_profileobjectrequired

      The work profile: the weekly hours that make their recurring shifts.

      • slotsarray of objectsrequired

        Their weekly hours.

        • named_shift_idstring | nullrequired

          A named shift, or null for hours given directly.

        • start_timestringrequired

          Start, HH:mm.

        • end_timestringrequired

          End, HH:mm.

        • week_daysarray of stringsrequired

          Days of these hours: MO, TU, WE, TH, FR, SA, SU.

        • named_shift_namestring | nullrequired
      • creators_countintegerrequired

        Creators of the profile.

      • creator_idsarray of strings

        The creators of the profile (one employee only).

curl 'https://api.fansquare.so/v1/planning/team' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "timezone": "Europe/Paris",
  "named_shifts": [
    {
      "id": "5afc7856-2404-4a6c-a7e5-5042b84bf795",
      "name": "Lena",
      "start_time": "string",
      "end_time": "string"
    }
  ],
  "data": [
    {
      "id": "40a6e358-bd2a-4cff-a59e-5709874d3f5b",
      "name": "Lena",
      "role_name": "string",
      "is_owner": true,
      "platforms": [
        "string"
      ],
      "role_platforms": [
        "string"
      ],
      "all_creators": true,
      "creators_count": 12,
      "creator_ids": [
        "m81IhLxdhzDGYs54rNp2"
      ],
      "work_profile": {
        "slots": [
          {
            "named_shift_id": "5afc7856-2404-4a6c-a7e5-5042b84bf795",
            "start_time": "string",
            "end_time": "string",
            "week_days": [
              "string"
            ],
            "named_shift_name": "string"
          }
        ],
        "creators_count": 12,
        "creator_ids": [
          "m81IhLxdhzDGYs54rNp2"
        ]
      }
    }
  ]
}