Planning
Remove a shift
DELETE
/v1/shifts/{shift_id}Removes one day (day), that day and the next ones (following), from today on, or the whole series (series, only for a series that has not started: otherwise end it from today with following). A past day stays as it was (409 planning_day_in_past). Confirm with the user first.
Required scope
write:planningRate limit30 requests per minute
curl -X DELETE 'https://api.fansquare.so/v1/shifts/e2ec62cd-6d60-4c5f-a1db-4112ca9ddc1a?scope=day' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste"{
"type": "https://developers.offmy.co/errors/validation_failed",
"title": "Validation failed",
"status": 400,
"detail": "limit: Number must be less than or equal to 200",
"instance": "/v1/shifts/e2ec62cd-6d60-4c5f-a1db-4112ca9ddc1a",
"errors": [
{
"keyword": "invalid_type",
"instancePath": "/scope",
"schemaPath": "#/scope/invalid_type",
"params": {
"issue": {
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"scope"
],
"message": "Required"
}
},
"message": "Required",
"path": "scope"
}
]
}Parameters
Headers
Fansquare-VersionstringrequiredAPI version to pin. Accepts the mineral name or the release date of a version.
Path
shift_idstringrequiredSeries id (
shift_id).format uuid
Query
scopestringrequiredWhat to remove.
Valuesdayfollowingseriesoccurrence_datestringThe
occurrence_dateof the day (fordayandfollowing).pattern ^\d{4}-\d{2}-\d{2}$
Response
No content
No response body
curl -X DELETE 'https://api.fansquare.so/v1/shifts/e2ec62cd-6d60-4c5f-a1db-4112ca9ddc1a?scope=day' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste"{
"type": "https://developers.offmy.co/errors/validation_failed",
"title": "Validation failed",
"status": 400,
"detail": "limit: Number must be less than or equal to 200",
"instance": "/v1/shifts/e2ec62cd-6d60-4c5f-a1db-4112ca9ddc1a",
"errors": [
{
"keyword": "invalid_type",
"instancePath": "/scope",
"schemaPath": "#/scope/invalid_type",
"params": {
"issue": {
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"scope"
],
"message": "Required"
}
},
"message": "Required",
"path": "scope"
}
]
}