Order Booking Finish

Order Booking Finish

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

Process for completing the reservation.

The reservation is carried out asynchronously, which means that the partner launches the process via the API, and then repeatedly requests Order Booking Finish Status (or you can receive the Order Status Webhook when the processing of the reservation is finished).

Please note the requirements for guests’ names when making test reservations (they are mentioned in the description of the corresponding request parameter).

If an invalid user’s data is used, all of that user’s data from that reservation call may be added to the stop-list.

Request example

curl --location 'https://api.worldota.net/api/b2b/v3/hotel/order/booking/finish/' \
--header 'Content-Type: application/json' \
--data-raw '{
  "user": {
    "email": "[email protected]",
    "comment": "comment",
    "phone": "12312321"
  },
  "supplier_data": {
    "first_name_original": "test",
    "last_name_original": "test",
    "phone": "123123",
    "email": "[email protected]"
  },
  "partner": {
    "partner_order_id": "asd123"
  },
  "language": "en",
  "rooms": [
    {
      "guests": [
        {
          "first_name": "Marty",
          "last_name": "Quatro"
        },
        {
          "first_name": "Marta",
          "last_name": "Quatro"
        }
      ]
    }
  ],
  "payment_type": {
    "type": "hotel",
    "amount": "40.85",
    "currency_code": "EUR"
  }
}'

Request body

arrival_datetime DateTime optional
Estimated arrival time at the hotel.
book_timeout Int optional

Book timeout in seconds.

ℹ️
  • The minimum value is 10.
  • The maximum value is 600.
language String required

The language.

ℹ️

The possible values:

  • ar—Arabic.
  • bg–Bulgarian.
  • cs–Czech.
  • de–German.
  • el–Greek.
  • en–English.
  • es–Spanish.
  • fr–French.
  • he–Hebrew.
  • hu–Hungarian.
  • it–Italian.
  • ja–Japanese.
  • kk–Kazakh.
  • ko–Korean.
  • nl–Dutch.
  • pl–Polish.
  • pt–Portuguese.
  • pt_PT–Portuguese (Portugal).
  • ro–Romanian.
  • ru–Russian.
  • sq–Albanian.
  • sr–Serbian.
  • th–Thai.
  • tr–Turkish.
  • uk–Ukrainian.
  • vi–Vietnamese.
  • zh_CN–Simplified Chinese.
payment_type Object required

Order payment information.

type String required

Payment type option.

ℹ️
  • The possible values:
    • now.
    • hotel.
    • deposit.
amount Decimal required
Amount of the order.
currency_code String required

The currency code in the ISO 4217 format.

ℹ️
  • The length is 3 characters.
  • The possible values:
    • AED.
    • AFN.
    • ALL.
    • AMD.
    • ANG.
    • AOA.
    • ARS.
    • AUD.
    • AWG.
    • AZN.
    • BAM.
    • BBD.
    • BDT.
    • BGN.
    • BHD.
    • BIF.
    • BMD.
    • BND.
    • BOB.
    • BOV.
    • BRL.
    • BSD.
    • BTN.
    • BWP.
    • BYR.
    • BYN.
    • BZD.
    • CAD.
    • CDF.
    • CHE.
    • CHF.
    • CHW.
    • CLF.
    • CLP.
    • CNY.
    • COP.
    • COU.
    • CRC.
    • CUC.
    • CUP.
    • CVE.
    • CZK.
    • DJF.
    • DKK.
    • DOP.
    • DZD.
    • EGP.
    • ERN.
    • ETB.
    • EUR.
    • FJD.
    • FKP.
    • GBP.
    • GEL.
    • GHS.
    • GIP.
    • GMD.
    • GNF.
    • GTQ.
    • GYD.
    • HKD.
    • HNL.
    • HRK.
    • HTG.
    • HUF.
    • IDR.
    • ILS.
    • INR.
    • IQD.
    • IRR.
    • ISK.
    • JMD.
    • JOD.
    • JPY.
    • KES.
    • KGS.
    • KHR.
    • KMF.
    • KPW.
    • KRW.
    • KWD.
    • KYD.
    • KZT.
    • LAK.
    • LBP.
    • LKR.
    • LRD.
    • LSL.
    • LTL.
    • LVL.
    • LYD.
    • MAD.
    • MDL.
    • MGA.
    • MKD.
    • MMK.
    • MNT.
    • MOP.
    • MRO.
    • MUR.
    • MVR.
    • MWK.
    • MXN.
    • MXV.
    • MYR.
    • MZN.
    • NAD.
    • NGN.
    • NIO.
    • NOK.
    • NPR.
    • NZD.
    • OMR.
    • PAB.
    • PEN.
    • PGK.
    • PHP.
    • PKR.
    • PLN.
    • PYG.
    • QAR.
    • RON.
    • RSD.
    • RUB.
    • RWF.
    • SAR.
    • SBD.
    • SCR.
    • SDG.
    • SEK.
    • SGD.
    • SHP.
    • SLL.
    • SOS.
    • SRD.
    • SSP.
    • STD.
    • SVC.
    • SYP.
    • SZL.
    • THB.
    • TJS.
    • TMT.
    • TND.
    • TOP.
    • TRY.
    • TTD.
    • TWD.
    • TZS.
    • UAH.
    • UGX.
    • USD.
    • USN.
    • USS.
    • UYI.
    • UYU.
    • UZS.
    • VEF.
    • VND.
    • VUV.
    • WST.
    • XAF.
    • XAG.
    • XAU.
    • XBA.
    • XBB.
    • XBC.
    • XBD.
    • XCD.
    • XDR.
    • XFU.
    • XOF.
    • XPD.
    • XPF.
    • XPT.
    • XSU.
    • XTS.
    • XUA.
    • YER.
    • ZAR.
    • ZMW.
    • ZWL.
