The booking flow
Hold places, take payment your way, then confirm.
- Read availability for an option and a date: each departure has an id, its places left and the price per unit.
- Hold: POST /bookings with the departure, the units and an Idempotency-Key. The places are held for 30 minutes and the answer is ON_HOLD with the total.
- Take payment in your own system, or choose a payment link we send.
- Confirm: POST /bookings/{uuid}/confirm with the guest's details. Send expectedTotal to be told if the price changed.
curl -X POST "https://api.opentourbase.com/api/supplier/v1/bookings" \
-H "Authorization: Bearer $API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"optionId":"{optionId}","availabilityId":"{availabilityId}","units":[{"unitId":"{unitId}","quantity":2}],"reference":"ORDER-1042"}'curl -X POST "https://api.opentourbase.com/api/supplier/v1/bookings/{uuid}/confirm" \
-H "Authorization: Bearer $API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"contact":{"fullName":"Ana Beridze","email":"ana@example.com"},"payment":{"mode":"offline"}}'- 409 unavailable: not enough places; the answer says how many are left.
- 410 hold_expired: the hold ran out and the places went back on sale. Hold again.
- 409 price_changed: the total differs from expectedTotal; show the new one before confirming.
- Extend a hold with POST /bookings/{uuid}/extend while it is still held.
Money is always an integer of the currency's smallest unit with the currency beside it: 12000 GEL is ₾120.00, 8500 JPY is ¥8,500.