# /hotels - V3 migration guide

## Endpoints

In version 2, the /hotels endpoint returns hotel and room data.

- By default, the endpoint returns only the `hotel_ids` of the hotels that match the supplied search criteria.
- You can use the `extras` parameter to tailor the information returned to your requirements.


In version 3, the equivalent endpoint is [accommodations/details](/demand/docs/open-api/demand-api/accommodations/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_ids``countries``region_ids` | `city``country``region` |
| `district_ids``landmark_ids` | `district` `landmarks` |
| `hotel_ids` | `accommodations` |


To retrieve locations in v3, use the [common/locations API collection](/demand/docs/open-api/demand-api/commonlocations).

### 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](/demand/docs/accommodations/filter-sorting) 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 parametervalues 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](/demand/docs/migration-guide/v3/changes-in-v3#multiple-language-support). |


### Pagination

| **v2 query parameter** | **Equivalent v3 field** |
|  --- | --- |
| `offset` | `page` |
| `rows` | `rows` |


Refer to the [Pagination guide](/demand/docs/development-guide/pagination) for examples and best practices.

## Response schema mappings

### Result

| **v2 field** | **Equivalent v3 field** |
|  --- | --- |
| [hotel_data](#hotel_data) | [data](#hotel_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` |
| `address``city_id,``country, ``district_id,``location.latitude,``location.longitude,``region_ids,``zip` | `location` |
| `adult_age_restrictions.max_age``adult_age_restrictions.min_age` | `policies.maximum_checkin_age``policies.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](/demand/docs/payments/overview). |
| `chain_id` | `brands` |
| `checkin_checkout_times.checkin_from``checkin_checkout_times.checkin_to``checkin_checkout_times.checkout_from``checkin_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. |
| `class``class_is_estimated``exact_class``number_of_reviews``preferred``review_score` | `rating` |
| `credit_card_exceptions``creditcard_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_description``hotel_important_information``license_number` | `description` |
| `hotel_facilities.attrs``hotel_facilities.hotel_facility_type_id,` | `facilities` |
| `name` | *Not available*Use `/accommodations/constants` to obtain this information. |
| `hotel_photos.main_photo``hotel_photos.tags``hotel_photos.url_max300``hotel_photos.url_original``hotel_photos.url_square60` | `photos` |
| `auto_tags``is_logo_photo` | *Not available* |
| `hotel_policies.content``hotel_policies.name``hotel_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` in 3.1 (and `work_friendly` in 3.2) |
| `key_collection_info.alternative_key_location``key_collection_info.how_to_collect``key_collection_info.key_location` | `key_collection_information` |
| `other_text` | *Not available* |
| `max_persons_in_reservation``max_rooms_in_reservation` | *Not available* |
| `name` | `name` |
| `number_of_rooms` | `number_of_rooms` |
| `payment_details` | `extras.payment` |
| `payment_options.pay_at_the_property``payment_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_count``bedroom_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_price``min_price``ranking` | *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` |