# Get booking status restriction by ID

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

- **Success:** `200 OK`
- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Get booking status restriction by ID](https://support.gladstonesoftware.cloud/reference/configuration/get-booking-status-restriction-by-id)

## 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](get-booking-membership-restrictions-by-id.md).
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](get-all-booking-status-restrictions.md) —
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](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | integer (int32) | Yes | The 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](get-all-booking-status-restrictions.md); it is not the same thing as `restrictionId`, and passing a `restrictionId` here will retrieve the wrong entry or none at all. |

## Sample request

```bash title="cURL"
curl -X GET '{base_url}/api/configuration/bookings/restrictions/status/{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 identifier when deleting the restriction. |
| `statusId` | string | The 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](get-all-member-statuses.md). 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. |
| `statusDescription` | string | The 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. |
| `restrictionId` | integer (int32) | A reference to a [booking membership restriction](get-booking-membership-restrictions-by-id.md) 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

```json title="200 OK"
{
  "id": 12345,
  "statusId": "string",
  "statusDescription": "string",
  "restrictionId": 12345
}
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `404` | Not found | No 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. |
| `500` | Internal server error | Any 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. |
