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

# Bulk Upsert Room Overrides

> Create or update room-type overrides for a product’s lodging link in a single request.

## Method

`PATCH` `/v1/products/:id/lodging/overrides`

## Path Parameters

<ParamField path="id" type="uuid">Product ID whose room overrides should be updated.</ParamField>

## Body Parameters

<ParamField name="propertyId" type="uuid" required>Property ID tied to the lodging link.</ParamField>
<ParamField name="departureId" type="uuid">Optional departure scope for the link.</ParamField>
<ParamField name="ratePlanId" type="uuid">Optional rate plan scope for the link.</ParamField>
<ParamField name="roomOverrides" type="array" required>Array of room override objects.</ParamField>

<Expandable title="Room override object">
  <ParamField name="roomOverrides[].room_type_id" type="uuid" required>Room type ID to override.</ParamField>
  <ParamField name="roomOverrides[].name" type="string">Display name override.</ParamField>
  <ParamField name="roomOverrides[].available_count" type="integer">Override of available rooms.</ParamField>
  <ParamField name="roomOverrides[].currency" type="string" required>Pricing currency (ISO 4217).</ParamField>
  <ParamField name="roomOverrides[].amount_minor" type="integer">Price amount in minor units.</ParamField>
</Expandable>

## 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 PATCH "https://api.voyantcloud.com/v1/products/prod_123/lodging/overrides" \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "propertyId": "prop_987",
      "departureId": "dep_456",
      "roomOverrides": [
        {
          "room_type_id": "room_001",
          "name": "Deluxe Suite",
          "available_count": 5,
          "currency": "EUR",
          "amount_minor": 21900
        },
        {
          "room_type_id": "room_002",
          "currency": "EUR",
          "amount_minor": 18900
        }
      ]
    }'
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/products/prod_123/lodging/overrides", {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({
      propertyId: "prop_987",
      roomOverrides: [
        { room_type_id: "room_001", currency: "EUR", amount_minor: 21900 },
      ],
    }),
  })
  ```

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

  payload = {
    "propertyId": "prop_987",
    "ratePlanId": "rate_002",
    "roomOverrides": [
      {
        "room_type_id": "room_003",
        "name": "Family Room",
        "currency": "EUR",
        "amount_minor": 24900
      }
    ]
  }

  resp = requests.patch(
    "https://api.voyantcloud.com/v1/products/prod_123/lodging/overrides",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}"},
    json=payload,
  )
  result = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": [
      {
        "id": "plro_001",
        "room_type_id": "room_001",
        "name": "Deluxe Suite",
        "available_count": 5,
        "currency": "EUR",
        "amount_minor": 21900
      },
      {
        "id": "plro_002",
        "room_type_id": "room_002",
        "name": null,
        "available_count": null,
        "currency": "EUR",
        "amount_minor": 18900
      }
    ]
  }
  ```
</ResponseExample>

<Info>
  If the product is not yet linked to the provided property, the API creates the link automatically before applying room overrides.
</Info>
