Delete a booking lease
DELETE /api/bookings/lease/{id}
- Products: Operator (
FOH), Consumer (CONSUMER) (any one of these products, not all) - Features: Online Bookings (
ONLINEBOOK), Front of House Generic Access (FOHGENERIC) (any one of these features, not all)
Overview
Releases a booking lease and frees the spaces it was holding, so the slot becomes available to other bookers again. Use it when a booker abandons the flow, changes their mind before confirming, or when you want to tidy up a hold you no longer need.
The lease is the temporary hold created by
Create or update a booking lease;
{id} is that lease's GUID. Deleting removes the lease and its related data. On success
the endpoint returns 204 No Content.
Deleting is not mandatory — leases expire on their own ten minutes after they are created — but until then the spaces stay held, so release them explicitly rather than waiting out the clock if the booker walks away. To cancel a booking that has already been confirmed, use Delete one or more bookings instead.
Endpoint
DELETE {base_url}/api/bookings/lease/{id}
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The lease you are releasing, as a GUID in 8-4-4-4-12 form — the same value you generated and sent in the path when you created the lease with Create or update a booking lease. A value that does not parse as a GUID is rejected with The given lease ID of {id} must be a GUID, and a well-formed GUID that matches no lease with Lease {id} does not exist. |
Sample request
curl -X DELETE '{base_url}/api/bookings/lease/{id}' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | {id} is not a well-formed GUID — The given lease ID of {id} must be a GUID. |
404 | Not found | No lease exists with that id — Lease {id} does not exist. Either it was never created, it has already been deleted, or it has already expired and been cleaned up. |
500 | Internal server error |