Booking submit requests are sent by adding /booking_submit to your endpoint and sending the parameters explained below in a POST request.
When the traveler has made a room choice after viewing the booking availability results, they proceed to the next step of making a room booking. They are presented with a booking form, where they fill in the details that are sent to the endpoint as part of the booking submit request.
Request
https://partner-site.com/api_implementation/booking_submit
ContentType: application/json
{ "api_version": 8, "start_date":"2016-10-28", "end_date":"2016-10-29", "partner_hotel_code":"sfssc1", "reference_id":"766588a634734cc8b60dd6a66b2561c4", "ip_address":"192.168.1.1", "customer":{ "first_name":"Paul", "last_name":"Revere", "phone_number":"5555555555", "email":"paul.revere@tripadvisor.com", "country":"US" }, "rooms":[{ "party":{"adults":1,"children":[]}, "traveler_first_name":"Paul", "traveler_last_name":"Revere" }], "special_requests":"A pre-made pillow fort and Vanilla coke on arrival please.", "payment_method":{ "card_type":"Visa", "card_number":"5454545454545454", "cardholder_name":"Paul Revere", "expiration_month":"01", "expiration_year":"2015", "cvv":"999", "billing_address":{ "address1":"141 Needham Street", "city":"newton", "state":"MA", "postal_code":"77777", "country":"US" } }, "final_price_at_booking":{ "amount":100, "currency":"USD" }, "final_price_at_checkout":{ "amount":200, "currency":"USD" }, "partner_data":{ "hotel_code":"sfssc1", "room_code":"FENWAY", "rate":1 } }
Properties
Field | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
api_version | int |
The version of the API of this request
|
|||||||||
start_date | string |
The check-in date of the traveler.The date will be in ISO8601 full-date format (YYYY-MM-DD).
|
|||||||||
end_date | string |
The check-out date of the traveler. The date will be in ISO8601 full-date format (YYYY-MM-DD).
|
|||||||||
partner_hotel_code | string |
Partner hotel id.
|
|||||||||
ip_address | string |
[Optional] Sending IP address.
|
|||||||||
reference_id | string |
TripAdvisor identifier for the booking session. Please note, this id may not be unique and should not be stored as a TripAdvisor “confirmation” id.
|
|||||||||
customer | Customer | The user booking the reservation. | |||||||||
rooms | RoomStay array |
An array of rooms to be booked.
|
|||||||||
special_requests | string |
[Optional] Free text special requests or comments from the traveler to the hotel. This field will not be enabled in the UI until TripAdvisor has verified the implementation is working correctly.
|
|||||||||
payment_method | PaymentMethod |
An object containing the credit or debit card details for payment of the reservation.
|
|||||||||
final_price_at_booking | Price object |
An object containing the entire price to be paid at time of booking, including taxes and fees. This will be used to validate the line items.
|
|||||||||
final_price_at_checkout | Price object |
An object containing the entire price to be paid at time of stay, including taxes and fees. This will be used to validate the line items. If the full price is paid at the time of booking, this element must still be included, with an amount of 0 or 0.00.
|
|||||||||
partner_data | number, string or object |
This data will not be interpreted by TripAdvisor, but will be sent back to the partner as-is when we attempt a booking. For example, this field might be used to store a partner 'rate key,’ ‘room key,’ and/or ‘product key.’ It can consist of arbitrary nested JSON, or a single string or number. |