Create a booking from a locked fare. fareId must come from GET /v1/{vertical}/search/{sessionId}/fares/{fareId}.
When tripId is supplied, a TripSegment record is persisted linking this booking to its parent trip.
The Idempotency-Key header is required, but creates are not deduplicated on it: a repeated request creates another booking, whatever its key. The create is sent to the provider once and is not re-sent after a provider error or timeout. After a 503 the provider may still hold a booking from the failed attempt. Its id is not returned, and it is not charged unless it is confirmed: payment is taken only by confirm. Retrying creates a new booking.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
401Missing or invalid authentication
403User lacks booking capability for this vertical
404Referenced fare or tripId does not exist / is not accessible to the authenticated account
409Booking already exists (conflict)
410Offer expired (OFFER_EXPIRED); refresh fare search
422Validation error, missing Idempotency-Key header, missing passenger document, missing custom attributes, or APPROVAL_MESSAGE_REQUIRED
503Booking service not configured or temporarily unavailable