# Delete a member's booking

`DELETE /api/members/{memberId}/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 a member's booking](https://support.gladstonesoftware.cloud/reference/members/delete-a-members-booking)

## Overview

Takes a member off a booking. This is a deletion, not a status change: the member's place on the booking, and their entry in the booking's party list, are removed. Nothing is left behind marked "cancelled", and there is no endpoint to undo it — the member has to book again. If the member was the last one on the booking, the empty booking slot itself is deleted too for standard (non-class) activities, for host-led activities, and whenever `forceDeletion=true`; otherwise the booking survives for the members who remain, minus the cancelled member's name.

By default the member may only remove themselves from a booking that is still in the future, that they have not been marked as having attended, that is zero-priced, and that is not inside the site's cancellation cut-off window. All of those except the attendance check can be waived with `forceDeletion=true`, which is meant for staff overrides rather than member self-service. The cut-off window is an operator setting (`Book_CancellationCutOffPeriod`, in minutes) whose default is 0 — that is, no notice period at all — so do not assume a site has one, and do not assume it does not.

No refund is issued by this endpoint. Any sales invoice already raised for the booking is left where it is; the platform's invoicing is notified of the member and the sales invoice to act on separately, and if the member paid for the booking out of a membership that carries a fixed number of uses, those uses are credited back to the membership as long as that does not push it past its maximum. Money can still move in the other direction: unless you pass `dishonour=false`, the activity's late-cancellation rule is evaluated and, where it applies, a cancellation charge is raised against them.

One behaviour will surprise you. If the booking is for a class or course that members book as a whole block rather than one session at a time, deleting one session deletes the member from that session **and every remaining session of the same course**, in a single call. Check what you are deleting before you call this on a course.

The call succeeds with `204 No Content` and an empty body. It is not idempotent: repeat it and you get 404, because the member is no longer on the booking. The member in the path must be the member in your access token or someone linked to them — a parent may cancel a child's booking — and anything else is rejected with 403.

## Endpoint

`DELETE {base_url}/api/members/{memberId}/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 |
|------|------|----------|-------------|
| `memberId` | integer (int32) | Yes | The member being taken off the booking, not the person making the call: it must be the member in your access token or a member linked to them, or the request is rejected with 403. Must be 1 or greater. Only this member is removed — anyone else on the same booking is untouched. |
| `bookingId` | integer (int32) | Yes | The booking the member is being removed from. Must be 1 or greater. For a class or course that is booked as a whole block, this identifies where to start: the member is removed from this session and from every remaining session of the same course. |

## Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `dishonour` | boolean | No | Whether to apply the site's late-cancellation charge, known internally as a dishonour. Defaults to **true**, so leaving it out means the charge is assessed. When true, the cancellation rule attached to the activity is checked and, if one applies to this member at this point before the start time, raises a cancellation record against them carrying whatever fee the rule dictates. Set it to `false` to remove the member without assessing that charge — a waiver, in other words, so restrict who in your integration is allowed to send it. It makes no difference when the activity has no cancellation rule configured, or when the rule decides no charge is due. |
| `forceDeletion` | boolean | No | Waives the eligibility rules. Defaults to **false**. When `true` the booking may be in the past, may be non-zero-priced, and the cancellation cut-off is not applied. It does **not** waive the attendance check: a member marked as attended still cannot be removed. It also makes the clean-up unconditional — if removing the member leaves the booking with nobody on it, the booking and its products are deleted outright rather than kept for a class that others might still join. This is an administrative override that lets a member escape a charge they would otherwise owe, so do not expose it to end users. |

## Sample request

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

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | `memberId` or `bookingId` is zero or negative: `Invalid memberId or bookingId, both must be a positive number`. Or the booking is not eligible — `Cannot delete the booking as it is in the past, only future bookings can be deleted`, `Cannot delete the booking as member {memberId} has attended the specified booking`, `Cannot delete the booking as it is a non-zero priced booking`, or `Cannot cancel booking as fewer than {n} minutes remain until booking start time. Please contact the site`. All but the attendance message are suppressed by `forceDeletion=true`. |
| `404` | Not found | No booking has that id: `Invalid bookingId {bookingId}, booking does not exist`. Or the booking exists but this member is not on it: `MemberId {memberId} either does not exist or is not booked in to the specified booking` — which is also what a repeated delete returns once the first one has succeeded. |
| `422` | Unprocessable entity | Not returned by this endpoint in practice. |
| `500` | Internal server error | An unexpected server-side failure. The delete is applied all or nothing, so a failure during the delete itself leaves the booking intact. The response has no body. |
