# Copy preferences from one listing to another.

`PUT /preferences/{listing_id}/copy`

> Wheelhouse Revenue Management API. Web version: https://docs.usewheelhouse.com/rm/reference/rm-copy-preferences · OpenAPI spec: https://docs.usewheelhouse.com/rm/openapi.yaml · Operation ID: `rmCopyPreferences` · Tag: Listing Preferences

Copies the preferences (and optionally custom rates) from a source listing to the target listing. **This is a destructive action** — it will overwrite the target listing's existing preferences.

The **source** listing is identified in the request body by `copy_preferences_from`. The **target** listing is identified by the `listing_id` path parameter.

## Request

`PUT https://api.usewheelhouse.com/ss_api/v1/preferences/{listing_id}/copy`

Authentication: send your RM API key in the `X-Integration-Api-Key` header (see https://docs.usewheelhouse.com/rm/authentication.md). Modifies data; read-only keys get `403 Forbidden`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `listing_id` | string | yes | The channel's unique listing identifier of the **target** listing (the one to copy preferences **to**), or its Wheelhouse listing ID when the top-level `channel` is `wheelhouse`. |

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

- `copy_custom_rates` (boolean, default: `true`): If true, also copies the source listing's custom rates to the target.
- `channel` (string, required): Channel name the **target** listing is on (see return value of the [/listings](https://docs.usewheelhouse.com/rm/reference/rm-get-listings.md) endpoint), or the literal `wheelhouse` to read the path `listing_id` as a Wheelhouse listing ID instead.
- `copy_preferences_from` (object, required): Identifies the **source** listing to copy preferences from.
  - `channel` (string): Channel name for the **source** listing (same values as elsewhere in this API, e.g. from `/listings`), or the literal `wheelhouse` to read the source `listing_id` as a Wheelhouse listing ID instead. Resolved independently of the top-level `channel`, so the source and target listing may each be identified their own way.
  - `listing_id` (string, required): The channel's unique listing identifier of the **source** listing (the listing to copy **from**), or its Wheelhouse listing ID when `copy_preferences_from.channel` is `wheelhouse`.

### Example request

```bash
curl -X PUT 'https://api.usewheelhouse.com/ss_api/v1/preferences/{listing_id}/copy' \
  -H 'X-Integration-Api-Key: <your RM API key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "channel": "string",
  "copy_preferences_from": {
    "listing_id": "string"
  }
}'
```

Only required parameters and body fields are filled in, with placeholder values. Add the optional ones you need from the lists above; some are required in combination, as their descriptions say.

## Responses

### 200

Successfully copied preferences and/or custom rates.

Body (`application/json`): object

- `warnings` (array of object `preference_warning`, each item read-only): Settings the source listing carries that the **target** listing's channel cannot act on, and which were therefore not copied. Empty when everything copied. Only settings the source actually set are considered — a value left at its default is not treated as something the copy is applying. See the [Listing Preferences](https://docs.usewheelhouse.com/rm/concepts/preferences.md) section.
  - Each item: One setting in the request that was not applied, or that has no effect on this listing.
  - `setting` (string, one of: `checkin_checkout`, `gap_night`, `min_stays`, `long_term_discounts`): The setting group the warning is about.
  - `reason` (string, one of: `not_supported_by_channel`, `partially_supported_by_channel`, `not_supported_for_multi_unit`): `not_supported_by_channel` — the channel has no such feature and everything sent for it was dropped. `partially_supported_by_channel` — the channel has the feature but accepts a narrower form than what was sent, and only the excess was dropped. `not_supported_for_multi_unit` — the setting is stored but has no effect on price, because the listing has more than one unit.
  - `message` (string): A human-readable explanation of what was ignored and why.
  - `attributes` (array of string): The request attributes this warning covers, in dot notation for nested ones (e.g. `long_term_discounts.rules.14`).

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

```json
{
  "warnings": [
    {
      "setting": "checkin_checkout",
      "reason": "not_supported_by_channel",
      "message": "string",
      "attributes": [
        "string"
      ]
    }
  ]
}
```

### 401

API key authorization failed.

### 403

Listing authorization failed, or the API key is read-only and may not be used with PUT.

### 404

Source or target listing not found.

### 406

The listing is inactive. See the **Inactive Listings** section in the overview.

Body (`application/json`): object

- `error` (string, example: `Listing '12345' is inactive`)

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

```json
{
  "error": "Listing '12345' is inactive"
}
```

### 409

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

### 422

Validation failed (e.g. source channel could not be determined).

### 429

Rate limit exceeded — the API key has sent too many requests. Wait before retrying. See the **Rate Limits** section in the overview for the recommended exponential backoff strategy.

Body (`application/json`): object

- `error` (string, example: `API token is at rate limit`)

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

```json
{
  "error": "API token is at rate limit"
}
```

## Notes for AI agents

The Wheelhouse MCP server gives agents these instructions for this operation. They apply equally when calling the API directly.

⚠️ **Requires user confirmation before calling — this is destructive.** This overwrites the target listing's entire preference set (and custom rates, if `copy_custom_rates` is true) with the source listing's settings. Before calling, state to the user: the source and target listings, and whether custom rates will also be copied. Do not call until the user has explicitly confirmed both listings and the custom-rate scope.
