The Booking API represents the final step in our search-to-book flow. It requires passing essential details such as passenger information, contact information, and payment information to facilitate the booking process for the selected hotel at the quoted price.

Booking API details:

HTTP:POST
Endpoint:: {baseEndpoint}/api/v1/book

FAQs

Do I need to pass a credit card to complete the booking?
It depends on your payment terms and account configurations with the supplier. If the supplier needs a credit card, you need to pass it in the Booking API. Zentrum Connect API will forward that to the supplier. Zentrum Connect Api does not store or charge the credit card.

Do I need to pass the details of all the guests during the booking?
This depends on the allGuestInfoRequired field of the Price API response. If the value for this field is true, you need to pass the details of all the guests. Otherwise, the type and age (in case of a child) of the guests is enough.

What should I do in case of a timeout error or non-confirmed booking status?
Solution: To ensure seamless booking experiences, we recommend implementing a polling mechanism in your booking process. Here's how it works:

Error Handling on Timeout: Upon encountering a timeout error or receiving a non-confirmed booking status in the response, your system should initiate the following steps:

Polling Calls to getBookingDetails API: Make successive calls to the getBookingDetails API at intervals of 10 seconds.

Polling Time Limit: Continue polling for a maximum duration of 5 minutes (30 polling attempts).

Confirmation Check: Check the booking status received from each polling call. If the status is confirmed, proceed with the booking process as usual.

Handling Non-Confirmation: If the booking status remains unconfirmed after 5 minutes of polling, implement appropriate error handling mechanisms on your end. This may include informing users about the status and advising them on further steps.

Benefits of Implementation:

Minimizes the risk of failed bookings due to timeout errors.
Ensures that clients receive accurate booking statuses promptly.
Reduces the occurrence of duplicate bookings and associated complications.
Conclusion: Implementing a polling mechanism as part of your error handling strategy will significantly enhance the reliability and efficiency of your booking process, providing a seamless experience for both your clients and end-users.

Error Codes

Error CodeError Message
401'{{Field}}' must not be empty.
4004The hotel you selected is sold out.
4006The rate you trying to book has expired. Please try again with new room rates call.
4007Booking with same id already exists.
4008Booking failed due to insufficient balance in the credit card.
4012Booking failed due to insufficient fund in the supplier account.
5002Request timed out while processing your booking.
5003Booking failed due to credit card error.
5004Confirmation pending from supplier.
500Your request failed due to an unknown system error. Please contact support team with the correlationId.