Search Documentation
Search for a documentation page...
Booking Slots API
REST API endpoints for managing bookable time slots.
Booking slots are scheduled time windows attached to a product variant. The variant supplies the name, description, images and price; the slot adds when, where, how many people fit, and optional session-level details. Create the bookable product and variant first, then schedule slots against its variant id.
Capacity is managed by the platform: bookedCount increments as orders are placed and decrements on cancellations. The spotsRemaining field is derived for convenience.
Scopes: storefront:read for GET, catalog:write for POST/PATCH/DELETE. The bookings sub-resource requires orders:read.
List Booking Slots
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
startDate | string | — | Only slots starting at or after this instant (ISO 8601) |
endDate | string | — | Only slots starting at or before this instant (ISO 8601) |
status | string | — | Restrict to one status: draft, published, full, cancelled, completed |
productVariantId | string | — | Only slots for this bookable variant (UUID) |
limit | number | 100 | Slots to return (1-200) |
Response
Get Booking Slot
Returns a single slot by UUID. Returns 404 if the slot does not exist in this store.
Create Booking Slot
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
productVariantId | string | Yes | UUID of the bookable variant |
startsAt | string | Yes | When the slot begins (ISO 8601 with offset) |
endsAt | string | Yes | When the slot ends (ISO 8601 with offset); must be after startsAt |
timezone | string | No | IANA timezone (default: "UTC") |
maxCapacity | number | Yes | How many attendees fit (1–100,000) |
status | string | No | draft, published, cancelled, completed (default: "draft") |
settings | object | No | Slot-specific details (see below) |
Settings Object
| Field | Type | Description |
|---|---|---|
location | string | null | Physical address or room (max 300 chars) |
onlineUrl | string | null | Join link for a remote session |
instructor | string | null | Who runs it (max 200 chars) |
materials | string[] | What attendees should bring (max 50 items, 200 chars each) |
requirements | string | null | Prerequisites or restrictions (max 2000 chars) |
cancellationHours | number | null | Cancellation cut-off for this slot; falls back to the module default |
bufferMinutes | number | null | Gap held after this slot |
autoConfirm | boolean | null | Confirm bookings without merchant review |
Response (201)
Returns the created slot.
Errors
| Status | Condition |
|---|---|
400 | endsAt is not after startsAt |
404 | productVariantId does not reference a variant in this store |
409 | A slot already exists for that variant at that time |
Update Booking Slot
Partially updates a slot. Only the fields you send are changed. Settings fields merge: send only the settings sub-fields you are changing; null clears a field.
Request Body
All fields from Create are accepted and optional. productVariantId is changeable.
Errors
| Status | Condition |
|---|---|
400 | Merged endsAt is not after merged startsAt |
400 | maxCapacity is below the number of existing bookings |
404 | Slot not found |
Response (200)
Returns the updated slot.
Delete Booking Slot
Permanently deletes a slot. Slots with existing bookings cannot be deleted — set the status to cancelled instead to keep orders intact and stop new bookings.
Errors
| Status | Condition |
|---|---|
404 | Slot not found |
409 | Slot has existing bookings |
Response (204)
No content.
List Slot Bookings
Returns the orders booked into a slot. A booking is an order line — cancel or refund one through the Orders API and the slot's bookedCount follows. Requires the orders:read scope.