Last updated

/hotelAvailability - V3 migration guide


In V2, the hotelAvailability endpoint returns the cheapest available room for each hotel matching a traveller's check-in and check-out dates.

In V3, the equivalent endpoint is /accommodations/search. Use this endpoint to search for accommodations that has at least one available product that matches the search criteria for a traveller's stay.

The search response returns:

  • The ID of every accommodation that has at least one available product (or product combination) that matches the search criteria.
  • For each accommodation, the price of the product(s) that Booking.com recommends as the best match for the search criteria.
  • In case the search criteria in the request is for accommodations located in a specific country or region, the retrieved results are sorted by default based on "popularity" (also known as "Top picks").
  • However, you can still optionally use other "Sort.by" options, to get results based on price, distance, etc, instead.

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.

V3 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 parameterEquivalent V3 field
airportairport
city_ids,
countries,
district_ids,
landmark_ids,
region_ids
city,
country,
district,
landmark,
region
hotel_idsaccommodations
latitude,
longitude,
radius
coordinates->
- latitude,
- longitude,
- radius

Dates and guests

V2 query parameterEquivalent V3 field
checkincheckin
checkoutcheckout
guest_countrybooker.country
guest_ipNot available. Use booker.country instead.
no_rooms, room1..room30guests
V3 handles allocation of guests to rooms differently to V2. See Guest details and room allocation.
checkincheckin

Filter criteria

V2 query parameterEquivalent V3 field
filter=free_cancellation
filter=non_refundable
cancellation_type
filter=no_prepayment
filter=sustainable
Not available
hotel_facility_type_idsaccommodation_facilities
max_price, min_priceprice
mealplanmeal_plan
min_review_score, starsrating
options=no_cc_filter
options=show_test
Not available
options=no_dormsdormitories
options=is_24hr24_hour_reception
property_typeaccommodation_types
room_facility_type_idsroom_facilities
show_only_dealsNot available

Extra information

V2 query parameterEquivalent V3 field
extras=block_payment_optionsextras.products
extras=hotel_details
extras=hotel_amenities
extras=room_amenities
extras=room_details
extras=room_policies,
Not available. Use /accommodations/details to return this information.
extras=payment_terms,
extras=sustainability
Not available

General

V2 query parameterEquivalent V3 field
add_filtered rateNot available
affiliate_idNot available
currencycurrency
languageNot available
This parameter is not needed because /accommodations/search does not return any translatable data.
user_platformbooker.platform

Sorting and pagination

V2 query parameterEquivalent V3 field
offsetpage
rowsrows
order_bysort.by
- The V2 order_by values popularity and ranking are not available.
- Now popularity is set by default when searching by country or region. (Not applicable to city or district.)
order_dirsort.direction
The V2 order_dir values asc and desc are not available. Use ascending and descending instead.

Response schema mappings

result

V2 fieldEquivalent V3 field
address,
checkin_time,
cc_required,
cvc_required,
country,
hotel_amenities,
hotel_name,
hotel_photo,
location,
postcode,
review_nr,
review_score,
stars
Not available
Use /accommodations/details to obtain this information.
cheapest_filtered_rate,
default_language,
sustainability
Not available
deep_link_urldeep_link_url
direct_paymentNot available
V3 handles payments differently to V2.
hotel_currency_codecurrency
hotel_idid
hotel_urlurl
net_price,priceprice:
V3 handles prices differently to V2. See Prices (/accommodations).
review_score_wordNot available
Use /accommodations/constants to obtain this information.

rooms -> products

V2 fieldEquivalent V3 field
adultsnumber_of_adults
all_inclusive,
breakfast_included,
full_board,
half_board
policies.meal_plan
breakfast_costNot available
block_idid
cancellation_type,
refundable,
refundable_until
policies.cancellation
childrenchildren
deal_tagging.deal_name,
deal_tagging.discount_percentage,
deal_tagging.public_price
deal
platformNot available
deposit_requiredNot available
extra_charge,  net_price,  priceprice
V3 handles prices differently to V2. See Prices (/accommodations).
num_rooms_available_at_this_priceNot available.
Use /accommodations/availability to obtain this information.
pay_later_collection_date,
payment_terms.cancellation_description,
payment_terms.name,
payment_terms.prepayment_description
Not available
V3 handles payments differently to V2.
payment_options.pay_at_property,
payment_options.pay_online
policies.payment.timings
room_amenities,
room_name,
room_type_id
Not available. 
Use /accommodations/details to obtain this   information.
room_idroom
room_policies.class,
room_policies.content,
room_policies.mealplan_vector
Not available