---
title: "Get a YieldRule"
method: GET
path: "/shop/yield-rules/{yieldRule}"
tags: ["YieldRules"]
---

# Get a YieldRule

`GET /shop/yield-rules/{yieldRule}`

Retrieves a single `YieldRule`.

## Path parameters

- `yieldRule` string, uuid, required

## Response `200`

The yield rule was successfully retrieved

- object
  - `data` YieldRule, required — A demand-based price adjustment configured for a single offering. Adjustments apply on top of the offering's existing price rules, and are bounded by its yield price guardrails. Rules are per-offering: applying one to several offerings at once creates an independent rule for each, so editing one never affects the others.
    - `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.

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `404` — The resource couldn't be found

---

[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)
