YieldRules

List YieldRules

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.

get/shop/yield-rules

Query parameters

site_idstring uuid required

The site whose yield rules to list.

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.

Narrow the list to one offering, alongside offering_id. Both are needed together, since an ID alone does not identify the kind of offering.

offering_idstring uuid

Narrow the list to one offering, alongside offering_type.

created_batch_idstring uuid

Narrow the list to the rules created by one request. Used to follow a create that was answered with 202 and handed off to a background job.

pageinteger

The page to retrieve results from

per_pageinteger

The number of results to return per page

Response

The yield rules were successfully retrieved

Example response

{
  "data": [
    {
      "time_from": "12:00",
      "time_to": "21:00",
      "triggers": {
        "practitioner_utilisation": {
          "from": 70,
          "to": 90
        },
        "room_occupancy": {
          "from": 70,
          "to": 90
        }
      },
      "adjustment": {
        "value": 15
      }
    }
  ],
  "meta": {
    "from": 1,
    "to": 2,
    "total": 2,
    "current_page": 1,
    "last_page": 2,
    "per_page": 15,
    "path": "http://example.com/api"
  },
  "links": {
    "first": "http://example.com?page=1",
    "next": "https://example.com?page=3",
    "prev": "https://example.com?page=1",
    "last": "https://example.com?page=4"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.