YieldRules

Update a YieldRule

Replaces this rule's definition in full.

Only this rule changes. Rules created alongside it are independent copies and are left untouched, and the offering a rule applies to is fixed at creation.

When reductions may start is not part of the rule and cannot be changed here. That window belongs to the offering and is shared by every rule lowering its price, so it is set when a rule is created and changed from the offering.

put/shop/yield-rules/{yieldRule}

Path parameters

yieldRulestring uuid required

The ID of the yield rule.

Request body

weekdaysWeekday[] required
time_fromstring nullable required

24-hour HH:MM, in the site's local time. Send null for both this and time_to for a rule that applies all day; one without the other is rejected.

time_tostring nullable required

24-hour HH:MM, in the site's local time. Must differ from time_from. An earlier value means the window runs past midnight into the following day, and each selected weekday is the day its window starts on — Monday with 22:3000:30 runs Monday 22:30 to Tuesday 00:30. Send null for both this and time_from for a rule that applies all day.

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 lists and totals sales by this tier.

Example request

{
  "time_from": "12:00",
  "time_to": "21:00",
  "triggers": {
    "practitioner_utilisation": {
      "from": 70,
      "to": 90
    },
    "room_occupancy": {
      "from": 70,
      "to": 90
    }
  },
  "adjustment": {
    "value": 15
  }
}

Response

The yield rule was 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
    }
  }
}

Changes

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