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-Type | application/json |
| Authorization | Bearer {{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
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| itinerary_id | string | required | must read | The itinerary_id from reprice. An expired one answers 404: reprice again. |
| Total: 1 keys | ||||
Reply
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| segments[] | array | always | useful | The flights of the itinerary, each named by (journey_index, segment_index), with airline_code, flight_number, from and to. |
| baggage[] | array | always (empty when none) | must read | Extra bags per journey: journey_index and items. A bag covers every flight of its journey, so it has no segment_index. |
| meal[] | array | always (empty when none) | must read | Meals per flight: journey_index, segment_index and items. |
| other[] | array | always (empty when none) | useful | Other items per flight (priority check-in, bundles): journey_index, segment_index and items. |
| <list>[].items[] | array | always | must read | What can be bought: code (send it to book), label (show it), price (per passenger, INR). |
| Total: 5 keys | ||||
Errors this call answers with (4)
| HTTP | code | message | detail | when |
|---|---|---|---|---|
| 401 | 9001 | Authentication required | Invalid token | |
| 400 | 5100 | Invalid search request | itinerary_id is required | errors[]: field itinerary_id, rule required. |
| 404 | 5104 | Itinerary not found or expired | Unknown or expired itinerary_id. | |
| 502 | 5001 | The 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.
Real captures of this call
- Domestic, one way, 1 adult · HTTP 200 · reply in the viewer
- Domestic, one way, 1 adult, 1 child, 1 infant · HTTP 200 · reply in the viewer
- Domestic, return, 1 adult · HTTP 200 · reply in the viewer
- Domestic, return, 1 adult, 1 child, 1 infant · HTTP 200 · reply in the viewer
- International, one way, 1 adult · HTTP 200 · reply in the viewer
- International, one way, 1 adult, 1 child, 1 infant · HTTP 200 · reply in the viewer
- International, return, 1 adult · HTTP 200 · reply in the viewer
- International, return, 1 adult, 1 child, 1 infant · HTTP 200 · reply in the viewer
- Bags and meals on a low-cost airline · HTTP 200 · reply in the viewer
- Book on hold with a seat, a meal and a bag, one flight · HTTP 200 · reply in the viewer
- Book on hold with ancillaries on a two-flight journey · HTTP 200 · reply in the viewer
- Direct booking (paid, no hold) with a seat, a meal and a bag, one flight · HTTP 200 · reply in the viewer
- Direct booking (paid, no hold) with ancillaries on a two-flight journey · HTTP 200 · reply in the viewer