# API Reference (/developers/api-reference)



ResytechClient [#resytechclient]

The iframe-based booking widget. Creates a full-screen overlay with the Resytech checkout UI.

Constructor [#constructor]

```typescript
const client = new ResytechClient(config: ResytechClientConfig);
```

```typescript
interface ResytechClientConfig {
  locationId: string;          // Required. Your Resytech location UUID.
  baseUrl: string;             // Required. Base URL of your booking platform.
  theme?: {
    primaryColor?: string;     // Primary theme color.
    fontFamily?: string;       // Font family override.
  };
  debug?: boolean;             // Enable console logging.
}
```

Methods [#methods]

| Method         | Signature                                                   | Description                                                                         |
| -------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `showUI`       | `showUI(options?: Partial<CheckoutRequest>): void`          | Open the checkout overlay. Optionally pre-fill activity, equipment, date, and time. |
| `close`        | `close(): void`                                             | Close the checkout overlay and clean up the iframe.                                 |
| `on`           | `on(event: string, callback: (data: any) => void): void`    | Subscribe to an event.                                                              |
| `off`          | `off(event: string, callback: (data: any) => void): void`   | Unsubscribe from an event.                                                          |
| `updateConfig` | `updateConfig(config: Partial<ResytechClientConfig>): void` | Update client configuration at runtime.                                             |
| `destroy`      | `destroy(): void`                                           | Close the overlay, remove message listeners, and clear all event subscriptions.     |

CheckoutRequest [#checkoutrequest]

Passed to `showUI()` to pre-fill booking parameters:

| Field           | Type     | Required | Description                     |
| --------------- | -------- | -------- | ------------------------------- |
| `location`      | `string` | Auto     | Location UUID (set from config) |
| `activity`      | `string` | No       | Activity UUID to pre-select     |
| `equipment`     | `string` | No       | Equipment UUID to pre-select    |
| `date`          | `string` | No       | Pre-selected date               |
| `durationMins`  | `number` | No       | Duration in minutes             |
| `timeSlotStart` | `string` | No       | Time slot start time            |
| `timeSlotEnd`   | `string` | No       | Time slot end time              |
| `timeSlotPrice` | `number` | No       | Time slot price                 |

Events [#events]

| Event               | Payload                                | Description                                      |
| ------------------- | -------------------------------------- | ------------------------------------------------ |
| `checkout:open`     | `CheckoutRequest`                      | Fired when the checkout overlay opens.           |
| `checkout:ready`    | `undefined`                            | Fired when the iframe has loaded and is visible. |
| `checkout:complete` | `{ confirmationCode, price, ...data }` | Fired when a booking is successfully completed.  |
| `checkout:close`    | `undefined`                            | Fired when the checkout overlay is closed.       |

```typescript
client.on('checkout:complete', (data) => {
  console.log('Booking confirmed:', data.confirmationCode);
});
```

Data Attributes [#data-attributes]

Add these to any HTML element to create click-to-book triggers. The `ResytechClient` automatically binds click handlers to elements with `data-resytech-activity-id` or `data-resytech-equipment-id`.

| Attribute                    | Description                                                    |
| ---------------------------- | -------------------------------------------------------------- |
| `data-resytech-activity-id`  | Activity UUID. Opens checkout pre-filtered to this activity.   |
| `data-resytech-equipment-id` | Equipment UUID. Opens checkout pre-filtered to this equipment. |
| `data-resytech-date`         | Pre-selected date.                                             |
| `data-resytech-duration`     | Duration in minutes (parsed as integer).                       |
| `data-resytech-time-start`   | Time slot start time.                                          |
| `data-resytech-time-end`     | Time slot end time.                                            |
| `data-resytech-price`        | Time slot price (parsed as float).                             |

```html
<button
  data-resytech-activity-id="abc-123"
  data-resytech-date="2025-07-04"
  data-resytech-duration="60">
  Book Now
</button>
```

***

ResytechApi [#resytechapi]

The programmatic API client. Organizes methods into controller namespaces.

Constructor [#constructor-1]

```typescript
const api = new ResytechApi(config?: Partial<ResytechApiConfig>);
```

```typescript
interface ResytechApiConfig {
  baseUrl: string;                     // Default: 'https://api.bookingui.com/v1'
  cmsBaseUrl: string;                  // Default: 'https://crm-intake.resytech.com/v1'
  debug?: boolean;                     // Default: false
  timeout?: number;                    // Default: 30000 (ms)
  headers?: Record<string, string>;    // Custom headers for all requests
}
```

Instance Methods [#instance-methods]

| Method             | Signature                                                 | Description                                                                                        |
| ------------------ | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `setAuthToken`     | `setAuthToken(token: string): void`                       | Set the Bearer token on all controllers. Called automatically after `initialization.initialize()`. |
| `clearAuthToken`   | `clearAuthToken(): void`                                  | Remove the auth token from all controllers.                                                        |
| `getAuthToken`     | `getAuthToken(): string \| null`                          | Get the current auth token.                                                                        |
| `isAuthenticated`  | `isAuthenticated(): boolean`                              | Check if an auth token is set.                                                                     |
| `setCustomHeaders` | `setCustomHeaders(headers: Record<string, string>): void` | Set custom headers on all controllers.                                                             |
| `getConfig`        | `getConfig(): ResytechApiConfig`                          | Get a copy of the current configuration.                                                           |
| `setDebug`         | `setDebug(debug: boolean): void`                          | Enable or disable debug logging on all controllers.                                                |

Controllers [#controllers]

Access methods through controller namespaces on the `ResytechApi` instance.

***

api.initialization [#apiinitialization]

| Method       | Signature                                    | Returns                           | Description                                                                                                       |
| ------------ | -------------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `initialize` | `initialize(request: InitializationRequest)` | `Promise<InitializationResponse>` | Initialize a session. Returns activities, auth token, operator info. Auto-sets auth token and blog location GUID. |

InitializationRequest [#initializationrequest]

| Field        | Type     | Required | Description               |
| ------------ | -------- | -------- | ------------------------- |
| `identifier` | `string` | No       | Unique session identifier |

InitializationResponse [#initializationresponse]

| Field              | Type                       | Description                           |
| ------------------ | -------------------------- | ------------------------------------- |
| `success`          | `boolean`                  | Whether the request succeeded         |
| `message`          | `string`                   | Response message                      |
| `statusCode`       | `number`                   | HTTP status code                      |
| `activities`       | `InitializationActivity[]` | List of activities for the location   |
| `buiAccessToken`   | `string`                   | Bearer token for subsequent API calls |
| `operator`         | `Operator`                 | Operator/company details              |
| `locationGuid`     | `string`                   | Location UUID                         |
| `checkoutSettings` | `CheckoutSettings`         | Checkout UI configuration             |
| `hasSmsWorkflow`   | `boolean`                  | Whether SMS workflows are enabled     |
| `isTestMode`       | `boolean`                  | Whether the location is in test mode  |

***

api.activity [#apiactivity]

| Method        | Signature                   | Returns                     | Description                               |
| ------------- | --------------------------- | --------------------------- | ----------------------------------------- |
| `getActivity` | `getActivity(uuid: string)` | `Promise<ActivityResponse>` | Get full details for a specific activity. |

ActivityResponse [#activityresponse]

| Field      | Type       | Description                   |
| ---------- | ---------- | ----------------------------- |
| `success`  | `boolean`  | Whether the request succeeded |
| `activity` | `Activity` | Full activity object          |

***

api.calendar [#apicalendar]

| Method                | Signature                                               | Returns                     | Description                                  |
| --------------------- | ------------------------------------------------------- | --------------------------- | -------------------------------------------- |
| `getActivityCalendar` | `getActivityCalendar(request: ActivityCalendarRequest)` | `Promise<CalendarResponse>` | Get availability calendar for an activity.   |
| `getCartCalendar`     | `getCartCalendar(request: ActivityCalendarRequest)`     | `Promise<CalendarResponse>` | Get availability calendar for items in cart. |

ActivityCalendarRequest [#activitycalendarrequest]

| Field           | Type                            | Required | Description                 |
| --------------- | ------------------------------- | -------- | --------------------------- |
| `activity`      | `string`                        | Yes      | Activity UUID               |
| `month`         | `number`                        | Yes      | Month (1-12)                |
| `year`          | `number`                        | Yes      | Year                        |
| `includePrices` | `boolean`                       | No       | Include daily pricing       |
| `duration`      | `string`                        | No       | Duration UUID filter        |
| `startTime`     | `string`                        | No       | Start time filter           |
| `equipment`     | `ClientShoppingCartEquipment[]` | No       | Equipment selection         |
| `durationMins`  | `number`                        | No       | Dynamic duration in minutes |
| `cartId`        | `string`                        | No       | Existing cart ID            |

CalendarResponse [#calendarresponse]

| Field      | Type            | Description                   |
| ---------- | --------------- | ----------------------------- |
| `success`  | `boolean`       | Whether the request succeeded |
| `calendar` | `CalendarMonth` | Calendar month data           |

***

api.timeslots [#apitimeslots]

| Method                 | Signature                                        | Returns                              | Description                                        |
| ---------------------- | ------------------------------------------------ | ------------------------------------ | -------------------------------------------------- |
| `getActivityTimeSlots` | `getActivityTimeSlots(request: TimeSlotRequest)` | `Promise<ActivityTimeSlotsResponse>` | Get time slots for a specific activity on a date.  |
| `getLocationTimeSlots` | `getLocationTimeSlots(request: TimeSlotRequest)` | `Promise<LocationTimeSlotsResponse>` | Get time slots for all activities at the location. |
| `getCartTimeSlots`     | `getCartTimeSlots(request: TimeSlotRequest)`     | `Promise<ActivityTimeSlotsResponse>` | Get time slots for items in cart.                  |

TimeSlotRequest [#timeslotrequest]

| Field               | Type                            | Required | Description                                             |
| ------------------- | ------------------------------- | -------- | ------------------------------------------------------- |
| `activity`          | `string`                        | No       | Activity UUID (recommended for activity-specific slots) |
| `date`              | `string`                        | Yes      | Date string                                             |
| `duration`          | `string`                        | No       | Duration UUID                                           |
| `durationMins`      | `number`                        | No       | Dynamic duration in minutes                             |
| `equipment`         | `ClientShoppingCartEquipment[]` | No       | Equipment selection                                     |
| `isPrivateTour`     | `boolean`                       | No       | Filter for private tour availability                    |
| `ignoreEarlyCutoff` | `boolean`                       | No       | Ignore early cutoff restrictions                        |

ActivityTimeSlotsResponse [#activitytimeslotsresponse]

| Field       | Type                 | Description                   |
| ----------- | -------------------- | ----------------------------- |
| `success`   | `boolean`            | Whether the request succeeded |
| `timeSlots` | `ActivityTimeSlot[]` | Available time slots          |

LocationTimeSlotsResponse [#locationtimeslotsresponse]

| Field     | Type                             | Description                   |
| --------- | -------------------------------- | ----------------------------- |
| `success` | `boolean`                        | Whether the request succeeded |
| `results` | `LocationAllActivityTimeSlots[]` | Slots grouped by activity     |

***

api.addon [#apiaddon]

| Method              | Signature                                              | Returns                              | Description                                                     |
| ------------------- | ------------------------------------------------------ | ------------------------------------ | --------------------------------------------------------------- |
| `getEligibleAddons` | `getEligibleAddons(request: GetEligibleAddonsRequest)` | `Promise<GetEligibleAddonsResponse>` | Get addons available for the selected activity, date, and time. |

GetEligibleAddonsRequest [#geteligibleaddonsrequest]

| Field                    | Type                            | Required | Description                 |
| ------------------------ | ------------------------------- | -------- | --------------------------- |
| `activity`               | `string`                        | Yes      | Activity UUID               |
| `date`                   | `string`                        | Yes      | Date string                 |
| `time`                   | `string`                        | Yes      | Time string                 |
| `duration`               | `string`                        | No       | Duration UUID               |
| `dynamicDurationMinutes` | `number`                        | No       | Dynamic duration in minutes |
| `equipment`              | `ClientShoppingCartEquipment[]` | No       | Equipment selection         |

GetEligibleAddonsResponse [#geteligibleaddonsresponse]

| Field     | Type              | Description                   |
| --------- | ----------------- | ----------------------------- |
| `success` | `boolean`         | Whether the request succeeded |
| `addons`  | `EligibleAddon[]` | List of eligible addons       |

***

api.cart [#apicart]

| Method                     | Signature                                                         | Returns                                       | Description                       |
| -------------------------- | ----------------------------------------------------------------- | --------------------------------------------- | --------------------------------- |
| `createOrUpdateCart`       | `createOrUpdateCart(request: CreateOrUpdateCartRequest)`          | `Promise<CreateOrUpdateShoppingCartResponse>` | Create or update a shopping cart. |
| `updateCustomer`           | `updateCustomer(request: UpdateShoppingCartCustomerRequest)`      | `Promise<ApiResponseBase>`                    | Update customer info on the cart. |
| `applyCoupon`              | `applyCoupon(request: ApplyCouponRequest)`                        | `Promise<ApplyCouponResponse>`                | Apply a coupon code.              |
| `removeCoupon`             | `removeCoupon(request?: ApplyCouponRequest)`                      | `Promise<ApplyCouponResponse>`                | Remove an applied coupon.         |
| `applyGiftCard`            | `applyGiftCard(request: ApplyGiftCardRequest)`                    | `Promise<ApplyGiftCardResponse>`              | Apply a gift card.                |
| `removeGiftCard`           | `removeGiftCard(request?: ApplyGiftCardRequest)`                  | `Promise<ApplyGiftCardResponse>`              | Remove an applied gift card.      |
| `getTripProtectionPreview` | `getTripProtectionPreview(request: TripProtectionPreviewRequest)` | `Promise<TripProtectionPreviewResponse>`      | Preview trip protection pricing.  |

CreateOrUpdateCartRequest [#createorupdatecartrequest]

| Field    | Type                 | Required | Description                    |
| -------- | -------------------- | -------- | ------------------------------ |
| `cart`   | `ClientShoppingCart` | Yes      | Cart data                      |
| `cartId` | `string`             | No       | Existing cart ID (for updates) |

ClientShoppingCart [#clientshoppingcart]

| Field                    | Type                            | Required | Description                 |
| ------------------------ | ------------------------------- | -------- | --------------------------- |
| `activity`               | `string`                        | Yes      | Activity UUID               |
| `duration`               | `string`                        | Yes      | Duration UUID               |
| `date`                   | `string`                        | Yes      | Booking date                |
| `timeSlotStart`          | `string`                        | Yes      | Time slot start             |
| `timeSlotEnd`            | `string`                        | Yes      | Time slot end               |
| `equipment`              | `ClientShoppingCartEquipment[]` | No       | Selected equipment          |
| `customer`               | `ClientShoppingCartCustomer`    | No       | Customer info               |
| `downPaymentRequested`   | `boolean`                       | No       | Request down payment option |
| `isPrivateTour`          | `boolean`                       | No       | Book as private tour        |
| `durationMins`           | `number`                        | No       | Dynamic duration in minutes |
| `tripProtectionSelected` | `boolean`                       | No       | Include trip protection     |

ClientShoppingCartEquipment [#clientshoppingcartequipment]

| Field           | Type                                 | Required | Description               |
| --------------- | ------------------------------------ | -------- | ------------------------- |
| `equipmentUuid` | `string`                             | Yes      | Equipment UUID            |
| `quantity`      | `number`                             | Yes      | Number of equipment units |
| `seats`         | `number`                             | Yes      | Number of seats/guests    |
| `addons`        | `ClientShoppingCartEquipmentAddon[]` | No       | Selected addons           |

ClientShoppingCartEquipmentAddon [#clientshoppingcartequipmentaddon]

| Field           | Type     | Required | Description           |
| --------------- | -------- | -------- | --------------------- |
| `addonUuid`     | `string` | Yes      | Addon UUID            |
| `quantity`      | `number` | Yes      | Addon quantity        |
| `equipmentUuid` | `string` | Yes      | Parent equipment UUID |

ClientShoppingCartCustomer [#clientshoppingcartcustomer]

| Field         | Type     | Required | Description        |
| ------------- | -------- | -------- | ------------------ |
| `fullName`    | `string` | No       | Customer full name |
| `email`       | `string` | No       | Customer email     |
| `countryCode` | `string` | No       | Phone country code |
| `country`     | `string` | No       | Country            |
| `phone`       | `string` | No       | Phone number       |

UpdateShoppingCartCustomerRequest [#updateshoppingcartcustomerrequest]

| Field      | Type                         | Required | Description   |
| ---------- | ---------------------------- | -------- | ------------- |
| `customer` | `ClientShoppingCartCustomer` | Yes      | Customer data |
| `cartId`   | `string`                     | No       | Cart ID       |

ApplyCouponRequest [#applycouponrequest]

| Field        | Type     | Required | Description          |
| ------------ | -------- | -------- | -------------------- |
| `couponCode` | `string` | No       | Coupon code to apply |
| `cartId`     | `string` | No       | Cart ID              |

ApplyGiftCardRequest [#applygiftcardrequest]

| Field          | Type     | Required | Description             |
| -------------- | -------- | -------- | ----------------------- |
| `giftCardCode` | `string` | No       | Gift card code to apply |
| `cartId`       | `string` | No       | Cart ID                 |

TripProtectionPreviewRequest [#tripprotectionpreviewrequest]

| Field    | Type     | Required | Description |
| -------- | -------- | -------- | ----------- |
| `cartId` | `string` | No       | Cart ID     |

CreateOrUpdateShoppingCartResponse [#createorupdateshoppingcartresponse]

| Field               | Type                         | Description                      |
| ------------------- | ---------------------------- | -------------------------------- |
| `success`           | `boolean`                    | Whether the request succeeded    |
| `errorCode`         | `ShoppingCartErrorCode`      | Error code (if failed)           |
| `cartId`            | `string`                     | Cart identifier                  |
| `removals`          | `ShoppingCartRemoval[]`      | Items removed due to constraints |
| `cart`              | `ServerShoppingCartOverview` | Cart summary                     |
| `clientSecret`      | `string`                     | Stripe client secret for payment |
| `operatorAccountId` | `string`                     | Stripe connected account ID      |

ApplyGiftCardResponse [#applygiftcardresponse]

| Field              | Type                | Description                   |
| ------------------ | ------------------- | ----------------------------- |
| `success`          | `boolean`           | Whether the request succeeded |
| `errorCode`        | `GiftCardErrorCode` | Error code (if failed)        |
| `availableBalance` | `number`            | Remaining gift card balance   |

TripProtectionPreviewResponse [#tripprotectionpreviewresponse]

| Field            | Type      | Description                          |
| ---------------- | --------- | ------------------------------------ |
| `success`        | `boolean` | Whether the request succeeded        |
| `available`      | `boolean` | Whether trip protection is available |
| `price`          | `number`  | Trip protection price                |
| `title`          | `string`  | Display title                        |
| `description`    | `string`  | Display description                  |
| `coverageType`   | `number`  | Coverage type identifier             |
| `coverageAmount` | `number`  | Coverage amount                      |

***

api.checkout [#apicheckout]

| Method     | Signature                            | Returns                     | Description                           |
| ---------- | ------------------------------------ | --------------------------- | ------------------------------------- |
| `checkout` | `checkout(request: CheckoutRequest)` | `Promise<CheckoutResponse>` | Process checkout for a shopping cart. |

CheckoutRequest [#checkoutrequest-1]

| Field                     | Type                  | Required | Description                                  |
| ------------------------- | --------------------- | -------- | -------------------------------------------- |
| `cart`                    | `ClientShoppingCart`  | Yes      | Full cart data (must include customer email) |
| `customFields`            | `CustomFieldAnswer[]` | No       | Answers to custom fields                     |
| `demographics`            | `DemographicValue[]`  | No       | Demographic selections                       |
| `stripeConfirmationToken` | `string`              | No       | Stripe confirmation token                    |
| `handledNextAction`       | `string`              | No       | Stripe next action result                    |
| `agreements`              | `string[]`            | No       | Accepted agreement UUIDs                     |
| `smsOptIn`                | `boolean`             | No       | SMS opt-in consent                           |
| `cartId`                  | `string`              | No       | Existing cart ID                             |

CustomFieldAnswer [#customfieldanswer]

| Field    | Type     | Required | Description       |
| -------- | -------- | -------- | ----------------- |
| `uuid`   | `string` | Yes      | Custom field UUID |
| `answer` | `string` | No       | Answer value      |

DemographicValue [#demographicvalue]

| Field             | Type     | Required | Description      |
| ----------------- | -------- | -------- | ---------------- |
| `demographicUuid` | `string` | Yes      | Demographic UUID |
| `uuid`            | `string` | Yes      | Value UUID       |
| `value`           | `number` | Yes      | Count/value      |

CheckoutResponse [#checkoutresponse]

| Field             | Type                                 | Description                                |
| ----------------- | ------------------------------------ | ------------------------------------------ |
| `success`         | `boolean`                            | Whether the request succeeded              |
| `cart`            | `ServerShoppingCartOverview`         | Final cart state                           |
| `cartAction`      | `CreateOrUpdateShoppingCartResponse` | Cart action result                         |
| `confirmation`    | `string`                             | Booking confirmation code                  |
| `clientSecret`    | `string`                             | Stripe client secret (if payment required) |
| `paymentIntentId` | `string`                             | Stripe payment intent ID                   |

***

api.invoice [#apiinvoice]

| Method       | Signature                                                     | Returns                       | Description          |
| ------------ | ------------------------------------------------------------- | ----------------------------- | -------------------- |
| `getInvoice` | `getInvoice(invoiceUuid: string)`                             | `Promise<GetInvoiceResponse>` | Get invoice details. |
| `payInvoice` | `payInvoice(invoiceUuid: string, request: PayInvoiceRequest)` | `Promise<PayInvoiceResponse>` | Pay an invoice.      |

PayInvoiceRequest [#payinvoicerequest]

| Field                     | Type       | Required | Description               |
| ------------------------- | ---------- | -------- | ------------------------- |
| `agreements`              | `string[]` | No       | Accepted agreement UUIDs  |
| `stripeConfirmationToken` | `string`   | No       | Stripe confirmation token |
| `handledNextAction`       | `string`   | No       | Stripe next action result |

GetInvoiceResponse [#getinvoiceresponse]

| Field      | Type                         | Description                               |
| ---------- | ---------------------------- | ----------------------------------------- |
| `success`  | `boolean`                    | Whether the request succeeded             |
| `invoice`  | `ServerInvoice`              | Invoice details (`{ uuid, dueNowCents }`) |
| `cart`     | `ServerShoppingCartOverview` | Associated cart overview                  |
| `activity` | `string`                     | Activity name                             |
| `date`     | `string`                     | Booking date                              |
| `start`    | `string`                     | Start time                                |
| `end`      | `string`                     | End time                                  |
| `endDate`  | `string`                     | End date (if multi-day)                   |

PayInvoiceResponse [#payinvoiceresponse]

| Field          | Type      | Description                   |
| -------------- | --------- | ----------------------------- |
| `success`      | `boolean` | Whether the request succeeded |
| `clientSecret` | `string`  | Stripe client secret          |
| `confirmation` | `string`  | Payment confirmation code     |

***

api.waiver [#apiwaiver]

| Method           | Signature                                           | Returns                           | Description                               |
| ---------------- | --------------------------------------------------- | --------------------------------- | ----------------------------------------- |
| `getWaiver`      | `getWaiver(locationUuid: string, waiverId: string)` | `Promise<GetWaiverResponse>`      | Get waiver definition and fields.         |
| `getReservation` | `getReservation(request: GetReservationRequest)`    | `Promise<GetReservationResponse>` | Look up a reservation for waiver signing. |
| `submitWaiver`   | `submitWaiver(request: SubmitWaiverRequest)`        | `Promise<SubmitWaiverResponse>`   | Submit a completed waiver.                |

GetReservationRequest [#getreservationrequest]

| Field   | Type     | Required | Description  |
| ------- | -------- | -------- | ------------ |
| `lid`   | `string` | Yes      | Location ID  |
| `wid`   | `string` | Yes      | Waiver ID    |
| `type`  | `string` | No       | Lookup type  |
| `value` | `string` | No       | Lookup value |

SubmitWaiverRequest [#submitwaiverrequest]

| Field                           | Type     | Required | Description            |
| ------------------------------- | -------- | -------- | ---------------------- |
| `waiverId`                      | `string` | Yes      | Waiver UUID            |
| `locationId`                    | `string` | Yes      | Location UUID          |
| `waiverName`                    | `string` | No       | Waiver name            |
| `reservationId`                 | `string` | Yes      | Reservation UUID       |
| `reservationConfirmationNumber` | `string` | Yes      | Confirmation number    |
| `fields`                        | `any[]`  | Yes      | Completed field values |
| `submittedAt`                   | `string` | Yes      | ISO timestamp          |
| `dataHash`                      | `string` | Yes      | Integrity hash         |
| `bfp`                           | `string` | Yes      | Browser fingerprint    |

GetWaiverResponse [#getwaiverresponse]

| Field     | Type      | Description                   |
| --------- | --------- | ----------------------------- |
| `success` | `boolean` | Whether the request succeeded |
| `waiver`  | `Waiver`  | Waiver definition             |

GetReservationResponse [#getreservationresponse]

| Field                | Type      | Description                   |
| -------------------- | --------- | ----------------------------- |
| `success`            | `boolean` | Whether the request succeeded |
| `id`                 | `string`  | Reservation UUID              |
| `date`               | `string`  | Booking date                  |
| `customerName`       | `string`  | Customer name                 |
| `customerEmail`      | `string`  | Customer email                |
| `customerPhone`      | `string`  | Customer phone                |
| `status`             | `string`  | Reservation status            |
| `confirmationNumber` | `string`  | Confirmation code             |

SubmitWaiverResponse [#submitwaiverresponse]

| Field                | Type      | Description                   |
| -------------------- | --------- | ----------------------------- |
| `success`            | `boolean` | Whether the request succeeded |
| `submissionId`       | `string`  | Submission UUID               |
| `submittedAt`        | `Date`    | Submission timestamp          |
| `confirmationNumber` | `string`  | Confirmation code             |

***

api.survey [#apisurvey]

| Method         | Signature                                    | Returns                            | Description                   |
| -------------- | -------------------------------------------- | ---------------------------------- | ----------------------------- |
| `getSurvey`    | `getSurvey(token: string)`                   | `Promise<GetPublicSurveyResponse>` | Get a survey by access token. |
| `submitSurvey` | `submitSurvey(request: SubmitSurveyRequest)` | `Promise<SubmitSurveyResponse>`    | Submit survey responses.      |

SubmitSurveyRequest [#submitsurveyrequest]

| Field       | Type                  | Required | Description                               |
| ----------- | --------------------- | -------- | ----------------------------------------- |
| `token`     | `string`              | No       | Survey access token                       |
| `responses` | `Record<string, any>` | No       | Question responses (keyed by question ID) |
| `name`      | `string`              | No       | Respondent name                           |
| `email`     | `string`              | No       | Respondent email                          |

GetPublicSurveyResponse [#getpublicsurveyresponse]

| Field            | Type                   | Description                   |
| ---------------- | ---------------------- | ----------------------------- |
| `success`        | `boolean`              | Whether the request succeeded |
| `survey`         | `PublicSurvey`         | Survey definition             |
| `bookingContext` | `PublicBookingContext` | Associated booking info       |
| `branding`       | `Branding`             | Operator branding             |

SubmitSurveyResponse [#submitsurveyresponse]

| Field             | Type      | Description                   |
| ----------------- | --------- | ----------------------------- |
| `success`         | `boolean` | Whether the request succeeded |
| `thankYouMessage` | `string`  | Custom thank you message      |

***

api.giftCardPurchase [#apigiftcardpurchase]

| Method        | Signature                                    | Returns                                        | Description                           |
| ------------- | -------------------------------------------- | ---------------------------------------------- | ------------------------------------- |
| `getSettings` | `getSettings()`                              | `Promise<GetGiftCardPurchaseSettingsResponse>` | Get gift card purchase configuration. |
| `purchase`    | `purchase(request: PurchaseGiftCardRequest)` | `Promise<PurchaseGiftCardResponse>`            | Purchase a gift card.                 |

PurchaseGiftCardRequest [#purchasegiftcardrequest]

| Field                       | Type     | Required | Description               |
| --------------------------- | -------- | -------- | ------------------------- |
| `amount`                    | `number` | Yes      | Gift card amount in cents |
| `purchaserName`             | `string` | No       | Purchaser name            |
| `purchaserEmail`            | `string` | No       | Purchaser email           |
| `purchaserPhone`            | `string` | No       | Purchaser phone           |
| `purchaserPhoneCountryCode` | `string` | No       | Phone country code        |
| `recipientName`             | `string` | No       | Recipient name            |
| `recipientEmail`            | `string` | No       | Recipient email           |
| `customMessage`             | `string` | No       | Gift message              |
| `stripeConfirmationToken`   | `string` | No       | Stripe confirmation token |
| `handledNextAction`         | `string` | No       | Stripe next action result |

GetGiftCardPurchaseSettingsResponse [#getgiftcardpurchasesettingsresponse]

| Field                   | Type       | Description                             |
| ----------------------- | ---------- | --------------------------------------- |
| `success`               | `boolean`  | Whether the request succeeded           |
| `isAvailable`           | `boolean`  | Whether gift card purchases are enabled |
| `allowFlatAmounts`      | `boolean`  | Whether preset amounts are available    |
| `flatAmounts`           | `number[]` | Preset amount options                   |
| `allowVariableAmounts`  | `boolean`  | Whether custom amounts are allowed      |
| `variableMinAmount`     | `number`   | Minimum custom amount                   |
| `variableMaxAmount`     | `number`   | Maximum custom amount                   |
| `requireRecipientEmail` | `boolean`  | Whether recipient email is required     |
| `allowCustomMessage`    | `boolean`  | Whether custom messages are allowed     |
| `expirationDays`        | `number`   | Days until gift card expires            |

PurchaseGiftCardResponse [#purchasegiftcardresponse]

| Field             | Type      | Description                   |
| ----------------- | --------- | ----------------------------- |
| `success`         | `boolean` | Whether the request succeeded |
| `clientSecret`    | `string`  | Stripe client secret          |
| `paymentIntentId` | `string`  | Stripe payment intent ID      |
| `giftCardCode`    | `string`  | Generated gift card code      |
| `giftCardAmount`  | `number`  | Gift card value               |
| `expiresAt`       | `Date`    | Expiration date               |
| `recipientEmail`  | `string`  | Recipient email               |

***

api.blog [#apiblog]

The blog controller uses the CMS API (`cmsBaseUrl`), not the BookingUI API. No auth token is required, but a location GUID must be set. It is set automatically after `initialization.initialize()`.

| Method               | Signature                                                                                           | Returns                                | Description                                                                |
| -------------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------- | -------------------------------------------------------------------------- |
| `getPosts`           | `getPosts(page?: number, pageSize?: number, locationGuid?: string)`                                 | `Promise<GetBlogPostListResponse>`     | Get paginated published blog posts. Default: page 1, 20 per page (max 50). |
| `getPost`            | `getPost(slug: string, locationGuid?: string)`                                                      | `Promise<GetBlogPostResponse>`         | Get a single blog post by slug (includes full content).                    |
| `getCategories`      | `getCategories(locationGuid?: string)`                                                              | `Promise<GetBlogCategoryListResponse>` | Get all blog categories.                                                   |
| `getPostsByCategory` | `getPostsByCategory(categorySlug: string, page?: number, pageSize?: number, locationGuid?: string)` | `Promise<GetBlogPostListResponse>`     | Get posts filtered by category slug.                                       |
| `setLocationGuid`    | `setLocationGuid(locationGuid: string): void`                                                       | `void`                                 | Manually set the location GUID.                                            |

GetBlogPostListResponse [#getblogpostlistresponse]

| Field        | Type         | Description                    |
| ------------ | ------------ | ------------------------------ |
| `success`    | `boolean`    | Whether the request succeeded  |
| `posts`      | `BlogPost[]` | Array of blog posts            |
| `totalCount` | `number`     | Total number of matching posts |
| `page`       | `number`     | Current page number            |
| `pageSize`   | `number`     | Items per page                 |

GetBlogPostResponse [#getblogpostresponse]

| Field     | Type       | Description                   |
| --------- | ---------- | ----------------------------- |
| `success` | `boolean`  | Whether the request succeeded |
| `post`    | `BlogPost` | Blog post with full content   |

GetBlogCategoryListResponse [#getblogcategorylistresponse]

| Field        | Type             | Description                   |
| ------------ | ---------------- | ----------------------------- |
| `success`    | `boolean`        | Whether the request succeeded |
| `categories` | `BlogCategory[]` | Array of categories           |

***

api.health [#apihealth]

| Method  | Signature | Returns            | Description                                                                        |
| ------- | --------- | ------------------ | ---------------------------------------------------------------------------------- |
| `check` | `check()` | `Promise<boolean>` | Perform a HEAD request to `/health`. Returns `true` if healthy, `false` otherwise. |

***

Data Model Types [#data-model-types]

Activity [#activity]

| Field                     | Type                             | Description                   |
| ------------------------- | -------------------------------- | ----------------------------- |
| `uuid`                    | `string`                         | Unique identifier             |
| `name`                    | `string`                         | Activity name                 |
| `basePrice`               | `number`                         | Starting price                |
| `description`             | `string`                         | Full description              |
| `cancellationPolicy`      | `string`                         | Cancellation policy text      |
| `details`                 | `string`                         | Additional details            |
| `media`                   | `Media[]`                        | Photos and videos             |
| `durations`               | `Duration[]`                     | Available durations           |
| `equipment`               | `Equipment[]`                    | Available equipment           |
| `manifest`                | `Manifest`                       | Guest limits and demographics |
| `firstAvailableDate`      | `Date`                           | Earliest bookable date        |
| `allowEquipmentMixing`    | `boolean`                        | Can mix equipment types       |
| `maxEquipmentPerBooking`  | `number`                         | Max equipment per booking     |
| `customFields`            | `CustomField[]`                  | Custom checkout fields        |
| `agreements`              | `ActivityAgreement[]`            | Required agreements           |
| `type`                    | `number`                         | Activity type identifier      |
| `allowPrivateTours`       | `boolean`                        | Supports private tours        |
| `dynamicDurationSettings` | `ActivityDynamicDurationSetting` | Dynamic duration config       |
| `scheduling`              | `ActivityScheduling`             | Scheduling restrictions       |
| `tripProtection`          | `TripProtection`                 | Trip protection config        |

InitializationActivity [#initializationactivity]

Simplified activity returned from initialization (before full activity fetch).

| Field                     | Type                             | Description             |
| ------------------------- | -------------------------------- | ----------------------- |
| `uuid`                    | `string`                         | Unique identifier       |
| `name`                    | `string`                         | Activity name           |
| `tagline`                 | `string`                         | Short tagline           |
| `description`             | `string`                         | Description             |
| `equipment`               | `Equipment[]`                    | Available equipment     |
| `media`                   | `Media[]`                        | Photos and videos       |
| `startingAtPrice`         | `number`                         | Starting price          |
| `manifest`                | `Manifest`                       | Guest limits            |
| `firstAvailableDate`      | `Date`                           | Earliest bookable date  |
| `durations`               | `Duration[]`                     | Available durations     |
| `type`                    | `number`                         | Activity type           |
| `dynamicDurationSettings` | `ActivityDynamicDurationSetting` | Dynamic duration config |

Equipment [#equipment]

| Field         | Type                  | Description           |
| ------------- | --------------------- | --------------------- |
| `uuid`        | `string`              | Unique identifier     |
| `quantity`    | `number`              | Available quantity    |
| `name`        | `string`              | Equipment name        |
| `description` | `string`              | Description           |
| `details`     | `string`              | Additional details    |
| `media`       | `Media[]`             | Photos                |
| `capacity`    | `number`              | Max capacity per unit |
| `addons`      | `Addon[]`             | Available addons      |
| `amenities`   | `Amenity[]`           | Amenities             |
| `properties`  | `EquipmentProperty[]` | Custom properties     |

Media [#media]

| Field          | Type     | Description                  |
| -------------- | -------- | ---------------------------- |
| `uuid`         | `string` | Unique identifier            |
| `order`        | `number` | Display order                |
| `type`         | `number` | Media type (0 = image, etc.) |
| `uri`          | `string` | Full-size URL                |
| `thumbnailUri` | `string` | Thumbnail URL                |

Duration [#duration]

| Field     | Type     | Description         |
| --------- | -------- | ------------------- |
| `uuid`    | `string` | Unique identifier   |
| `minutes` | `number` | Duration in minutes |

Addon [#addon]

| Field         | Type     | Description       |
| ------------- | -------- | ----------------- |
| `name`        | `string` | Addon name        |
| `description` | `string` | Description       |
| `uuid`        | `string` | Unique identifier |
| `price`       | `number` | Price             |

EligibleAddon [#eligibleaddon]

| Field         | Type     | Description        |
| ------------- | -------- | ------------------ |
| `name`        | `string` | Addon name         |
| `description` | `string` | Description        |
| `quantity`    | `number` | Available quantity |
| `mediaUri`    | `string` | Image URL          |
| `uuid`        | `string` | Unique identifier  |
| `price`       | `number` | Price              |

Amenity [#amenity]

| Field             | Type     | Description           |
| ----------------- | -------- | --------------------- |
| `id`              | `string` | Unique identifier     |
| `name`            | `string` | Amenity name          |
| `description`     | `string` | Description           |
| `iconType`        | `number` | Icon type identifier  |
| `icon`            | `string` | Icon value            |
| `assignmentCount` | `number` | Number of assignments |

EquipmentProperty [#equipmentproperty]

| Field         | Type      | Description          |
| ------------- | --------- | -------------------- |
| `id`          | `string`  | Unique identifier    |
| `name`        | `string`  | Property name        |
| `iconType`    | `number`  | Icon type identifier |
| `icon`        | `string`  | Icon value           |
| `description` | `string`  | Description          |
| `value`       | `string`  | Property value       |
| `featured`    | `boolean` | Show as featured     |

Manifest [#manifest]

| Field            | Type            | Description                  |
| ---------------- | --------------- | ---------------------------- |
| `guestLimit`     | `number`        | Maximum guests per booking   |
| `ageRestriction` | `number`        | Minimum age                  |
| `guestMinimum`   | `number`        | Minimum guests per booking   |
| `demographics`   | `Demographic[]` | Guest demographic categories |

Demographic [#demographic]

| Field         | Type     | Description                                |
| ------------- | -------- | ------------------------------------------ |
| `uuid`        | `string` | Unique identifier                          |
| `title`       | `string` | Display title (e.g., "Adults", "Children") |
| `description` | `string` | Description                                |

Operator [#operator]

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| `uuid`              | `string` | Unique identifier |
| `companyName`       | `string` | Company name      |
| `locationName`      | `string` | Location name     |
| `addressLine1`      | `string` | Street address    |
| `addressLine2`      | `string` | Address line 2    |
| `city`              | `string` | City              |
| `state`             | `string` | State/province    |
| `postalCode`        | `string` | ZIP/postal code   |
| `operatorAccountId` | `string` | Stripe account ID |
| `contactEmail`      | `string` | Contact email     |
| `contactPhone`      | `string` | Contact phone     |
| `website`           | `string` | Website URL       |

CalendarMonth [#calendarmonth]

| Field   | Type                    | Description             |
| ------- | ----------------------- | ----------------------- |
| `month` | `number`                | Month (1-12)            |
| `year`  | `number`                | Year                    |
| `days`  | `ActivityCalendarDay[]` | Day-by-day availability |

ActivityCalendarDay [#activitycalendarday]

| Field              | Type      | Description                        |
| ------------------ | --------- | ---------------------------------- |
| `date`             | `string`  | Date string                        |
| `isAvailable`      | `boolean` | Whether the date has availability  |
| `price`            | `number`  | Price (if `includePrices` was set) |
| `isEstimatedPrice` | `boolean` | Whether the price is an estimate   |
| `blackoutMessage`  | `string`  | Reason for unavailability          |

ActivityTimeSlot [#activitytimeslot]

| Field                | Type      | Description                          |
| -------------------- | --------- | ------------------------------------ |
| `price`              | `number`  | Slot price                           |
| `remainingSeats`     | `number`  | Seats still available                |
| `canBookPrivateTour` | `boolean` | Private tour available for this slot |

LocationAllActivityTimeSlots [#locationallactivitytimeslots]

| Field               | Type                 | Description                 |
| ------------------- | -------------------- | --------------------------- |
| `uuid`              | `string`             | Activity UUID               |
| `slots`             | `ActivityTimeSlot[]` | Available slots             |
| `nextAvailableDate` | `string`             | Next date with availability |

ServerShoppingCartOverview [#servershoppingcartoverview]

| Field                    | Type                            | Description                 |
| ------------------------ | ------------------------------- | --------------------------- |
| `fees`                   | `Fee[]`                         | Taxes and fees              |
| `lineItems`              | `CartLineItem[]`                | Line items                  |
| `subtotal`               | `number`                        | Subtotal                    |
| `total`                  | `number`                        | Total                       |
| `feesTotal`              | `number`                        | Total fees                  |
| `discountTotal`          | `number`                        | Total discounts             |
| `paid`                   | `number`                        | Amount already paid         |
| `balance`                | `number`                        | Remaining balance           |
| `couponCode`             | `string`                        | Applied coupon code         |
| `giftCardCode`           | `string`                        | Applied gift card code      |
| `giftCardAmountApplied`  | `number`                        | Gift card amount used       |
| `giftCardBalance`        | `number`                        | Remaining gift card balance |
| `dueNow`                 | `number`                        | Amount due now              |
| `dueLater`               | `number`                        | Amount due later            |
| `tripProtectionSelected` | `boolean`                       | Trip protection included    |
| `tripProtectionPrice`    | `number`                        | Trip protection price       |
| `equipment`              | `ServerShoppingCartEquipment[]` | Equipment in cart           |

Fee [#fee]

| Field    | Type               | Description      |
| -------- | ------------------ | ---------------- |
| `amount` | `number`           | Fee amount       |
| `uuid`   | `string`           | Fee UUID         |
| `name`   | `string`           | Fee name         |
| `type`   | `TaxesAndFeesType` | 0 = Tax, 1 = Fee |

CartLineItem [#cartlineitem]

| Field   | Type     | Description     |
| ------- | -------- | --------------- |
| `name`  | `string` | Line item name  |
| `price` | `number` | Line item price |
| `type`  | `string` | Line item type  |

ShoppingCartRemoval [#shoppingcartremoval]

| Field         | Type                      | Description               |
| ------------- | ------------------------- | ------------------------- |
| `type`        | `ShoppingCartRemovalType` | Removal reason code (0-9) |
| `uuid`        | `string`                  | Removed item UUID         |
| `maxQuantity` | `number`                  | Maximum allowed quantity  |

ServerInvoice [#serverinvoice]

| Field         | Type     | Description         |
| ------------- | -------- | ------------------- |
| `uuid`        | `string` | Invoice UUID        |
| `dueNowCents` | `number` | Amount due in cents |

Waiver [#waiver]

| Field             | Type          | Description                 |
| ----------------- | ------------- | --------------------------- |
| `id`              | `string`      | Waiver UUID                 |
| `name`            | `string`      | Waiver name                 |
| `fields`          | `any`         | Field definitions           |
| `contactEmail`    | `string`      | Contact email               |
| `logoUri`         | `string`      | Logo image URL              |
| `appendLogo`      | `boolean`     | Show logo on waiver         |
| `requiresBooking` | `boolean`     | Requires reservation lookup |
| `theme`           | `WaiverTheme` | Color theme                 |

WaiverTheme [#waivertheme]

| Field        | Type     | Description      |
| ------------ | -------- | ---------------- |
| `primary`    | `string` | Primary color    |
| `secondary`  | `string` | Secondary color  |
| `accent`     | `string` | Accent color     |
| `background` | `string` | Background color |
| `paper`      | `string` | Paper/card color |
| `text`       | `string` | Text color       |
| `textMuted`  | `string` | Muted text color |
| `border`     | `string` | Border color     |
| `error`      | `string` | Error color      |
| `success`    | `string` | Success color    |
| `warning`    | `string` | Warning color    |

CustomField [#customfield]

| Field      | Type      | Description                   |
| ---------- | --------- | ----------------------------- |
| `uuid`     | `string`  | Unique identifier             |
| `type`     | `number`  | Field type identifier         |
| `label`    | `string`  | Display label                 |
| `required` | `boolean` | Whether the field is required |

ActivityAgreement [#activityagreement]

| Field      | Type      | Description         |
| ---------- | --------- | ------------------- |
| `uuid`     | `string`  | Unique identifier   |
| `title`    | `string`  | Agreement title     |
| `body`     | `string`  | Agreement body text |
| `required` | `boolean` | Must be accepted    |
| `enabled`  | `boolean` | Currently active    |

ActivityDynamicDurationSetting [#activitydynamicdurationsetting]

| Field              | Type      | Description                   |
| ------------------ | --------- | ----------------------------- |
| `enabled`          | `boolean` | Dynamic duration enabled      |
| `minimumHours`     | `number`  | Minimum bookable hours        |
| `maximumHours`     | `number`  | Maximum bookable hours        |
| `incrementMinutes` | `number`  | Duration increment in minutes |
| `baseHourlyRate`   | `number`  | Hourly rate                   |
| `createdAt`        | `Date`    | Created timestamp             |
| `updatedAt`        | `Date`    | Updated timestamp             |

ActivityScheduling [#activityscheduling]

| Field              | Type            | Description                        |
| ------------------ | --------------- | ---------------------------------- |
| `dateType`         | `number`        | Scheduling type identifier         |
| `dateRange`        | `DateOnlyRange` | Available date range               |
| `specificDates`    | `string[]`      | Specific available dates           |
| `earlyCutoffValue` | `number`        | Early cutoff value                 |
| `futureCutoffDays` | `number`        | How far ahead bookings are allowed |
| `earlyCutoffType`  | `number`        | Early cutoff type identifier       |

DateOnlyRange [#dateonlyrange]

| Field                   | Type      | Description        |
| ----------------------- | --------- | ------------------ |
| `lowerBound`            | `string`  | Start date         |
| `upperBound`            | `string`  | End date           |
| `lowerBoundIsInclusive` | `boolean` | Start is inclusive |
| `upperBoundIsInclusive` | `boolean` | End is inclusive   |
| `lowerBoundInfinite`    | `boolean` | No start boundary  |
| `upperBoundInfinite`    | `boolean` | No end boundary    |
| `isEmpty`               | `boolean` | Range is empty     |

TripProtection [#tripprotection]

| Field               | Type      | Description              |
| ------------------- | --------- | ------------------------ |
| `enabled`           | `boolean` | Trip protection enabled  |
| `pricingType`       | `number`  | Pricing type identifier  |
| `flatAmount`        | `number`  | Flat price amount        |
| `percentAmount`     | `number`  | Percentage amount        |
| `coverageType`      | `number`  | Coverage type identifier |
| `coverageAmount`    | `number`  | Coverage amount          |
| `customTitle`       | `string`  | Custom display title     |
| `customDescription` | `string`  | Custom description       |

BlogPost [#blogpost]

| Field                       | Type             | Description                                |
| --------------------------- | ---------------- | ------------------------------------------ |
| `uuid`                      | `string`         | Unique identifier                          |
| `title`                     | `string`         | Post title                                 |
| `slug`                      | `string`         | URL-friendly identifier                    |
| `excerpt`                   | `string`         | Short excerpt                              |
| `content`                   | `string \| null` | Full JSON content (version 2 block format) |
| `featuredImageUri`          | `string`         | Featured image URL                         |
| `featuredImageThumbnailUri` | `string`         | Featured image thumbnail URL               |
| `status`                    | `string`         | Publication status                         |
| `metaTitle`                 | `string \| null` | SEO meta title                             |
| `metaDescription`           | `string \| null` | SEO meta description                       |
| `author`                    | `string`         | Author name                                |
| `publishedAt`               | `Date \| null`   | Publication date                           |
| `createdAt`                 | `Date`           | Created timestamp                          |
| `updatedAt`                 | `Date`           | Last updated timestamp                     |
| `categories`                | `BlogCategory[]` | Assigned categories                        |

BlogCategory [#blogcategory]

| Field         | Type     | Description             |
| ------------- | -------- | ----------------------- |
| `uuid`        | `string` | Unique identifier       |
| `name`        | `string` | Category name           |
| `slug`        | `string` | URL-friendly identifier |
| `description` | `string` | Category description    |
| `createdAt`   | `Date`   | Created timestamp       |

PublicSurvey [#publicsurvey]

| Field             | Type               | Description                    |
| ----------------- | ------------------ | ------------------------------ |
| `id`              | `string`           | Survey ID                      |
| `name`            | `string`           | Survey name                    |
| `description`     | `string`           | Survey description             |
| `questions`       | `SurveyQuestion[]` | Survey questions               |
| `thankYouMessage` | `string`           | Message shown after submission |

SurveyQuestion [#surveyquestion]

| Field      | Type                     | Description                                |
| ---------- | ------------------------ | ------------------------------------------ |
| `id`       | `string`                 | Question ID                                |
| `type`     | `string`                 | Question type (text, rating, choice, etc.) |
| `label`    | `string`                 | Question text                              |
| `required` | `boolean`                | Whether the question is required           |
| `order`    | `number`                 | Display order                              |
| `maxStars` | `number`                 | Max stars for rating questions             |
| `options`  | `SurveyQuestionOption[]` | Options for choice questions               |

SurveyQuestionOption [#surveyquestionoption]

| Field   | Type     | Description   |
| ------- | -------- | ------------- |
| `id`    | `string` | Option ID     |
| `label` | `string` | Option text   |
| `order` | `number` | Display order |

PublicBookingContext [#publicbookingcontext]

| Field              | Type     | Description               |
| ------------------ | -------- | ------------------------- |
| `customerName`     | `string` | Customer name             |
| `customerEmail`    | `string` | Customer email            |
| `confirmationCode` | `string` | Booking confirmation code |
| `bookingDate`      | `string` | Booking date              |

Branding [#branding]

| Field                 | Type     | Description           |
| --------------------- | -------- | --------------------- |
| `companyName`         | `string` | Company name          |
| `logoUrl`             | `string` | Logo URL              |
| `locationName`        | `string` | Location name         |
| `primaryColor`        | `string` | Primary color         |
| `secondaryColor`      | `string` | Secondary color       |
| `accentColor`         | `string` | Accent color          |
| `backgroundColor`     | `string` | Background color      |
| `cardBackgroundColor` | `string` | Card background color |
| `cardTextColor`       | `string` | Card text color       |
| `headerTextColor`     | `string` | Header text color     |

CheckoutSettings [#checkoutsettings]

| Field                         | Type                      | Description                      |
| ----------------------------- | ------------------------- | -------------------------------- |
| `pageTitle`                   | `string`                  | Page title                       |
| `returnUrl`                   | `string`                  | Post-checkout redirect URL       |
| `successMessage`              | `string`                  | Success message                  |
| `showActivitySelector`        | `boolean`                 | Show activity selector           |
| `autoRedirectToFirstActivity` | `boolean`                 | Auto-redirect if single activity |
| `allowGuestCheckout`          | `boolean`                 | Allow guest checkout             |
| `autoSelectSingleEquipment`   | `boolean`                 | Auto-select if single equipment  |
| `durationTitleText`           | `string`                  | Duration step title              |
| `dateTitleText`               | `string`                  | Date step title                  |
| `timeSlotTitleText`           | `string`                  | Time slot step title             |
| `popupWindowTitle`            | `string`                  | Popup window title               |
| `activityPageTheme`           | `ActivityPageThemeConfig` | Activity page theme              |
| `customCss`                   | `string`                  | Custom CSS                       |
| `customJavaScript`            | `string`                  | Custom JavaScript                |
| `purchaseCompleteJavaScript`  | `string`                  | Post-purchase JavaScript         |
| `gaTrackingId`                | `string`                  | Google Analytics ID              |
| `fbPixelId`                   | `string`                  | Facebook Pixel ID                |
| `activitiesCustomOrder`       | `ActivityOrderItem[]`     | Custom activity ordering         |
| `equipmentCustomOrder`        | `EquipmentOrderItem[]`    | Custom equipment ordering        |

***

Enum Types [#enum-types]

ShoppingCartErrorCode [#shoppingcarterrorcode]

| Value | Name                      | Description                          |
| ----- | ------------------------- | ------------------------------------ |
| `0`   | None                      | No error                             |
| `1`   | ActivityNotFound          | Activity does not exist              |
| `2`   | EquipmentNotFound         | Equipment does not exist             |
| `3`   | DurationNotFound          | Duration does not exist              |
| `4`   | TimeSlotNotAvailable      | Selected time slot is unavailable    |
| `5`   | EquipmentNotAvailable     | Equipment is not available           |
| `6`   | EquipmentQuantityExceeded | Requested quantity exceeds available |
| `7`   | SeatLimitExceeded         | Seat limit exceeded                  |
| `8`   | GuestMinimumNotMet        | Minimum guest count not met          |
| `9`   | GuestLimitExceeded        | Maximum guest count exceeded         |
| `10`  | AddonNotFound             | Addon does not exist                 |
| `11`  | AddonNotAvailable         | Addon is not available               |
| `12`  | AddonQuantityExceeded     | Addon quantity exceeded              |
| `13`  | InvalidDate               | Invalid booking date                 |
| `14`  | DateNotAvailable          | Date is not available                |
| `15`  | InvalidDuration           | Invalid duration selection           |
| `16`  | InvalidTimeSlot           | Invalid time slot                    |
| `17`  | CustomerRequired          | Customer information required        |
| `18`  | InvalidCustomer           | Invalid customer data                |
| `19`  | CartExpired               | Cart session has expired             |
| `20`  | CartNotFound              | Cart does not exist                  |
| `21`  | PaymentFailed             | Payment processing failed            |
| `22`  | CouponInvalid             | Coupon code is invalid               |
| `23`  | CouponExpired             | Coupon has expired                   |
| `24`  | GeneralError              | Unspecified error                    |

GiftCardErrorCode [#giftcarderrorcode]

| Value | Name                | Description                               |
| ----- | ------------------- | ----------------------------------------- |
| `0`   | None                | No error                                  |
| `1`   | InvalidCode         | Gift card code is invalid                 |
| `2`   | Expired             | Gift card has expired                     |
| `3`   | NoBalance           | Gift card has no remaining balance        |
| `4`   | InsufficientBalance | Gift card balance is too low              |
| `5`   | AlreadyApplied      | Gift card is already applied              |
| `6`   | NotFound            | Gift card not found                       |
| `7`   | Disabled            | Gift cards are disabled                   |
| `8`   | LocationMismatch    | Gift card belongs to a different location |
| `9`   | GeneralError        | Unspecified error                         |

ShoppingCartRemovalType [#shoppingcartremovaltype]

| Value | Name                     | Description                       |
| ----- | ------------------------ | --------------------------------- |
| `0`   | None                     | No removal                        |
| `1`   | EquipmentUnavailable     | Equipment no longer available     |
| `2`   | EquipmentQuantityReduced | Quantity reduced to max available |
| `3`   | AddonUnavailable         | Addon no longer available         |
| `4`   | AddonQuantityReduced     | Addon quantity reduced            |
| `5`   | SeatReduction            | Seats reduced to max available    |
| `6`   | DurationUnavailable      | Duration no longer available      |
| `7`   | TimeSlotUnavailable      | Time slot no longer available     |
| `8`   | DateUnavailable          | Date no longer available          |
| `9`   | ActivityUnavailable      | Activity no longer available      |

TaxesAndFeesType [#taxesandfeestype]

| Value | Name | Description   |
| ----- | ---- | ------------- |
| `0`   | Tax  | Tax line item |
| `1`   | Fee  | Fee line item |

ApiResponseBase [#apiresponsebase]

All API responses extend this base interface:

```typescript
interface ApiResponseBase {
  success: boolean;        // Whether the request succeeded
  message: string;         // Human-readable message
  statusCode: number;      // HTTP status code (0 for network errors)
  action: string;          // API endpoint/action
  isNetworkError: boolean; // True if the error was a network/timeout issue
}
```
