Cancel shifts
This endpoint cancels one or more shifts, and can notify whoever was booked onto them.
Cancelling is not reversible through the API. A cancelled shift cannot be reopened here; create a new shift instead.
Endpoint
POST api/shifts/bulk-cancel/Example Request Payload
{
"shift_ids": [
"4a9f2c7e-1b2c-4d3e-8f90-a1b2c3d4e5f6",
"8c1d3f5a-2b3c-4d5e-9f01-b2c3d4e5f607"
],
"notify_users": true
}Fields
shift_ids
yes
The shifts to cancel, up to 500.
notify_users
no
Tell everyone booked onto these shifts that they are cancelled. Defaults to false.
Example response
{
"success": true,
"queued": 2,
"shift_ids": [
"4a9f2c7e-1b2c-4d3e-8f90-a1b2c3d4e5f6",
"8c1d3f5a-2b3c-4d5e-9f01-b2c3d4e5f607"
],
"notify_users": true
}Behavior
Cancelling releases everybody's reservation and clears the shift's scheduled reminders, as well as marking it cancelled.
The work runs in the background, which is why the response says
queued. The shifts will not read as cancelled the instant this returns.Every ID is checked against your organization before anything is cancelled. If any ID is not yours, the whole request is refused and nothing is cancelled.
Only people already booked are notified, and only when
notify_usersistrue.