Prebook

https://api.worldota.net/api/b2b/v3/hotel/prebook/
ℹ️
The call is required.

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

hash String required

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.
price_increase_percent Int optional

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

total_hotels Int optional
Total number of hotels.
changes Object optional

Information about changes in rate after the prebook compared to the original rate.

price_changed Boolean optional
Whether or not the prices in the new rate differ from the original ones.
hotels Array[Object] optional

Information about the found hotel and its rates.

bar_price_data Object optional

BarPriceData.

hotel Object optional

HotelBarPriceData.

currency String optional
Currency.
price Number optional
Price.
room_groups String optional

RoomGroupsBarPriceData.

currency String optional
Currency.
price Number optional
Price.
rg_ext Object optional

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.).

balcony Integer required
Balcony.
bathroom Integer required
Bathroom.
bedding Integer required
Bedding.
bedrooms Integer required
Bedrooms.
capacity Integer required
Capacity.
class Integer required
Class.
club Integer required
Club.
family Integer required
Family.
floor Integer required
Floor.
quality Integer required
Quality.
sex Integer required
Sex.
view Integer required
View.
id String required or optional

The unique hotel identifier.

ℹ️
  • Either this field or the hid field is required.
hid Int required or optional

The most preferred hotel ID.

ℹ️
  • Either this field or the id field is required.
  • The maximum length is 7 characters.
rates Array[Object] required

List of available rates at the hotel.

allotment Int required
Allotment.
amenities_data [String] required
any_residency Boolean required
Whether or not the rate is allowed to be booked by the guest with any kind of residency. Should be used by the partners that do not collect the real guest’s residency.
bar_rate_price_data Object required

BarRatePriceData.

amount Number optional
Amount.
currency_code String optional
Currency code.
book_hash String required

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.

daily_prices [Number] required
Daily rate prices breakdown in the search currency.
deposit Object required

The deposit information of the order. Has a value if the rate payment_types.type field has the hotel value.

amount Number optional
The deposit amount.
currency_code String optional
The deposit amount currency code. Is the same as the charged (hotel) currency code.
is_refundable Boolean optional
Whether the deposit is refundable or not.
match_hash String required

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 String required

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 Object required

No-show penalty information.

amount Number optional
Amount of the no-show penalty (in the hotel’s currency - currency_code).
currency_code String optional
Amount’s currency. Is the same as the charged (hotel’s) currency.
from_time String optional
Time (local timezone) from which amount would be charged for the no-show.
payment_options Object required

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.

payment_types String optional

Array with accepted payment option for the requested rate.

amount Number optional
Amount to be charged for the booking (in the contract’s currency - currency_code).
by String optional
Payment instrument.
cancellation_penalties String optional

Rate’s cancellation rules with commission information.

free_cancellation_before String optional

Date when free cancellation policy expires (may return null - no free cancellation).

Timezone is UTC+0.

policies String optional

Cancellation policies’ breakdown by time periods.

amount_charge Number optional
Cancellation penalty amount (in the charge/contract currency).
amount_show Number optional
Cancellation penalty amount (in the search currency).
commission_info Array[Object] optional

Commission information.

charge Array[Object] optional

Commission information (in the charge/contract currency).

amount_commission Number optional
Commission.
amount_gross Number optional
Gross price.
amount_net Number optional
Net price.
show Array[Object] optional

Commission information (in the search currency).

amount_commission Number optional
Commission.
amount_gross Number optional
Gross price.
amount_net Number optional
Net price.
end_at String optional

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.

start_at String optional

Date when this particular cancellation policy takes effect (null means that it is in effect till end_at).

Timezone is UTC+0.

commission_info Array[Object] optional

Commission information.

charge Array[Object] optional

Commission information (in the charge/contract currency).

amount_commission Number optional
Commission.
amount_gross Number optional
Gross price.
amount_net Number optional
Net price.
show Array[Object] optional

Commission information (in the search currency).

amount_commission Number optional
Commission.
amount_gross Number optional
Gross price.
amount_net Number optional
Net price.
currency_code String optional
Amount’s currency. Is the same as the charged (contract’s) currency.
is_need_credit_card_data Boolean optional
Whether or not credit card information is needed.
is_need_cvc Boolean optional
Whether or not a CVC code is needed.
perks String optional

Additional service information: early check-in / late check-out.

early_checkin Array[Object] optional

Additional service type.

