Skip to main content

Endpoints

MethodPathDescription
POST/v1/bookings/wizard/sessionCreate or update a wizard session and persist progress between steps.
GET/v1/bookings/wizard/:idRetrieve the saved wizard session payload.
POST/v1/bookings/wizard/:id/commitValidate the session and create a booking.
POST/v1/bookings/wizardSubmit a snapshot for asynchronous booking orchestration.
Wizard endpoints require workspace-scoped API keys. Read routes need bookings:read; mutations require bookings:write.

Key concepts

  • Wizard session: JSON payload stored in bookings.wizard_sessions, tracking steps (step_1step_4), passengers, rooms, add-ons, and billing.
  • Partial saves: POST /wizard/session merges payloads when id is provided, allowing clients to save after each step.
  • Commit: POST /wizard/:id/commit enforces workspace-configured billing/passenger forms and creates a draft booking, returning bookingId.
  • Async submission: POST /wizard accepts a validated snapshot (without writing to the DB) and queues downstream workflows.
  • Workspace resolution: Sessions automatically infer workspace from product/departure if not supplied in the request context.