action viator_booking_book { label: "/booking/book" description: "Make a booking\n\nFor more information, see: \n\n - [Cancellation policy](#section/Key-concepts/Cancellation-policy)\n - [Booking concepts](#section/Key-concepts/Booking-concepts)\n - [Booking process flow](#section/Common-workflows-and-data-validation/Booking-process-flow)\n - [Making a booking](#section/Common-workflows-and-data-validation/Making-a-booking)\n - [Supplier communications](#section/Key-concepts/Supplier-communications)\n" provider: viator method: POST path: "/booking/book" encoding: json input: { type: "object" properties: { booker: { type: "object" description: "**object** containing details about the primary contact (**note**: this contact needn't be a traveller)" required: ["firstname", "surname"] properties: { cellPhone: { type: "string" description: "**telephone number** of the lead traveler\n\n**Note**:\n\n * Must be included to enable CLC communications\n * See [Supplier communications](#section/Merchant-APIs/Supplier-communications) for more information\n" } cellPhoneCountryCode: { type: "string" description: "**country code** for the telephone number of the lead traveler\n\n**Note**: \n\n * Must be included to enable CLC communications. \n * See [Supplier communications](#section/Merchant-APIs/Supplier-communications) for more information\n" } email: { type: "string" description: "**email address** of the primary contact" } firstname: { type: "string" format: "(.)*[\\\\<\\\\>%;\\\"\\\\(\\\\)+]+(.)*" description: "**first name** of the primary contact\n" } homePhone: { type: "string" description: "**phone number** (home) of the primary contact" } surname: { type: "string" format: "(.)*[\\\\<\\\\>%;\\\"\\\\(\\\\)+]+(.)*" description: "**surname** of the primary contact" } title: { type: "string" description: "**title** of the primary contact" } } } currencyCode: { type: "string" description: "**currency code** for the currency the booking will be submitted in (you will be billed in this currency)" } demo: { type: "boolean" description: "**specifier**: `true` if this is a *demo* booking only (demos do not send any notifications, are automatically confirmed and OnRequest products become freesale products. Default value is true. Production must have `demo` set to `false`." } items: { type: "array" description: "**array** of items to be booked" items: { type: "object" properties: { bookingQuestionAnswers: { type: "array" description: "**array** of objects containing booking questions and the answers provided for them for *this* product\n- If a booking question is available in the `bookingQuestions` array in the response from [/product](#operation/product) for *this* product, the matching `bookingQuestionAnswers` must be passed to *this* service. \n- If a product does not have any booking questions, you can omit the `bookingQuestionAnswers` array in your request. \n- Any invalid or unrequired booking-question answers that are passed to *this* service will be ignored (and, no exceptions will be raised) \n- You will need to include this array if [/product](#operation/product) returns any questions in the `bookingQuestions` array.\n" items: { type: "object" properties: { answer: { type: "string" description: "**answer** to the question for the `questionId` listed (recommended length for the answer is 500 characters)\n\n**Note**: To specify answers for each traveler, separate the values with a comma as in the per_person_booking_questions request example\n" } questionId: { type: "integer" description: "**numeric identifier** for the question (**note**: `questionId` can be retrieved from the [/product](#operation/product) service)" } } } } hotelId: { type: "string" description: "**specifer** of the hotel\nIf [/product](#operation/product) returns `hotelPickup`: `true` and a list of hotels is available for *this* product in [/booking/hotels](#operation/bookingHotels), a `hotelId` must be captured (as per the hotel service id field); or, use an alternative `hotelId`, such as:\n \n - `\"notBooked\"`: the customer has not yet booked their hotel\n - `\"notListed\"`: the customer's hotel is not listed\n\n If the customer chooses one of these options, the product supplier may need to correspond with the user to find out their pick-up location. The best way to do this is by enabling [Closed-Loop-Communication (CLC)](#section/Merchant-APIs/Supplier-communications).\n" } languageOptionCode: { type: "string" description: "**specifier** of language service provided for this product that has been chosen for this booking (usually in the format langcode/Service eg en/SERVICE_GUIDE. If the product details service [/product](#operation/product) for the product returns a langService, this must be provided.)" } partnerItemDetail: { type: "object" description: "**object** containing partner details at a per-item level" properties: { distributorItemRef: { type: "string" description: "**unique alphanumeric code** for the order ('itinerary') (merchant API partners must pass a `distributorItemRef` into the `partnerItemDetails` object for each item in *this* object\n- this code can be any alphanumeric string and is defined by the distributor\n" } } } pickupPoint: { type: "string" description: "**details** about the hotel pick-up point (must be provided if the `hotelId` selected by the user is `'notListed'` or if no hotels are returned for *this* product in [/booking/hotels](#operation/bookingHotels) where `hotelPickup` is `true`." } productCode: { type: "string" description: "**unique alphanumeric identifier** of the product to be booked" } specialRequirements: { type: "string" description: "**text field** to capture any additional requirements for the booking, such as dietary requirements or if a wheelchair is required" } tourGradeCode: { type: "string" description: "**specifier** of the tour grade to be booked (if tour grades are supplied in [/product](#operation/product), you must allow the customer to select a tour grade code. If no tour grades are available for *this* product, set this to `'DEFAULT'`.)" } travelDate: { type: "string" description: "**date** of travel for the item in format yyyy-mm-dd" } travellers: { type: "array" description: "**array** of traveler names, details and whether they are the lead traveller" items: { type: "object" properties: { bandId: { type: "integer" description: "**unique numeric identifier** for the age band\n- See: [Working with age bands](#section/Appendices/Working-with-age-bands)\n" } firstname: { type: "string" description: "**first name** of *this* traveller" } leadTraveller: { type: "boolean" description: "**indicator**: `true` if this traveler is the lead traveler" } surname: { type: "string" description: "**surname** of *this* traveler" } title: { type: "string" description: "**title** of the traveler (e.g `'Mr'`, `'Mrs'`, `'Ms'`, `'Miss'`, `'Mstr'`, `'Dr'`)" } } } } } } } partnerDetail: { type: "object" description: "Applicable only for extra partner detail for either partner or merchant partner for sending partner specific information\n" properties: { distributorRef: { type: "string" description: "**unique alphanumeric reference code** for the distributor\n- Merchant API partners must pass a `distributorRef` at the order (A.K.A. 'itinerary') level in the `partnerDetail` object. The `distributorRef` passed must be alphanumeric and unique to bookings made by the merchant.\n- Passing an existing `distributorRef`: If an existing `distributorRef` is passed, the booking with the matching `distributorRef` will be returned in the response and a new booking will not be made. The fields in the response are identical to the response for a new booking.\n" } } } } } output: { type: "object" } }