Developers / REST API
Reservory REST API
Supported public REST surface. All responses are JSON. CORS-enabled where indicated (anon endpoints). Mutating POSTs accept an Idempotency-Key header for safe client retries.
Tenant API keys support cancellation and check-in only on the operator routes listed here. Cancellation never refunds. Refunds and administrative actions require authorized dashboard sessions and are outside this SDK contract. GraphQL is unavailable.
Machine-readable spec: /api/openapi.json (OpenAPI 3.1, covers the public booking + payment surface). Import into Postman, Stoplight, or any SDK generator.
Auth at a glance
- anon — no auth; CORS-open; rate-limited where relevant
- signed token — HMAC token issued at booking-create or waiver-dispatch; passed as a header (
X-Booking-Token) or URL segment - operator staff+/manager+/admin+ — Supabase JWT bearer;
requireOperatorenforces the role floor server-side
Booking
/api/widget/experience?tenant=&experience=anonWidget bootstrap. Returns experience metadata and up to 40 available slots, filtered by capacity and business hours. Optional party_size must be an integer from 1 to 200; effective_party_size is at least the product minimum.
/api/bookings/holdanonAcquire a 10-minute soft hold on N seats. Rate-limited 10/min/IP.
{ slot_id, experience_id, seats }Supports Idempotency-Key header. CORS-enabled.
/api/bookingsanonConvert a hold into a booking. Returns a signed booking_token for the customer payment-intent route.
{ hold_id, slot_id, experience_id, venue_id, customer:{email,first_name,last_name?,phone?}, guest_count, notes?, tickets?, form_responses?, form_session_token?, promo_code?, gift_card_code?, addons? }Persist the key before sending. Completed identical requests replay; uncertain execution can require reconciliation. Never start another booking to bypass uncertainty.
/api/forms/checkout/[experienceId]anonRead current published forms and session_token. Server/same-origin only; upload fields use hosted checkout.
/api/embed/bookings/[id]signed tokenRead canonical booking status with X-Booking-Token. Only confirmed means booking completion.
/api/bookings/[id]/canceloperator manager+Cancel a held / payment-pending / confirmed booking. Does NOT refund.
/api/bookings/[id]/check-inoperator staff+Stamp checked_in_at + checked_in_by_user_id. Idempotent.
Payments
/api/embed/bookings/[id]/payment-intentsigned tokenCustomer-facing PI creation. Requires X-Booking-Token (HMAC issued at booking-create).
Webhook signatures
Outbound webhook deliveries include X-Reservory-Timestamp and X-Reservory-Signature: v1,<hex>. The signature is HMAC-SHA256 of `${timestamp}.${rawBody}` with your endpoint's signing secret. Reject deliveries older than 5 minutes to mitigate replay attacks.