Planning
List the named shifts
GET
/v1/named-shiftsThe named shifts of the agency (« Matin, 08:00 to 14:00 »), set in Settings › Planning of the app.
Required scope
read:planningRate 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-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.
dataarray of objectsrequiredidstringrequiredNamed 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.
colorstringrequiredColor 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"
}
]
}