# Get market metric distributions for a month.

`GET /market_report/{market_id}/distribution`

> Wheelhouse Revenue Management API. Web version: https://docs.usewheelhouse.com/rm/reference/rm-get-market-distribution · OpenAPI spec: https://docs.usewheelhouse.com/rm/openapi.yaml · Operation ID: `rmGetMarketDistribution` · Tag: Market Reports

Returns histogram distributions for one or more market-level metrics for a given calendar month. RM API users can only access markets in which they have at least one Pro tier listing.

Available metrics: `occupancy`, `occupancy_adjusted`, `asking_rate_w_fees`, `adr_w_fees`, `lead_time`, `revpar_adjusted_w_fees`, `revpar_w_fees`, `length_of_stay`.

## Request

`GET https://api.usewheelhouse.com/ss_api/v1/market_report/{market_id}/distribution`

Authentication: send your RM API key in the `X-Integration-Api-Key` header (see https://docs.usewheelhouse.com/rm/authentication.md). Read-only keys can call this endpoint.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `market_id` | integer | yes | The Wheelhouse internal market ID (from `GET /market_report`). |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `metric` | array of string | no | Metrics to include. Defaults to all metrics. Send more than one in brackets (`?metric[]=asking_rate_w_fees&metric[]=occupancy`); a key repeated without brackets keeps only its last value. (each item one of: `occupancy`, `occupancy_adjusted`, `asking_rate_w_fees`, `adr_w_fees`, `lead_time`, `revpar_adjusted_w_fees`, `revpar_w_fees`, `length_of_stay`) |
| `month` | string (date) | no | The month to retrieve distributions for (YYYY-MM-DD or YYYY-MM, e.g. `2026-05-01` or `2026-05`). Defaults to the start of the current month. (example: `2026-05-01`) |
| `performance` | string | no | Filter to a performance tier. Omit to include all tiers. (one of: `low`, `average`, `high`) |
| `bedrooms` | string | no | Filter to this bedroom group. Omit to include all bedroom counts. Which groups a market is broken down by depends on the listings in it, so they differ from market to market: a market with many larger listings is broken down further (`0`, `1`, `2`, `3`, `4`, `5`, `6+`) than one without them (`0`, `1`, `2+`). Read a market's groups from `GET /market_report/{market_id}/bedroom_groups` rather than assuming a fixed set. A group the market has no data for is rejected, and the error names the groups it does have. The top group holds every listing with at least that many bedrooms. A request for a top group is answered from the exact bedroom count it names where the market is broken down past it, so `4+` returns the 4 bedroom group in a market broken down into `4`, `5` and `6+`.  (pattern: `^\d{1,2}\+?$`, example: `2`) |
| `property_type` | string | no | Filter to a property type. Omit to include all property types. (one of: `apartment`, `bnb`, `boat`, `bus`, `cabin`, `camper`, `camping`, `castle`, `holiday_home`, `hostel`, `hotel`, `house`, `houseboat`, `island`, `mill`, `other`, `room`, `shared`, `tower`) |

### Example request

```bash
curl -X GET 'https://api.usewheelhouse.com/ss_api/v1/market_report/{market_id}/distribution' \
  -H 'X-Integration-Api-Key: <your RM API key>'
```

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

Market metric distributions for the month.

Body (`application/json`): object

- `currency` (string): ISO-4217 currency code for monetary metrics.
- `month` (string (date)): The start of the month these distributions cover (YYYY-MM-DD).
- `updated_at` (string, example: `2026-08-30 04:17:22 UTC`): When the underlying market report was last generated, as a timestamp with a time zone abbreviation rather than ISO-8601.
- `data` (map of string to array of object): Distribution buckets keyed by metric name. Each metric maps to an array of histogram
  buckets sorted by probability descending.
  - `bucket_min_incl` (number): Inclusive lower bound of the bucket.
  - `bucket_max_excl` (number): Exclusive upper bound of the bucket.
  - `probability` (number): Fraction of observations in this bucket (0–1).
  - `percentile` (number): Cumulative probability up to and including this bucket (0–1).

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

```json
{
  "currency": "string",
  "month": "2026-01-01",
  "updated_at": "2026-08-30 04:17:22 UTC",
  "data": {
    "key": [
      {
        "bucket_min_incl": 0,
        "bucket_max_excl": 0,
        "probability": 0,
        "percentile": 0
      }
    ]
  }
}
```

### 204

Not enough data for the requested parameters.

### 400

Invalid parameter value (e.g. month out of range, or a `bedrooms` group this market is not broken down by).

### 401

API key authorization failed.

### 404

Market not found or not accessible.

### 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"
}
```
