Get booking membership restrictions by ID
GET /api/configuration/bookings/restrictions/memberships/{id}
Success: 200 OK
- Products: Operator (
FOH) - Features: Front of House Generic Access (
FOHGENERIC)
Overview
Retrieves one booking membership restriction, including the activities it covers and the membership types it permits. This is the only endpoint that returns those two lists — Get all booking membership restrictions returns just id, description and modifiedOn, so to build a complete picture you list the restrictions and then call this endpoint once per id.
A booking membership restriction is an allow-list. Naming an activity in any restriction turns that activity from open-to-anyone into members-only, and from then on a member may book it only if they hold a subscription whose membership type appears on a restriction that also names that activity, and whose start and end dates bracket today. Expired and not-yet-started subscriptions do not count. If several restrictions name the same activity, holding a membership type from any one of them is enough.
Two consequences are worth planning for. Removing the last restriction that names an activity silently reopens that activity to everyone. And a restriction that names activities but no membership types would block every member from booking them — Create booking membership restrictions and Update booking membership restrictions both reject an empty memberships list, so this should not arise through the API, but it is the failure mode to look for if bookings stop being accepted.
Restrictions are enforced during member validation for booking, not at this endpoint. This endpoint only reads configuration; it tells you nothing about whether a particular member may book.
Restrictions have no active, inactive or status flag, and nothing is filtered beyond the id, so whatever is configured is what you get. Deletion is the only way a restriction stops applying.
id is a tenant-local integer assigned by Gladstone when the restriction is created; it is not stable across tenants or environments, and there is no natural key you can use instead — description is not unique.
When no restriction has that id the endpoint returns 404 with a plain-text message, not 200 with an empty body.
Endpoint
GET {base_url}/api/configuration/bookings/restrictions/memberships/{id}
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | integer (int32) | Yes | The restriction to retrieve, as returned in the id field of Get all booking membership restrictions. An integer assigned by Gladstone that is meaningful only within the tenant that issued it. A value that is not an integer is rejected before any lookup; an integer that matches no restriction gives 404. |
Sample request
curl -X GET '{base_url}/api/configuration/bookings/restrictions/memberships/{id}' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Response fields
| Field | Type | Description |
|---|---|---|
id | integer (int32) | Echoes the id you requested. Use it as the path id of Update booking membership restrictions, and in the ids array of Delete booking membership restrictions. |
description | string | The operator's free-text label for the rule — the only human-readable handle it has, since restrictions have no code or reference. Always populated, at most 255 characters, and create and update both reject a missing, empty or whitespace-only value. Not unique and not validated for meaning, so do not treat it as a key or parse it. |
activities | array of string | The activities this restriction locks down, as activity ids of at most 15 characters — the id values from Get all activities. Each must already exist when the restriction is created or updated, otherwise the write is rejected. Returned as [] rather than null if the restriction somehow has none; create and update both refuse an empty list, so through the API this list always has at least one entry. An activity may appear in more than one restriction. |
memberships | array of string | The membership types permitted to book the activities above, as membership type ids of at most 15 characters — the id values from Get all membership types. These are operator-defined codes, meaningful only within this tenant. Each must already exist when the restriction is written. Returned as [] rather than null if empty; create and update both refuse an empty list. Holding one of these membership types is sufficient — a member does not need all of them. |
Sample response
{
"id": 12345,
"description": "Members-only swimming lanes",
"activities": [
"LANESWIM",
"EARLYSWIM"
],
"memberships": [
"GOLD",
"PLATINUM"
]
}Errors
| Status | Meaning | When |
|---|---|---|
404 | Not found | No restriction exists with that id — including one that has been deleted. The body is the plain-text message No booking membership restriction exists against ID {id}., not JSON. |
500 | Internal server error | Any unexpected server-side failure while reading the restriction. The response is a bare status code with no body, so there is nothing to parse and no way to distinguish causes from the response; retry once, then escalate with the timestamp. |