Delete booking membership restrictions

DELETE /api/configuration/bookings/restrictions/memberships

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

FieldTypeRequiredDescription
idsarray of integerYesThe 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
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

StatusMeaningWhen
400Bad requestids is missing, null or an empty array — No booking membership restriction id provided.
400Bad requestAny 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.
403ForbiddenThe 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.
404Not foundAt 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.
500Internal server errorAn unexpected server-side failure while deleting. Nothing is removed, and the request is safe to retry.

This page as markdown · All pages · llms.txt