# Get aggregated metrics for a dynamic set

`GET /sets/{set_id}/aggregated_metrics`

> Wheelhouse Comp Set API. Web version: https://docs.usewheelhouse.com/comp-set/reference/get-set-aggregated-metrics · OpenAPI spec: https://docs.usewheelhouse.com/comp-set/openapi.yaml · Operation ID: `getSetAggregatedMetrics` · Tag: Set Analytics · Index of all docs pages: https://docs.usewheelhouse.com/llms.txt

Returns aggregated performance metrics for the active member listings of a dynamic set. Optionally filtered by specific dates.

## Request

`GET https://api.usewheelhouse.com/ss_api/v1/comp_set/sets/{set_id}/aggregated_metrics`

Authentication: send your Comp Set 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/comp-set/authentication.md).

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `set_id` | integer | yes | ID of the dynamic set. |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `currency` | string | no | Currency code for the returned metrics. Defaults to the set's currency. |
| `dates` | array of string (date) | no | Array of specific dates to aggregate over. Send more than one in brackets (`?dates[]=2026-05-01&dates[]=2026-06-01`); a key repeated without brackets keeps only its last value. |

### Example request

```bash
curl -X GET 'https://api.usewheelhouse.com/ss_api/v1/comp_set/sets/{set_id}/aggregated_metrics' \
  -H 'X-Integration-Api-Key: <your Comp Set API key>' \
  -H 'X-User-API-Key: <your user 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

Successfully retrieved aggregated metrics.

Body (`application/json`): object

- `data` (array of object `AggregatedMetric`)
  - `start_date` (string (date)): Start of the aggregation period.
  - `end_date` (string (date)): End of the aggregation period.
  - `occupancy` (number, nullable): Occupancy rate over the period.
  - `occupancy_adjusted` (number, nullable): Open occupancy rate (excludes blocked nights) over the period.
  - `nights_percent_open` (number, nullable): Percentage of nights that were open over the period.
  - `revenue` (number, nullable): Total net revenue over the period.
  - `adr` (number, nullable): Average daily rate over the period.
  - `asking_rate` (number, nullable): Asking Rate (Booked + Available Nights): average nightly price across booked and available nights, excluding fees. A booked night counts at the rate it was booked for, an available night at its current price. Blocked nights are left out. `null` when no night qualifies. See `asking_rate_available` for available nights only.
  - `asking_rate_available` (number, nullable): Asking Rate (Available Nights): sum of nightly prices on available nights / number of available nights, excluding fees. Booked and blocked nights, and nights without a price, count in neither. `null`, not `0`, when no available night has a price.
  - `revpar` (number, nullable): Revenue per available room over the period.
  - `revpar_adjusted` (number, nullable): Revenue per available room excluding blocked nights.
  - `revenue_available` (number, nullable): Revenue earned from available nights.
  - `revenue_blocked` (number, nullable): Potential revenue from blocked nights.
  - `lead_time` (number, nullable): Average lead time for bookings in days.
  - `length_of_stay` (number, nullable): Average length of stay in nights.
  - `nights_available` (number, nullable): Number of available nights.
  - `nights_blocked` (number, nullable): Number of blocked nights.
  - `nights_booked` (number, nullable): Number of booked nights.
  - `nights_bookable` (number, nullable): Number of bookable nights.
  - `nights_calendar` (integer, nullable): Total number of nights in the calendar period.
  - `count_bookings` (integer, nullable): Number of bookings over the period.
- `currency` (string)

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

```json
{
  "data": [
    {
      "start_date": "2026-01-01",
      "end_date": "2026-01-01",
      "occupancy": 0,
      "occupancy_adjusted": 0,
      "nights_percent_open": 0,
      "revenue": 0,
      "adr": 0,
      "asking_rate": 0,
      "asking_rate_available": 0,
      "revpar": 0,
      "revpar_adjusted": 0,
      "revenue_available": 0,
      "revenue_blocked": 0,
      "lead_time": 0,
      "length_of_stay": 0,
      "nights_available": 0,
      "nights_blocked": 0,
      "nights_booked": 0,
      "nights_bookable": 0,
      "nights_calendar": 0,
      "count_bookings": 0
    }
  ],
  "currency": "string"
}
```

### 401

API key authorization failed

### 404

Dynamic set not found
