/booking_sync

Note: For partners upgrading from API version 7 to 8 there has been no change to booking_sync request and response. You should continue to send the same response you would have done for API version 7.

 

Booking "sync" requests are sent by adding /booking_sync to your endpoint and sending the parameters explained below in a POST request.

The purpose of the "booking_sync" API call is to update TripAdvisor with the full set of changes to bookings that have occurred on the hotel/property system.

The "booking_sync" API call is made daily to verify which bookings actually took place as expected, or conversely which bookings were cancelled or modified.

For example, if a cancellation is made over the phone to the hotel, the booking_sync mechanism would let TripAdvisor know that a reservation was cancelled.

If "booking_cancel" or "booking_sync" API calls were not implemented, it would be up to the individual hotel/property to inform TripAdvisor that a cancellation was made, which they would need to communicate through the Instant Booking dashboard in their TripAdvisor Management Center.

If a booking has been cancelled, the original rate must be returned in the response. This also covers the case where there has been a cancellation fee charged.

In a case where a booking has been modified, the new rate must be returned in the response. (This rate must not include any charges applied to have the booking modified.)

Example:
  1. Booking in December for stay dates March 24th - March 28th, $400 base rate.
  2. Modification made on March 23rd to change stay March 24th - March 27th, which results in a $300 base rate.
  3. The response to the "booking_sync" call must contain the data March 24th - March 27th, with a $300 base rate.
  4. If there was a $20 modification fee applied it should be included in the "fees" part of the "booking_sync" repsonse, but the $300 must remain as the base rate.

Request

ContentType: application/json

[
{ "partner_hotel_code": "sfssc1", "reservation_id": "AB0005" },
{
"partner_hotel_code": "sfssc1",
"reservation_id": "AB0006"
}
]

Properties

Type Description
array A JSON array of hotel code/reservation id pairs.

Response

ContentType: application/json

[
{ "partner_hotel_code": "sfssc1", "reservation_id": "AB0005",
 "status": "CheckedOut", "checkin_date": "2014-10-28", "checkout_date": "2014-10-29", "total_rate": { "amount":100, "currency":"USD" }, "total_taxes": { "amount":20, "currency":"USD" }, "total_fees": { "amount":10, "currency":"USD" } },
{
"partner_hotel_code": "sfssc1",
"reservation_id": "AB0006",
 "status": "Cancelled",
"cancelled_date":"2014-10-20",
"cancellation_number":"12345678"
}
]

Properties

The response is a JSON array echoing the request objects and returning the pertinent reservation data. If the reservation is found, all fields appropriate to the status should be returned (e.g. checkin_date if status is CheckedIn, cancelled_date and cancellation_number if status is Cancelled). If no taxes or fees are to be paid, a Price object with an amount of 0 should still be passed.

Field Type Description
reservation_id string
Echo the reservation_id from the request.
partner_hotel_code string Echo partner_hotel_code from the request.
status string
The status of the lookup, must be one of:
 
  • Booked
  • Cancelled
  • CheckedIn
  • CheckedOut
  • NoShow
  • UnknownReference
checkin_date string
Check-in date. yyyy-MM-dd.
 
[Optional if status=Cancelled] 
checkout_date string
Check-out date. yyyy-MM-dd.
 
[Optional if status=Cancelled]
cancelled_date string
[Optional] Date the reservation was cancelled.
 
[Required if status=Cancelled]
cancellation_number string
[Optional] Unique identifier for the cancellation.
 
[Required if status=Cancelled]
total_rate Price
Total base rate of this reservation for the duration of the stay.
total_taxes Price
Total taxes of this reservation for the duration of the stay.
total_fees Price
Total fees of this reservation for the duration of the stay.