# Copy the preferences from one listing to another.

`PUT /preferences/{id}/copy`

> Wheelhouse Pro API. Web version: https://docs.usewheelhouse.com/pro/reference/copy-preferences · OpenAPI spec: https://docs.usewheelhouse.com/pro/openapi.yaml · Operation ID: `copyPreferences` · Tag: Listing Preferences · Index of all docs pages: https://docs.usewheelhouse.com/llms.txt

This endpoint can be used to copy the preferences from one listing to another. This is
useful if you have multiple listings that are very similar and you want to copy the
preferences from one listing to another, or if you are creating a listing on a new channel
and want to copy the preferences from an existing listing.

**This is a destructive action** — it overwrites the target listing's existing preferences (and optionally
custom rates when enabled).

The **target** listing is `id` in the URL. The **source** listing is identified in the
JSON body by `copy_preferences_from.listing_id` (your integration's listing ID for that
property) and optionally `copy_preferences_from.channel`. If you omit `channel`, the
channel implied by your API credentials is used; set `channel` when the source listing is on
a different channel. Custom rates can also be copied using the `copy_custom_rates` field.

## Request

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

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 for the **target** listing (the listing to copy preferences **to**). |

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

- `copy_custom_rates` (boolean, default: `true`): Whether to copy custom rates from the source listing to the target listing.
- `channel` (string): Channel name of the **target** listing. Can be omitted if you request a listing you created, but required if you request a listing from another channel. See return value of the [/listings](https://docs.usewheelhouse.com/pro/reference/get-listings.md) endpoint.
- `copy_preferences_from` (object, required): Identifies the source listing from which to copy the preferences.
  - `channel` (string): Channel name for the **source** listing in Wheelhouse's system. Omit to use the
    channel associated with your API credentials; set when the source listing is on
    a different channel.
  - `listing_id` (string, required, example: `12344`): Your integration's unique listing identifier for the **source** listing (the
    listing to copy **from**).

### Example request

```bash
curl -X PUT 'https://api.usewheelhouse.com/ss_api/v1/preferences/{id}/copy' \
  -H 'X-Integration-API-Key: <your integration API key>' \
  -H 'X-User-API-Key: <your user API key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "copy_preferences_from": {
    "listing_id": "12344"
  },
  "copy_custom_rates": false
}'
```

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

## Responses

### 200

Successfully copied preferences and/or custom rates.

Body (`application/json`): object

- `warnings` (array of object `preference_warning`, required, each item read-only): Copied settings the target listing's channel can't act on, or that have no effect on it. Empty when everything applied.
  - 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

### 404

Listing not found

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