# Deposit, policies, opt-ins, guest fields and questions for a booking What to show the guest before booking this slot, as the operator has set it up for your channel (BOO-967): - guestFields: which optional details this booking type asks for, and which it insists on: today the guest's date of birth and whether the special requests box is shown. Always present. - questions: the operator's own questions for this venue and booking type (dietary needs, the occasion, a membership number), the ones the operator's booking system asks on its own booking page. Render each by its type, mark mandatory ones as required, and send the guest's replies in the booking's answers. Archived questions and questions the operator hasn't switched on for this venue and booking type are left out. Empty when there are none. These questions (the operator's Collins custom fields) are the operator's own website's (BOO-1470): the operator's own website gets every one of them, with the venue's own required flags. Any other channel gets none of them unless an operator's guest-questions rule covers it, and then only the questions that rule names (source channel: mandatory when the rule requires them, otherwise optional; the venue's mandatory ones too where the rule requires the venue's questions), and guestFields.dateOfBirth is hidden unless a rule names it for the channel (optional, or required where the rule requires it and the booking type shows it; BOO-1421, BOO-1467, BOO-1470), and the same holds for every other field in guestFields (12.0.0). An answer to a question you are not offered is refused (422 BOOK-N-038). Breaking in 11.0.0, and guestFields the same way in 12.0.0: before, every channel was offered these questions and could answer them; now only the operator's own website is, so a channel that sent such answers has to stop (or get a rule). A booking is not refused for leaving a question out unless such a rule enforces it. - paymentOptions: for a space with a minimum spend, the amounts the payment link will ask for, after the operator's payment rules. Full payment is always offered. The deposit option follows the operator's room hire deposit rule (its percentage and terms, 25% unless the operator changed it). It is left out where no rule applies, when the rule asks for full payment, or when the booking date is within the rule's pay-in-full window. Empty without a space or a minimum spend. The amounts are quoted for the duration asked; if the booking is made with a different duration (for example a shorter flexible one), read the booking's payment options after booking, which are the amounts charged. - bookingPolicies: wording the guest must accept before booking, for the operator's own booking widget only (X-Partner-Reference: Own Website). Send each accepted policy's id in the booking's acceptedPolicyIds; a booking without them is refused with BKRUL-N-009. Sitewide policies come first. Every other caller gets none and is never refused for them. They include the booking type's own booking policy from the operator's booking system (named "Booking policy": the date override's notes on a date that has its own, otherwise the weekday's), shown wherever the operator set one. Its id changes when that wording changes, so read it again rather than keep it. - marketingPolicies: opt-ins to offer, never pre-ticked. Send each answer in the booking's marketingAnswers; an opt-in is recorded with the booking in the operator's booking system. The operator's own booking widget (X-Partner-Reference: Own Website) is offered the marketing preferences the operator's booking system shows at the venue, with its wording, for every booking type. When any of the operator's marketing rules applies to the booking (for example one for room hire), the rules' opt-ins replace the venue's completely. Every other caller gets only the operator's marketing rules. The policies, deposit and opt-ins are for your channel: they depend on who asks (the X-Partner-Reference and its channel categories), so ask with your own identity and the slot you are about to book, and never reuse another channel's policy ids. Policy and opt-in wording is Markdown: render it formatted. guestFields and questions are the same for every channel; they depend only on the venue and booking type. Endpoint: GET /venues/{compositeId}/booking-terms Version: 12.19.0 Security: Live, Sandbox ## Path parameters: - `compositeId` (string, required) The product's composite id, as for POST /venues/{compositeId}/booking. ## Query parameters: - `date` (string, required) The booking date (the venue's trading day, as for availability). - `time` (string, required) The start time, HH:mm. Example: "19:00" - `partySize` (integer, required) - `duration` (integer) Minutes. When omitted, the booking type's shortest duration for the party, as the booking would get. - `spaceId` (integer) The space to book, from availability's times[].product.spaces. Payment options need it, and rules the operator narrowed to a space apply only with it: send the same spaceId when you create the booking. A space that isn't one of the venue's is refused with 404 BOOK-N-010. ## 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" ## Response 200 fields (application/json): - `guestFields` (object, required) The guest details a booking type asks for, as the operator set them up in their booking system. First name, last name and email are always asked. Like the questions, these are the operator's own website's (BOO-1470): the operator's own website gets what the booking system switches on for the booking type; any other channel gets none of the optional ones (except specialRequests, which every channel reads as the venue sets it) (hidden) unless an operator's guest-questions rule names them for it, and the phone is only ever optional or required for it. A field the booking system hides stays hidden for everyone. - `guestFields.dateOfBirth` (string, required) hidden: don't ask (a dateOfBirth sent anyway is dropped). optional: ask, the guest may skip it. required: ask, and the booking is refused without dateOfBirth (422 BOOK-N-041) where an operator's guest-questions rule enforces it for your channel; otherwise it is the venue's own setting and a booking without it is accepted. The operator's own website reads the venue's setting. Any other channel reads hidden (before 12.0.0: optional) unless a rule names the date of birth for it: optional when named as optional, required when it requires it. hidden in the booking system stays hidden for everyone. A booking type the operator marked both hidden and required reads required on the own website. Enum: "hidden", "optional", "required" - `guestFields.specialRequests` (string, required) Whether to show the box for the booking's notes. notes is accepted either way. Every channel reads the venue's setting: shown unless the booking system hides it for the booking type (12.1.0; in 12.0.0 any channel other than the own website read hidden). Enum: "shown", "hidden" - `guestFields.phone` (string, required) Whether to ask for the guest's phone. The own website: required where the booking system requires it, else optional. Any other channel: optional, or required where an operator's guest-questions rule requires it, and then a booking without phone is refused (422 BOOK-N-044). Never hidden. Enum: "hidden", "optional", "required" - `guestFields.allNames` (string, required) Whether the booking system asks for every guest's name. required on the own website only where the booking type requires it; hidden otherwise and for any other channel unless a rule names all_names. The booking request can't carry it yet, so it is reported but never enforced. Enum: "hidden", "optional", "required" - `guestFields.gender` (string, required) Whether the booking system asks for the guest's gender. Read like allNames: required on the own website only where the booking type requires it, hidden otherwise. The booking request can't carry it yet, so it is reported but never enforced. Enum: "hidden", "optional", "required" - `questions` (array, required) The operator's questions for this venue and booking type, in the order the operator's booking system lists them. Archived ones and ones not switched on for this venue and booking type are left out; empty when none. - `questions.id` (string, required) The question's id. Send it back as questionId in answers. Example: "615184d5453d703314000bd3" - `questions.label` (string, required) The question, as the operator wrote it. Example: "Is this a Birthday Booking?" - `questions.type` (string, required) How to ask it and what a valid answer is. text: free text (a string). select: one of options (a string). multiselect: one or more of options (a list of strings). boolean: yes or no (true or false). Enum: "text", "select", "multiselect", "boolean" - `questions.options` (array, required) The choices for select and multiselect, exactly as to be sent back. Empty for the other types. Example: ["Vegetarian","Vegan","Gluten free"] - `questions.mandatory` (boolean, required) The guest must answer, for your channel. On the operator's own website it is the venue's own setting; for any other channel it is true only where an operator's guest-questions rule for your channel requires the question (source channel); a question your channel is merely asked has mandatory false (BOO-1470). A booking without an answer is refused (422 BOOK-N-040) only where such a rule enforces it; an empty text, an empty list or a missing answer all count as no answer. A boolean question is answered by false as well as true. - `questions.source` (string, required) Why your channel is asked it. venue: the venue's own question in the operator's booking system. channel: an operator's guest-questions rule makes your channel ask it (always mandatory). Enum: "venue", "channel" - `paymentOptions` (array, required) - `paymentOptions.optionType` (string) full_minimum_spend (the whole amount) or deposit_25_minimum_spend (the deposit, whatever its percentage: the id is kept for compatibility). Example: "deposit_25_minimum_spend" - `paymentOptions.label` (string) - `paymentOptions.amount` (integer) Amount in pence (GBP), so 50000 is £500.00. - `paymentOptions.percent` (integer,null) The deposit's percentage of the full amount; deposit option only. - `paymentOptions.terms` (string,null) The operator's deposit terms, to show next to the deposit option; deposit option only. - `bookingPolicies` (array, required) - `bookingPolicies.id` (string) Send this back in acceptedPolicyIds (booking policy) or marketingAnswers (marketing policy). - `bookingPolicies.name` (string) The operator's name for the policy. - `bookingPolicies.wording` (string) The operator's wording, exactly as they wrote it: Markdown (CommonMark with GitHub tables and autolinks), so paragraphs, headings, bold, lists and links. Render it formatted, without rendering raw HTML. - `marketingPolicies` (array, required) ## 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 (usually non-retryable; a few N codes are retryable, see isRetryable). 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. Authoritative over the code's letter: true for every R code and for the N codes the error catalog marks retryable (e.g. ENQRY-N-005, a draft model timeout). - `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."]} - `unmetRequirements` (array,null) Only present for USER-N-022 when the operator's password rules refused the password (BOO-1144): what the password is missing. Absent when Auth0's own policy refused it; then detail says why. Enum: "minLength", "uppercase", "lowercase", "number", "specialCharacter" - `resetWith` (string,null) Only present for USER-N-023 (BOO-1144): the call that sets the new password the user's operator asks for and clears the reset. A password changed on Auth0's forgotten-password page does not. Example: "PUT /users/me/password" ## Response 401 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 (usually non-retryable; a few N codes are retryable, see isRetryable). 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. Authoritative over the code's letter: true for every R code and for the N codes the error catalog marks retryable (e.g. ENQRY-N-005, a draft model timeout). - `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."]} - `unmetRequirements` (array,null) Only present for USER-N-022 when the operator's password rules refused the password (BOO-1144): what the password is missing. Absent when Auth0's own policy refused it; then detail says why. Enum: "minLength", "uppercase", "lowercase", "number", "specialCharacter" - `resetWith` (string,null) Only present for USER-N-023 (BOO-1144): the call that sets the new password the user's operator asks for and clears the reset. A password changed on Auth0's forgotten-password page does not. Example: "PUT /users/me/password" ## 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 (usually non-retryable; a few N codes are retryable, see isRetryable). 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. Authoritative over the code's letter: true for every R code and for the N codes the error catalog marks retryable (e.g. ENQRY-N-005, a draft model timeout). - `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."]} - `unmetRequirements` (array,null) Only present for USER-N-022 when the operator's password rules refused the password (BOO-1144): what the password is missing. Absent when Auth0's own policy refused it; then detail says why. Enum: "minLength", "uppercase", "lowercase", "number", "specialCharacter" - `resetWith` (string,null) Only present for USER-N-023 (BOO-1144): the call that sets the new password the user's operator asks for and clears the reset. A password changed on Auth0's forgotten-password page does not. Example: "PUT /users/me/password" ## 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 (usually non-retryable; a few N codes are retryable, see isRetryable). 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. Authoritative over the code's letter: true for every R code and for the N codes the error catalog marks retryable (e.g. ENQRY-N-005, a draft model timeout). - `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."]} - `unmetRequirements` (array,null) Only present for USER-N-022 when the operator's password rules refused the password (BOO-1144): what the password is missing. Absent when Auth0's own policy refused it; then detail says why. Enum: "minLength", "uppercase", "lowercase", "number", "specialCharacter" - `resetWith` (string,null) Only present for USER-N-023 (BOO-1144): the call that sets the new password the user's operator asks for and clears the reset. A password changed on Auth0's forgotten-password page does not. Example: "PUT /users/me/password" ## 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 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"