> ## 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 Accommodation Candidate

> Add a candidate property/room combination to an accommodation set.

## Method

`POST` `/v1/products/:id/accommodations/sets/:setId/items`

## Path Parameters

<ParamField path="id" type="uuid" required>Product ID.</ParamField>
<ParamField path="setId" type="uuid" required>Accommodation set ID.</ParamField>

## Body Parameters

<ParamField name="propertyProductId" type="uuid">Linked lodging product ID (nullable).</ParamField>
<ParamField name="propertyId" type="uuid">Reference to a property (nullable).</ParamField>
<ParamField name="roomTypeId" type="uuid">Room type identifier (nullable).</ParamField>
<ParamField name="ratePlanId" type="uuid">Rate plan identifier (nullable).</ParamField>
<ParamField name="board" type="string">Board basis string (nullable).</ParamField>
<ParamField name="priority" type="integer">Ordering priority (defaults to 0).</ParamField>
<ParamField name="pricingSource" type="string">Pricing source (`manual`, `provider`, etc.). Defaults to `manual`.</ParamField>
<ParamField name="pricingJson" type="object">Pricing overrides when `pricingSource` is `manual`.</ParamField>

All fields are optional; unspecified values default to `null`, `0`, or sensible defaults.

## Headers

<ParamField header="Authorization" type="string">Bearer token (requires `products: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/products/prod_123/accommodations/sets/acset_01J0D0EY7XG9ZW5P0N5T0KX6QG/items" \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "propertyProductId": "prod_property_123",
      "roomTypeId": "room_789",
      "ratePlanId": "rate_101",
      "board": "half-board",
      "priority": 1,
      "pricingSource": "manual",
      "pricingJson": { "net": 120 }
    }'
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/products/prod_123/accommodations/sets/acset_01/items", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({ propertyId: "prop_456", priority: 10 }),
  })
  ```

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

  payload = {
    "propertyProductId": "prod_property_123",
    "pricingSource": "manual",
    "pricingJson": {"gross": 150, "currency": "EUR"}
  }

  resp = requests.post(
    "https://api.voyantcloud.com/v1/products/prod_123/accommodations/sets/acset_01/items",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json=payload,
  )
  created = resp.json()
  ```
</RequestExample>

## Response Example

<ResponseExample>
  ```json 201 Created theme={null}
  { "item": { "id": "acitem_01J0D0G0T5ZTRM87X7FQ0KCY4N" } }
  ```

  ```json 500 Internal Server Error theme={null}
  { "error": "Failed to create accommodation set item" }
  ```
</ResponseExample>
