/booking_submit

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.
 
Field Type Description
amount number
The value of the price.
currency string
ISO 4217 currency code for the price.
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.
 
Field Type Description
amount number
The value of the price.
currency string
ISO 4217 currency code for the price.
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.


Response

ContentType: application/json

{
  "api_version": 8
  "reference_id": "766588a634734cc8b60dd6a66b2561c4",
  "status": "Success",
  "reservation": {
    "reservation_id": "AB0005",
    "status": "Booked",
    "confirmation_url": "http://www.hotelsite.com/deeplink-to-reservation",
    "start_date": "2017-05-01",
    "end_date": "2017-05-03",
    "partner_hotel_code": "sfssc1",
    "hotel": {
      "name": "Hotel Commonwealth",
      "address1": "500 Commonwealth Avenue",
      "address2": "",
      "city": "Boston",
      "state": "Massachusetts",
      "postal_code": "02492",
      "phone": "8001234567",
      "checkin_checkout_policy": "For early check in, please contact hotel.",
      "checkin_time": "12:00Z",
      "checkout_time": "14:00Z",
      "hotel_smoking_policy": {
        "standard": [
          47
        ],
        "custom": [
          "Strict non smoking policy"
        ]
      },
      "pet_policy": {
        "standard": [
          6
        ],
        "custom": [
          "My own pet policy if applicable"
        ]
      },
      "child_policy": "All children are welcome",
      "parking_shuttle": {
        "standard": [
          185
        ],
        "custom": [
          "You can park on curbside in a metered spot"
        ]
      },
      "hotel_extra_bed_policy": "Rollaway beds and cribs available on request",
      "hotel_amenities": {
        "standard": [
          5,
          15
        ],
        "custom": [
          "Bean bag chairs"
        ]
      },
      "photos": [
        {
          "url": "https://www.example.com/hotel_lobby.png",
          "width": 480,
          "height": 270,
          "caption": "Hotel Lobby"
        },
        {
          "url": "https://www.example.com/hotel_cafe.png",
          "width": 480,
          "height": 270,
          "caption": "Hotel Cafe"
        }
      ]
    },
    "customer": {
      "first_name": "Paul",
      "last_name": "Revere",
      "phone_number": "5555555555",
      "email": "paul.revere@tripadvisor.com",
      "country": "US"
    },
    "rooms": [
      {
        "party": {
          "adults": 2,
          "children": [
            9,
            5
          ]
        },
        "traveler_first_name": "Paul",
        "traveler_last_name": "Revere"
      }
    ],
    "legal_text": "Hotel Commonwealth is committed to privacy for everyone who accesses our website. This site, Hotel Commonwealth.com, only collects personal data about you as needed to provide you with outstanding service, and to help process your request or provide you with information.",
    "comments": "But only if you are of age."
    "line_items": [
              {
                "price": {
                  "requested_currency_price": {
                    "amount": 220,
                    "currency": "USD"
                  },
                  "currency_of_charge_price": {
                    "amount": 178,
                    "currency": "EUR"
                  }
                },
                "type": "rate",
                "paid_at_checkout": false
              },
              {
                "price": {
                  "requested_currency_price": {
                    "amount": 20,
                    "currency": "USD"
                  },
                  "currency_of_charge_price": {
                    "amount": 16,
                    "currency": "EUR"
                  }
                },
                "type": "tax",
                "sub_type": "tax_city",
                "paid_at_checkout": false
              }
            ]
          },
  "customer_support": {
            "phone_numbers": {
              "standard": [
                {
                  "country_code": "1",
                  "number": "5555555555",
                  "description": "Support phone line"
                }
              ]
            }
          }

Properties

Field Type Description
problems Problem array
An array of problems that occurred
  • Required if status = "Failure."
reference_id string
Echo the reference_id requested by TripAdvisor in the request. If the request fails (timeout or otherwise), TripAdvisor should be able to use this id in a booking_verify request to determine if the call were successful or not.
status string
An overall status of the booking request. One of the following:
 
  • Success
  • Failure
reservation Reservation
An object containing details associated with the reservation (receipt, date of stay, guests, etc.). Returned only if the booking is successfully made.
customer_support CustomerSupport
A required object containing the hotel’s customer support contact information for guests.
This must be returned on both successes and failures.