Bookings API
Auto-generated from the OpenAPI spec. Run
node docs-site/scripts/fetch-openapi.jsto regenerate.
GET /api/v1/bookings
List Bookings
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
client_id | query | No | ||
class_id | query | No | ||
instructor_id | query | No | Limit to bookings for classes taught by this instructor. | |
location_id | query | No | Limit to bookings for classes at this location. | |
template_id | query | No | Limit to bookings for classes created from this class template. | |
start_date | query | No | Only bookings for classes starting on or after this date. | |
end_date | query | No | Only bookings for classes starting on or before this date (inclusive of the whole day, same convention as GET /api/v1/classes). | |
page | query | No | integer | |
page_size | query | No | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error
POST /api/v1/bookings
Create Booking
Request body
| Field | Required | Type | Description |
|---|---|---|---|
scheduled_class_id | Yes | integer | |
client_id | No | integer | |
membership_id | No | integer | |
override_tag_check | No | boolean | Manager-only escape hatch for a tag-restricted class (see note below). Ignored if sent by a client. |
If the target class has a tag restriction (PRODUCT_SPEC.md §4.1a) and the client doesn't carry
the required tag, this returns 403 TAG_REQUIRED instead of creating the booking:
{
"error": {
"code": "TAG_REQUIRED",
"message": "This class is reserved for clients tagged '<tag_name>'.",
"details": { "tag_id": 7, "tag_name": "Unlimited Plan" }
}
}
A client booking their own spot (client_id omitted) always gets this error when they lack the
tag — override_tag_check has no effect for a client-initiated request, even if sent. A manager
booking another client (client_id set) gets the same error unless the request also includes
"override_tag_check": true, in which case the booking proceeds despite the missing tag. See
Managing Classes ("Tag-Restricted Classes" section) for the
manager-facing override flow.
Responses
- 201 — Successful Response
- 403
TAG_REQUIRED— Target client lacks the class's required tag (see above). - 422 — Validation Error
POST /api/v1/bookings/waitlist
Join Waitlist
Request body
| Field | Required | Type | Description |
|---|---|---|---|
scheduled_class_id | Yes | integer | |
client_id | No | integer | |
override_tag_check | No | boolean | Manager-only escape hatch for a tag-restricted class. Ignored if sent by a client. |
Same tag-restriction check as POST /bookings above, applied before the waitlist entry is
created: 403 TAG_REQUIRED if the target client lacks the class's required tag, overridable by
a manager with "override_tag_check": true.
Responses
- 201 — Successful Response
- 403
TAG_REQUIRED— Target client lacks the class's required tag. - 422 — Validation Error
DELETE /api/v1/bookings/waitlist/{waitlist_id}
Leave Waitlist
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
waitlist_id | path | Yes | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error
POST /api/v1/bookings/waitlist/{waitlist_id}/confirm
Confirm Waitlist
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
waitlist_id | path | Yes | integer |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
membership_id | No | integer |
Responses
- 201 — Successful Response
- 422 — Validation Error
POST /api/v1/bookings/{booking_id}/no-show
Mark No Show
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
booking_id | path | Yes | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error
GET /api/v1/bookings/{booking_id}
Get Booking
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
booking_id | path | Yes | integer |
Responses
- 200 — Successful Response
- 422 — Validation Error
DELETE /api/v1/bookings/{booking_id}
Cancel Booking
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
booking_id | path | Yes | integer |
Request body
| Field | Required | Type | Description |
|---|---|---|---|
reason | No | string |
Responses
- 200 — Successful Response
- 422 — Validation Error