Skip to main content

Quotes

A quote is a price locked for a short window. Discovery mints one per result row; you book by its quoteId.

Three rules

1. Quotes expire, and the window differs per vertical.

VerticalQuote lifetime
Airport transfer15 minutes
Express bus10 minutes
Entertainment (iQIYI)24 hours
Read expiresAt, do not hardcode a TTL

Every offering carries an expiresAt. Treat the table above as background, not as a constant in your code — these values are ours to tune, and expiresAt is the contract.

Booking an expired quote returns 409. The fix is a new quote from a fresh search, never a retry of the same one.

2. A quote is bound to the key that minted it. Another agent booking your quote gets 404 Unknown quote — the same response as for a quote that never existed, deliberately, so ids cannot be probed.

3. A quote is single-use, and priced for exactly what you searched. You cannot book one quote twice, and you cannot change the shape of what you booked. Express bus enforces this explicitly: booking 3 adults against a quote priced for 2 is rejected with a 400 telling you to re-quote, because the price is only valid for the mix it was computed for.

Designing around expiry

The short TTLs are live supplier prices, not an arbitrary limit. Two consequences worth building for:

  • Search late. Fetch quotes when the customer is ready to pay, not when they start browsing. A 15-minute quote spent on a checkout funnel is a 409 waiting to happen.
  • Re-search on expiry, and show the new price. The customer may see a different number. That is the point of a live-priced quote; presenting the stale one is how you sell below cost.