/hotels - V3 migration guide
Endpoints
In version 2, the /hotels endpoint returns hotel and room data.
- By default, the endpoint returns only the
hotel_idsof the hotels that match the supplied search criteria. - You can use the
extrasparameter to tailor the information returned to your requirements.
In version 3, the equivalent endpoint is accommodations/details. This endpoint:
- By default returns more information about each accommodation than
hotels. - Returns purely static content. It does not return any information about room availability or prices. Use the following tables to identify how to migrate request query parameters and response fields from a v2 call to the appropriate v3 equivalent.
Attention
Do not assume that mapped parameters or fields work in exactly the same way in v3 as they did in v2.
The version 3 is a significant redesign of the Demand API and some things work very differently. Use this documentation, the API Reference, and your own experimentation and testing to make sure that you migrate each v2 call correctly.
Request parameter mappings
Location
| v2 query parameter | Equivalent v3 field |
|---|---|
- | airport (new in v3) |
city_idscountriesregion_ids | citycountryregion |
district_idslandmark_ids | district landmarks |
hotel_ids | accommodations |
To retrieve locations in v3, use the common/locations API collection.
Filter criteria
| v2 query parameter | Equivalent v3 field |
|---|---|
chain_ids | brands |
hotel_facility_type_ids | accommodation_facilities |
hotel_type_ids | accommodation_types |
Refer to the Filtering and sorting guide for examples and best practices.
Extra information
| v2 query parameter | Equivalent v3 field |
|---|---|
extras | extras |
=credit_card_exceptions=payment_details | =payment |
=hotel_description=hotel_description_formatted | =description |
=hotel_facilities | =facilities |
=hotel_info=key_collection_info | Not available The information returned by these v2 parameter values is returned in the default V3 response. |
=hotel_photos=room_photos | =photos |
=hotel_policies | =policies |
=room_facilities=room_info=room_description | =rooms |
=sustainability | Not available |
General
| v2 query parameter | Equivalent v3 field |
|---|---|
language | languages You can now return multiple translations in a single call to this endpoint. See Multiple language support. |
Pagination
| v2 query parameter | Equivalent v3 field |
|---|---|
offset | page |
rows | rows |
Refer to the Pagination guide for examples and best practices.
Response schema mappings
Result
| v2 field | Equivalent v3 field |
|---|---|
| hotel_data | data |
hotel_id | id |
room_data | rooms |
hotel_data
| v2 field | Equivalent v3 field |
|---|---|
| hotel_data: | data: |
additional_policies.child_min_age,additional_policies.children_allowed | policies.minimum_guest_age |
cots_and_extra_beds | policies.cots_and_beds |
addresscity_id,country, district_id,location.latitude,location.longitude,region_ids,zip | location |
adult_age_restrictions.max_ageadult_age_restrictions.min_age | policies.maximum_checkin_agepolicies.minimum_checkin_age |
min_age | policies.minimum_guest_age |
book_domestic_without_cc_details | Not available V3 handles payments differently to V2. See Payments section. |
chain_id | brands |
checkin_checkout_times.checkin_fromcheckin_checkout_times.checkin_tocheckin_checkout_times.checkout_fromcheckin_checkout_times.checkout_to | checkin and checkout times |
city | To obtain the city name in v3, call /common/locations/cities and use the location.city value from this response. |
classclass_is_estimatedexact_classnumber_of_reviewspreferredreview_score | rating |
credit_card_exceptionscreditcard_required | payment.credit_card_required |
currency | currency |
deep_link_url | deep_link_url |
default_language | Not available (If no language is specified in the request, English is the default language) |
email | contacts |
hotel_descriptionhotel_important_informationlicense_number | description |
hotel_facilities.attrshotel_facilities.hotel_facility_type_id, | facilities |
name | Not available Use /accommodations/constants to obtain this information. |
hotel_photos.main_photohotel_photos.tagshotel_photos.url_max300hotel_photos.url_originalhotel_photos.url_square60 | photos |
auto_tagsis_logo_photo | Not available |
hotel_policies.contenthotel_policies.namehotel_policies.type | policies To get the accommodation policies, call the /accommodations/details endpoint and specify the extras parameter with the policies option. |
hotel_type_id | accommodation_types |
hotelier_welcome_message | Not available |
is_closed | Not available |
is_work_friendly | is_work_friendly |
key_collection_info.alternative_key_locationkey_collection_info.how_to_collectkey_collection_info.key_location | key_collection_information |
other_text | Not available |
max_persons_in_reservationmax_rooms_in_reservation | Not available |
name | name |
number_of_rooms | number_of_rooms |
payment_details | extras.payment |
payment_options.pay_at_the_propertypayment_options.pay_online | payment.timings |
ranking | ranking |
spoken_languages | spoken_languages |
sustainability | Not available |
theme_ids | themes |
url | url |
room_data
| v2 field | Equivalent v3 field |
|---|---|
| room_data | rooms |
room_description | description |
room_facilities.room_facility_type_id | facilities |
name | Not available Use /accommodations/constants to obtain this information. |
room_id | id |
| room_info | |
bathroom_countbedroom_count | number_of_rooms |
bedrooms.bed_configurations.bed_types.configuration_id.count | bed_options.bed_configurations |
bedrooms.bed_configurations.bed_types.description.description_imperial.name | Not available Use /accommodations/constants to obtain this information. |
bedrooms.description.name | Not available |
bookable | Not available |
is_work_friendly | attributes |
max_pricemin_priceranking | Not available |
occupancy.allow_cribs_and_extra_beds.max_cribs.max_extra_beds | cots_and_extra_beds |
occupancy.max_adults.max_children.max_occupancy | maximum_occupancy |
room_size | size |
room_type | Not available |
room_type_id | room_type |
roomtype | Not available. Use /accommodations/constants to obtain this information. |
room_name | name |
room_photos.main_photo.tags.url_max300.url_original.url_square60 | photos |