Create booking process
https://api-sandbox.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.
The limitations:
- The booking form lifetime is 60 minutes.
Sandbox limitations
The 3D Secure check isn’t supported in the sandbox.
Request
language
. Input value is ignored, the value is alwaysen
.
Response
- Not supported fields:
item_id
.payment_type.type
.payment_types.recommended_price.show_currency_code
.
currency_code
. For every object with this field, 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": "1c481611-6432-5157-03d6-6093g2b75gd1",
"book_hash": "p-86ccba07-27ab-489b-b549-c956ea928811",
"language": "en",
"user_ip": "82.29.0.86"
}'
Request body
Response
Response example
{
"data": {
"is_gender_specification_required": false,
"item_id": 89,
"order_id": 89,
"partner_order_id": "1c481611-6432-5157-03d6-6093g2b75gd1",
"payment_types": [
{
"amount": "306.00",
"currency_code": "USD",
"is_need_credit_card_data": false,
"is_need_cvc": false,
"recommended_price": null,
"type": "deposit"
}
],
"upsell_data": []
},
"debug": null,
"error": null,
"status": "ok"
}
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
.
insufficient_b2b_balance
The credit limit is reached. Contact your account manager.
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_hash
field value isn’t found. - The
book_hash
field 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 5хх
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.