init_uuid String optional

Universally unique identifier (UUID4) token of the booking payment operation.

It needs to be transferred in orders with “is_need_credit_card_data”: true payment types and should be the same with the Credit Card Data Tokenization (B2B, Affiliate) method.

pay_uuid String optional

Universally unique identifier (UUID4) token of the booking payment check.

It needs to be transferred in orders with “is_need_credit_card_data”: true payment types and should be the same with the Credit Card Data Tokenization (B2B, Affiliate) method.

return_path String optional

URL at the partner side to which the user will be forwarded by the payment gateway after 3-D Secure verification. Such an URL may contain GET parameters. Transferring return_path is obligatory for rates with payment_types.type:“now”. If you don’t send this parameter, and the bank requires 3-D Secure verification, when sending a booking status check request a response will be returned with array “pay_data3ds” having null value.

In order to make the process of card data transfer safer, you are required to tell us the beginning of the URI or host itself (without protocol) for return_path (example: api.worldota.net). When sending a reserve request, a compatibility check will be performed in order to find out if the beginning (host) of the return_path URI is the same as the one specified before. In case of mismatch, the reservation process may currently result in a failed reservation attempt (the user may be forwarded to an Emerging Travel Group site).

ℹ️
  • The minimum length is 1 character.
  • The maximum length is 256 character.
rooms Object required

Guest data for the rooms.

guests String required

Guests data.

first_name String optional

Guest’s first name.

