http://partner-site.com/api_implementation/room_information
ContentType: application/x-www-form-urlencoded
api_version=7 &hotel={ "ta_id": 730099, "partner_hotel_code": "1191", "partner_url": "http://www.partner-site.com/deeplink/to/1191" } &language_request=en_US &unique_query_key=6167a22d1f87d2028bf60a8e5e27afa7_191_1360299600000_1_200
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
api_version | number | The version of the API that this request is using. | ||||||||||||
hotel | object | JSON serializable hash representing requested hotel.
|
||||||||||||
language_request | string |
Language code (see Supported Languages). The inventory requested in a single call will be for this language specified, i.e. there can only be one language returned. If the partner cannot provide the exact language in the request, they can return a closely matched language — for example, if the request is asking for "de_AT", a response in "de" is also acceptable. If the partner cannot provide the language requested, abort response and return an "error_log" within "language_response" |
||||||||||||
unique_query_key | string | String useful for debugging. It is recommended for this value to be logged. |
ContentType: application/json
{ "api_version": 7, "hotel_id": 730099, "language_response": {
"code_str":"en_US",
"error_log": ""
} "query_key": "6167a22d1f87d2028bf60a8e5e27afa7_191_1360299600000_1_200",
"hotel_room_types": {
"KNGDL": {
"code": "KNGDL",
"name": "Deluxe King Room",
"description": "Plush King bed, deluxe beddings, recently renovated bath",
"photos": [{
"url":"http://www.partnersite.com/FenwayRoomBed.jpg",
"width":200,
"height":300,
"caption":"Image of King Bed"
}],
"room_amenities": {
"standard": [ 20, 900118],
"custom": [ "My custom chair", "Wolf appliances" ]
},
"room_size": "500",
"room_size_units": "square_feet",
"bed_type": {
"standard": [ 3 ],
"custom": [ ]
},
"extra_bed_type": {
"standard": [ 2 ],
"custom": [ ]
},
"room_view_type": {
"standard": [ 21 ],
"custom": [ "Parking Lot" ]
},
"accessibility": "ada_compliant",
"max_occupancy": {
"number_of_adults": 2,
"number_of_children": 2
},
"room_smoking_policy": "non_smoking",
}
"DBLBED": {
"code": "DBLBED",
"name": "Double Bed Standard Room",
"description": "Comfortable double bed with a view of downtown.",
"photos": [{
"url":"http://www.partnersite.com/DoubleStdRoomBed.jpg",
"width":200,
"height":300,
"caption":"Image of King Bed"
}],
"room_amenities": {
"standard": [ 20, 900118]
},
"room_size": "400",
"room_size_units": "square_feet",
"bed_type": {
"standard": [ 3 ]
},
"extra_bed_type": {
"standard": [ 2 ]
},
"room_view_type": {
"standard": [ 2 ],
"custom": [ "Parking Lot" ]
},
"accessibility": "ada_compliant",
"max_occupancy": {
"number_of_adults": 2,
"number_of_children": 2
},
"room_smoking_policy": "non_smoking"
}
},
"hotel_rate_plans": {
"BAR1": {
"name": "Best Available Rate",
"code": "BAR1",
"description": "This is the best available rate available in March, suitable for family stays under 7 days",
"photos": [ ],
"rate_amenities": {
"standard": [ 75 ],
"custom": [ "Complimentary jetskis", "Kayak rentals" ]
},
"refundable": "unknown",
"cancellation_rules": {
"policy_info": "Partially refundable rate", ]
},
"meal_plan": {
"standard": [ 22 ],
"custom": [ "Hot Pockets" ]
},
"discount_type": {
"standard": [ 9 ],
"custom": [ "My hotel discount" ]
}
}
},
}
Field | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
api_version | number |
The version of the API that this request is using.
|
|||||||||
hotel_id | number | Echo the ta_id (not partner_hotel_code) requested by TripAdvisor in the 'hotel' object. | |||||||||
language_response | string |
|
|||||||||
unique_query_key | string | Echo the unique query key in the request by TripAdvisor. | |||||||||
hotel_room_types | HotelRoomTypeCode map | Map object that maps codes to objects.
The codes are the hotel room type codes.
The objects provide the details for the hotel room type.
|
|||||||||
hotel_rate_plans | HotelRatePlanCode map |
Map object that maps codes to objects.
The codes are the hotel rate plan codes.
The objects provide the details for the hotel rate plan.
|
Note that hotel_room_types and hotel_rate_plans are containers for an array of rooms and rateplans. Elements of each container are the same as that in /booking_availabiltiy. The only caveat is that RatePlan information requested in this periodic call will only require descriptive content to be present and you can omit any information related to dates.
The "hotel_room_types" map consists of the following fields, with their respective types and descriptions.
Field |
Type | Description |
---|---|---|
hotel_room_types | HotelRoomTypeCode map |
Map object that maps codes to objects.
The codes are the hotel room type codes.
The objects provide the details for the hotel room type.
|
Field | Type | Description |
---|---|---|
"<hotel_room_type_code>" |
HotelRoomType |
The hotel_room_type_code is itself a string. This value of the string is determined by the Connectivity Partner.
The hotel_room_type_code maps to a HotelRoomType object.
|
Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
code |
string |
The code must have the same value as the HotelRoomTypeCode.
The hotel_room_type_code is itself a string. This value of the string is determined by the Connectivity Partner. The room type code must be unique for each room available in the hotel
|
||||||||||||||||||||||||||||||||||||||||||||||||||
name | string |
The name of this room type.
For example, "Fenway Room"
|
||||||||||||||||||||||||||||||||||||||||||||||||||
description | string |
Longer room description. This will be displayed to end users, and should be in the language indicated by the 'lang' parameter.
Max length 1000 characters.
See supported HTML tags.
|
||||||||||||||||||||||||||||||||||||||||||||||||||
photos | Photo array |
An array of photo objects for the room.
|
||||||||||||||||||||||||||||||||||||||||||||||||||
room_amenities | object |
Array of number codes. Each code corresponds to an amenity for the OpenTravel Hotel Amenity Code List. A map of the standard room amenities is listed under the Supported Amenities section. The standard amenities will be returned as an integer array. If an amenity does not exist in the Supported Amenities list, then the Connectivity Partner may provide their own values. Example: |
||||||||||||||||||||||||||||||||||||||||||||||||||
max_occupancy | map of string:int |
Maximum number of guests permitted in the room. {"number_of_adults": <num_adult>, "number_of_children": <num_child>}. Example: {"number_of_adults": 3, "number_of_children": 2 } |
||||||||||||||||||||||||||||||||||||||||||||||||||
room_size | string | [Optional] How large is the room area. Specify the unit of measurement in room_size_units | ||||||||||||||||||||||||||||||||||||||||||||||||||
room_size_units | string |
[Optional] Must be specified if room_size is provided. Pick one of the two options (derived from OTA’s UOM):
|
||||||||||||||||||||||||||||||||||||||||||||||||||
bed_type | object |
The type of bed provided. Based on OpenTravel BED code table:
The standard bed_type will be returned as an integer array. If a bed_type does not exist in the table above, then the Connectivity Partner may provide their own values in the "custom" field as a string array. Return "custom":[ ] if no custom list exists.
|
||||||||||||||||||||||||||||||||||||||||||||||||||
extra_bed_type | object |
Provide information on additional beds and configurations available. Based on OpenTravel BED code table:
The standard extra_bed_type will be returned as an integer array. If an extra_bed_type does not exist in the table above, then the Connectivity Partner may provide their own values in the "custom" field as a string array. Return "custom":[ ] if no custom list exists. Example: { "standard": [1,2,5], "custom": ["Extra bed not available", "My custom extra bed type"] } |
||||||||||||||||||||||||||||||||||||||||||||||||||
room_view_type | object | [Optional] Choose from available OpenTravel codes for Room View Type when available:
The standard extra_bed_type will be returned as an integer array. If a room_view_type does not exist in the table above, then the Connectivity Partner may provide their own values in the "custom" field as a string array. Return "custom":[ ] if no custom list exists. Example: { "standard": [1,2,25], "custom": ["extra bed not available", "myextratype"] } |
||||||||||||||||||||||||||||||||||||||||||||||||||
accessibility | string |
[Optional] Choose from the following options:
|
||||||||||||||||||||||||||||||||||||||||||||||||||
room_smoking_policy | string |
We also capture hotel_smoking_policy in HotelDetails and require that the options specified here do not invalidate information at the Hotel level. In the case of a mismatch, TripAdvisor will not display this information. |
||||||||||||||||||||||||||||||||||||||||||||||||||
rooms_remaining | integer | The number of rooms remaining / available at a given hotel for this given roomtype |
"hotel_rate_plans" map consists of the following fields, with their respective types and descriptions.
Field |
Type | Description |
---|---|---|
hotel_rate_plans | HotelRatePlanCode map |
An map object, which maps codes to objects.
The codes are the hotel rate plan codes.
The objects provide the details for the hotel rate plan.
|
Field | Type | Description |
---|---|---|
"<hotel_rate_plan_code>" |
HotelRatePlan |
The hotel_rate_plan_code is itself a string. This value of the string is determined by the Connectivity Partner.
The hotel_rate_plan_code maps to a HotelRatePlan object.
|
Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
code |
string |
The code must have the same value as the HotelRatePlanCode.
The hotel_rate_plan_code is itself a string. This value of the string is determined by the Connectivity Partner. The rate plan code must be unique for each rate plan available in the hotel
|
||||||||||||||||||||||||||||||||||||||||||
name | string |
The name of this rate plan.
For example, "Best Available Rate"
|
||||||||||||||||||||||||||||||||||||||||||
description | string |
Longer rate description. This will be displayed to end users, and should be in the language indicated by the 'lang' parameter.
Max length 1000 characters.
See supported HTML tags.
|
||||||||||||||||||||||||||||||||||||||||||
photos | Photo array |
[Optional] An array of photo objects for the rate plan.
|
||||||||||||||||||||||||||||||||||||||||||
rate_amenities | object |
Array of number codes where each code corresponds to a rate amenity. Each code corresponds to an amenity for the OpenTravel Hotel Amenity Code List. A map of the standard room amenities is listed under the Supported Amenities section. Use this list to specify amenities that are specific to the rate plan, such as "Executive Club Lounge Access", "English Breakfast Included". The standard amenities will be returned as an integer array. If an amenity does not exist in the Supported Amenities list, then the Connectivity Partner may provide their own values. Example: |
||||||||||||||||||||||||||||||||||||||||||
refundable | string |
We strongly encourage the use of cancellation_rules as this will enable TripAdvisor to display useful information to your customers. This field can be omitted if you are already providing cancllation_rules. Must be one of:
|
||||||||||||||||||||||||||||||||||||||||||
cancellation_rules | object |
Container for cancellation rules and policies. We encourage you to provide only the descriptive fields within cancellation_rules (unlike the /booking_availability call). Contains the following fields:
|
||||||||||||||||||||||||||||||||||||||||||
meal_plan | object |
Choose from available OpenTravel codes for meal plans (MPT):
The standard meal_plan will be returned as an integer array. If a meal_plan does not exist in the table above, then the Connectivity Partner may provide their own values in the "custom" field as a string array. Return "custom":[ ] if no custom list exists. Example: { "standard": [1,2], "custom": ["All you can eat", "Special breakfast"] } |
||||||||||||||||||||||||||||||||||||||||||
discount_type | object |
[Optional] Choose from available codes for Discount Types when available, based on OpenTravel Discount Types:
The standard discount_type will be returned as an integer array. If a discount_type does not exist in the table above, then the Connectivity Partner may provide their own values in the "custom" field as a string array. Return "custom":[ ] if no custom list exists. Example: { "standard": [1,10], "custom": ["Florida resident discount", "Buy with sea world tickets and save"] } |