/hotel_inventory_v7

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

 

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=tripconnect

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.