/hotel_inventory_v7

Inventory requests are sent by appending /hotel_inventory to your endpoint and sending the parameters described below in a GET request.
 

Important: You must provide your full inventory (full list of hotels) and remove all test properties for us to consider your implementation complete.

TripAdvisor expects you to continue to provide your entire inventory and return availability for all your properties. If the entire inventory is not provided your connection may be paused, which will pause all traffic for all hotels connected through your system. 

You can find more information about the hotel inventory here: http://www.tripadvisor.com/ConnectivityPartnerFAQ#hotelInv

Note: This request is only required for internet booking engines and not required if an inventory/bidding feed is already configured with TripAdvisor.

Request

http://www.partner-site.com/api_implementation/hotel_inventory?lang=en&api_version=7&inventory_type=instantbook

Query Parameters

Name Type Description
api_version number
The version of the API that this request is using.
lang string
Language code (see Supported Languages). The language that Tripadvisor would prefer that the partner return content in. If the partner does not have the language of the request, they can return a less specific language. e.g. If the request is asking for de_AT, then the response can be de. If the partner does not have the language, they may return a response with any language.
inventory_type string
The type of inventory that is being requested

Response

ContentType: application/json

{
    "api_version" : 7,
    "lang" : "en_US",
    "hotels" :
        [
            {
                "ta_id" : 258705 ,
                "partner_id" : "hc",
                "name" : "Hotel Commonwealth",
                "street" : "500 Commonwealth Avenue",
                "city" : "Boston",
                "postal_code" : "02215",
                "state" : "Massachusetts",
                "country" : "USA",
                "latitude" : 42.348808,
                "longitude" : -71.094971,
                "desc" : "The Hotel Commonwealth stands above the Kenmore Square \"T\" subway station in Boston, Mass. Fenway Park is located two blocks away, while the shops along Newbury Street are three blocks from the hotel.",
                "amenities" : ["RESTAURANT","NON_SMOKING"],
                "url" : "http://www.partner-site.com/hotelcommonwealth",
                "email" : "concierge@example.com",
                "phone" : "555-555-5555",
                "fax" : "555-555-5555",
                "room_types"  :
                    {
                        "Fenway Room" :
                            {
                                "url" : "http://www.partner-site.com/hotel_commonwealth/fenway_room",
                                "desc" : "One king bed with pillowtop mattress, Frette Italian linens, down bedding, multiple pillows. View of Fenway Park."
                            },
                        "Commonwealth Room" :
                            {
                                "url" : "http://www.partner-site.com/hotel_commonwealth/commonwealth_room",
                                "desc" : "One king bed with pillowtop mattress, Frette Italian linens, down bedding, multiple pillows. View of Commonwealth Avenue."
                            }
                    }
            }
        ]
}

Properties

Field Type Description
api_version number The version of the API that this response is using.
lang string Language code (see Supported Languages). The language of the response.
hotels InventoryHotel array Array of all inventory hotel objects supported by the partner. This is a full inventory list. Any hotels not included in an inventory response will be removed from the site.
errors Error array [Optional] If any error is included in the inventory response, the inventory will not be processed.

 

Please note that TripAdvisor will always expect a response with "api_version": 7 in it, with the respective fields required in a v7 response. In order to transition from our current v5 to v7 (new) API, TripAdvisor may send you a request with the "api_version": 5 and transition these to "api_version": 7 in the near future. Please ensure that your v7 endpoint accepts the TripAdvisor request with variant "api_version" (both 5 and 7).