ℹ️
  • The minimum length is 1 character.
  • The maximum length is 50 characters.
  • The match pattern:
    • ^[^\W\d_]+([^\W\d_]*[\u0590-\u05FF\u0900-\u097F\u0980-\u09FF\u0E00-\u0E7F'\-,.’\s]*)*$.
last_name String optional

Guest’s last name (for test purposes "Ratehawk" is required).

ℹ️
  • The minimum length is 1 character.
  • The maximum length is 50 characters.
  • The match pattern:
    • ^[^\W\d_]+([^\W\d_]*[\u0590-\u05FF\u0900-\u097F\u0980-\u09FF\u0E00-\u0E7F'\-,.’\s]*)*$.
is_child Boolean optional
Whether or not the guest is a child.
age Int optional

Child’s age.

ℹ️
  • The minimum value is 0.
  • The maximum value is 17.
gender String optional

The guest gender.

ℹ️
  • The possible values:
    • male.
    • female.
    • unknown.
user Object required

Partner’s manager additional information.

comment String optional
Guest’s comments sent to the hotel.
email String required

Email of the partner’s manager for contact purposes & transactional emails. A valid email is required, otherwise an error will be returned.

In order to view all orders in your account, you need a Master or Supervisor type of account. With Manager type the user will see only reservations with their own email address.

phone String required

Phone number of the partner’s manager for contact purposes. A valid phone number is required, otherwise an error will be returned.

ℹ️
  • The minimum length is 5 characters.
  • The maximum length is 35 characters.
supplier_data Object required or optional

The contact details of the user who initiated the booking.

required : depends on available to you suppliers, ask your account manager

To ensure a smooth booking process, some of our suppliers require the contact details of the user who initiated the booking.

Please note that the mandatory requirement for these fields may vary depending on the available to you suppliers. We recommend discussing with your account manager to determine if this information is required for a particular case.

first_name_original String required

First name of the user who initiates the booking.

required : depends on available to you suppliers, ask your account manager

last_name_original String required

Last name of the user who initiates the booking.

required : depends on available to you suppliers, ask your account manager

email String required

Email of the user who initiates the booking.

required : depends on available to you suppliers, ask your account manager

phone String required

Phone number of the user who initiates the booking.

required : depends on available to you suppliers, ask your account manager

ℹ️
  • The minimum length is 5 characters.
  • The maximum length is 35 characters.
partner Object required

Partner’s information.

amount_sell_b2b2c Decimal optional

Resell price for the client in the contract currency. The value of this parameter (the resell price) is accepted if transferred (even if automatic completion of the resale price value is activated) and is displayed in the confirmatory accounting documents for the partners.

ℹ️
  • The minimum value is 1.
partner_order_id String required

The partner’s unique booking identifier.

ℹ️
  • The minimum length is 1 character.
  • The maximum length is 256 character.

Errors’ description

book_hash_not_found

An internal error in case we could not recognize the book_hash.

booking_form

An attempt to make a booking without the first Order Booking Form step.

booking_form_expired

In case Order Booking Form has beed expired.

Please request a new Order Booking Form with a different partner_order_id.

chosen_payment_type_was_not_available_on_booking_form

The payment type you have provided in the Order Booking Finish step was not available on the Order Booking Form.

credit_card_required

A credit card is required to complete the booking.

double_booking_finish

An attempt to complete the same booking for the second time (while the status of the first attempt is not an error).

email

Not a valid email address.

exceed_limit

In case the credit limit is not enough for the reservation.

To discuss changes to this limit please contact your account manager.

incorrect_chosen_payment_type

Incorrect payment type.

incorrect_guest_name

Values of parameters first_name and last_name should be consistent with Regex.

incorrect_guests_number

Number of guests (names) is more than the request was initially made for or there is no adult guest.

incorrect_children_data

Number of children (names) is more than the request was initially made for or age is not provided correct.

incorrect_rooms_number

Amount of rooms is more than the request was initially made for.

insufficient_b2b_balance

The credit limit is reached.

To discuss changes to this limit, contact your account manager.

order_not_found

No order found by partner_order_id.

rate_not_found

The rate wasn’t found. Probably too much time has passed since the search request. Another search request is needed.

return_path_required

In case return_path is not transferred while trying to book a rate with payment_types.type:"now".

unauthorized_group_booking

In case you are trying to make more than 9 with the conditions:

  • Reservations in the same hotel.
  • Reservations for the same dates.
  • In one request.

To make a group booking, contact the API support team or fill in the group booking form on the site.

arrival_date_differs_from_checkin_date

Estimated arrival date at the hotel should be equal to or the day after the arrival date.

not_enough_credit_card_data

In case, when init_uuid or pay_uuid is not transferred while trying to book the rate with "is_need_credit_card_data": true payment type.

incorrect_init_uuid_format

The value of the parameter should be consistent with Regex ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$.

incorrect_pay_uuid_format

The value of the parameter should be consistent with Regex ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$.

sandbox_restriction

You cannot book a hotel other than test_hotel or test_hotel_do_not_book with a sandbox API-key.

supplier_data_required

The supplier_data object is mandatory for your integration and it absence may cause errors in the system. Please ensure that all required supplier_data fields are included in your integration to avoid any disruption in functionality.

timeout, unknown, and 5xx

If you get errors timeout, unknown, or other 5хх status code from this call, it doesn’t necessarily mean the booking isn’t created. These errors may occur because of the ETG services’ timeout. To check the booking creation, send the Order Booking Finish Status request.