Delete shifts
rotacloud_delete_shiftsWRITE — deletes shifts from the rota (assigned employees lose the shift). Delete 1-100 shifts by id; select them first with rotacloud_find_shifts. Without confirm it only previews: it reads each shift and deletes nothing. Show the preview to the user, then call again with confirm: true. Guards re-check each shift right before its delete and skip it if it no longer qualifies: require_open (skip assigned shifts), require_shorter_than_minutes (skip shifts whose elapsed duration is not strictly less). After each delete the shift is read again to verify it is gone. DELETE /shifts/{id}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | true = delete now. Omit or false = preview only (nothing is deleted). | |
| shift_ids | Yes | Ids of the shifts to delete (1-100). | |
| require_open | No | true = delete a shift only if it is still open (unassigned) at delete time. | |
| require_shorter_than_minutes | No | Delete a shift only if its elapsed duration (end − start) is still strictly less than this many minutes. |