# Create or update a batch of reservations

`PUT /listings/{id}/reservations`

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

This endpoint accepts a list of reservation objects and returns a list of processed reservation IDs.
The `unchanged` response field additionaly indicates reservations that were already present and
required no update.

### Errors

If Wheelhouse errors or otherwise fails to return the reservation IDs that were created or updated,
integrators MUST resend them after some period of time. DO NOT repeatedly call this endpoint if it is failing.

## Request

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

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)

reservations

- `reservations` (array of object `reservation`, required)
  - Each item: A reservation booked at a specific listing
  - `id` (string, required): The unique id of this reservation on this channel.
  - `start_date` (string (date), required): The first night of the booking (YYYY-MM-DD).
  - `end_date` (string (date), required): The move-out day (YYYY-MM-DD).
  - `booked_at` (string (date-time)): The datetime of when this reservation was made (ISO-8601).
  - `num_guests` (integer, required): The number of guests coming for this booking.
  - `num_included_guests` (integer, required): The number of guests included in the base price for this booking.
  - `num_adults` (integer): The number of adults coming for this booking.
  - `num_children` (integer): The number of children coming for this booking.
  - `currency` (string, required): The currency paid for this reservation.
  - `total_price` (number, required): The total price paid **by the guest**.
  - `payout_total` (number): (Recommended) The total price paid **to the host** by the channel. Equivalent to Total Revenue for the host. If not included, total revenue will be estimated.
  - `nightly_subtotal` (number, min: 0): A sum of all nightly room prices, can optionally be provided if `nightly_prices` are unavailable.
  - `nightly_prices` (array of object `nightly_price`): An array of hashes.  Each hash represents one night and will have both a 'price' and a 'date' field.
    - Each item: Represents a nightly price.
    - `price` (integer, required): The nightly price.
    - `date` (string, required): The stay date (YYYY-MM-DD).
  - `taxes` (array of object `fee`): (Recommended) A map of applicable taxes that would appear on an invoice.
    - Fields: see `fee` under Schemas.
  - `fees` (array of object `fee`): (Recommended) A map of applicable fees that would appear on an invoice.
    - Fields: see `fee` under Schemas.
  - `deposits` (array of object `fee`): A map of applicable deposits that would appear on an invoice.
    - Fields: see `fee` under Schemas.
  - `discounts` (array of object `fee`): (Recommended) A map of applicable discounts that would appear on an invoice.
    - Fields: see `fee` under Schemas.
  - `cancelled` (boolean, default: `false`): (Recommended) If the reservation is cancelled or not.
  - `cancelled_total` (number): Amount that has been currently refunded to guest due to cancellation. Do not include if the booking has not been cancelled or the amount is unknown.
  - `unit_name` (string): The identifier of the room booked. Can be omitted for non-grouped inventory.
  - `source_name` (string): The name of the channel on which this reservation was booked.
  - `confirmation_code` (string): A code to identify a reservation confirmation.
  - Requires one of: `nightly_subtotal`; or `nightly_prices`.
  - Requires one of: `booked_at`; or `cancelled` set to `true`.

### Example request

```bash
curl -X PUT 'https://api.usewheelhouse.com/ss_api/v1/listings/{id}/reservations' \
  -H 'X-Integration-API-Key: <your integration API key>' \
  -H 'X-User-API-Key: <your user API key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "reservations": [
    {
      "id": "RES-20481",
      "confirmation_code": "HM4KQ2X9TZ",
      "source_name": "Airbnb",
      "start_date": "2027-03-12",
      "end_date": "2027-03-15",
      "booked_at": "2026-11-02T14:32:00Z",
      "num_guests": 4,
      "num_included_guests": 4,
      "num_adults": 3,
      "num_children": 1,
      "currency": "USD",
      "nightly_prices": [
        {
          "date": "2027-03-12",
          "price": 200
        },
        {
          "date": "2027-03-13",
          "price": 200
        },
        {
          "date": "2027-03-14",
          "price": 200
        }
      ],
      "fees": [
        {
          "name": "Cleaning fee",
          "type": "cleaning",
          "multiplier": "PER_STAY",
          "value_type": "FIXED",
          "value": 100,
          "quantity": 1
        }
      ],
      "taxes": [
        {
          "name": "Occupancy tax",
          "type": "tax",
          "multiplier": "PER_STAY",
          "value_type": "PERCENTAGE",
          "value": 0.125,
          "quantity": 1
        }
      ],
      "total_price": 775,
      "payout_total": 679,
      "cancelled": false
    }
  ]
}'
```

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

## Responses

### 200

Successfully created or updated all reservations

