Planning
Read the team as the planning sees it
/v1/planning/teamEach 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.
read:planningcurl '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-VersionstringrequiredAPI version to pin. Accepts the mineral name or the release date of a version.
Response
OK, application/json
timezonestringrequiredThe agency time zone (IANA): every date and time of this answer is read in it.
named_shiftsarray of objectsrequiredThe named shifts of the agency.
idstringrequiredNamed shift id (Settings › Planning of the app).
namestringrequiredName of the shift, such as « Matin ».
start_timestringrequiredStart, HH:mm.
end_timestringrequiredEnd, HH:mm; before the start means the next day.
dataarray of objectsrequiredThe active members of the agency.
idstringrequiredFansquare user id.
namestringrequiredDisplay name.
role_namestring | nullrequiredName of their agency role.
is_ownerbooleanrequiredThe owner of the agency.
platformsarray of stringsrequiredThe platforms they work on (the coverage counts them there).
role_platformsarray of stringsrequiredThe platforms their role opens.
all_creatorsbooleanrequiredReaches every creator (owner, Associate).
creators_countintegerrequiredNumber of creators they reach.
creator_idsarray of stringsThe creators they reach (GET /v1/planning/team/{employee_id} only).
work_profileobjectrequiredThe work profile: the weekly hours that make their recurring shifts.
slotsarray of objectsrequiredTheir weekly hours.
named_shift_idstring | nullrequiredA named shift, or null for hours given directly.
start_timestringrequiredStart, HH:mm.
end_timestringrequiredEnd, HH:mm.
week_daysarray of stringsrequiredDays of these hours: MO, TU, WE, TH, FR, SA, SU.
named_shift_namestring | nullrequired
creators_countintegerrequiredCreators of the profile.
creator_idsarray of stringsThe 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"
]
}
}
]
}