Delete booking membership restrictions
DELETE /api/configuration/bookings/restrictions/memberships
- Products: Operator (
FOH) - Features: Front of House Generic Access (
FOHGENERIC)
Overview
Deletes one or more booking membership restrictions by id. This is a permanent delete, and it cascades: along with each restriction the endpoint removes every subscription-type entry and every activity entry attached to it, so the whole restriction — the rule and the memberships and activities it covered — goes in one call. Nothing is soft-deleted, and a restriction carries no active flag, so there is no deactivate alternative.
The call is all-or-nothing. Every id you send is checked first; if a single one is unknown the request fails with 404, names the offending ids, and deletes nothing. Send only ids you have just read back from List booking membership restrictions, and do not retry a partially-guessed list expecting the valid entries to go through.
A successful call returns 204 No Content with an empty body. Repeating it returns 404, because the ids no longer exist.
Note that the ids travel in a JSON request body on a DELETE, not in the query string, so your HTTP client must be able to send a body with DELETE.
Endpoint
DELETE {base_url}/api/configuration/bookings/restrictions/memberships
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
ids | array of integer | Yes | The restrictions to delete, identified by the id returned in List booking membership restrictions. Despite being nullable in the request schema, it is effectively required — omitting it, sending null or sending an empty array is rejected with 400 and No booking membership restriction id provided. Negative values are rejected with 400 before any lookup happens. Every id must exist, or the whole call fails with 404 and nothing is deleted. |
Sample request
curl -X DELETE '{base_url}/api/configuration/bookings/restrictions/memberships' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true' \
-H 'Content-Type: application/json' \
-d '{
"ids": [
12345
]
}'Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | ids is missing, null or an empty array — No booking membership restriction id provided. |
400 | Bad request | Any entry in ids is negative — Negative booking membership restriction IDs are not allowed. The check runs before any id is looked up, so one bad value rejects the whole request. |
403 | Forbidden | The token does not carry a scope allowed on this route. Member tokens and anonymous tokens are both rejected — this is a staff and integration endpoint. |
404 | Not found | At least one id in ids does not match a booking membership restriction — No booking membership restrictions found for the following IDs: {ids}, listing only the ids that were not found. Nothing is deleted, including the ids that did exist. |
500 | Internal server error | An unexpected server-side failure while deleting. Nothing is removed, and the request is safe to retry. |