---
title: "List YieldRules"
method: GET
path: "/shop/yield-rules"
tags: ["YieldRules"]
---

# List YieldRules

`GET /shop/yield-rules`

Lists the `YieldRules` configured for a site.

Pass `offering_type` and `offering_id` together to narrow the list to the
rules affecting one offering, or `created_batch_id` to return only the rules
created by a single request.

Requires the `advanced_yield_management` feature. Sites without it return
`404`, since yield rules do not exist as a concept for them.

## Query parameters

- `site_id` string, uuid, required
- `offering_type` 'appointment' | 'area_booking' | 'session' | 'package' — The kind of offering a rule applies to. Limited to offerings booked against a service date, which is what demand is measured over.
- `offering_id` string, uuid
- `created_batch_id` string, uuid
- `page` integer
- `per_page` integer

## Response `200`

The yield rules were successfully retrieved

- object
  - `data` YieldRule[], required — Ordered by `updated_at` descending, so where rules conflict the one that would win comes first.
    - `id` string, uuid, required
    - `offering_type` 'appointment' | 'area_booking' | 'session' | 'package', required — The kind of offering a rule applies to. Limited to offerings booked against a service date, which is what demand is measured over.
    - `offering_id` string, uuid, required — The offering this rule adjusts the price of.
    - `site_id` string, uuid, required
    - `created_batch_id` string, uuid, nullable, required — Shared by every rule created in the same request. The rules remain independent of one another — editing one does not affect the others — so this only records that they were created together.
    - `weekdays` Weekday[], required — The days of the week this rule applies on.
    - `time_from` string, nullable, required — Start of the daily window this rule applies within, in the site's local time. 24-hour `HH:MM`. Each selected weekday is the day its window starts on. Null alongside a null `time_to` means the rule applies all day.
    - `time_to` string, nullable, required — End of the daily window this rule applies within, in the site's local time. 24-hour `HH:MM`. A value earlier than `time_from` means the window runs past midnight into the following day. Null alongside a null `time_from` means the rule applies all day.
    - `triggers` YieldRuleTriggers, required — The demand conditions under which a rule fires. At least one band must be set. When both are set the rule fires if either is satisfied, so setting both widens a rule rather than narrowing it.
      - `practitioner_utilisation` UtilisationBand, required — A percentage band a demand measurement is tested against. The band is half-open: `from` is inclusive and `to` is exclusive, so consecutive bands can share a boundary without both matching it. Given `0–30` and `30–60`, a measurement of exactly 30 matches only the second. A `to` of 100 is the exception and is inclusive, so a top band of `60–100` matches a fully utilised site rather than leaving 100 uncovered. "Only when completely full" is expressed by leaving `to` unset, which is unbounded upwards, rather than by `100`–`100`. Because the upper bound is exclusive, bounds that meet describe nothing and are rejected — `30`–`30` would never apply. An absent bound is unbounded in that direction. Both bounds `null` means the band is not set.
        - `from` integer, nullable, required — Lowest percentage this band matches, inclusive.
        - `to` integer, nullable, required — Upper bound of the band, exclusive — unless it is 100, which is inclusive. Must be greater than or equal to `from` when both are set.
      - `room_occupancy` UtilisationBand, required — A percentage band a demand measurement is tested against. The band is half-open: `from` is inclusive and `to` is exclusive, so consecutive bands can share a boundary without both matching it. Given `0–30` and `30–60`, a measurement of exactly 30 matches only the second. A `to` of 100 is the exception and is inclusive, so a top band of `60–100` matches a fully utilised site rather than leaving 100 uncovered. "Only when completely full" is expressed by leaving `to` unset, which is unbounded upwards, rather than by `100`–`100`. Because the upper bound is exclusive, bounds that meet describe nothing and are rejected — `30`–`30` would never apply. An absent bound is unbounded in that direction. Both bounds `null` means the band is not set.
        - `from` integer, nullable, required — Lowest percentage this band matches, inclusive.
        - `to` integer, nullable, required — Upper bound of the band, exclusive — unless it is 100, which is inclusive. Must be greater than or equal to `from` when both are set.
    - `adjustment` YieldRuleAdjustment, required — The change a rule makes to the price it applies to. Signed, so a rule can discount to shift demand as well as add a premium at peak.
      - `type` 'amount' | 'percentage', required — Whether the adjustment is a fixed amount in minor units, or a percentage of the price it applies to.
      - `value` integer, required — Integer minor units when `type` is `amount`, matching `standard_price`; whole percent when `type` is `percentage`.
    - `rounding` 'one' | 'five' | 'ten', nullable, required — Rounds the adjusted price to the nearest whole unit of currency. `null` leaves the adjusted price unrounded.
    - `reporting_tier` 'low' | 'high' | 'peak', required — Groups yielded sales in reporting. Descriptive only — it never affects the adjustment a rule makes. Sales made when no rule applied report as an implicit standard tier, which is why it is absent here. The [yielded sales report](/endpoints/Reports#listYieldedSales) lists and totals sales by this tier.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required — When several rules could apply to the same slot, the most recently updated one wins.
  - `meta` PaginationMeta, required — Counts and positional information for the current page of a list response. Use `current_page` and `last_page` to drive pagination UI, `total` for result counts, and `per_page` to confirm the page size the server actually applied (which may differ from the requested value when capped).
    - `from` integer, required — The item number from which this results set starts from
    - `to` integer, required — The item number from which this results set ends at
    - `total` integer, required — The total number of results
    - `current_page` integer, required — The current page number
    - `last_page` integer, required — The page number of the last result set
    - `per_page` integer, required — The number of results per page
    - `path` string, required — The path of this api request
  - `links` PaginationLinks, required — Hypermedia navigation links for paging through a list response. Each property is a fully-qualified URL that preserves the original query string (filters, sort, page size) and only swaps the `page` parameter. `next` and `prev` are `null` at the ends of the result set; `first` and `last` are always present.
    - `first` string, required — The url of the first page for the paginated results set
    - `next` string, nullable, required — The url of the next page for the paginated results set
    - `prev` string, nullable, required — The url of the previous page for the paginated results set
    - `last` string, required — The url of the last page for the paginated results set

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `404` — The resource couldn't be found
- `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)
