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",
    "comment": "partner_comment",
    "amount_sell_b2b2c": "10"
  },
  "language": "en",
  "rooms": [
    {
      "guests": [
        {
          "first_name": "Marty",
          "last_name": "Quatro"
        },
        {
          "first_name": "Marta",
          "last_name": "Quatro"
        }
      ]
    }
  ],
  "upsell_data": [
    {
      "name": "early_checkin",
      "uid": "d7b56e81-b874-40ee-b195-e2f73d1ec714"
    },
    {
      "name": "late_checkout",
      "uid": "c4013ea8-3ffd-4eee-bbbc-37693670031e"
    }
  ],
  "payment_type": {
    "type": "deposit",
    "amount": "8",
    "currency_code": "EUR"
  }
}'

Request body

arrival_datetime DateTime optional
Estimated arrival time at the hotel.
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.
partner Object required

Partner’s information.

partner_order_id String required

The partner’s unique booking identifier.

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

Partner’s booking’s internal comment.

These comments are not sent to the hotel and are not processed by the Emerging Travel Group Support Team. They are visible only to the partner itself.

ℹ️
  • The minimum length is 1 character.
  • The maximum length is 256 character.
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.
payment_type Object required

Order payment information.

type String required

The payment type.

ℹ️
  • The possible values:
    • now. Use it to allow the user to pay for the booking via the ETG payment system:

      1. Request the Order Booking Form call and get the card details.
      2. Request the Credit Card Data Tokenization call with the card details.
    • hotel. Use it to allow the user to pay for the booking upon check-in at the hotel. The user won’t be charged now.

    • deposit. Use it to allow you to charge the user bank card for the booking by yourself:

      1. You need to keep your ETG deposit sufficient. To increase funds, contact your account manager.
      2. The user makes a booking.
      3. You charge the user bank card.
      4. The ETG writes funds from your deposit by themselves during the reporting period.

      Every payment goes under a credit limit for the deposit.

amount Decimal required
Amount of the order.
currency_code String required

The amount 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.

upsell_data Object required

Order upsell information.

attributes String optional

HotelOrderBookingFinishUpsellAttributes.

checkin_datetime String optional
Checkin in the Datetime format.
checkout_datetime String optional
Checkout in the Datetime format.
name String optional

Name of the upsell.

ℹ️
  • The possible values:
    • additional_service.
    • complimentary.
    • dubai_expo_2020_month.
    • dubai_expo_2020_one_day.
    • early_checkin.
    • extra_bed.
    • hotel_facilities.
    • insurance.
    • late_checkout.
    • meal_upgrade.
    • name_change_auto.
    • name_change_manual.
    • room_service.
    • room_upgrade.
    • taxes_and_fees.
    • visa_support.
rule_id Int optional
Rule ID.
uid String optional

Identification of the upsell.

You can find this value in the response of the Order Booking Form (B2B, Affiliate) step.

return_path String optional

The URL at your side to redirect the user to. It is done by the payment gateway after 3-D secure verification. The reason the ETG needs it.

This field is required if the rate you are booking has the payment_types field with the now value.

The field data_3ds of the Order Booking Finish Status call will have the null value if:

  • You don’t pass this field.
  • The bank requires 3-D secure verification.
ℹ️
  • Must have the HTTPS scheme.
  • Might have GET parameters.
  • 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

The partner manager additional information.

comment String optional
The partner manager comments sent to the hotel.
email String required

The partner manager email address for contact purposes and sending transactional emails. The email address must be valid.

To view all orders in your account, get a Master or Supervisor type of account. With Manager type the user will see only reservations with their own email address.

phone String required

The partner manager phone number for contacting purposes. The phone number must be valid.

ℹ️
  • 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.

Response example

{
  "data": null,
  "debug": null,
  "error": null,
  "status": "ok"
}

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