Body (`application/json`): object `listOfStringsApiResponse`

Fields: see `listOfStringsApiResponse` under Schemas.

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

```json
{
  "error_messages": [
    "string"
  ],
  "api_warnings": [
    "string"
  ],
  "data": [
    "string"
  ],
  "unchanged": [
    "string"
  ],
  "failed": {
    "res-1001": [
      "end_date: must be after start_date"
    ],
    "reservations[3]": [
      "Reservation is null"
    ]
  },
  "warnings": {
    "key": [
      "string"
    ]
  }
}
```

### 207

Partial success creating or updating reservations. Either some reservations failed (see `failed`), or
some were saved but have nights outside the stay dates Wheelhouse stores calendars for, which were not
added to the calendar (see `warnings`).

Body: same as `200` above.

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

## Schemas

Shared by more than one field above.

### `fee`

Type: object `fee`

A fee associated with booking a listing.

On a reservation, Wheelhouse totals each entry as `amount × multiplier count × quantity`:

* `amount` is `value` for `FIXED`, or `value × nightly subtotal` for `PERCENTAGE`. The nightly
  subtotal is `nightly_subtotal`, or the sum of `nightly_prices` when it is missing.
* `multiplier count` comes from `multiplier`: `1` for `PER_STAY`, the number of nights for
  `PER_NIGHT`, `num_guests` for `PER_GUEST_PER_STAY`, and so on.
* `quantity` defaults to `1`.

`multiplier` already counts nights and guests, so leave `quantity` at `1`. Sending the number of
nights as `quantity` inflates the total; for a fee charged each night, use `PER_NIGHT`.

Example: a 3-night stay with a $100 cleaning fee, a $10 nightly resort fee and a 12.5% tax on
a $600 nightly subtotal ($200 a night).

```json
"fees": [
  { "name": "Cleaning", "type": "cleaning", "multiplier": "PER_STAY", "value_type": "FIXED", "value": 100, "quantity": 1 },
  { "name": "Resort fee", "type": "other", "multiplier": "PER_NIGHT", "value_type": "FIXED", "value": 10, "quantity": 1 }
],
"taxes": [
  { "name": "Occupancy tax", "type": "tax", "multiplier": "PER_STAY", "value_type": "PERCENTAGE", "value": 0.125, "quantity": 1 }
]
```

These come to $100, $30 (`10 × 3 nights`) and $75 (`0.125 × 600`).

`discounts` are always taken off the nightly subtotal, whatever the sign of `value`.

- `name` (string, required): The name of the fee/tax that will appear on line items. E.g. 'cleaning' or 'local hotel tax'.
- `type` (string, one of: `cleaning`, `extra_guest`, `deposit`, `discount`, `tax`, `withholding`, `cancellation`, `channel`, `other`): Used to classify commonly-recognized fees (Optional)
- `multiplier` (string, required, one of: `PER_STAY`, `PER_NIGHT`, `PER_GUEST_PER_STAY`, `PER_GUEST_PER_NIGHT`, `PER_EXTRA_GUEST_PER_STAY`, `PER_EXTRA_GUEST_PER_NIGHT`): What factor to use to quantify this fee/tax.
- `value_type` (string, required, one of: `FIXED`, `PERCENTAGE`): Whether `value` is a fixed amount (`FIXED`) or a share of the reservation's nightly subtotal (`PERCENTAGE`). Pair `PERCENTAGE` with `PER_STAY`; with `PER_NIGHT` the percentage is charged once per night.
- `value` (number, required): For `FIXED`, the amount per unit in the reservation's `currency` (the listing's currency on listing fees). For `PERCENTAGE`, a decimal fraction of the nightly subtotal, so 12.5% is `0.125`, not `12.5`.
- `quantity` (integer): Optional, defaults to `1`. Do not send the number of nights or guests; `multiplier` already counts them. Omit it on listing fees.

### `listOfStringsApiResponse`

Type: object `listOfStringsApiResponse`

- `error_messages` (array of string)
- `api_warnings` (array of string)
- `data` (array of string, required): List of processed reservation IDs (created or updated)
- `unchanged` (array of string, required): list of unprocessed reservation IDs (reservations were present and required no update)
- `failed` (map of string to array of string, required): hash where the key is the ID of the reservation that failed to be created or updated and the value is an array of field error messages. A `null` entry in the request has no ID, so its key is its position in the `reservations` array, e.g. `reservations[3]`
- `warnings` (map of string to array of string): hash where the key is the ID of a reservation that was saved with a caveat and the value is an array of messages, e.g. that some of its nights are outside the stored range of stay dates
