> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit Wizard Snapshot

> Submit a validated wizard payload for asynchronous booking orchestration.

## Method

`POST` `/v1/bookings/wizard`

## Body Parameters

<ParamField name="productId" type="uuid">Product ID associated with the booking.</ParamField>
<ParamField name="departureId" type="uuid">Departure ID being booked.</ParamField>
<ParamField name="ratePlanId" type="uuid">Optional rate plan applied to the departure.</ParamField>
<ParamField name="currency" type="string">Pricing currency (ISO 4217).</ParamField>
<ParamField name="language" type="string">Locale used for customer communications.</ParamField>
<ParamField name="paxAdults" type="integer" required>Adult passenger count (minimum `1`).</ParamField>
<ParamField name="paxChildren" type="integer">Child passenger count (defaults to `0`).</ParamField>
<ParamField name="paxInfants" type="integer">Infant passenger count (defaults to `0`).</ParamField>
<ParamField name="billing" type="object">Billing contact details (first name, last name, optional address & document fields).</ParamField>
<ParamField name="passengers" type="array">Passenger payload captured during the wizard.</ParamField>
<ParamField name="rooms" type="array">Room selection array (`categoryKey`, `occupancy`, `quantity`).</ParamField>
<ParamField name="addons" type="array">Optional add-on selections (`id`, `quantity`).</ParamField>
<ParamField name="consent" type="object">Policy acceptance information (policy ID, title, locale, timestamps).</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token (requires `bookings:write`).</ParamField>
<ParamField header="content-type" type="string">`application/json`</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.voyantcloud.com/v1/bookings/wizard" \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "productId": "prod_123",
      "departureId": "dep_456",
      "currency": "EUR",
      "language": "en",
      "paxAdults": 2,
      "rooms": [
        { "categoryKey": "double", "occupancy": 2, "quantity": 1 }
      ],
      "billing": {
        "firstName": "Alex",
        "lastName": "Rivera",
        "email": "alex@example.com"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.voyantcloud.com/v1/bookings/wizard", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({
      productId: "prod_123",
      departureId: "dep_456",
      paxAdults: 2,
      paxChildren: 1,
      addons: [{ id: "ext_wifi", quantity: 1 }]
    }),
  })
  const submission = await res.json()
  ```

  ```python Python theme={null}
  import os, requests

  payload = {
    "productId": "prod_123",
    "departureId": "dep_456",
    "paxAdults": 2,
    "paxInfants": 1,
    "currency": "USD"
  }

  resp = requests.post(
    "https://api.voyantcloud.com/v1/bookings/wizard",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json=payload,
  )
  submission = resp.json()
  ```
</RequestExample>

## Response Fields

<ResponseField name="accepted" type="boolean" required>`true` when the payload is queued for downstream processing.</ResponseField>
<ResponseField name="code" type="string" required>Opaque tracking code generated for the wizard submission.</ResponseField>

## Response Example

<ResponseExample>
  ```json 200 OK theme={null}
  { "accepted": true, "code": "2F4D9A1C" }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": "Invalid request body",
    "issues": [{ "path": "paxAdults", "message": "Required" }]
  }
  ```
</ResponseExample>

<Tip>
  This endpoint does not persist bookings immediately. Trigger.dev workflows ingest the payload (using the returned `code` or session context) to create the booking after payment confirmation.
</Tip>