Free cancellation policy of upsell equals to the cancellation policy of the rate and should be parsed from “cancellation_penalties”.“free_cancellation_before”. Upsell cancellation policy does not have cancellation policies’ breakdown.

charge_price Number optional
Additional service amount (in the charge/contract currency).
commission_info Array[Object] optional

Commission information.

charge Array[Object] optional

Commission information (in the charge/contract currency).

amount_commission Number optional
Commission.
amount_gross Number optional
Gross price.
amount_net Number optional
Net price.
show Array[Object] optional

Commission information (in the search currency).

amount_commission Number optional
Commission.
amount_gross Number optional
Gross price.
amount_net Number optional
Net price.
is_requested Boolean optional
Is requested.
show_price Number optional
Additional service amount (in the search currency).
time String optional
Additional service time.
late_checkout Array[Object] optional

Additional service type.

Free cancellation policy of upsell equals to the cancellation policy of the rate and should be parsed from “cancellation_penalties”.“free_cancellation_before”. Upsell cancellation policy does not have cancellation policies’ breakdown.

charge_price Number optional
Additional service amount (in the charge/contract currency).
commission_info Array[Object] optional

Commission information.

charge Array[Object] optional

Commission information (in the charge/contract currency).

amount_commission Number optional
Commission.
amount_gross Number optional
Gross price.
amount_net Number optional
Net price.
show Array[Object] optional

Commission information (in the search currency).

amount_commission Number optional
Commission.
amount_gross Number optional
Gross price.
amount_net Number optional
Net price.
recommended_price String optional

The price below which the rate cannot be sold on b2c website. This price will be transferred only if you have signed an additional agreement with ETG, for details, you can contact your account manager. If the agreement is not signed, a null will be transferred.

amount Number optional
Amount of the deposit (in the hotel’s currency - currency_code).
currency_code String optional
Amount’s currency. Is the same as the charged (hotel’s) currency.
show_amount Number optional
Rate price in the requested (show_currency_code) currency (not necessarily the sum in the charged/payment currency).
show_currency_code String optional
Requested currency (not necessarily the charged/payment currency).
show_amount Number optional
Rate price in the requested (show_currency_code) currency (not necessarily the sum in the charged/payment currency).
show_currency_code String optional
Requested currency (not necessarily the charged/payment currency).
tax_data Object optional

Information about taxes in the rate.

taxes Object optional

List of taxes, information about which is available for these rates.

amount Number optional
Amount of the tax.
currency_code String optional
Currency in which the amount is specified.
included_by_supplier Boolean optional
Shows if the tax is included in the rate by the supplier; if the tax is not included, it is supposed to be paid at the hotel (in the specified currency).
name String optional

Tax identifier at Emerging Travel Group.

There is a request which returns all available taxes and definitions (taxes key):

https://api.worldota.net/api/b2b/v3/hotel/static/

type String optional
Payment type.
vat_data Object optional

Information about VAT in the rate.

amount Number optional
Amount.
applied Boolean optional
Applied.
currency_code String optional
Currency code.
included Boolean optional
Whether or not VAT is included.
value Number optional
⚠️
DEPRECATED

The VAT amount in the currency of this object currency_code field value.

rg_ext Object optional

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.).

balcony Integer required
Balcony.
bathroom Integer required
Bathroom.
bedding Integer required
Bedding.
bedrooms Integer required
Bedrooms.
capacity Integer required
Capacity.
class Integer required
Class.
club Integer required
Club.
family Integer required
Family.
floor Integer required
Floor.
quality Integer required
Quality.
sex Integer required
Sex.
view Integer required
View.
room_data_trans Object required

Structured room name in the selected language.

bathroom String optional

Room’s bathroom information.

null means private bathroom.

bedding_type String optional
Room’s bedding information.
main_name String optional
Room name.
main_room_type String optional
Room name.
misc_room_type String optional
Additional room information.
room_name String required
Room name in the selected language.
room_name_info Object optional
The optional object that may help resolve certain matching problems. To get access to the object, contact your account manager.
sell_price_limits Object required

Information about restrictions on the final selling price for the client.

If this parameter is not null, the final selling price should be within min_price and max_price (the amount is in the search currency).

max_price Number optional
Maximum final selling price for the client (in the search currency).
min_price Number optional
Minimum final selling price for the client (in the search currency).
serp_filters [String] required
⚠️
DEPRECATED

List of amenities at the hotel.

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
}