Skip to navigation

5 · Fare quote

Re-price an offer & get a quote token.

What: re-prices a chosen offer against the live supplier and returns a signed quoteToken.

When: after the traveller picks an offer from /search, immediately before /book.

Before / After: /search → here → /book (pass the quoteToken).

Gotchas

  • Read the new names — the old ones are removed in the next release. Each new name has the same value as its old one until then, and the reference marks the old name deprecated. price (the price block of every answer) for pricing; supplierCode for sourceCode.
  • Always show your customer price.totalAmount from this response, never the search price. priceChanged is true when it differs from the offer’s total at Search (searchTotalAmount) — Kitionz compares the two for every supplier. Then book with this token only if your customer accepts the new price.
  • With an infant, read price.infantFare.status before comparing. When the infant price was not given at Search but is given in this quote (or the other way round), the two totals cover different passengers: the difference is the infant fare, not a fare change.
  • The quoteToken binds this price, offer and passengers for about 15 minutes (quoteTokenExpiresAt); after that, quote again.
  • The passengers must be the ones you searched with — the same adults, children and infants. Another party is refused before any supplier is asked: 400 PASSENGER_COUNTS_CHANGED, with both parties in details.searchedParty and details.sentParty. Search again with these passengers. (400 BOOK_PAX_SHAPE_UNSUPPORTED means something else: the supplier refused the searched passengers — choose another fare.)
  • It does not hold the seat. /book asks the supplier again: if the price went up you get FARE_HIGHER_THAN_QUOTED, if the seats are gone you get INSUFFICIENT_SEATS, and nothing is booked; quote again. If the price went down, some suppliers book at the lower price and some refuse any change with 409 SUPPLIER_FARE_CHANGED_AT_BOOK (nothing booked: quote again and show the new price). Never rely on either.
  • offerId is the offer you chose — its offerId in the /search answer. (supplierOfferRef is the old name of this field, in the request and in the search answer: accepted until the next release, which removes it. Sending both with different values → 400 VALIDATION_ERROR naming both.)
  • Send the same adults/children/infants + offer id + dates you’ll book with — the token binds them.
  • Every quote is checked before it is signed. In the quote, every adult and child row of price.passengerFares states a total above 0, and the rows add up to price.totalAmount exactly. A quote that fails this is refused with 422 FARE_QUOTE_UNUSABLE (the reason is in error.supplierError.failureClass; nothing is quoted or booked): choose another fare or search again.
  • With infants, read price.infantFare.status here, not at search — the quote is the truth and can differ. NOT_GIVEN: totalAmount covers adults and children only; add your own infant charge. A missing infant price is never a reason to refuse a quote.
  • Send the offer’s departureDate back from /search. tripType and returnDate may be left out: the offer’s own trip is used. When you send them, they must be the offer’s; another trip answers 400 OFFER_TRIP_MISMATCH (its details name the offer’s values). A returnDate needs tripType: "ROUND_TRIP".
  • No supplier field: the offer id already names the supplier. Most organisations see the supplier only after booking, and sending sourceCode returns SOURCE_CODE_NOT_ACCEPTED.

Example — request:

{ "offerId": "floffer_9x2k7q", "tripType": "ONE_WAY", "departureDate": "2027-01-15", "adults": 1 }

Response (trimmed) — pass quoteToken straight to /book:

{ "data": { "offerId": "floffer_9x2k7q", "quoteToken": "eyJhbGci…", "quoteTokenExpiresAt": "2027-01-10T04:45:00.000Z", "priceChanged": false, "searchTotalAmount": 5480.00, "price": { "totalAmount": 5480.00, "currency": "INR", "baseFare": null, "taxes": null, "passengerFares": [ { "passengerType": "ADULT", "count": 1, "perPerson": 5480.00, "total": 5480.00 } ], "infantFare": null } } }

Authentication

AuthorizationBearer

Your Kitionz API key, sent as Authorization: Bearer keyId:secret. Create a Test key at sandbox.kitionz.com → API keys, a Live key at kitionz.com → API → API keys.

Request

This endpoint expects an object.
offerIdstringRequired1-30 characters

Required (or its old name supplierOfferRef; send one, null is refused): the id of the offer you chose in /search — the offer’s offerId (floffer_…, 30 characters).

adultsintegerRequired1-9
departureDatestringRequired

The offer’s departureDate from /search — send it back unchanged (a different date → 400 OFFER_TRIP_MISMATCH).

sourceCodestringOptional2-50 characters

Leave it out: the offer id already names the supplier. Only an organisation shown suppliers before booking may send it, and it must then match the offer; for everyone else it is refused with SOURCE_CODE_NOT_ACCEPTED.

childrenintegerOptional0-9Defaults to 0
infantsintegerOptional0-9Defaults to 0
tripTypeenumOptional

The offer’s tripType from /search. May be left out: the offer’s own trip type is used. When sent it must be the offer’s (another → 400 OFFER_TRIP_MISMATCH).

Allowed values:
returnDatestringOptional

Round trip only: the offer’s returnDate from /search, sent only with tripType ROUND_TRIP. May be left out (the offer fixes it); when sent, send it on /fare-quote and /book alike.

Response

Default Response
successboolean
statusCodedouble
dataobject

Re-priced fare quote with per-offer eligibility AND the signed quoteToken + quoteTokenExpiresAt that /book requires.

metaobject