Get booking status restriction by ID

GET /api/configuration/bookings/restrictions/status/{id}

Success: 200 OK

Overview

Returns one booking status restriction. A booking status restriction is a single entry that names a member status — the operator-defined code describing the state of a person's membership, such as a live, frozen or suspended state — and marks members holding that status as blocked from making bookings.

The check is a simple existence test. When a member is validated for booking, Gladstone looks for any booking status restriction whose statusId equals the member's current status; if one exists, the member cannot proceed. The restrictionId recorded alongside it is not consulted by that check, so adding an entry for a status blocks every member on that status outright, for every activity. See the restrictionId description below.

Do not confuse this with a booking membership restriction, which is a different object: a named rule pairing a set of activities with a set of membership types, retrieved through Get booking membership restrictions by ID. Both are exposed under /api/configuration/bookings/restrictions/, and the two are evaluated independently.

Use this endpoint when you already hold an id and want the current state of that one entry. To discover ids in the first place, call Get all booking status restrictions — there is no other way to obtain one, because the create endpoint does not return the ids it allocated.

Endpoint

GET {base_url}/api/configuration/bookings/restrictions/status/{id}

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

Path parameters

NameTypeRequiredDescription
idinteger (int32)YesThe identifier of the booking status restriction, allocated by Gladstone when the restriction is created. It is tenant-local and carries no meaning outside this tenant — the same id points at a different restriction in another tenant, and ids are not reused after deletion. Take the value from the id field of Get all booking status restrictions; it is not the same thing as restrictionId, and passing a restrictionId here will retrieve the wrong entry or none at all.

Sample request

cURL
curl -X GET '{base_url}/api/configuration/bookings/restrictions/status/{id}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'

Response fields

FieldTypeDescription
idinteger (int32)Echoes the id you requested. Use it as the identifier when deleting the restriction.
statusIdstringThe member status code this restriction blocks, up to 15 characters. Statuses are operator-defined per tenant rather than drawn from a fixed Gladstone list, so do not hard-code values — read them from Get all member statuses. Every member carries exactly one status, and any member whose status matches this value is refused when validated for booking. It always refers to a status in the tenant's status list and is never null.
statusDescriptionstringThe human-readable label configured against statusId, up to 25 characters, taken from the status at read time. It is a display string only — never match on it, because operators rename statuses and the text is translated per tenant language. It is returned as null when the operator has not set a description.
restrictionIdinteger (int32)A reference to a booking membership restriction recorded against this entry. Three things are worth knowing before you rely on it. First, it is recorded but not evaluated: the booking check matches on statusId alone, so the restriction named here does not narrow which activities the block applies to. Second, only values 1–255 can be held — a booking membership restriction whose own id has grown past 255 cannot be referenced. Third, the value is not validated, so it can point at a booking membership restriction that has since been deleted; expect a 404 from the membership restriction endpoint rather than assuming the reference resolves. Returned as null where the entry was written without one.

Sample response

200 OK
{
  "id": 12345,
  "statusId": "string",
  "statusDescription": "string",
  "restrictionId": 12345
}

Errors

StatusMeaningWhen
404Not foundNo booking status restriction exists with that id in this tenant — either it was never created, or it has since been deleted. The body is a plain-text message in the form No booking status restrictions exists against ID 42., not a JSON object. This is also what you get when you pass a restrictionId by mistake.
500Internal server errorAny unexpected server-side failure while reading the record. The response has no body, so there is nothing to parse — treat it as retryable and do not attempt to distinguish causes from the response.

This page as markdown · All pages · llms.txt