# Delete an empty booking

`DELETE /api/bookings/{bookingId}`

- **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)

HTML version: [Delete an empty booking](https://support.gladstonesoftware.cloud/reference/bookings/delete-a-booking-completely-and-utterly-its-gone-for-good-its-an-ex-booking-now)

## 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](deletes-one-or-more-bookings.md), 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](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `bookingId` | integer (int32) | Yes | The 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

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

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | `bookingId` is not a positive integer — `Invalid bookingId, must be a positive number`. |
| `400` | Bad request | The 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. |
| `404` | Not found | No booking has that id — `Invalid bookingId {bookingId}, booking does not exist`. You also get this on a second attempt, once the first has succeeded. |
| `422` | Unprocessable entity | This endpoint does not return `422`. |
| `500` | Internal server error | An unexpected server-side failure, with an empty body. |
