Delete an empty booking

DELETE /api/bookings/{bookingId}

Overview

Deletes the booking record itself — the slot, not a person's place in it. It only works on a booking that has nobody booked on to it; if a single member is still attached, the call is rejected and you must remove them first with Delete one or more bookings, which cancels each member in turn.

Deletion is unconditional in every other respect. The usual cancellation rules — that a booking must be in the future, and that it must be outside the cancellation cut-off — are bypassed here, so a booking that has already taken place can still be removed. Nothing is charged: a dishonour fee needs a member to charge it to, and by definition there is not one.

On success the endpoint returns 204 No Content, and other parts of the platform, such as invoicing, pick up the deletion automatically.

Endpoint

DELETE {base_url}/api/bookings/{bookingId}

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Path parameters

NameTypeRequiredDescription
bookingIdinteger (int32)YesThe booking to delete. Must be 1 or greater — 0 or a negative number is rejected with Invalid bookingId, must be a positive number before the booking is looked up. An id that parses but matches nothing gives Invalid bookingId {bookingId}, booking does not exist.

Sample request

cURL
curl -X DELETE '{base_url}/api/bookings/{bookingId}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Errors

StatusMeaningWhen
400Bad requestbookingId is not a positive integer — Invalid bookingId, must be a positive number.
400Bad requestThe booking still has people on it — Cannot delete booking {bookingId} as there are members booked in to it. Remove them first; this endpoint never cancels a member's place.
404Not foundNo booking has that id — Invalid bookingId {bookingId}, booking does not exist. You also get this on a second attempt, once the first has succeeded.
422Unprocessable entityThis endpoint does not return 422.
500Internal server errorAn unexpected server-side failure, with an empty body.

This page as markdown · All pages · llms.txt