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) forpricing;supplierCodeforsourceCode. - Always show your customer
price.totalAmountfrom this response, never the search price.priceChangedistruewhen 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.statusbefore 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
quoteTokenbinds 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,childrenandinfants. Another party is refused before any supplier is asked:400 PASSENGER_COUNTS_CHANGED, with both parties indetails.searchedPartyanddetails.sentParty. Search again with these passengers. (400 BOOK_PAX_SHAPE_UNSUPPORTEDmeans something else: the supplier refused the searched passengers — choose another fare.) - It does not hold the seat.
/bookasks the supplier again: if the price went up you getFARE_HIGHER_THAN_QUOTED, if the seats are gone you getINSUFFICIENT_SEATS, and nothing is booked; quote again. If the price went down, some suppliers book at the lower price and some refuse any change with409 SUPPLIER_FARE_CHANGED_AT_BOOK(nothing booked: quote again and show the new price). Never rely on either. offerIdis the offer you chose — itsofferIdin the/searchanswer. (supplierOfferRefis 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_ERRORnaming 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.passengerFaresstates a total above 0, and the rows add up toprice.totalAmountexactly. A quote that fails this is refused with422 FARE_QUOTE_UNUSABLE(the reason is inerror.supplierError.failureClass; nothing is quoted or booked): choose another fare or search again. - With infants, read
price.infantFare.statushere, not at search — the quote is the truth and can differ.NOT_GIVEN:totalAmountcovers 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
departureDateback from/search.tripTypeandreturnDatemay be left out: the offer’s own trip is used. When you send them, they must be the offer’s; another trip answers400 OFFER_TRIP_MISMATCH(itsdetailsname the offer’s values). AreturnDateneedstripType: "ROUND_TRIP". - No supplier field: the offer id already names the supplier. Most organisations see the supplier only after booking, and sending
sourceCodereturnsSOURCE_CODE_NOT_ACCEPTED.
Example — request:
Response (trimmed) — pass quoteToken straight to /book:
Authentication
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
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).
The offer’s departureDate from /search — send it back unchanged (a different date → 400 OFFER_TRIP_MISMATCH).
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.
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).
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
Re-priced fare quote with per-offer eligibility AND the signed quoteToken + quoteTokenExpiresAt that /book requires.