Create booking process
https://api-sandbox.worldota.net/api/b2b/v3/hotel/order/booking/form/https://api.worldota.net/api/b2b/v3/hotel/order/booking/form/- This call is required.
- Request this call right after the calls:
- After requesting this call, you must send the Start booking process request.
The call creates a booking process. The booking process includes several stages. Their number depends on whether there are 3D Secure and fraud checks.
The limitations:
- The booking form lifetime is 60 minutes.
The following applies only when using a test API key:
- All bookings for the test hotel (use
hid=8473727orid=test_hotel_do_not_book) will be real with all financial responsibilities. Nevertheless, giveaway prices are available within their rates for testing purposes. - All test bookings must be canceled.
Sandbox limitations
- The 3D Secure check is not supported in the sandbox.
- The input value for the
languagefield is ignored and is always set toen. - The following fields are not supported:
item_id,payment_type.type, andpayment_types.recommended_price.show_currency_code. - For all objects with the
currency_codefield, the value is alwaysEUR.
Request example
curl --user '<KEY_ID>:<API_KEY>' 'https://api-sandbox.worldota.net/api/b2b/v3/hotel/order/booking/form/' \
--header 'Content-Type: application/json' \
--data '{
"partner_order_id": "asd12399235",
"book_hash": "h-372e7fa4-3a85-5a09-9f14-867766abf26c",
"language": "en",
"user_ip": "82.29.0.86"
}'curl --user '<KEY_ID>:<API_KEY>' 'https://api.worldota.net/api/b2b/v3/hotel/order/booking/form/' \
--header 'Content-Type: application/json' \
--data '{
"partner_order_id": "asd12399235",
"book_hash": "h-372e7fa4-3a85-5a09-9f14-867766abf26c",
"language": "en",
"user_ip": "82.29.0.86"
}'Request body
Response
Response example
{
"data": {
"order_id": 559350847,
"partner_order_id": "asd12399235",
"item_id": 128903852,
"payment_types": [
{
"amount": "2000.00",
"currency_code": "RUB",
"is_need_credit_card_data": false,
"is_need_cvc": false,
"type": "deposit",
"recommended_price": null
}
],
"is_gender_specification_required": false,
"upsell_data": []
},
"debug": {
"api_endpoint": {
"endpoint": "api/b2b/v3/hotel/order/booking/form",
"is_active": true,
"is_limited": true,
"remaining": 29,
"requests_number": 30,
"reset": "2025-10-21T12:22:00",
"seconds_number": 60
},
"request": {
"partner_order_id": "asd12399235",
"book_hash": "h-372e7fa4-3a85-5a09-9f14-867766abf26c",
"language": "en",
"user_ip": "82.29.0.86"
},
"method": "POST",
"real_ip": "104.30.161.77",
"request_id": "26f502336760ea6e5a71ed6beae781f5",
"key_id": 1234,
"api_key_id": 1234,
"utcnow": "2025-10-21T12:21:01.572537"
},
"status": "ok",
"error": null
}Errors
The error field has the value specified in the headers below.
contract_mismatch
An attempt to make the booking with a rate found with the different contract.
double_booking_form
An attempt to make a new booking with the partner_order_id that is already used for the API key contract and isn’t completed yet.
Make another request with a new partner_order_id.
duplicate_reservation
An attempt to make a new booking with the partner_order_id that is already used for the API key contract and is already completed with a successful or error status.
Make another request with a new partner_order_id.
hotel_not_found
The hotel isn’t found.
reservation_is_not_allowed
There is no permission to use this call for this contract. Contact your account manager.
rate_not_found
- The rate with the
book_hashfield value isn’t found. - The
book_hashfield value has expired.
Send another search request and change the book_hash field value.
sandbox_restriction
An attempt to book the real hotel in the test environment.
- To book the real hotel, use the production environment.
- To book the test hotel, use the test environment.
timeout, unknown, and 5xx
If you get errors timeout, unknown, or the 5xx status code from this call:
- Make another request with a new
partner_order_id. - The number of calls should be limited to 10.
- If you get this error more than 10 times in a row, the issue is probably in automatically changed settings of your contract. Contact your account manager to resolve the issue. Otherwise, the ETG has temporary technical issues.
Error Handling Diagram
Below is a sequence diagram describing how to handle errors during the booking create process:
sequenceDiagram
participant User
participant API
User->>API: Create booking process request
alt status == "ok"
API-->>User: Response: "ok"
User->>User: Go to Start booking process
else error in (duplicate_reservation, double_booking_form, unknown, timeout) or HTTP status code 5xx
loop Retry with new partner_order_id (until status == "ok" or other error)
User->>API: Retry Create booking process with new partner_order_id
API-->>User: Response
alt status == "ok"
User->>User: Go to Start booking process
else error in retryable set
User->>User: Continue retry
else other error
User->>User: Show error and stop
end
end
else other error
API-->>User: Response error
User->>User: Show error and stop
end