# Preview price recommendations with custom preferences

`POST /preferences/{id}/preview`

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

Returns price recommendations as if the provided preferences were applied to the listing, without saving
any changes. You can use this endpoint to preview what recommendations would look like with different
preference settings before applying them.
The response format is identical to the GET /listings/{id}/price_recommendations
endpoint, with the exception of the global_min_stay and automatic_rate_posting_enabled
fields, which are not included in the preview response.

This is useful for testing different preference configurations or showing users
what their pricing would look like with different settings.

## Request

`POST https://api.usewheelhouse.com/ss_api/v1/preferences/{id}/preview`

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

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `attribution` | boolean | no | Whether or not you want to receive a detailed attribution for each day. The attribution will break a daily recommendation down into contributing prices like seasonality, local events, etc. and activate all `attr_` response values. (default: `false`) |

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

An object representing the preferences to preview.

The pricing preferences to set for a listing. All fields are optional; only provided fields will be updated (same semantics as the Revenue Management API `listing_preference_request`).

- `price_model` (string, one of: `current`, `opt_in`): The price model version to use. `current` is the model the listing gets without a pick of its own. `opt_in` is the opt-in model, and returns `400` when there are several; pass `price_model_id` instead. With no opt-in model, `opt_in` uses the model the listing is on, as does omitting the parameter.
- `price_model_id` (integer): The ID of a price model to use, instead of `price_model`, from [GET /price_models](https://docs.usewheelhouse.com/pro/reference/get-price-models.md). It must be one the listing can use and that has run for the listing's market, or the request returns `400`.
- Plus every field of [`listing_preference_request`](https://docs.usewheelhouse.com/pro/reference/schemas/listing_preference_request.md).

### Example request

```bash
curl -X POST 'https://api.usewheelhouse.com/ss_api/v1/preferences/{id}/preview' \
  -H 'X-Integration-API-Key: <your integration API key>' \
  -H 'X-User-API-Key: <your user API key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "base_price": 220,
  "weekly_discount": 10,
  "last_minute_discount": {
    "type": "AGG"
  },
  "minimum_price_rules": [
    {
      "type": "global",
      "value": 120
    },
    {
      "type": "custom",
      "start_date": "2027-07-01",
      "end_date": "2027-07-05",
      "value": 300
    }
  ]
}'
```

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

## Responses

### 201

Successfully generated preview recommendations

Body (`application/json`): object

- `data` (array of object, required): Daily price recommendations based on the provided preferences.
  - `min_price` (integer, required, nullable): The minimum nightly price applied to this day, or `null` when none applies.
  - `min_stay` (integer, nullable): The minimum stay applied to reservations overlapping this day. Omitted unless the preferences configure min stays, and `null` on days no minimum stay rule covers.
  - `stay_date` (string (date), required): The date of the given price info (YYYY-MM-DD).
  - `price` (number, required): The recommended nightly price for this day.
  - `currency` (string, required): The ISO-4217 3-letter currency code of the price.
  - `custom_type` (string, required, nullable): Reflects if this price is based on a custom rate from the user. `null` means this is the Wheelhouse recommendation, otherwise it can be one of `fixed` (i.e. a fixed custom price) or `adjusted` (i.e. a percentage adjustment to the Wheelhouse recommendation).
  - `attr_seasonality` (integer): The seasonality attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_local_demand` (integer): The local demand attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_availability` (integer): The availability/gap night attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_time` (integer): The time-based attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_custom_weekend` (integer): The custom weekend attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_scarcity` (integer): The scarcity attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_occupancy_pacing` (integer): The occupancy pacing attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_revenue_pacing` (integer): The revenue pacing attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_market_health_barometer` (integer): The market health barometer attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_historical_anchoring` (integer): The historical anchoring attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_restriction` (integer): The restriction attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `attr_user_adjustment` (integer): The user adjustment attribution of the recommended price. Only present if `attribution` query parameter is set to `true`.
  - `historical_anchor_date` (string (date)): The earlier date whose price historical anchoring held this date's recommendation up to. Only present if `attribution` query parameter is set to `true` and historical anchoring raised this date's price.
  - `historical_anchor_pct` (number): The historical anchoring percentage in effect for this date. Present with `historical_anchor_date`.
  - `historical_anchor_price` (integer): The price on `historical_anchor_date` that anchoring weighed in, in this response's `currency`. Present with `historical_anchor_date`.
  - `historical_anchor_source` (string, one of: `observed`, `posted`): Where `historical_anchor_price` comes from, `observed` or `posted`. Present with `historical_anchor_date`.
- `base_price` (number, required): The current base price for the listing.
- `base_price_recommended` (number, required): The recommended base price (anchored base price).
- `base_price_conservative` (number, required): A conservative base price option (90% of recommended).
- `base_price_aggressive` (number, required): An aggressive base price option (110% of recommended).
- `warnings` (array of object `preference_warning`, required, each item read-only): Settings in the request the listing's channel can't act on, or that have no effect on this listing. Empty when everything applies.
  - 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`).
- `supported_settings` (object `supported_settings`, required, read-only): Which listing preference settings this listing's channel can act on. A setting reported `false` is discarded on write rather than posted to the channel, so check this before sending it. Reflects any per-account early access, so two listings on the same channel can differ.
  - `checkin_checkout` (boolean): Whether `checkin_checkout` rules can be set.
  - `min_stays` (boolean): Whether minimum stay settings (`min_min_stay`, `min_stays_enabled`, `minimum_stay_rules`) can be set.
  - `long_term_discounts` (boolean): Whether long-term discounts (`long_term_discounts`, `weekly_discount`, `monthly_discount`) can be set at all.
  - `long_term_discount_type` (string, one of: `disabled`, `simple`, `rules`, `complex`): The form of long-term discount the channel accepts. `disabled` takes none; `simple` stores only flat `weekly_discount` and `monthly_discount` values: global 7 and 28 night rules in a `rules` object are converted into those two values, and any other rule is dropped; `rules` additionally takes the 7 and 28 night tiers; `complex` takes arbitrary tiers.

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

```json
{
  "data": [
    {
      "min_price": 0,
      "min_stay": 0,
      "stay_date": "2026-01-01",
      "price": 0,
      "currency": "string",
      "custom_type": "string",
      "attr_seasonality": 0,
      "attr_local_demand": 0,
      "attr_availability": 0,
      "attr_time": 0,
      "attr_custom_weekend": 0,
      "attr_scarcity": 0,
      "attr_occupancy_pacing": 0,
      "attr_revenue_pacing": 0,
      "attr_market_health_barometer": 0,
      "attr_historical_anchoring": 0,
      "attr_restriction": 0,
      "attr_user_adjustment": 0,
      "historical_anchor_date": "2026-01-01",
      "historical_anchor_pct": 0,
      "historical_anchor_price": 0,
      "historical_anchor_source": "observed"
    }
  ],
  "base_price": 0,
  "base_price_recommended": 0,
  "base_price_conservative": 0,
  "base_price_aggressive": 0,
  "warnings": [
    {
      "setting": "checkin_checkout",
      "reason": "not_supported_by_channel",
      "message": "string",
      "attributes": [
        "string"
      ]
    }
  ],
  "supported_settings": {
    "checkin_checkout": true,
    "min_stays": true,
    "long_term_discounts": true,
    "long_term_discount_type": "disabled"
  }
}
```

### 400

A setting in the request has the wrong shape; the message names the field.

### 401

API key authorization failed

### 403

Listing authorization failed

### 404

Listing not found

### 422

Listing not covered by a market
