Prebook
https://api.worldota.net/api/b2b/v3/hotel/prebook/
This method updates the availability of the requested rate. If the original rate is not available, the method will try to find the same or similar rate with a new book_hash
. If exactly the same rate was not found and the request specifies a permissible price increase in price_increase_percent
, the method will try to find the same room, but with an increased price. In a new rate with an increased price, the values in payment_options
may change.
Request example
curl --location 'https://api.worldota.net/api/b2b/v3/hotel/prebook' \
--header 'Content-Type: application/json' \
--data '{
"hash": "h-b91ec066-8cb3-57bd-9a0f-2bf9cb12c132",
"price_increase_percent": 20
}'
Request body
Unique identifier of the rate (from the hotel page request). The hash key’s value can be transferred to the value of this parameter within 24 hours after the relevant rate is returned in the https://api.worldota.net/api/b2b/v3/search/hp/ results.
- The minimum length is
1
character. - The maximum length is
256
characters.
Percentage by which the new price can be higher than the original price.
Meaning if you send price_increase_percent=20 and starting price was 1000, the maximum allowed price for this prebook call is 1200.
If the value is not provided the API should try to rebook with the same price or lower.
- The minimum value is
0
.
Response
Information about the found hotel and its rates.
The unique hotel identifier.
- Either this field or the
hid
field is required.
- Either this field or the
hid
field is required.
The most preferred hotel ID.
- Either this field or the
id
field is required. - The maximum length is
7
characters.
- Either this field or the
id
field is required. - The maximum length is
7
characters.
List of available rates at the hotel.
List of amenities in the room.
There is a request which returns all available room amenities and definitions (room_amenities key):
Unique identifier of the rate. This value is passed to booking API method to identify a selected rate.
book_hash
key’s value can be transferred via the Order Booking Form method within 6 hours after the corresponding rate was returned in the search results. Exceeding this limit will return an error with error.slug
containing a “rate_not_found
” value.
The deposit information of the order. Has a value if the rate payment_types.type
field has the hotel
value.
The match_hash
field of the rate from the call made by the SERP mechanism.
Use this field if you are:
- Showing rates to the users from the call made by the SERP mechanism.
- Making a booking from these rates.
- Using this call response as actual data on the rate.
- Using this call response to actualize the exact rate from the calls made by the SERP mechanism.
Usage of this field can help the ETG collect analytics for SERP-HP matching.
Meal type in the rate.
There is a request which returns all available meals and definitions (meals
key):
https://api.worldota.net/api/b2b/v3/hotel/static/
If there is no meal type provided by the rate’s source, nomeal
value is displayed.
No-show penalty information.
Accepted payment options, with specified amount to be charged, transferred as an object with key-value pairs payment_options.payment_types
.
Please note that for a reservation, namely the specified sum (with the given currency) shall be paid.
Array with accepted payment option for the requested rate.
currency_code
).
Rate’s cancellation rules with commission information.
Date when free cancellation policy expires (may return null - no free cancellation).
Timezone is UTC+0.
Cancellation policies’ breakdown by time periods.
Date when this particular cancellation policy expires (null means all the time from start_at
till check in).
Timezone is UTC+0.
If start_at == end_at == null
then this particular cancellation policy has no time restrictions / is in effect all the time.
Information about taxes in the rate.
List of taxes, information about which is available for these rates.
Tax identifier at Emerging Travel Group.
There is a request which returns all available taxes and definitions (taxes
key):
Type of hotel room.
rg_ext
can be used to obtain extra information about the room from the hotel’s static information (room images, description etc.).
Structured room name in the selected language.
Response example
{
"data": {
"changes": {
"price_changed": true
},
"hotels": [
{
"id": "access_international_hotel_annex",
"rates": [
{
"book_hash": "p-689f63c7-6663-5148-a7ce-01b007frt2zz",
"match_hash": "m-d580b80f-4189-5020-ba37-b0a73f4b67a3",
"daily_prices": [
"23.60"
],
"meal": "nomeal",
"payment_options": {
"payment_types": [
{
"amount": "98.60",
"show_amount": "22.10",
"currency_code": "PLN",
"show_currency_code": "EUR",
"by": null,
"is_need_credit_card_data": true,
"is_need_cvc": true,
"type": "hotel",
"vat_data": {
"included": false,
"applied": false,
"amount": "0.00",
"currency_code": "EUR",
"value": "0.00"
},
"tax_data": {},
"perks": {},
"commission_info": {
"show": {
"amount_gross": "26.00",
"amount_net": "22.10",
"amount_commission": "3.90"
},
"charge": {
"amount_gross": "116.00",
"amount_net": "98.60",
"amount_commission": "17.40"
}
},
"cancellation_penalties": {
"policies": [
{
"start_at": null,
"end_at": "2023-11-20T16:00:00",
"amount_charge": "0.00",
"amount_show": "0.00",
"commission_info": {
"show": {
"amount_gross": "0.00",
"amount_net": "0.00",
"amount_commission": "0.00"
},
"charge": {
"amount_gross": "0.00",
"amount_net": "0.00",
"amount_commission": "0.00"
}
}
},
{
"start_at": "2023-11-20T16:00:00",
"end_at": null,
"amount_charge": "98.60",
"amount_show": "22.10",
"commission_info": {
"show": {
"amount_gross": "26.00",
"amount_net": "22.10",
"amount_commission": "3.90"
},
"charge": {
"amount_gross": "116.00",
"amount_net": "98.60",
"amount_commission": "17.40"
}
}
}
],
"free_cancellation_before": "2023-11-20T16:00:00"
},
"recommended_price": null
}
]
},
"rg_ext": {
"class": 3,
"quality": 2,
"sex": 0,
"bathroom": 2,
"bedding": 3,
"family": 0,
"capacity": 2,
"club": 0,
"bedrooms": 0,
"balcony": 0,
"view": 0,
"floor": 0
},
"room_name": "Standard Double (double bed)",
"room_name_info": null,
"serp_filters": [
"has_bathroom"
],
"sell_price_limits": null,
"allotment": 2,
"amenities_data": [
"non-smoking"
],
"any_residency": true,
"deposit": null,
"no_show": {
"amount": "135.00",
"currency_code": "EUR",
"from_time": "12:00:00"
},
"room_data_trans": {
"main_room_type": "Standard Double",
"main_name": "Standard Double",
"bathroom": null,
"bedding_type": "double bed",
"misc_room_type": null
}
}
]
}
]
},
"debug": {
"request": {
"book_hash": "h-b91ec066-8cb3-57bd-9a0f-2bf9cb12c132"
},
"key_id": 1234,
"validation_error": null
},
"status": "ok",
"error": null
}