Last updated

/bookingDetails - V3 migration guide


In V2, the bookingDetails endpoint returns a list of accommodation bookings that have been made through your account or with one of your affiliate ids.

In V3, two separate endpoints provide the equivalent functionality:

Note that the /orders/details/* endpoints do not return static accommodation data that was returned by bookingDetails. To obtain static accommodation data you must use the /accommodations/details endpoint.

Use the following tables to identify how to migrate request query parameters and response fields from a V2 bookingDetails 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

The following tables show:

/orders/details request mappings

V2 query parameterEquivalent V3 field
created_from
created_until
created.from
created.to
last_changeupdated.from,
updated.to
local_fee_currencycurrency
offsetpage
new in V3sort.by
sort.direction
rowsmaximum_results

/orders/details/accommodations request mappings

V2 query parameterEquivalent V3 field
extras=cancellation_info
extras=mealplans
extras=[policies]
local_fee_currencycurrency
reservation_idreservations

No equivalent V3 mapping

V2 query parameterNotes
checkin_from
checkin_until
checkout_from
checkout_until
extras=auth_form_url
extras=hotel_page_url
extras=key_collection_info
Use /accommodations/details to obtain this information.
extras=no_show
extras=status_details
Not required.
Both /orders/details and /orders/details/accommodations return status details by default.
extras=receipt_urlThe payment receipt is only available when you use /orders/create.
extras=total_room_nights
last_change_day
options
stay_probability_from
stay_probabiity_to

Response schema mappings

This section contains the following tables:

/orders/details response mappings

Bookings

V2 fieldEquivalent V3 field
affiliate_idaffiliate
booker_citybooker.address.city
booker_emailbooker_email
booker_firstnamebooker.name.first_name
booker_lastnamebooker.name.last_name
booker_phonebooker.telephone
createdcreated
currencycurrency.accommodation
euro_feecommission.amount.accommodation_currency
guest_price_europrice.total.accommodation_currency

Note: In V2 this price was always in Euros.
In V3 this price is in the currency used by the accommodation.
languagebooker.language
local_feecommission.amount.booker_currency
loyalty:
> rewards:
>> type
>> amount
>> is_eligible
>> fulfillment_at_utc
>> fulfillment
>> loyalty_member_data:
>>> field_name
>>> field_value
>> currency
>> payout_after
loyalty_reward

Note: For more information see the description in the API Reference.
ttv:
> amount
> currency
price
statusstatus

Note: In V3 status is available at the order, accommodation and product level.
travel_purposebooker.travel_purpose
user_devicebooker.platform

/orders/details/accommodations response mappings

Bookings

V2 fieldEquivalent V3 field
affiliate_labellabel
cancellation_datecancellation_details.at
cancellation_feecancellation_details.fee
cancellation_info:
> from
> fee

The cancellation_info fields currency, timezone and until have no equivalent mapping in V3. See Fields with no V3 equivalent.
products.policies.cancellation:
> from
> price

Note: V3 handles cancellations differently to V2.
extra_charges_breakdown: > extra_charge:
>> name
>> charge_amount
>> currency
>> excluded
>> charge_price_mode
>> name_id
>> amount
products.prices

Note: V3 handles prices differently to V2. See Prices (/orders).
checkincheckin
checkoutcheckout
currencycurrency.accommodation
external_reservation_idsaccommodation_order_references
fee_percentagecommission.actual_percentage
hotel_idaccommodation
hotel_emailaccommodation_details.email
hotel_nameaccommodation_details.name
destination_ufi
hotel_address
hotel_coordinates:
> latitude
> longitude
hotel_countrycode
hotel_zipcode
accommodation_details.location
pincodepin_code
reservation_idreservation

Note: See Reservation and order ids.
rooms:
> id
product.room
rooms:
> name
product.room_details.name
statusstatus,
products.status

Note: In V3 status is available at the order, accommodation and product level.

Bookings.rooms

V2 fieldEquivalent V3 field
guest_emailproducts.guests.email
guest_nameproducts.guests.name
mealplan:
> dinner:
>> price_per_person_per_night
>> number_of_nights
>> included
>> number_of_persons
> lunch: (breakdown as dinner)
> breakfast: (breakdown as dinner)
products.policies.meal_plan

Note: The V2 mealplan and V3 meal_plan structures are different.
nr_guestsproducts.allocation
smoking_preferenceproducts.policies.smoking_preference

/accommodations/details response mappings

Bookings

V2 fieldEquivalent V3 field
chain_idsbrands
key_collection_info:
> alternative_key_location
> key_location
> how_to_collect
key_collection_information
urlurl

Fields with no V3 equivalent

Bookings

V2 field                                                     Notes
auth_form_url
booker_mailinglist
cancellation_info:
> currency
> timezone
> until
The cancellation_info fields from and fee are mapped. See /orders/details/accommodations response mappings.
charges:
> included
> transaction_sum
> excluded
The charges object was deprecated in V2.10.
creditslip
destination_nameTo get the name of the city in which the accommodation is located:
1. Call /accommodations/details. The location.city value in the response returns the city id.
2. Call /common/locations/cities and specify the city id in the request.
direct_payment_info:
> payment_amount_paid
> percent_paid
> currency
> payment_amount
fee_calculation_date
guest_price_local
price_euro
V3 handles prices differently to V2. See Prices (/orders).
hotel_fax
key_collection_info:
> other_text
nr_guestsThe products.allocation field in the /orders/details/accommodations response gives the number of guests in each room. You can use this information to calculate the total number of guests.
nr_modification_allowed:
> from
> timezone
> until
nr_roomsYou can obtain this data by counting the number of items in the products array in the /orders/details/accommodations response
receipt_urlThis data is available from the /orders/create endpoint.
stay_probability
total_room_nights
rooms:
> guest_comments
> rres_id
sustainable_hotel