> ## 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.

# Create Booking

> Create a new booking.

## Method

`POST` `/v1/bookings`

## Body Parameters

<ParamField path="code" type="string">Custom booking code/reference</ParamField>
<ParamField path="status" type="string">Initial status (`pending` by default)</ParamField>
<ParamField path="paymentStatus" type="string">Initial payment status</ParamField>
<ParamField path="fulfillmentStatus" type="string">Initial fulfillment status</ParamField>
<ParamField path="channel" type="string">Sales channel</ParamField>
<ParamField path="source" type="string">Source system</ParamField>
<ParamField path="currency" type="string">ISO currency (e.g. EUR)</ParamField>
<ParamField path="paxAdults" type="number">Adults count</ParamField>
<ParamField path="paxChildren" type="number">Children count</ParamField>
<ParamField path="paxInfants" type="number">Infants count</ParamField>
<ParamField path="roomsCount" type="number">Number of rooms (if applicable)</ParamField>
<ParamField path="billingPersonId" type="string">Existing person ID for billing contact ([TypeID](/concepts/identifiers) with `ppl` prefix)</ParamField>
<ParamField path="organizationId" type="string">Existing organization ID ([TypeID](/concepts/identifiers) with `org` prefix)</ParamField>
<ParamField path="observations" type="string">Public notes</ParamField>
<ParamField path="notesInternal" type="string">Internal notes</ParamField>
<ParamField path="attributes" type="object">Custom attributes</ParamField>
<ParamField path="metadata" type="object">Arbitrary metadata</ParamField>
<ParamField path="language" type="string">Preferred language</ParamField>
<ParamField path="productId" type="string" required>Product to book ([TypeID](/concepts/identifiers) with `prod` prefix)</ParamField>
<ParamField path="departureId" type="string" required>Departure to book ([TypeID](/concepts/identifiers) with `dept` prefix)</ParamField>
<ParamField path="ratePlanId" type="string">Override rate plan ([TypeID](/concepts/identifiers) with `rate` prefix)</ParamField>
<ParamField path="addons[].id" type="string">Addon product identifier ([TypeID](/concepts/identifiers) with `prad` prefix)</ParamField>
<ParamField path="addons[].quantity" type="number">Addon quantity</ParamField>
<ParamField path="rooms[].categoryKey" type="string">Room category key</ParamField>
<ParamField path="rooms[].occupancy" type="number">Occupancy per room</ParamField>
<ParamField path="rooms[].quantity" type="number">Rooms requested</ParamField>
<ParamField path="couponCode" type="string">Coupon or promotion code</ParamField>
<ParamField path="quoteId" type="string">Quote identifier issued by Voyant ([TypeID](/concepts/identifiers) with `qte` prefix)</ParamField>

## Attributes and metadata

<Tip>
  Voyant stores two JSON blobs on every booking: <strong>attributes</strong>, which the platform extends with workflow state, and <strong>metadata</strong>, which is left untouched for your own identifiers.
</Tip>

* **attributes** — send a JSON object with workspace-specific context (for example, the answers from a booking form). The booking service automatically merges in a `pricingSnapshot` that captures the quote that was used to price the booking.
* **metadata** — supply any arbitrary JSON you need to round-trip (CRM references, analytics tags, third-party payloads). Voyant never mutates this object.

```json Example theme={null}
{
  "attributes": {
    "sourceForm": {
      "version": 3,
      "submittedBy": "csr_7842",
      "customFields": {
        "preferredGuide": "GUIDE-2387",
        "requiresWheelchair": true
      }
    }
  },
  "metadata": {
    "externalReferences": {
      "salesforceOpportunityId": "OPP-0098123",
      "legacyBookingId": "BK-5567"
    },
    "utm": {
      "campaign": "summer-argentina-2025",
      "source": "newsletter"
    }
  }
}
```

<Note>
  If you omit `attributes`, Voyant still persists a `pricingSnapshot`. When you do send an object, avoid overwriting that key unless you intend to replace it.
</Note>

<Info>
  Totals are calculated on the server from the pricing payload. The booking response includes the computed subtotal, taxes, discounts, and total amount. Items and passengers are created via separate endpoints after the booking is created:

  <ul>
    <li><code>POST /v1/bookings/:id/items</code> — add items</li>
    <li><code>POST /v1/bookings/:id/passengers</code> — upsert passengers (by <code>personId</code>)</li>
  </ul>
</Info>

## Headers

<ParamField header="Authorization" type="string" required>Bearer token (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)</ParamField>
<ParamField header="content-type" type="string">application/json</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.voyantcloud.com/v1/bookings \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "currency": "EUR",
      "paxAdults": 2,
      "paxChildren": 1,
      "language": "en",
      "notesInternal": "VIP",
      "productId": "prod_01h8z3y4x2w1v0u9t8s7r6q5p4",
      "departureId": "dept_01h9xm2n3p4q5r6s7t8v9w0x1y",
      "addons": [
        { "id": "prad_01h9xm3n4p5q6r7s8t9v0w1x2y", "quantity": 1 }
      ],
      "rooms": [
        { "categoryKey": "double", "occupancy": 2, "quantity": 1 }
      ]
    }'
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/bookings", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}`, "content-type": "application/json" },
    body: JSON.stringify({
      currency: "EUR",
      paxAdults: 2,
      paxChildren: 1,
      language: "en",
      productId: "prod_01h8z3y4x2w1v0u9t8s7r6q5p4",
      departureId: "dept_01h9xm2n3p4q5r6s7t8v9w0x1y",
      rooms: [{ categoryKey: "double", occupancy: 2, quantity: 1 }],
    }),
  })
  ```

  ```python Python theme={null}
  import os, requests
  requests.post(
    "https://api.voyantcloud.com/v1/bookings",
    headers={"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}", "content-type": "application/json"},
    json={
      "currency": "EUR",
      "paxAdults": 2,
      "paxChildren": 1,
      "language": "en",
      "productId": "prod_01h8z3y4x2w1v0u9t8s7r6q5p4",
      "departureId": "dept_01h9xm2n3p4q5r6s7t8v9w0x1y",
      "addons": [{"id": "prad_01h9xm3n4p5q6r7s8t9v0w1x2y", "quantity": 1}],
    },
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "id": "book_01h9xm4n5p6q7r8s9t0v1w2x3y",
    "code": "BKG-2025-0001",
    "status": "pending"
  }
  ```
</ResponseExample>
