Start booking process

Start booking process

🆕
The Sandbox environment is available exclusively to new partners who begin their integration in Q4 2025.
https://api-sandbox.worldota.net/api/b2b/v3/hotel/order/booking/finish/
ℹ️

The call starts the booking process.

⚠️
If invalid user data is used, the data may be added to the stop list.

Sandbox limitations

⚠️
Use all field values and API keys obtained from the sandbox environment only within the sandbox. Don’t mix them with test or production environments.

Request

  • payment_type.type. The possible field values:
    • hotel.
    • deposit.
  • payment_type.currency_code. The field value is always USD.
  • Not supported fields:
    • payment_type.init_uuid.
    • payment_type.pay_uuid.
    • upsell_data.
    • return_path.

Response

  • currency_code. For every object with this field, the value is always EUR.

Errors

  • Not supported errors:
    • book_hash_not_found.
    • rate_not_found.
    • return_path_required.
    • not_enough_credit_card_data.
    • incorrect_init_uuid_format.
    • incorrect_pay_uuid_format.

Request example

curl --user '<KEY_ID>:<API_KEY>' 'https://api-sandbox.worldota.net/api/b2b/v3/hotel/order/booking/finish/' \
--header 'Content-Type: application/json' \
--data '{
  "user": {
    "email": "[email protected]",
    "comment": "The user comment.",
    "phone": "12124567899"
  },
  "supplier_data": {
    "first_name_original": "Peter",
    "last_name_original": "Collins",
    "phone": "12124567880",
    "email": "[email protected]"
  },
  "partner": {
    "partner_order_id": "1c481611-6432-5157-03d6-6093g2b75gd1",
    "comment": "The partner comment.",
    "amount_sell_b2b2c": "10"
  },
  "language": "en",
  "rooms": [
    {
      "guests": [
        {
          "first_name": "Martin",
          "last_name": "Smith"
        },
        {
          "first_name": "Eliot",
          "last_name": "Smith"
        }
      ]
    }
  ],
  "payment_type": {
    "type": "deposit",
    "amount": "306.00",
    "currency_code": "USD"
  }
}'

Request body

Response example

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

Errors

The error field has the value specified in the headers below.

book_hash_not_found

⚠️
The error isn’t supported yet.

A rare internal error when the ETG couldn’t recognize the book_hash used in the booking.

After getting the error, the only option is to find another rate and continue with it.

booking_form_expired

In case Create booking process has been expired.

Request a new Create booking process with a different partner_order_id.

chosen_payment_type_was_not_available_on_booking_form

The payment_type field values don’t match any of the payment_types field values in the response of the Create booking process call.

Try to change the payment_type field value according to the payment_types field values in the response.

credit_card_required

N/A (cc payments not supported yet)

double_booking_finish

An attempt to finish the booking for the second time while the status of the first attempt isn’t an error.

email

The provided email address isn’t valid.

incorrect_chosen_payment_type

The type field value is incorrect.

incorrect_guests_number

The adult guest number doesn’t match the adult guest number in the request of the Retrieve hotelpage call.

Try to change the rooms field item number according to the guests field values in the request.

incorrect_children_data

  • The children guest number doesn’t match the children guest number in the request of the Retrieve hotelpage call.
  • The children age is incorrect.

Try to change:

  • The rooms field item number according to the guests field values in the request.
  • The age field value.

incorrect_rooms_number

The room number doesn’t match the room number in the request of the Retrieve hotelpage call.

Try to change the rooms field item number according to the guests field values in the request.

insufficient_b2b_balance

The credit limit is reached. Contact your account manager.

order_not_found

The order with the partner_order_id field value isn’t found.

Send another booking creation request and change the partner_order_id field value.

rate_not_found

⚠️
The error isn’t supported yet.

The rate isn’t found. Send another search request.

return_path_required

⚠️
The error isn’t supported yet.

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

unauthorized_group_booking

An attempt to make a request with the conditions:

  • More than 9 bookings in the same hotel.
  • More than 9 bookings for the same dates.
  • In one request.

To make a group booking:

  • Contact the API support team.
  • Fill in the group booking form on the site.

invalid_upsell_attributes

Invalid name and attributes combination in upsell_data field.

invalid_upsell_uid

Invalid upsell uid in upsell_data field.

arrival_date_differs_from_checkin_date

The check-in date should be equal to or the day after the check-in date in the request of the Retrieve hotelpage call.

Try to change the checkin_datetime field value according to the checkin field value in the request.

not_enough_credit_card_data

⚠️
The error isn’t supported yet.

The init_uuid and pay_uuid fields are required if the rate you are booking has the is_need_credit_card_data field with the true value.

incorrect_init_uuid_format

⚠️
The error isn’t supported yet.

The init_uuid field values don’t match the regular expression.

incorrect_pay_uuid_format

⚠️
The error isn’t supported yet.

The pay_uuid field values don’t match the regular expression.

sandbox_restriction

An attempt to book the test hotel with the hid = 6291619 or id = test_hotel_do_not_book in the production environment.

To book the test hotel, use the test environment.

supplier_data_required

The supplier_data field is required for your integration. Contact your account manager.

timeout, unknown, and 5xx

If you get the error, 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 Check booking process request.