# List the booking condition rules that are active for the calling partner Returns every active booking condition rule that applies to the calling partner, across all the operators (venue groups) the partner is linked to (the same operators GET /venues exposes), together with the description of every hook referenced by an expression rule in the response (hooks[]: its facts, how to obtain each fact from your booking request, and its writable paths). A rule is returned when it is active and it has no partner target, or it targets the calling partner, or it targets one of the calling partner's categories. Rules aimed only at other partners are never returned, and no other partner is identified: appliesTo.partnerScope says whether the rule is aimed at everybody (all_partners), at you (you) or at a category you belong to (your_categories). appliesTo.venues[] lists only the venues you can see (the same visibility as GET /venues). A rule restricted to venues none of which you can see is not returned; allVenues: false with a non-empty venues[] means "only these of your venues". The partner is taken from the credentials (or from X-Partner-Reference for Bookable Agents, as on the other partner endpoints). There is no operator in the path. The response is not paginated. Filters narrow the response and are combined with AND: - operatorId: only rules of that operator (venue group). - venueId: only rules that apply to that venue. A rule with no venue target applies to every venue; a rule with venue targets is returned only if it lists that venue. - effect: only rules with that effect. - hook: only rules that apply at that moment of the flow: booking.create returns the rules whose whenApplied contains booking_create (fixed rules that run on create and expression rules at the booking.create hook), booking.amend those whose whenApplied contains booking_amend, payment those whose whenApplied contains booking_payment (only expression rules at the payment hook: they change the amount payable for an existing booking, see "Rules at the payment hook" in the API description). rules[] is ordered by operatorId, then fixed effects (by the precedence order in the guide: lock_preorder_edits, preorder_required, same_package, max_quantity_party_size, max_quantity, require_deposit, then route_to_enquiry, which never rejects; rules of one effect by rule id), then expression rules by hook (booking.create, then booking.amend, then payment), priority ascending (no priority counts as 100) and rule id, which is the order the platform evaluates expression rules. Properties whose value is null are omitted from the JSON; arrays and objects that the schema declares required are always present, empty when there is nothing to list. Read the "Integration guide for AI agents", the effects table, the expression language reference and the worked examples in the API description first. Responses: | Status | Meaning | Error code | |---|---|---| | 200 | The rules (possibly none) and the hooks they reference. | | | 400 | Unknown hook, operatorId below 1, malformed venueId, venueId of another operator than operatorId, or a query value of the wrong type. | none, or VALID-N-001 for a wrong type | | 401 | Missing, expired or invalid bearer token. | none | | 403 | Operator or venue not available to you, or unknown X-Partner-Reference. | none, IDENT-N-002, IDENT-N-003 | | 404 | venueId does not exist. | VENUE-N-001 | | 429 | Rate limit exceeded: retry after Retry-After. | RATE-R-001 | Endpoint: GET /booking-rules Version: 1.6.0 Security: Live, Sandbox ## Header parameters: - `X-Partner-Reference` (string) Required for Bookable Agents. Identifies the partner for whom the request is being made. This header must be provided when making requests with the agent:write scope. Accepts either form: * a partner reference, e.g. thefork.com * a partner id, e.g. 288 — the same id returned by GET /agent/impersonation-targets A value matching a known partner reference always resolves as that reference; it is only treated as a partner id when it does not. Most partners have no reference configured, so the partner id is generally the form to use — the one exception being a reference spelled as digits, which still takes precedence over the partner whose id is that number. - `X-Correlation-ID` (string) An optional ID which you can use to track transactions across multiple systems. It can have any value, but we recommend avoiding . characters. Mirrored back in a response header. Example: "11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA" ## Query parameters: - `operatorId` (integer) Only rules of this operator (venue group); the operator id is the first segment of every composite id (17 in 17|X9|9d3f...). Must be at least 1 (otherwise 400) and an operator the calling partner is linked to (otherwise 403). Omit it to get the rules of every operator you are linked to. Example: 17 - `venueId` (string) Composite venue id ({operatorId}|{rmsSlug}|{venueResourceId}, as returned by GET /venues; a 4-segment product compositeId is also accepted and its first three segments are used). Only rules that apply to this venue are returned: rules with no venue target (every venue) and rules that list this venue. The venue must be visible to the calling partner. When both operatorId and venueId are given the venue must belong to that operator, otherwise the call fails with 400. A venue of an operator you are not linked to, or a venue your partner mapping hides, fails with 403; a venue that does not exist fails with 404 (VENUE-N-001). A value that is not a composite venue id fails with 400. Send the | characters percent-encoded (%7C). - `effect` (string) Only rules with this effect: one of same_package, max_quantity_party_size, max_quantity, preorder_required, route_to_enquiry, lock_preorder_edits, require_deposit, preorder_email, booking_window, expression. A value outside this list fails with 400 (VALID-N-001). Enum: "same_package", "max_quantity_party_size", "max_quantity", "preorder_required", "route_to_enquiry", "lock_preorder_edits", "require_deposit", "preorder_email", "expression", "booking_window" - `hook` (string) Only rules that apply at this moment of the flow: booking.create (rules checked when you create a booking), booking.amend (rules checked when you amend one with PUT or PATCH) or payment (expression rules that change the amount payable when the platform computes the payment options or creates the payment of an existing booking; they have whenApplied booking_payment). Free string checked against the hooks the platform knows (today those three); not an enum so that adding a hook never changes this specification. An unknown hook fails with 400. There is no cancel hook: booking_window rules with action cancel are returned without this filter, with whenApplied booking_cancel. Example: "booking.create" ## Response 200 fields (application/json): - `generatedAt` (string, required) Instant (UTC, ISO 8601) at which the server built this answer. Informational: rules can change after this instant and there is no cache validator, so re-fetch at the start of each booking flow. The booking endpoints always validate against the current rules. Example: "2026-10-01T09:30:12Z" - `caller` (object, required) Facts about the calling partner itself (never about other partners): the values of the facts partner.id and partner.categoryIds that expression rules can read. Copy them into the fact document you build: partner.id from partnerId, partner.categoryIds from categoryIdsByOperator[rule.operatorId] of the rule you evaluate. - `caller.partnerId` (integer, required) Id of the calling partner, resolved from your credentials (or from X-Partner-Reference for Bookable Agents). It is the value of the fact partner.id. Example: 482 - `caller.partnerCategoryIds` (array, required) Ids of the partner categories assigned directly to the calling partner, ascending: global, the same for every operator. Kept for backward compatibility. It is NOT the value of the fact partner.categoryIds of a rule: operators can also place the partner in a category through their own third-party records, which this field does not include. Use categoryIdsByOperator[rule.operatorId] and fall back to this field only when that entry is missing. An empty array when the partner has no direct category. Example: [1] - `caller.categoryIdsByOperator` (object, required) The categories of the calling partner per operator, as the server sees them when it filters the rules and when it evaluates them on a booking: the directly assigned categories plus the categories of the operator's own live third parties linked to the partner. Keys are operator ids as strings (JSON object keys); values are ascending category ids. One entry for every operator that has at least one rule in rules[], so categoryIdsByOperator[String(rule.operatorId)] always exists; an empty object when rules is empty. It is the value of the fact partner.categoryIds for the rules of that operator. Example: {"17":[1,5]} - `rules` (array, required) Active rules that apply to the caller after the query filters; an empty array when none. Ordered by operatorId, then fixed effects by precedence (route_to_enquiry last), then expression rules by hook (booking.create first), priority ascending and rule id: the order the platform evaluates expression rules. Not paginated. Do not re-sort: apply it as returned. - `rules.id` (string, required) Rule identifier (UUID). This is the SAME id that appears in violations[].ruleId (and in analyticsRuleId) of the 400 response when a booking is rejected by this rule: use it to connect a rejection to the rule. Example: "9c1d5e72-3b84-4f06-a2d9-17c4e8b05a36" - `rules.operatorId` (integer, required) Operator (venue group) that owns the rule; the first segment of the composite ids it applies to. Keep the rule only for bookings at venues of this operator. Example: 17 - `rules.name` (string, required) Name given by the operator, free text. Also reported as violations[].ruleName in a rejection. Show it to your user; do not parse it. Example: "Premium brunch - whole table, no mixing" - `rules.description` (string,null) Free text from the operator, returned as stored (it defaults to a summary the operator tooling generated when the rule was saved). Omitted when the operator wrote none. If that text names a partner or partner category other than yours, or a venue you cannot see, the platform returns summary instead, so another partner is never identified. Informational; do not parse. Example: "If any of: Premium Bottomless Brunch is chosen, everyone must have that same choice and nothing else can be selected." - `rules.effect` (string, required) Kind of rule. The eight fixed effects have fixed semantics (see the effects table and "How to evaluate each fixed effect" in the API description); expression is a generic rule defined by data (hook, when, then, priority). These are the same wire names as violations[].effect in a rejected booking. - same_package: the chosen pre-order lines may not mix items of the rule's set (and, when exclusive, nothing else may be chosen). Refuses with BKRUL-N-001. - max_quantity_party_size: the total quantity of the set (empty set = every package and menu) may not exceed the party size. Refuses with BKRUL-N-002. - max_quantity: the total quantity of the set may not exceed params.max. Refuses with BKRUL-N-003. - preorder_required: from params.threshold guests a qualifying pre-order line is mandatory. Refuses with BKRUL-N-004. - route_to_enquiry: a booking made fewer than params.leadTimeDays days ahead becomes an enquiry instead of being confirmed. Never refuses, create only. - lock_preorder_edits: inside params.leadTimeDays days of the booking date pre-orders may not be added or changed. Refuses with BKRUL-N-005. - require_deposit: the booking must already carry a deposit of params.amount (per person or per booking). Refuses with BKRUL-N-006. - preorder_email: below params.threshold guests the Collins pre-order email is not sent; the pre-order is still posted. Never refuses. - booking_window: you may not book, amend or cancel (params.action) within params.minHoursBefore hours of the reservation start, nor book more than params.maxHoursBefore hours ahead. Refuses with AVAIL-N-007 / AVAIL-N-008 (book), BKRUL-N-007 (amend) or BKRUL-N-008 (cancel). - expression: a rule written as a JSON expression (when) with actions (then) evaluated at a hook. Refuses with BKRUL-N-100 when its then contains a reject (except at the payment hook, where a reject is ignored: that hook changes the amount payable of an existing booking). Enum: "same_package", "max_quantity_party_size", "max_quantity", "preorder_required", "route_to_enquiry", "lock_preorder_edits", "require_deposit", "preorder_email", "expression", "booking_window" - `rules.active` (boolean, required) Always true: inactive rules are never returned by this API. Example: true - `rules.appliesTo` (object, required) Where and for whom the rule applies. Dimensions combine with AND: the rule applies to a booking at a venue in venues (or any, if allVenues), for a product in products (or any, if allProducts), by a partner matching partnerScope. items is the set the effect operates on (it is not a scope test). Names are the current catalog names. A target that no longer exists in the operator's catalog is not listed (the platform ignores it too); a rule whose venue targets have all disappeared, or none of which you can see, is not returned. - `rules.appliesTo.allVenues` (boolean, required) true when the rule has no venue target: it applies to every venue of the operator (venues is then empty). false means the rule is restricted to the venues in venues[], which are only the ones you can see: only these of YOUR venues. - `rules.appliesTo.venues` (array, required) Venues the rule is narrowed to when allVenues is false. The rule applies only to bookings at one of them: compare each id with the first three segments of the composite id you book. Only venues you can see are listed (same visibility as GET /venues); a rule restricted to venues none of which you can see is not returned, so this list is never empty when allVenues is false. Empty when allVenues is true. - `rules.appliesTo.venues.id` (string, required) Composite venue id {operatorId}|{rmsSlug}|{venueResourceId} (3 segments, as returned by GET /venues). A booking is at this venue when the first three segments of its 4-segment compositeId equal this id. Example: "17|X9|9d3f0b6e7a1c4e58b2c4f1a60d7e8b93" - `rules.appliesTo.venues.name` (string,null, required) Current display name of the venue (informational; may be null when the venue has no name). Example: "The Rooftop Kitchen" - `rules.appliesTo.allProducts` (boolean, required) true when the rule has no product target: it applies to every product (booking type) (products is then empty). false means the rule applies only to the products in products; such a rule never applies to a product that has no aggregation slug. - `rules.appliesTo.products` (array, required) Products (booking types) the rule is limited to when allProducts is false; empty when allProducts is true. Match the slug with the slug of the product you book in GET /venues (the product of the 4-segment compositeId). - `rules.appliesTo.products.id` (integer, required) Aggregation-level id of the product, package or menu (operator side id). Informational: do NOT compare it with the venue-specific ids you send in a booking; match on slug. Example: 1257 - `rules.appliesTo.products.slug` (string,null) Aggregation slug: the identifier rules use. It is the slug of the product, package or menu in GET /venues, and the slug of the elements of the fact booking.items. Omitted when the item has none; such an item can never match a booking line. Example: "bottomless-brunch" - `rules.appliesTo.products.name` (string,null, required) Current name of the catalog item (informational; may be null). Example: "Bottomless Brunch" - `rules.appliesTo.items` (object, required) The set S of packages and menus (compared by slug) that the effect works on. How it is used depends on the effect: same_package: the set whose members may not be mixed / that triggers exclusivity (needs at least one item); max_quantity_party_size: the set whose total quantity is counted (EMPTY means every package and menu counts); max_quantity: the set whose total quantity is counted; preorder_required: the pre-order lines that qualify (EMPTY means any package or menu qualifies); route_to_enquiry, lock_preorder_edits, require_deposit: not used (any items listed have no effect); expression: informational only, never evaluated. - `rules.appliesTo.items.packages` (array, required) Packages in S. A chosen package line is in S when its aggregation slug equals one of these slugs. Empty when the set has no package. - `rules.appliesTo.items.menus` (array, required) Menus in S. A chosen menu line is in S when its aggregation slug equals one of these slugs. Empty when the set has no menu. - `rules.appliesTo.partnerScope` (string, required) How the rule is aimed at the calling partner. Only these three values exist: rules aimed only at other partners are never returned and no other partner is ever identified. - all_partners: the rule has no partner target; it applies to every partner. - you: the rule names your partner id. - your_categories: the rule names a partner category you belong to (and does not name your partner id). If a rule names both your partner id and one of your categories the value is you. You never need to filter on it: the rule is already known to concern you. Enum: "all_partners", "you", "your_categories" - `rules.conditions` (array, required) Extra field conditions. ALL entries must hold for the rule to apply to a booking (empty = no extra gating). Normally empty today: the operator tooling cannot create conditions yet. - `rules.conditions.field` (string, required) Request field. On create: partySize, duration, spaceId, isCrossSale, commission, depositAmount, hasCustomerCompany (boolean: a non-blank company), hasNotes (boolean: non-blank notes). On amend only partySize, duration, commission, hasCustomerCompany, hasNotes. Example: "partySize" - `rules.conditions.operator` (string, required) How field is compared with value: - equals: same value (numbers compare by value, so 8 equals 8.0). - not_equals: different value (still false when the booking does not carry the field). - gte: the field is a number greater than or equal to value (a non-number never matches). - lte: the field is a number less than or equal to value (a non-number never matches). - in: the field value is one of the values of the array value. - contains: the field value is a list that contains value. Enum: "equals", "not_equals", "gte", "lte", "in", "contains" - `rules.conditions.value` (any, required) The value to compare with, any JSON value (an array for in). Its kind must suit the operator. Example: 8 - `rules.params` (object, required) Parameters of a fixed effect; only the keys of the rule's effect are present, the others are omitted. Defaults are already applied. Expression rules (and max_quantity_party_size without perItem) have an empty object. - `rules.params.exclusive` (boolean,null) same_package only. true (the default): once any set item is chosen, every selected package/menu must be that same single item - a second distinct set item or any chosen line outside the set is a violation. false: only the set items are compared with each other (two distinct set items is a violation); items outside the set are ignored. Example: true - `rules.params.wholeGroup` (boolean,null) same_package only. Default false. When true, the summed quantity of the chosen set lines must equal the party size, otherwise it is a violation (same code BKRUL-N-001). - `rules.params.max` (integer,null) max_quantity only. Maximum total quantity of the set per booking (inclusive: exactly max is allowed). Example: 4 - `rules.params.perItem` (boolean,null) max_quantity and max_quantity_party_size only. Present (and true) only when set: each item of the set is capped on its own (its lines added together by slug) instead of the set's total. Absent = the total is capped. Example: true - `rules.params.threshold` (integer,null) preorder_required and preorder_email only. preorder_required - party size from which a pre-order is required, inclusive (party size >= threshold), 1 means every booking. preorder_email - party size from which the Collins pre-order email is sent, inclusive. Example: 8 - `rules.params.leadTimeDays` (integer,null) route_to_enquiry and lock_preorder_edits only. Window in whole calendar days, counted in Europe/London: the window is daysAhead < leadTimeDays with daysAhead = booking date minus today. A booking exactly leadTimeDays ahead is NOT inside the window. Example: 7 - `rules.params.amount` (number,null) require_deposit only. Deposit amount in pounds sterling (GBP), per person or per booking according to per. Send the collected deposit as depositAmount in the same currency. Example: 10 - `rules.params.per` (string,null) require_deposit only. What amount is measured against: - person (the default): the required deposit is amount x party size. - booking: the required deposit is amount, flat, whatever the party size. Enum: "person", "booking" - `rules.params.action` (string,null) booking_window only. The operation the window limits: - book: POST /venues/{compositeId}/booking, and an amend that changes the date or time (checked against the new start). - amend: PUT / PATCH /venues/bookings/{bookingId} on a confirmed booking (checked against the stored start). - cancel: DELETE /venues/bookings/{bookingId} on a confirmed booking. Enum: "book", "amend", "cancel" - `rules.params.minHoursBefore` (integer,null) booking_window only. The operation is refused when the reservation starts in fewer than this many hours (real elapsed time from your request to booking date + start time, Europe/London). Exactly this many hours away is allowed. Example: 120 - `rules.params.maxHoursBefore` (integer,null) booking_window with action book only. A booking is refused when the reservation starts more than this many hours away. Example: 2400 - `rules.message` (string,null) The text partners receive (detail of the error and, for expression rules, the fallback text of a reject action without its own message) when the rule rejects a booking. Omitted when the operator set none: the platform then uses the default message of the effect (see the effects table). Example: "Please collect the 10 pound per person deposit and send it as depositAmount." - `rules.summary` (string, required) One English sentence generated by the server from the rule's structure. It never names partners or partner categories: when the rule is aimed at some of them it says "selected partners" (see appliesTo.partnerScope for how it is aimed at you). Informational: the exact wording can change, do not parse it. Example: "A deposit of £10.00 per person must be collected before booking for selected partners." - `rules.whenApplied` (array, required) Moments at which the rule is evaluated; keep the rule only if it contains the operation you are about to call. Fixed effects: booking_create and booking_amend, except route_to_enquiry, which is booking_create only (an amend never un-confirms a booking). Expression rules: booking_create when hook is booking.create, booking_amend when it is booking.amend, booking_payment when it is payment (the moment the platform computes the amount payable of an existing booking; not a request you send and never a gate for your create or amend). Enum: "booking_create", "booking_amend", "booking_payment", "booking_cancel" - `rules.consequence` (string, required) What the platform does when the rule is violated or triggers, and so what you should do: - rejects_booking: used by same_package, max_quantity_party_size, max_quantity, preorder_required, lock_preorder_edits and booking_window. The booking is refused with errorCode; change the booking until the condition holds. - turns_booking_into_enquiry: used by route_to_enquiry. No error: the booking is created as an enquiry (type request) that the operator must accept; book further ahead to avoid it. - requires_deposit: used by require_deposit. The booking is refused with BKRUL-N-006 unless it already carries the deposit; collect it and send it as depositAmount. - skips_preorder_email: used by preorder_email. No error: below params.threshold guests the Collins pre-order email is not sent, the pre-order is still posted. - conditional: used by expression rules. The effect depends on then: read outcomes (rejects, writes, flags). At the payment hook the rule only writes the amount payable (payment.finalBalance) and never refuses. Enum: "rejects_booking", "turns_booking_into_enquiry", "requires_deposit", "conditional", "skips_preorder_email" - `rules.errorCode` (string,null) Error catalog code the booking endpoint returns when this rule rejects: BKRUL-N-001 same_package, BKRUL-N-002 max_quantity_party_size, BKRUL-N-003 max_quantity, BKRUL-N-004 preorder_required, BKRUL-N-005 lock_preorder_edits, BKRUL-N-006 require_deposit, for booking_window AVAIL-N-007 (action book with a minimum; a book window with both bounds answers AVAIL-N-008 when the booking is too far ahead), AVAIL-N-008 (action book with only a maximum), BKRUL-N-007 (amend) and BKRUL-N-008 (cancel), BKRUL-N-100 expression (every rejecting expression rule, with the message of its reject). Omitted for route_to_enquiry (no error), and omitted for an expression rule whose outcomes.rejects is false (always the case for a rule at the payment hook, where a reject action has no effect). Example: "BKRUL-N-001" - `rules.hook` (string,null) Expression rules only: the hook (named point of the flow) where the rule runs: booking.create, booking.amend or payment. The matching description (facts, how to obtain them, writable paths) is the entry of hooks[] with the same name. Omitted for fixed effects. Example: "booking.create" - `rules.priority` (integer,null) Expression rules only: evaluation order within the hook, ascending (ties by rule id); the platform default is 100. A set written by a lower number is visible to the rules evaluated after it. Omitted for fixed effects. Example: 100 - `rules.when` (object,null) Expression rules only (omitted for fixed effects): the condition, one boolean expression tree in JsonLogic format, exactly as the platform evaluates it. The rule applies when it evaluates to true. Read facts with {"var": ""}; build the fact document from hooks[].facts[].howToObtain and evaluate with the operator reference in the API description (comparison, logic, arithmetic, in, list predicates filter / map / some / all / none where var is the element, aggregates count / sum / distinct / pluck; limits depth 12 and 96 nodes). A fact that is missing or of the wrong type for an operator makes the rule NOT apply (skipped), it never fails the booking. Example: {"and": [{"==": [{"var": "space.name"}, "Terrace"]}, {">": [{"var": "booking.partySize"}, 8]}, {"==": [{"var": "booking.itemCount"}, 0]}]}. Example: {"and":[{"==":[{"var":"space.name"},"Terrace"]},{">":[{"var":"booking.partySize"},8]},{"==":[{"var":"booking.itemCount"},0]}]} - `rules.then` (array,null) Expression rules only (omitted for fixed effects): the actions applied when when is true, in order. Each action is an object with exactly one key: {"set": {"path": "booking.type", "value": "request"}} (writes a literal or an expression to a path that is writable at the hook; several sets on a path: the last wins), {"reject": {"message": "..."}} (refuses the booking with BKRUL-N-100; the message is optional; ignored at the payment hook) or {"flag": {"name": "vip"}} (a named annotation with no behaviour). outcomes gives the same information already parsed. Example: [{"reject":{"message":"Parties of more than 8 on the Terrace must include a pre-order."}}] - `rules.outcomes` (object,null) Expression rules only (omitted for fixed effects). What the rule's then does when its when is true, derived from then, so that you need not read then. If several rules write the same path the last one (priority, then rule id) wins; the final value is not computed here. - `rules.outcomes.rejects` (boolean, required) true when then contains at least one reject action: the booking is refused with BKRUL-N-100 (when when is true). When false the rule never refuses. Always false for a rule at the payment hook, where the platform ignores a reject action. Example: true - `rules.outcomes.rejectMessages` (array, required) The message of each reject action (the action's own message, else the rule's message, else "Rule '' rejected the booking."). Empty when rejects is false (always, at the payment hook). The first one is the detail of the 400. Example: ["Parties of more than 8 on the Terrace must include a pre-order."] - `rules.outcomes.writes` (array, required) The set actions, in order: what the platform writes when when is true. booking.type = request makes the booking an enquiry; payment.finalBalance (hook payment) sets the total payable in integer pence. Empty when there are none. - `rules.outcomes.writes.path` (string, required) The path written. At booking.create: booking.type, booking.enquiryReason or booking.sendPreorderEmail. At booking.amend no path is writable (a rule that sets one is skipped). At payment: payment.finalBalance only. Example: "booking.type" - `rules.outcomes.writes.value` (any, required) The value written, as JSON. When isExpression is false it is the literal itself (for booking.type book or request, for booking.enquiryReason operatorRule or none, for booking.sendPreorderEmail true or false, for payment.finalBalance an integer number of pence). When true it is the expression tree to evaluate against the facts, like when (for payment.finalBalance, for example the sum of the spend values of payment.bands). Example: "request" - `rules.outcomes.writes.isExpression` (boolean, required) true when value is an expression tree to be evaluated rather than a literal. When false, value is final. - `rules.outcomes.flags` (array, required) Names of the flag actions. A flag has no behaviour of its own; it is an annotation. Empty when there are none. Example: ["large-party"] - `hooks` (array, required) One entry for every hook named by an expression rule in rules (the payment hook only when a returned rule is at that hook): its facts, how to obtain each from your request (or, at payment, how the platform computes it), and its writable paths. Empty when rules holds no expression rule. Look a hook up by name (equal to the rule's hook) before evaluating an expression rule. - `hooks.name` (string, required) The identifier of the hook: the value of a rule's hook and of the hook query filter (booking.create, booking.amend or payment). Example: "booking.create" - `hooks.description` (string, required) When the hook runs in the booking flow and what an expression rule can do there (reject, write, flag). Example: "Runs before a partner booking is created in the RMS. A rule can reject the booking, turn it into an enquiry (set booking.type / booking.enquiryReason) or flag it." - `hooks.triggeredBy` (array, required) The endpoint calls that run this hook. For payment it lists the calls that compute the amount payable of an existing booking. Example: ["POST /venues/{compositeId}/booking"] - `hooks.writablePaths` (array, required) The only paths a set action may write at this hook. Empty = the hook can only reject or flag. - `hooks.writablePaths.path` (string, required) Dotted path that a set action may write (also readable as a fact once written). Example: "booking.type" - `hooks.writablePaths.type` (string, required) Type of the value written: - number: a JSON number. - string: a JSON string. - bool: true or false. - list: a JSON array. - object: a JSON object. Enum: "number", "string", "bool", "list", "object" - `hooks.writablePaths.allowedValues` (array, required) The values the platform accepts at this path; any other value is ignored. Example: ["book","request"] - `hooks.writablePaths.meaning` (string, required) What writing this path means for the booking (the consequence an expression rule has by writing it). Example: "The booking type. Writing `request` makes the booking an enquiry the operator must accept instead of an instant confirmation. Any other value makes the rule be skipped." - `hooks.facts` (array, required) Every fact an expression can read at this hook, with how to compute it from your request. - `hooks.facts.path` (string, required) Dotted path for {"var": ...}. Absolute (booking.partySize) at the top level of facts; relative to the element (slug) inside elementFields. Example: "booking.partySize" - `hooks.facts.type` (string, required) Type of the value: - number: a decimal number. - string: a JSON string. - bool: true or false (never a number or string). - list: an array; see isList, elementType and elementFields for its elements. - object: a nested object (not used by the facts of today's hooks). Enum: "number", "string", "bool", "list", "object" - `hooks.facts.isList` (boolean, required) true when the fact is a list (then type is list): read it with the list operators (count, sum, some, filter, ...). When false the fact is a single value. - `hooks.facts.nullable` (boolean, required) true when the fact can be null. An operator that needs a number, string, boolean or list and receives null makes the rule skipped (it does not apply); use {"var": [path, default]} to be null-safe. - `hooks.facts.description` (string, required) What the fact means (for amend hooks, the state after the amend). Example: "Number of guests on the booking (the new value on an amend)" - `hooks.facts.howToObtain` (string, required) How to compute the value from the booking request you send (create) or the booking you amend (amend): which request field to copy or which derivation to apply. Hook specific: the same fact can be obtained differently at booking.create and booking.amend, and this text is already the one of the hook it belongs to. Example: "Copy of `partySize` of the create request body. `children` is not added to it." - `hooks.facts.elementType` (string,null) For a list of scalars, the type of its elements; omitted otherwise. - number: every element is a number (for example partner.categoryIds). - string: every element is a string. - bool: every element is true or false. Enum: "number", "string", "bool" - `hooks.facts.elementFields` (array,null) For a list of objects, the fields of one element (use them inside filter / map / some / all / none as {"var": ""} and as the field name of pluck); omitted otherwise. ## Response 400 fields (application/json): - `type` (string) A URI reference [rfc9457] that identifies the problem type. This specification encourages that, when dereferenced, it provides human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". - `title` (string, required) A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. - `status` (integer, required) The HTTP status code [rfc9457, Section 3.1.12] generated by the origin server for this occurrence of the problem. - `detail` (string) A human-readable explanation specific to this occurrence of the problem. - `code` (string, required) Error code in the format RESOURCE-X-NNN where X is R (retryable) or N (non-retryable). See ErrorCatalog.md for all error codes. Example: "VALID-N-001" - `isRetryable` (boolean, required) Indicates whether the error is retryable. If true, the request may succeed if retried. If false, the request will fail again with the same input. - `traceId` (string) Request trace identifier for debugging and correlation purposes. Example: "0HNJ2BG2TU3BU:00000001" - `errors` (object,null) Validation errors dictionary mapping field names to arrays of error messages. Only present for validation errors (VALID-N-001). Example: {"Date":["Availability date cannot be in the past."],"EndTime":["EndTime must be after StartTime."]} ## Response 403 fields (application/json): - `type` (string) A URI reference [rfc9457] that identifies the problem type. This specification encourages that, when dereferenced, it provides human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". - `title` (string, required) A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. - `status` (integer, required) The HTTP status code [rfc9457, Section 3.1.12] generated by the origin server for this occurrence of the problem. - `detail` (string) A human-readable explanation specific to this occurrence of the problem. - `code` (string, required) Error code in the format RESOURCE-X-NNN where X is R (retryable) or N (non-retryable). See ErrorCatalog.md for all error codes. Example: "VALID-N-001" - `isRetryable` (boolean, required) Indicates whether the error is retryable. If true, the request may succeed if retried. If false, the request will fail again with the same input. - `traceId` (string) Request trace identifier for debugging and correlation purposes. Example: "0HNJ2BG2TU3BU:00000001" - `errors` (object,null) Validation errors dictionary mapping field names to arrays of error messages. Only present for validation errors (VALID-N-001). Example: {"Date":["Availability date cannot be in the past."],"EndTime":["EndTime must be after StartTime."]} ## Response 404 fields (application/json): - `type` (string) A URI reference [rfc9457] that identifies the problem type. This specification encourages that, when dereferenced, it provides human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". - `title` (string, required) A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. - `status` (integer, required) The HTTP status code [rfc9457, Section 3.1.12] generated by the origin server for this occurrence of the problem. - `detail` (string) A human-readable explanation specific to this occurrence of the problem. - `code` (string, required) Error code in the format RESOURCE-X-NNN where X is R (retryable) or N (non-retryable). See ErrorCatalog.md for all error codes. Example: "VALID-N-001" - `isRetryable` (boolean, required) Indicates whether the error is retryable. If true, the request may succeed if retried. If false, the request will fail again with the same input. - `traceId` (string) Request trace identifier for debugging and correlation purposes. Example: "0HNJ2BG2TU3BU:00000001" - `errors` (object,null) Validation errors dictionary mapping field names to arrays of error messages. Only present for validation errors (VALID-N-001). Example: {"Date":["Availability date cannot be in the past."],"EndTime":["EndTime must be after StartTime."]} ## Response 429 fields (application/json): - `type` (string) A URI reference [rfc9457] that identifies the problem type. This specification encourages that, when dereferenced, it provides human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". - `title` (string, required) A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. - `status` (integer, required) The HTTP status code [rfc9457, Section 3.1.12] generated by the origin server for this occurrence of the problem. - `detail` (string) A human-readable explanation specific to this occurrence of the problem. - `code` (string, required) Error code in the format RESOURCE-X-NNN where X is R (retryable) or N (non-retryable). See ErrorCatalog.md for all error codes. Example: "VALID-N-001" - `isRetryable` (boolean, required) Indicates whether the error is retryable. If true, the request may succeed if retried. If false, the request will fail again with the same input. - `traceId` (string) Request trace identifier for debugging and correlation purposes. Example: "0HNJ2BG2TU3BU:00000001" - `errors` (object,null) Validation errors dictionary mapping field names to arrays of error messages. Only present for validation errors (VALID-N-001). Example: {"Date":["Availability date cannot be in the past."],"EndTime":["EndTime must be after StartTime."]} ## Response 500 fields (application/json): - `type` (string) A URI reference [rfc9457] that identifies the problem type. This specification encourages that, when dereferenced, it provides human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". - `title` (string, required) A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. - `status` (integer, required) The HTTP status code [rfc9457, Section 3.1.12] generated by the origin server for this occurrence of the problem. - `detail` (string) A human-readable explanation specific to this occurrence of the problem. - `code` (string, required) Error code in the format RESOURCE-X-NNN where X is R (retryable) or N (non-retryable). See ErrorCatalog.md for all error codes. Example: "BOOK-N-001" - `isRetryable` (boolean, required) Indicates whether the error is retryable. If true, the request may succeed if retried. If false, the request will fail again with the same input. - `traceId` (string) Request trace identifier for debugging and correlation purposes. Example: "0HNJ2BG2TU3BU:00000001" ## Response 503 fields (application/json): - `type` (string) A URI reference [rfc9457] that identifies the problem type. This specification encourages that, when dereferenced, it provides human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". - `title` (string, required) A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. - `status` (integer, required) The HTTP status code [rfc9457, Section 3.1.12] generated by the origin server for this occurrence of the problem. - `detail` (string) A human-readable explanation specific to this occurrence of the problem. - `code` (string, required) Error code in the format RESOURCE-X-NNN where X is R (retryable) or N (non-retryable). See ErrorCatalog.md for all error codes. Example: "BOOK-N-001" - `isRetryable` (boolean, required) Indicates whether the error is retryable. If true, the request may succeed if retried. If false, the request will fail again with the same input. - `traceId` (string) Request trace identifier for debugging and correlation purposes. Example: "0HNJ2BG2TU3BU:00000001" ## Response default fields (application/json): - `type` (string) A URI reference [rfc9457] that identifies the problem type. This specification encourages that, when dereferenced, it provides human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". - `title` (string, required) A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. - `status` (integer, required) The HTTP status code [rfc9457, Section 3.1.12] generated by the origin server for this occurrence of the problem. - `detail` (string) A human-readable explanation specific to this occurrence of the problem. - `code` (string, required) Error code in the format RESOURCE-X-NNN where X is R (retryable) or N (non-retryable). See ErrorCatalog.md for all error codes. Example: "BOOK-N-001" - `isRetryable` (boolean, required) Indicates whether the error is retryable. If true, the request may succeed if retried. If false, the request will fail again with the same input. - `traceId` (string) Request trace identifier for debugging and correlation purposes. Example: "0HNJ2BG2TU3BU:00000001" ## Response 401 fields