Delete booking sheet exceptions within a date range
DELETE /api/booking-sheets/exception/{scheduleId}
Success: 200 OK
- Products: Operator (
FOH) - Features: Front of House Generic Access (
FOHGENERIC)
Overview
Removes exceptions from a schedule created by Create one or more booking sheet exceptions, putting the time back on sale. A schedule usually holds many exceptions — one per generated date, per time band, per product — and this call removes those that fall inside the date range you give, across every product and time band in the schedule. There is no way to remove a single exception from within a schedule by id.
Two things about the range are easy to get wrong. Only exceptions that sit entirely inside it
are removed: one that starts before fromDate or ends after toDate is left in place, so widen
the range rather than trimming it to the block you have in mind. And the whole range must be in
the future — you cannot clear a closure that has already begun.
Dates removed this way are also added to the schedule's exclusion dates, so a recurring pattern does not simply regenerate them.
On success the endpoint returns 200 OK with a plain string body of the form
{count} exceptions deleted. If the schedule has no exceptions at all, or none inside the range,
you get a 404 rather than a count of zero.
Endpoint
DELETE {base_url}/api/booking-sheets/exception/{scheduleId}
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
scheduleId | string | Yes | The schedule whose exceptions you are removing — the scheduleId returned when the exceptions were created by Create one or more booking sheet exceptions. It identifies the whole set created by that one request, not an individual exception. An empty value is rejected with Schedule ID must be specified, a non-GUID with Schedule ID is not a valid GUID, and a GUID with no exceptions behind it with No exceptions found for Schedule ID '{scheduleId}'. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
fromDate | string (date-time) | No | The earliest point an exception may start at and still be removed; anything starting before it is left alone. Defaults to the moment the request is handled when omitted, which is the safe choice — an explicit value even slightly in the past is rejected with You cannot specify a date range that is partly or entirely in the past. Must be strictly earlier than toDate (fromDate must be before toDate). Send the site's local wall-clock time rather than converting to UTC yourself, because exception times are compared in site local time. |
toDate | string (date-time) | No | The latest point an exception may end at and still be removed; anything ending after it is left alone, even if it started inside the range. Defaults to the maximum representable date when omitted, which clears every future exception on the schedule. Must be in the future and later than fromDate. Interpreted as site wall-clock time, as fromDate is. |
Sample request
curl -X DELETE '{base_url}/api/booking-sheets/exception/{scheduleId}' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Sample response
"12 exceptions deleted"Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | The schedule id is unusable: Schedule ID must be specified for an empty value, or Schedule ID is not a valid GUID for anything that does not parse as a GUID. |
400 | Bad request | The range is unusable: fromDate must be before toDate when they are equal or the wrong way round, or You cannot specify a date range that is partly or entirely in the past when either end is before the current instant. |
400 | Bad request | Removing the exceptions failed — A database error occurred. |
404 | Not found | The schedule holds no exceptions at all — No exceptions found for Schedule ID '{scheduleId}'. You also get this after a successful delete has removed the last of them. |
404 | Not found | The schedule exists but nothing falls in the range — No exceptions found for Schedule ID '{scheduleId}' in the specified date range. Raised both when every exception on the schedule has already finished, and when none of them sits inside fromDate–toDate. |
500 | Internal server error | An unexpected server-side failure, with an empty body. |