Planning
Read one employee of the planning
/v1/planning/team/{employee_id}One member, with the ids of the creators they reach and of the creators of their work profile.
read:planningcurl 'https://api.fansquare.so/v1/planning/team/9926b1f9-74a9-4ab5-a716-1c14f6bcc475' \
-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": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
"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.
Path
employee_idstringrequiredFansquare user id.
min length 1max length 128
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/9926b1f9-74a9-4ab5-a716-1c14f6bcc475' \
-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": "9926b1f9-74a9-4ab5-a716-1c14f6bcc475",
"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"
]
}
}
]
}