Passa al contenuto principale

Bookings API

Auto-generated from the OpenAPI spec. Run node docs-site/scripts/fetch-openapi.js to regenerate.

GET /api/v1/bookings​

List Bookings

Parameters

NameInRequiredTypeDescription
client_idqueryNo
class_idqueryNo
instructor_idqueryNoLimit to bookings for classes taught by this instructor.
location_idqueryNoLimit to bookings for classes at this location.
template_idqueryNoLimit to bookings for classes created from this class template.
start_datequeryNoOnly bookings for classes starting on or after this date.
end_datequeryNoOnly bookings for classes starting on or before this date (inclusive of the whole day, same convention as GET /api/v1/classes).
pagequeryNointeger
page_sizequeryNointeger

Responses

  • 200 — Successful Response
  • 422 — Validation Error

POST /api/v1/bookings​

Create Booking

Request body

FieldRequiredTypeDescription
scheduled_class_idYesinteger
client_idNointeger
membership_idNointeger
override_tag_checkNobooleanManager-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

FieldRequiredTypeDescription
scheduled_class_idYesinteger
client_idNointeger
override_tag_checkNobooleanManager-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

NameInRequiredTypeDescription
waitlist_idpathYesinteger

Responses

  • 200 — Successful Response
  • 422 — Validation Error

POST /api/v1/bookings/waitlist/{waitlist_id}/confirm​

Confirm Waitlist

Parameters

NameInRequiredTypeDescription
waitlist_idpathYesinteger

Request body

FieldRequiredTypeDescription
membership_idNointeger

Responses

  • 201 — Successful Response
  • 422 — Validation Error

POST /api/v1/bookings/{booking_id}/no-show​

Mark No Show

Parameters

NameInRequiredTypeDescription
booking_idpathYesinteger

Responses

  • 200 — Successful Response
  • 422 — Validation Error

GET /api/v1/bookings/{booking_id}​

Get Booking

Parameters

NameInRequiredTypeDescription
booking_idpathYesinteger

Responses

  • 200 — Successful Response
  • 422 — Validation Error

DELETE /api/v1/bookings/{booking_id}​

Cancel Booking

Parameters

NameInRequiredTypeDescription
booking_idpathYesinteger

Request body

FieldRequiredTypeDescription
reasonNostring

Responses

  • 200 — Successful Response
  • 422 — Validation Error