---
title: "Get the yield insights revenue comparison"
method: GET
path: "/shop/yield-insights/revenue-comparison"
tags: ["YieldInsights"]
---

# Get the yield insights revenue comparison

`GET /shop/yield-insights/revenue-comparison`

Returns what the site took over the reporting period against what the same
bookings would have made at baseline prices, as the two lines of a chart
plus the overall uplift between them.

`has_data` needs both occupancy history and yield rules — with no rules
there is nothing to compare against. `series` is empty until the underlying
calculation has data to work from.

Separate from the [yield insights summary](/endpoints/YieldInsights#getYieldInsights)
because it returns a series rather than a stat. For the single
since-inception figure, read `performance.additional_revenue` there instead.

Amounts are integers in the minor units of the top-level `currency`. Sites
without the `advanced_yield_management` feature respond `404`.

## Query parameters

- `site_id` string, uuid, required
- `period` 'last_30_days' | 'last_60_days' | 'last_90_days'

## Response `200`

The revenue comparison was successfully retrieved.

- object
  - `data` YieldInsightsRevenueComparison, required — What the site took over the reporting period against what the same bookings would have made at baseline prices.
    - `period` 'last_30_days' | 'last_60_days' | 'last_90_days', required — The reporting period the comparison covers.
    - `window` YieldInsightsWindow, nullable, required — The concrete datetime window the requested `period` resolved to, or `null` when the site has no occupancy history at all to build a window from. When the site's data starts too recently to cover the whole requested period, `starts_at` reflects where the data actually begins rather than the full period.
      - `starts_at` string, date-time, required — When the reporting window starts.
      - `ends_at` string, date-time, required — When the reporting window ends.
    - `currency` string, required — The ISO-4217 currency code every amount in this response is denominated in. The amounts themselves are integers in this currency's minor units.
    - `has_data` boolean, required — Whether there is enough to compare: the site needs both occupancy history and yield rules. When `false`, `uplift_percent` is `null` and `series` is empty.
    - `uplift_percent` integer, nullable, required — How much more the site took over the period than it would have at baseline prices, as a whole-number percentage. Negative when discounting rules netted below baseline.
    - `series` YieldInsightsRevenueComparisonPoint[], required — The two lines to plot. Empty until the underlying calculation has data to work from.
      - `date` string, date, required — The start of the bucket, on the site's local calendar.
      - `revenue_with_yield` integer, required — What the bucket's bookings actually made, in minor units of the top-level `currency`.
      - `revenue_without_yield` integer, required — What the same bookings would have made at baseline prices, in minor units of the top-level `currency`.

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `422` — The request didn't pass validation

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
