# Update the price calendar of a listing

`PUT /listings/{id}/price_calendar`

> Wheelhouse Pro API. Web version: https://docs.usewheelhouse.com/pro/reference/update-calendar · OpenAPI spec: https://docs.usewheelhouse.com/pro/openapi.yaml · Operation ID: `updateCalendar` · Tag: Price Calendars · Index of all docs pages: https://docs.usewheelhouse.com/llms.txt

This endpoint should be called before requesting price recommendations.
If the listing calendar is changed by our recommendations, integrators MUST
call this endpoint again to update our calendar.

## Request

`PUT https://api.usewheelhouse.com/ss_api/v1/listings/{id}/price_calendar`

Authentication: send your integration API key in the `X-Integration-API-Key` header and your user API key in the `X-User-API-Key` header (see https://docs.usewheelhouse.com/pro/authentication.md).

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The integration partner's unique listing identifier. |

### Request body (`application/json`, required)

- `price_calendars` (array of object, required): A calendar object describing pricing and availability by stay date.
  - `stay_date` (string (date), required): The date of the given price info (YYYY-MM-DD).
  - `price` (number, required): The nightly price on this day.
  - `currency` (string, required): The ISO-4217 3-letter currency code of the price.
  - `is_available` (boolean, required): Whether or not this room can be booked.
  - `min_night_stay` (integer, **deprecated**): The minimum stay applied to reservations overlapping this day.
  - `unit_name` (string, nullable): The unit name for this calendar day.
    Can be null for single-unit listings.
    Required for multi-unit (linked) listings.

### Example request

```bash
curl -X PUT 'https://api.usewheelhouse.com/ss_api/v1/listings/{id}/price_calendar' \
  -H 'X-Integration-API-Key: <your integration API key>' \
  -H 'X-User-API-Key: <your user API key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "price_calendars": [
    {
      "stay_date": "2027-03-12",
      "price": 200,
      "currency": "USD",
      "is_available": false
    },
    {
      "stay_date": "2027-03-13",
      "price": 200,
      "currency": "USD",
      "is_available": false
    },
    {
      "stay_date": "2027-03-14",
      "price": 200,
      "currency": "USD",
      "is_available": false
    },
    {
      "stay_date": "2027-03-15",
      "price": 185,
      "currency": "USD",
      "is_available": true
    },
    {
      "stay_date": "2027-03-16",
      "price": 175,
      "currency": "USD",
      "is_available": true
    }
  ]
}'
```

Path and query parameters are placeholders. The body is a complete example; replace its values with your own.

## Responses

### 200

Successfully created or updated the calendar

### 207

Partial success for multi-unit listings. Some of the provided `unit_name` values
did not match any units on the listing. Calendar entries for valid unit names were
saved; entries for invalid unit names were ignored.

Body (`application/json`): object

- `message` (string, required): Human-readable description of the partial result.
- `processed_unit_names` (array of string, required): Unit names that were successfully processed.
- `invalid_unit_names` (array of string, required): Unit names from the request that were not found on the listing.
- `valid_unit_names` (array of string, required): All valid unit names for this listing.

Example shape (generated from the schema; placeholder values, not a real response):

```json
{
  "message": "string",
  "processed_unit_names": [
    "string"
  ],
  "invalid_unit_names": [
    "string"
  ],
  "valid_unit_names": [
    "string"
  ]
}
```

### 400

Validation failed (e.g. unit_name missing for multi-unit listing, or no provided unit names match the listing at all)

### 401

API key authorization failed

### 403

Listing authorization failed

### 404

Listing not found

### 409

Another request is already in progress for this listing. Retry after the concurrent request completes.
