This article lists some common pitfalls faced when working with the Booking.com Taxi API and how to avoid them.
Pagination means bookings are on a different page of the response
Pagination is the ability to split a large response from the API into a limited number of pages. If you have more than 500 upcoming bookings, then the response you get from our API will be paged.
If a lot of bookings are missing, its possible pagination has not been implemented properly. See our documentation for a technical guide on how to do this.
Please note: bookings are in 'Booked_date' field descending order.
The no longer supported “Changed” flag is present
Older versions of the API included a way to filter results by whether they had recently been changed or not, by adding a URL parameter e.g. “changed=true” to the endpoint URL.
The changed flag is no longer supported and can cause issues if attempted, so it should not be present in calls to the API.
The booking status has changed to CANCELLED
In the response from the Get Bookings endpoint, there are multiple possible statuses a booking may exist in. These are:
- NEW
- ACCEPTED
- DRIVER_ASSIGNED
- PENDING_AMENDMENT
- PENDING_CANCELLATION
Bookings in PENDING_CANCELLATION status are waiting for you to acknowledge the update. Once a booking has been cancelled and the cancellation has been acknowledged, then this booking will move into a CANCELLED status and will not be returned.
If a booking is missing, then it’s possible that it has simply been cancelled, then acknowledged as cancelled and is no longer available via the API, since it is no longer required to be fulfilled.
Another reason could be that you acknowledged the booking (which moves to ACCEPTED status) on the Portal before your API pulled the NEW bookings. Make sure you consider this scenario when you integrate.
More information on booking statuses is available here.
The booking is in the past
Two hours after the pickup time on the booking has elapsed, the booking will move into a COMPLETE status. Bookings in the COMPLETE status are not available via the Get All Bookings endpoint.
If you need to retrieve a completed booking, you can do so via the Get Single Booking endpoint.
Too Many requests
If your team sees error '429 Too Many Requests' it means you are sending too many requests are made in a short period of time to the Get All Bookings endpoint. (Please read the SLA of the contract).
If you face this problem, to solve we advise to:
- increase pagination
- consider the booking webhook
Error: "There was an issue with processing the request"
If your team is receiving this error when trying to collect new bookings, we advise to:
- reduce pagination (ex. 100)
- put in place retries to make sure you called all bookings
- consider the booking webhook