Request
https://partner-site.com/api_implementation/booking_submit
ContentType: application/json
{ "checkin_date":"2016-10-28", "checkout_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 |
---|---|---|
checkin_date | string |
The check-in date of the traveler. The date will be in the form YYYY-MM-DD.
|
checkout_date | string |
The check-out date of the traveler. The date will be in the form 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 [NEW] | 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 card details for payment of the reservation.
|
final_price_at_booking | Price |
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 |
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. |