/booking_submit_v7

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.
 
(Note: The details shown in the following sample image are subject to change)
 

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 or debit 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.


Response

ContentType: application/json

{
  "reference_id": "766588a634734cc8b60dd6a66b2561c4",
  "status": "Success",
  "reservation": {
    "reservation_id": "AB0005",
    "partner_hotel_code":"sfssc1", 
    "status": "Booked",
    "confirmation_url": "http://www.tripadvisor.com",
    "checkin_date": "2016-10-28",
    "checkout_date": "2016-10-29",
    "hotel":{  
      "name":"Hotel Commonwealth",
      "address1":"500 Commonwealth Avenue",
      "address2":"",
      "city":"Boston",
      "state":"Massachusetts",
      "postal_code":"02215",
      "country":"USA",
      "latitude":42.348808,
      "longitude":-71.094971,
      "phone":"555-555-5555",
      "url":"http://www.partner-site.com/hotelcommonwealth",
      "hotel_amenities":{  
        "standard":[  
          5,
          15
        ],
        "custom":[  
          "Bean bag chairs"
        ]
      },
      "photos":[  
        {  
          "url":"https://www.partnersite.com/hotel_lobby.png",
          "width":200,
          "height":300,
          "caption":"Hotel Lobby"
        },
        {  
          "url":"https://www.partnersite.com/hotel_cafe.png",
          "width":200,
          "height":300,
          "caption":"Hotel Cafe"
        }
      ],
      "checkinout_policy":"For early check in, please contact hotel.",
      "checkin_time":"12:00",
      "checkout_time":"14:00",
      "hotel_smoking_policy":{  
        "standard":[  
          47
        ],
        "custom":[  
          "Strict non smoking policy"
        ]
      },
      "child_policy":"All children are welcome",
      "pet_policy":{  
        "standard":[  
          6
        ],
        "custom":[  
          "My own pet policy if applicable"
        ]
      },
      "parking_shuttle":{  
        "standard":[  
          185
        ],
        "custom":[  
          "You can park on curbside in a metered spot"
        ]
      },
      "extra_bed_policy_hotel":"Rollaway beds and cribs available on request",
      "extra_fields":[  
        {  
          "id":"text1",
          "description":"Enter text",
          "required":false,
          "type":"text",
          "default_value":"foo"
        },
        {  
          "id":"select2",
          "description":"Choose an option",
          "required":true,
          "type":"single_select",
          "field_values":[  
            {  
              "id":"first",
              "description":"First option"
            },
            {  
              "id":"second",
              "description":"Second option"
            }
          ]
        }
      ]
    },
    "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"
      }
    ],
    "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.",
    "receipt": {
      "line_items": [
        {
          "price": {
            "amount": 100,
            "currency": "USD"
          },
          "type": "rate",
          "paid_at_checkout": false,
          "description": "base fee: day 0"
        },
        {
          "price": {
            "amount": 200,
            "currency": "USD"
          },
          "type": "fee",
          "paid_at_checkout": true,
          "description": "mint: day 0"
        }
      ],
      "final_price_at_booking": {
        "amount": 100,
        "currency": "USD"
      },
      "final_price_at_checkout": {
        "amount": 200,
        "currency": "USD"
      }
    }
  },
  "customer_support": {
    "phone_numbers": [{
       "contact": "555-555-5555",
       "description": "Support phone line"
    }]
  }
}

Properties

Field Type Description
problems Problem array
An array of problems that occurred
  • [Required] if status = "Failure."
  • [Optional] if status = "Success"
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.