Reference · step 4 of 9

POST/flights/ancillaries

{{base_url}}/flights/ancillaries

Optional. Baggage, meal and other add-ons on sale on the itinerary, each with the journey and the flights it covers.

Headers

Content-Typeapplication/json
AuthorizationBearer {{token}}
Reply (4 notes)
  • segments[] repeats the itinerary's flights, each named by (journey_index, segment_index) as in search and reprice; segment_index restarts at 0 inside every journey.
  • Bags are sold per journey: baggage[] has one entry per journey. Meals and other items are sold per flight: meal[] and other[] have one entry per flight. A journey or flight absent from a bucket offers nothing of that type.
  • On book, send a bag with its code and journey_index; a meal, other item or seat with its code, journey_index and segment_index.
  • errors[] (plain strings) appears when one flight's catalogue failed; the rest is still returned.
Keys and what they mean
Request
keytypewhen presentimportancemeaning
itinerary_idstringrequiredmust readThe itinerary_id from reprice. An expired one answers 404: reprice again.
Total: 1 keys
Reply
keytypewhen presentimportancemeaning
segments[]arrayalwaysusefulThe flights of the itinerary, each named by (journey_index, segment_index), with airline_code, flight_number, from and to.
baggage[]arrayalways (empty when none)must readExtra bags per journey: journey_index and items. A bag covers every flight of its journey, so it has no segment_index.
meal[]arrayalways (empty when none)must readMeals per flight: journey_index, segment_index and items.
other[]arrayalways (empty when none)usefulOther items per flight (priority check-in, bundles): journey_index, segment_index and items.
<list>[].items[]arrayalwaysmust readWhat can be bought: code (send it to book), label (show it), price (per passenger, INR).
Total: 5 keys
Errors this call answers with (4)
HTTPcodemessagedetailwhen
4019001Authentication requiredInvalid token
4005100Invalid search requestitinerary_id is requirederrors[]: field itinerary_id, rule required.
4045104Itinerary not found or expiredUnknown or expired itinerary_id.
5025001The airline or supplier could not complete the request
Questions developers ask (1)
How do I send a bag and a meal on book?
A bag with its code and journey_index; a meal, seat or other item with its code, journey_index and segment_index, exactly as this reply gave them.