The required call order for booking a transfer and for changing a reservation.
New reservation
POST /search
-> POST /pricing
-> POST /book
-> GET /reservations/detailsPricing is required even when the traveller selects no amenities. There is no way to book directly from a search result.
Reservation change
POST /reservations/changes/search
-> POST /pricing
-> POST /reservations/changesThe original reservation stays active until the change is confirmed.
Values you carry between calls
| Value | Where it comes from | Where it goes |
|---|---|---|
searchId | Search or change search | Pricing, booking, reservation reads |
resultId | The selected offer | Pricing and booking |
bookingToken | The selected offer | Pricing and booking |
pricingToken | Pricing | Booking or change confirmation |
reservationId | Booking | Reservation reads, driver and vehicle, tracking, cancellation |
confirmationNumber | Booking | Reservation reads, traveller communication |
bookingToken and pricingToken are opaque. Copy them into the next call exactly as you received them: do not decode, parse or modify them. They belong to the offer they were issued for and stop working when that offer expires, which expiresAt tells you in advance.
Booking result states
Booking and change confirmation answer HTTP 200 with a status field:
status | What it means | What to do |
|---|---|---|
completed | The transfer is booked. | Confirm to the traveller once completed is true and reservations is not empty. |
pending | There is no final answer yet. | Read the reservation to find out how it ended. Do not send the booking request again. |
failed | The booking was refused. | Show the reason from error and offer the traveller another option. |
Never treat a reservation as confirmed just because the HTTP status was 200.
After a failed request
A 502 means the request did not complete, not that nothing happened. Keep the identifiers you already have and read the reservation before you create another one.
What to persist
Store searchId, resultId, bookingToken, pricingToken, reservationId, confirmationNumber and your own partnerTrackingId. Without them you cannot read, change or cancel the reservation later.