Reference
Every endpoint of the flight API in call order. Open a strip for its example request and reply, the keys and what they mean, and the errors it answers with. Examples are illustrative values in the exact shape; the test cases show real captures.
▸1.POST /generate-tokenExchange the API key for a token that lives 4 hours (expires_in 14400).open pagekeys explained
Exchange the API key for a token that lives 4 hours (expires_in 14400). Every later call sends it as Authorization: Bearer <token>.
Auth: Authorization: Bearer <token> from generate-token.
{
"api_key": "ak_3f2e1d0c9b8a7f6e5d4c3b2a1f0e9d8c"
}{
"token": "<token>",
"token_type": "Bearer",
"expires_in": 14400,
"expires_at": "2026-10-16T10:12:00Z"
}Keys and what they mean
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| api_key | string | required | must read | Your API key (starts with aiqo_). Keep it on your server; never send it from a browser or app. |
| Total: 1 keys | ||||
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| token | string | always | must read | Send it as Authorization: Bearer <token> on every other call. |
| token_type | string | always | informational | Always Bearer. |
| expires_in | integer | always | must read | Seconds the token lives (14400 = 4 hours). Get a new token before it ends; a call with an expired token answers 401. |
| expires_at | datetime | always | useful | The same end as a time (UTC). |
| Total: 4 keys | ||||
Errors this call answers with (4)
| HTTP | code | message | detail | when |
|---|---|---|---|---|
| 401 | 9001 | Authentication required | Invalid api_key | Unknown key, suspended user, or the API has no API-key routes (today). Observed on the local stack. |
| 401 | 9001 | Authentication required | Api_key required | |
| 400 | 5000 | Invalid request | (Huma's text) | Malformed JSON or wrong content type. |
| 429 | 9004 | Too many requests | Rate limit, when configured. |
Questions developers ask (2)
- How long does a token last?
- 4 hours (expires_in, expires_at). Renew before it ends; an expired token answers 401 with code 9001.
- Can I call the API from a browser or a mobile app?
- No. The API key must stay on your server; call the API from there.
▸2.POST /flights/searchOne request, complete results: options grouped by the journeys their fares cover, each fare priced once for the whole option with a journey view; the per-flight segment view on request.open pagekeys explained
One request, complete results: options grouped by the journeys their fares cover, each fare priced once for the whole option with a journey view; the per-flight segment view on request. The UI uses the streaming route instead; this one waits for all suppliers.
Auth: Authorization: Bearer <token> from generate-token.
{
"segments": [
{
"from": "BLR",
"to": "BOM",
"date": "2026-11-14"
}
],
"adult": 1,
"child": 0,
"infant": 0,
"cabin_class": 1,
"fare_types": [
1
],
"direct_flight": false,
"preferred_airlines": [
"QP"
],
"detail": "journey",
"include_fare_rules": true
}- detail: journey (default) = one set of fare attributes per fare option; segment = also segments[] inside each fare option, one entry per flight. Any other value is a 400 (field detail, rule one_of).
- include_fare_rules: default true; false leaves fare_rules out of the reply and off every fare.
- segments: 1 to 6 legs; a return trip is two segments. date is YYYY-MM-DD.
- adult 1-9 (required), child 0-9, infant 0-9.
- cabin_class: 1 economy, 2 premium economy, 3 business, 4 first; 0 or absent = no filter.
- fare_types: 1 regular, 2 student, 3 senior citizen, 4 doctor/nurse, 5 armed forces; absent = regular.
{
"search_id": "a1d2c3b4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"status": "completed",
"valid_till": "2026-10-18T21:12:00+05:30",
"fare_rules": {
"fr_1": {
"cancellation": [
{
"allowed": false,
"from": {
"value": 0,
"unit": "HOURS"
},
"to": {
"value": 3,
"unit": "HOURS"
},
"text": "Non-refundable within 3 hours of departure"
},
{
"allowed": true,
"amount": 3899,
"from": {
"value": 3,
"unit": "HOURS"
},
"to": {
"value": 365,
"unit": "DAYS"
}
}
],
"date_change": [
{
"allowed": true,
"amount": 2999,
"from": {
"value": 3,
"unit": "HOURS"
},
"to": {
"value": 365,
"unit": "DAYS"
}
}
]
}
},
"results": [
{
"journey_indexes": [
0
],
"options": [
{
"option_id": "3f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c",
"segments": [
{
"segment_index": 0,
"journey_index": 0,
"segment_id": "BLR_BOM_QP_1101",
"from": "BLR",
"to": "BOM",
"airline_code": "QP",
"airline_name": "Akasa Air",
"aircraft_type": "737 MAX 8",
"flight_number": "1101",
"departure_time": "2026-11-14T06:00:00",
"departure_terminal": "1",
"arrival_time": "2026-11-14T07:45:00",
"arrival_terminal": "2",
"duration": 105
}
],
"fare_options": [
{
"price_id": "7c1b2f3e-9a4d-4c2e-8f1a-2b3c4d5e6f70",
"fare_rules": {
"0": "fr_1"
},
"adult": {
"fare_ref": "SAVER",
"refundable_type": "PARTIALLY_REFUNDABLE",
"cabin_class": "Economy",
"booking_class": "Q",
"fare_basis": "QPSAVER",
"baggage": {
"hand": {
"kg": 7
},
"checkin": {
"kg": 15
}
},
"fare": {
"hand_baggage": "7Kg",
"checkin_baggage": "15Kg",
"base_fare": 4200,
"yq": 0,
"yr": 0,
"airline_gst": 0,
"booking_fee": 0,
"commission": 0,
"other_taxes": 812,
"total_fare": 5012,
"net_fare": 5012,
"pax_count": 1
}
},
"varies_by_segment": false
}
]
}
]
}
]
}- results[] groups options by the journey indexes their fares cover: one way = one group [0]; a return sold per direction = groups [0] and [1]; a combined return fare = one group [0, 1]. Pick one option and one fare per group until every requested journey is covered.
- option_id identifies the flights, price_id the fare on them; both go to /flights/reprice. Ids are valid until valid_till (60 minutes).
- A fare prices the whole option: one object per requested passenger type (adult, child, infant), each with its fare (base, taxes, total, net, pax_count), booking_class, fare_basis and baggage. No amount appears anywhere else, never inside segments[].
- Segment view (detail=segment): segments[] on every fare, one entry per flight matched by segment_index, same fields per flight.
- fare_rules on a fare maps each journey index to an id (fr_1, fr_2, …) in the top-level fare_rules; a missing index has no rule known at search. Ids mean nothing outside this reply.
- Baggage is {kg} and/or {pieces}; absent = not included or not known. Flight segments carry airport codes only (from, to).
- Times are local to the airport, format YYYY-MM-DDTHH:MM:SS, no zone; valid_till carries its offset.
- A missing field is zero, false or not applicable. The reply has no $schema field.
Keys and what they mean
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| segments[] | array | required, 1 to 6 | must read | The legs you search: one for one way, two for a return (second from the destination back), up to six for a multi-city trip. |
| segments[].from | string | required | must read | Departure airport, IATA code. |
| segments[].to | string | required | must read | Arrival airport, IATA code. |
| segments[].date | date | required | must read | Departure date, YYYY-MM-DD, local to the departure airport. |
| adult | integer | required, 1 to 9 | must read | Adults travelling. child and infant default to 0; an infant needs an adult. |
| cabin_class | integer | optional | useful | 1 economy (default), 2 premium economy, 3 business, 4 first. |
| detail | string | optional | useful | journey (default) or segment. segment adds segments[] inside every fare option with the fare attributes per flight. |
| include_fare_rules | boolean | optional, default true | informational | false leaves fare_rules out of the reply and off every fare; smaller reply. |
| Total: 8 keys | ||||
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| search_id | string | always | informational | Id of this search, for support questions. |
| valid_till | datetime | always | must read | Until when an option_id and price_id of this reply can be sent to reprice. After it, search again. |
| fare_rules | object | unless include_fare_rules is false | useful | Every distinct fare rule of the reply keyed by id (fr_1, fr_2, …). Fares point at them; ids mean nothing outside this reply. |
| results[] | array | always | must read | One group per set of journeys the fares cover. Pick one option and one fare from each group until every journey of your request is covered. |
| results[].journey_indexes | array of integer | always | must read | Which journeys of your request this group's fares cover: [0] onward only, [1] return only, [0, 1] a combined fare for both. |
| results[].options[].option_id | string | always | must read | Names the flights of this option. Send it to reprice with the price_id of the chosen fare. |
| results[].options[].segments[] | array | always | must read | The flights of this option in order, each named by (journey_index, segment_index); segment_index restarts at 0 in every journey. |
| results[].options[].segments[].operating_airline_code | string | only on a codeshare | useful | The airline that flies the aircraft when it differs from airline_code, the airline selling the seat. Show it to the traveller. |
| results[].options[].fare_options[] | array | always | must read | The fares sold on exactly these flights. Each prices the whole option once; no amount appears anywhere else. |
| results[].options[].fare_options[].price_id | string | always | must read | Names this fare. Send it to reprice with the option_id. |
| results[].options[].fare_options[].adult | object | always | must read | What this fare gives an adult: fare (the price for the whole option), fare_ref, refundable_type, cabin_class, booking_class, fare_basis, baggage. child and infant appear only when requested. |
| results[].options[].fare_options[].adult.fare.total_fare | number | always | must read | What the traveller pays for one adult on this option, taxes included. |
| results[].options[].fare_options[].adult.fare.net_fare | number | always | must read | What you pay us for one adult: total_fare less your commission. |
| results[].options[].fare_options[].adult.baggage | object | when the airline states it | useful | Allowance included in the fare: hand and checkin, each {kg} and/or {pieces}. Absent = not stated. |
| results[].options[].fare_options[].fare_rules | object | when a rule is known at search | useful | Journey index → id in the top-level fare_rules. A missing index has no rule known at search; the reprice reply carries the final rules. |
| results[].options[].fare_options[].varies_by_segment | boolean | always | informational | true when a later flight of this fare differs from the first in cabin, meal, booking class, fare basis or baggage. Ask detail=segment to see them per flight. |
| Total: 16 keys | ||||
Errors this call answers with (3)
| HTTP | code | message | detail | when |
|---|---|---|---|---|
| 401 | 9001 | Authentication required | Invalid token | Missing, expired or foreign token; also when the API cannot be reached. |
| 400 | 5100 | Invalid search request | cabin_class must be 1 (economy), 2 (premium), 3 (business), or 4 (first) | errors[] has field cabin_class, rule one_of. Same for fare_types and the engine's own checks (dates, airport codes, pax counts). |
| 500 | 9000 | Something went wrong |
Questions developers ask (4)
- What do I send to reprice for a domestic return?
- Two items: one option and one fare from group [0] (onward) and one from group [1] (return). An international return has one group [0, 1] and one item.
- Why does commission not appear on my fares?
- Zero amounts are left out. commission appears only when a commission rule applies to your account; net_fare is then total_fare less it.
- How long can I use an option_id and price_id?
- Until valid_till of the search reply. After it, search again.
- What does varies_by_segment true mean?
- A later flight of the fare differs from the first in cabin, meal, booking class, fare basis or baggage. Send detail=segment to see every flight.
▸3.POST /flights/repriceReprice the chosen fare(s) with the airline and return the itinerary: the final price, what the booking needs (passport, DOB, GST, hold allowed) and any price change..open pagekeys explained
Reprice the chosen fare(s) with the airline and return the itinerary: the final price, what the booking needs (passport, DOB, GST, hold allowed) and any price change.
Auth: Authorization: Bearer <token> from generate-token.
{
"items": [
{
"option_id": "3f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c",
"price_id": "7c1b2f3e-9a4d-4c2e-8f1a-2b3c4d5e6f70"
}
]
}- items: one entry per fare; a return sold as two one-way fares sends two items. option_id and price_id at top level are accepted for a single fare.
{
"itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
"valid_till": "2026-10-18T20:27:00+05:30",
"fare_rules": {
"fr_1": {
"cancellation": [
{
"allowed": false,
"from": {
"value": 0,
"unit": "HOURS"
},
"to": {
"value": 3,
"unit": "HOURS"
},
"text": "Non-refundable within 3 hours of departure"
},
{
"allowed": true,
"amount": 3899,
"from": {
"value": 3,
"unit": "HOURS"
},
"to": {
"value": 365,
"unit": "DAYS"
}
}
],
"date_change": [
{
"allowed": true,
"amount": 2999,
"from": {
"value": 3,
"unit": "HOURS"
},
"to": {
"value": 365,
"unit": "DAYS"
}
}
]
}
},
"results": [
{
"journey_indexes": [
0
],
"option_id": "3f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c",
"segments": [
{
"segment_index": 0,
"journey_index": 0,
"segment_id": "BLR_BOM_QP_1101",
"from": "BLR",
"to": "BOM",
"airline_code": "QP",
"airline_name": "Akasa Air",
"aircraft_type": "737 MAX 8",
"flight_number": "1101",
"departure_time": "2026-11-14T06:00:00",
"departure_terminal": "1",
"arrival_time": "2026-11-14T07:45:00",
"arrival_terminal": "2",
"duration": 105
}
],
"fare": {
"price_id": "7c1b2f3e-9a4d-4c2e-8f1a-2b3c4d5e6f70",
"fare_rules": {
"0": "fr_1"
},
"adult": {
"fare_ref": "SAVER",
"refundable_type": "PARTIALLY_REFUNDABLE",
"cabin_class": "Economy",
"booking_class": "Q",
"fare_basis": "QPSAVER",
"baggage": {
"hand": {
"kg": 7
},
"checkin": {
"kg": 15
}
},
"fare": {
"hand_baggage": "7Kg",
"checkin_baggage": "15Kg",
"base_fare": 4200,
"yq": 0,
"yr": 0,
"airline_gst": 0,
"booking_fee": 0,
"commission": 0,
"other_taxes": 812,
"total_fare": 5012,
"net_fare": 5012,
"pax_count": 1
}
},
"varies_by_segment": false
}
}
],
"booking_requirements": {
"is_gst_mandatory": false,
"pan_applicable": false,
"passport_mandatory": false,
"dob_applicable": {
"adt": false,
"chd": true,
"inf": true
},
"is_hold": true,
"firstname_length": 30,
"lastname_length": 30,
"firstname_min_length": 2,
"lastname_min_length": 2,
"seat_mandatory": false,
"meal_mandatory": false,
"baggage_mandatory": false
},
"price": {
"adult": {
"hand_baggage": "7Kg",
"checkin_baggage": "15Kg",
"base_fare": 4200,
"yq": 0,
"yr": 0,
"airline_gst": 0,
"booking_fee": 0,
"commission": 0,
"other_taxes": 812,
"total_fare": 5012,
"net_fare": 5012,
"pax_count": 1
},
"total": {
"hand_baggage": "7Kg",
"checkin_baggage": "15Kg",
"base_fare": 4200,
"yq": 0,
"yr": 0,
"airline_gst": 0,
"booking_fee": 0,
"commission": 0,
"other_taxes": 812,
"total_fare": 5012,
"net_fare": 5012,
"pax_count": 1
}
},
"messages": [
{
"type": "FARE_ALERT",
"option_id": "3f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c",
"message": "Fare has changed: previous price 5012.00, current price 5112.00 (difference: 100.00)",
"old_value": 5012,
"new_value": 5112
}
]
}- booking_requirements.is_hold says whether POST /flights/book may be called with is_hold true; the other fields say what the booking must carry (GST, PAN, passport, dates of birth, name lengths, mandatory seat, meal or bag).
- results[] has one entry per item sent: the option's flights and the one fare, priced again, in the fare shape of search (detail=segment adds segments[] inside fare). fare_rules holds the rules those fares point at.
- valid_till is when the supplier's session for this itinerary ends (the API's review session, default 15 minutes); book before it.
- messages is absent when nothing changed; otherwise one entry per repriced option with type FARE_ALERT, the option_id, and the old and new value.
Keys and what they mean
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| items[] | array | required, one per group | must read | One item per search group you chose from: one for a one way or a combined return, two for a domestic return (one per direction). |
| items[].option_id | string | required | must read | The option_id from the search reply. |
| items[].price_id | string | required | must read | The price_id of the chosen fare of that option. An option_id or price_id not in a current search answers 400 with errors[] (search again). |
| Total: 3 keys | ||||
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| itinerary_id | string | always | must read | Names the repriced itinerary. Send it to ancillaries, seat map and book. |
| valid_till | datetime | always | must read | Until when the itinerary_id can be booked. After it, book answers 410: reprice again. |
| results[] | array | always | must read | One entry per item sent: journey_indexes, option_id, the flights (segments) and the one fare, priced again. |
| results[].segments[] | array | always | must read | The flights in order, each named by (journey_index, segment_index); segment_index restarts at 0 in every journey. |
| results[].fare | object | always | must read | The fare in the shape of search: price_id, per passenger type (adult, child, infant) the fare_ref, refundable_type, cabin_class, booking_class, fare_basis, baggage and fare, and fare_rules ids. |
| price.total | object | always | must read | The price in the components of search: base_fare, yq, yr, airline_gst, booking_fee, commission, other_taxes, total_fare (what the traveller pays), net_fare (what you pay us), pax_count, and the baggage stated in the fare. For the whole booking. |
| price.adult (child, infant) | object | always (child, infant when requested) | useful | The price in the components of search: base_fare, yq, yr, airline_gst, booking_fee, commission, other_taxes, total_fare (what the traveller pays), net_fare (what you pay us), pax_count, and the baggage stated in the fare. For one passenger of that type. |
| booking_requirements | object | always | must read | What book must carry: is_gst_mandatory, pan_applicable, passport_mandatory, dob_applicable (adt, chd, inf), name lengths, and whether a seat, meal or bag is mandatory. |
| booking_requirements.is_hold | boolean | always | must read | true when this fare may be booked on hold (book with is_hold true); false: book directly, paid at once. |
| fare_rules | object | when known | useful | The cancellation and date-change rules the fares point at, keyed by id (fr_1, …): bands with allowed, amount or percent, the window (from, to) and the airline's text. |
| messages[] | array | only when the price changed | must read | One entry per repriced option whose price changed since search: type FARE_ALERT, option_id, old_value, new_value. Show the new price before booking. |
| Total: 11 keys | ||||
Errors this call answers with (6)
| HTTP | code | message | detail | when |
|---|---|---|---|---|
| 401 | 9001 | Authentication required | Invalid token | |
| 400 | 5100 | Invalid search request | option_id and price_id are required | Also 'each review item needs option_id and price_id'. |
| 404 | 5103 | Flight not found | option_id or price_id not in a stored search. | |
| 410 | 5102 | Search results have expired | ||
| 502 | 5001 | The airline or supplier could not complete the request | Reprice failed at the airline. | |
| 504 | 5002 | A supplier or service did not answer in time |
Questions developers ask (2)
- The price changed. What now?
- messages has a FARE_ALERT with old_value and new_value for that option_id. Show the new price to the traveller before booking; the itinerary is priced at the new value.
- Until when can I book?
- valid_till of the reprice reply: the airline's session for this itinerary. Book before it or reprice again.
▸4.POST /flights/ancillariesOptional.open pagekeys explained
Optional. Baggage, meal and other add-ons on sale on the itinerary, each with the journey and the flights it covers.
Auth: Authorization: Bearer <token> from generate-token.
{
"itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e"
}{
"itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
"segments": [
{
"journey_index": 0,
"segment_index": 0,
"airline_code": "QP",
"flight_number": "1101",
"from": "BLR",
"to": "BOM"
}
],
"baggage": [
{
"journey_index": 0,
"items": [
{
"code": "XBAG05",
"label": "Extra 5 Kg",
"price": 1500
}
]
}
],
"meal": [
{
"journey_index": 0,
"segment_index": 0,
"items": [
{
"code": "VGML",
"label": "Vegetarian meal",
"price": 350
}
]
}
],
"other": []
}- 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
| 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 | ||||
| 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.
▸5.POST /flights/seat-mapOptional.open pagekeys explained
Optional. The seat map of every flight of the itinerary with price and availability per seat.
Auth: Authorization: Bearer <token> from generate-token.
{
"itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e"
}{
"itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
"segments": [
{
"journey_index": 0,
"segment_index": 0,
"airline_code": "QP",
"flight_number": "1101",
"from": "BLR",
"to": "BOM"
}
],
"seats": [
{
"journey_index": 0,
"segment_index": 0,
"aircraft_type": "737 MAX 8",
"total_seats": 189,
"seats": [
{
"aisle": false,
"amount": 600,
"code": "WINDOW",
"column": 1,
"desc": "1A",
"exit_row": false,
"infant": true,
"is_available": true,
"leg_room": true,
"middle": false,
"near_wings": false,
"reclining": true,
"row": 1,
"tax": 0,
"window": true
}
]
}
]
}- segments[] as in ancillaries; each seats block names its flight by (journey_index, segment_index). desc is the seat label (1A) that goes into the booking; code is the seat type.
Keys and what they mean
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| itinerary_id | string | required | must read | The itinerary_id from reprice. |
| Total: 1 keys | ||||
| 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. |
| seats[] | array | always (empty when the airline gives no map) | must read | One seat map per flight: journey_index, segment_index, aircraft_type, total_seats and seats. |
| seats[].seats[] | array | always | must read | Every seat: code (send it to book), desc (e.g. 3A, show it), row, column, amount (price; 0 = free), tax, is_available. |
| seats[].seats[].window / aisle / middle | boolean | always | useful | Where the seat is in its row. |
| seats[].seats[].exit_row / leg_room / infant / near_wings / reclining | boolean | always | useful | Seat features. A passenger with an infant needs a seat with infant true; exit rows have rules of their own. |
| 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 | |
| 404 | 5104 | Itinerary not found or expired | ||
| 502 | 5001 | The airline or supplier could not complete the request |
▸6.POST /flights/bookSave the passengers on the itinerary, then pay from the wallet and ticket (is_hold false) or hold the booking without payment (is_hold true)..open pagekeys explained
Save the passengers on the itinerary, then pay from the wallet and ticket (is_hold false) or hold the booking without payment (is_hold true).
Auth: Authorization: Bearer <token> from generate-token.
{
"itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
"is_hold": false,
"gst_details": {
"name": "Example Travels Pvt Ltd",
"number": "27AABCE1234F1Z5",
"address": "12 MG Road, Mumbai 400001",
"email": "accounts@example.com",
"mobile": "+919876543210"
},
"pax_details": [
{
"first_name": "Rahul",
"last_name": "Sharma",
"pax_type": "ADULT",
"title": "Mr",
"gender": "male",
"dob": "1990-05-12",
"phone": "+919876543210",
"email": "rahul.sharma@example.com",
"passport_details": {
"passport_number": "Z1234567",
"passport_issue_date": "2022-01-10",
"passport_expiry_date": "2032-01-09",
"passport_issue_country": "IN",
"nationality": "IN"
},
"ancillaries": {
"seat": [
{
"code": "1A",
"price": 600,
"label": "window",
"journey_index": 0,
"segment_index": 0
}
],
"baggage": [
{
"code": "XBAG05",
"price": 1500,
"label": "Extra 5 Kg",
"journey_index": 0
}
],
"meal": [],
"other": []
}
}
]
}- pax_details: one per traveller, at least one. pax_type ADULT, CHILD or INFANT; title Mr, Mrs, Ms, Mstr, Miss; gender male or female; dates YYYY-MM-DD (values as the web frontend sends them; the validator names are passenger_type, passenger_title, gender, dateformat).
- phone and email are required on every passenger; the first passenger's pair is stored as the customer contact.
- gst_details is optional as a block; when present, all five fields are required and number must be a valid GSTIN.
- passport_details is optional; send it when review's requirements say passport_applicable.
{
"booking_id": "AIOR482913",
"itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
"status": "SUCCESS",
"amount": 7112
}{
"booking_id": "AIOR482914",
"itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
"status": "ONHOLD",
"amount": 7112,
"pay_till": "2026-10-17T10:12:00Z"
}- status is the payment status for a paid booking (SUCCESS; PENDING when the ticket is not yet issued) and ONHOLD for a hold.
Keys and what they mean
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| itinerary_id | string | required | must read | The itinerary_id from reprice, before its valid_till. |
| is_hold | boolean | optional, default false | must read | false: book directly, paid at once from your balance or credit and ticketed. true: hold the seats without payment until pay_till (only when reprice said booking_requirements.is_hold true); then confirm-hold or release. |
| pax_details[] | array | required, one per passenger | must read | Every passenger of the search, adults first: first_name, last_name, pax_type (ADULT, CHILD, INFANT), title, gender, dob, phone and email. |
| pax_details[].passport_details | object | when reprice says passport_mandatory | useful | passport_number, passport_issue_date, passport_expiry_date, passport_issue_country, nationality. |
| pax_details[].ancillaries | object | optional | useful | What this passenger buys: seat[], meal[], other[] (each with code, price, label, journey_index and segment_index) and baggage[] (code, price, label, journey_index; no segment_index). Codes come from ancillaries and seat map; an item on a flight not in the itinerary answers 400 with errors[] (rule scope). |
| gst_details | object | optional; required when reprice says is_gst_mandatory | useful | The company on the invoice: name, number (GSTIN), address, email, mobile. |
| Total: 6 keys | ||||
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| booking_id | string | always | must read | Your booking's id. Send it to booking details, confirm-hold and release. |
| status | string | always | must read | ONHOLD (held, pay before pay_till), SUCCESS (booked directly and paid), PENDING (the airline has not confirmed yet: read the booking details), or the booking's state. |
| pay_till | datetime | on a hold | must read | Until when the hold can be confirmed; after it the airline releases the seats. |
| amount | number | always | must read | What the booking costs (INR); taken at once for a direct booking, at confirm-hold for a hold. |
| itinerary_id | string | always | informational | The itinerary that was booked. |
| Total: 5 keys | ||||
Errors this call answers with (7)
| HTTP | code | message | detail | when |
|---|---|---|---|---|
| 401 | 9001 | Authentication required | Invalid token | |
| 403 | 9002 | You do not have permission for this action | Role without bookings.create (Finance, Operation, Tech). | |
| 400 | 3000 | Invalid request | (the API's detail text) | |
| 400 | 9003 | Some fields are missing or invalid | Schema validation of the body (required fields, formats); errors[] lists them. | |
| 503 | 3003 | A service the API depends on is unavailable | (the API's text) | the API answered 5xx or did not answer. |
| 409 | 3101 | Hold booking limit reached | ||
| 500 | 9000 | Something went wrong | Payment or order errors that no translator knows. |
Questions developers ask (2)
- Is gst_details required?
- Only when booking_requirements.is_gst_mandatory is true. When you send it, all five fields are required.
- What is the difference between is_hold true and false?
- false pays from your wallet and tickets at once. true holds the seats without payment until pay_till; confirm with confirm-hold or give them back with release.
▸7.POST /flights/booking/detailsThe booking as stored: status, payment status, the flights with the PNR, the passengers with their fare and ticket number per flight, the price..open pagekeys explained
The booking as stored: status, payment status, the flights with the PNR, the passengers with their fare and ticket number per flight, the price.
Auth: Authorization: Bearer <token> from generate-token.
{
"booking_id": "AIOR482913"
}{
"booking_id": "AIOR482913",
"status": "SUCCESS",
"payment_status": "SUCCESS",
"created_at": "2026-10-15T10:12:34Z",
"route_type": "DOMESTIC",
"journeys": [
{
"journey_index": 0,
"from": "BLR",
"to": "BOM",
"departure_time": "2026-11-14T06:00:00",
"arrival_time": "2026-11-14T07:45:00",
"segments": [
{
"segment_index": 0,
"from": "BLR",
"to": "BOM",
"airline_code": "QP",
"airline_name": "Akasa Air",
"flight_number": "1101",
"departure_time": "2026-11-14T06:00:00",
"arrival_time": "2026-11-14T07:45:00",
"departure_terminal": "1",
"arrival_terminal": "2",
"duration": 105
}
],
"passengers": [
{
"passenger_index": 0,
"first_name": "Rahul",
"last_name": "Sharma",
"pax_type": "ADULT",
"title": "Mr",
"gender": "male",
"dob": "1990-05-12",
"passport_details": {
"passport_number": "Z1234567",
"passport_issue_date": "2022-01-10",
"passport_expiry_date": "2032-01-09",
"nationality": "IN"
},
"fare": {
"base_fare": 4200,
"yq": 500,
"other_taxes": 312,
"ancillaries": 2100,
"total_fare": 7112,
"net_fare": 7112
},
"status": "CONFIRMED",
"pnr": "H7K2PQ",
"ticket_number": "",
"fare_ref": "SAVER",
"refundable_type": "PARTIALLY_REFUNDABLE",
"cabin_class": "Economy",
"booking_class": "Q",
"fare_basis": "QPSAVER",
"baggage": {
"hand": {
"kg": 7
},
"checkin": {
"kg": 15
}
},
"ancillaries": {
"seat": [
{
"code": "1A",
"price": 600,
"label": "window",
"segment_index": 0
}
],
"baggage": [
{
"code": "XBAG05",
"price": 1500,
"label": "Extra 5 Kg"
}
]
}
}
]
}
],
"price": {
"base_fare": 4200,
"yq": 500,
"other_taxes": 312,
"ancillaries": 2100,
"total_fare": 7112,
"net_fare": 7112
},
"gst_details": {
"name": "Example Travels Pvt Ltd",
"number": "27AABCE1234F1Z5",
"address": "12 MG Road, Mumbai 400001",
"email": "accounts@example.com",
"mobile": "+919876543210"
}
}- journeys[] is the booking journey by journey: its dates, its flights (segment_index restarts at 0 inside each journey; operating airline shown only on a codeshare) and, for every passenger on it, who they are (passenger_index is the same person on every journey), the status, the PNR, the ticket number, the fare paid for that journey in the components of the search price plus ancillaries, the fare attributes (fare_ref, refundable_type, cabin, booking class, fare basis, included baggage) and the ancillaries bought (a seat or meal with its segment_index, a bag without).
- status per passenger per journey is PENDING until the booking is held or ticketed, then CONFIRMED; CANCELLED, VOIDED or REISSUED come later. price is the booking as a whole in the same components, total_fare and net_fare included.
- pay_till appears on a held booking. Zero fare fields are omitted (omitempty).
- status values are the API's order statuses: CREATED, PENDING, SUCCESS, ONHOLD, FAILED, PNR_RELEASED, CANCELLED, ABORTED.
Keys and what they mean
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| booking_id | string | required | must read | The id book returned. |
| Total: 1 keys | ||||
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| status | string | always | must read | The booking's state: CREATED, ONHOLD, SUCCESS, PNR_RELEASED, CANCELLED, FAILED. |
| payment_status | string | always | must read | PENDING until paid, then SUCCESS; FAILED or REFUNDED later. |
| pay_till | datetime | on a hold | must read | Until when a held booking can be confirmed; after it the airline releases the seats. |
| journeys[] | array | always | must read | The booking journey by journey: its dates, its flights and, for every passenger on it, who they are, their state, the PNR, the ticket, the fare paid for that journey and the add-ons. |
| journeys[].passengers[].pnr | string | once the airline confirmed | must read | The airline's record locator for this passenger on this journey. Empty until the hold or the ticket is confirmed. |
| journeys[].passengers[].status | string | always | must read | PENDING until confirmed, then CONFIRMED; CANCELLED, VOIDED or REISSUED when something happened to this passenger on this journey. |
| price | object | always | must read | The booking's price as a whole, in the components of the search price (base_fare, yq, yr, airline_gst, booking_fee, commission, other_taxes, total_fare, net_fare) plus ancillaries and fees. |
| journeys[].passengers[].fare | object | always | must read | What this passenger's journey cost, in the components of the search price plus ancillaries bought on it. |
| Total: 8 keys | ||||
Errors this call answers with (4)
| HTTP | code | message | detail | when |
|---|---|---|---|---|
| 401 | 9001 | Authentication required | Invalid token | |
| 403 | 9002 | You do not have permission for this action | Role without bookings.read. | |
| 400 | 3000 | Invalid request | Booking_id is required | |
| 404 | 9005 | Not found | Booking not found |
Questions developers ask (1)
- Why is pnr empty?
- The airline has not confirmed yet: the passenger reads PENDING. It appears once the hold or the ticket is confirmed.
▸8.POST /flights/booking/confirm-holdPay a held booking from the wallet and ticket it, before pay_till..open pagekeys explained
Pay a held booking from the wallet and ticket it, before pay_till.
Auth: Authorization: Bearer <token> from generate-token.
{
"booking_id": "AIOR482914"
}{
"booking_id": "AIOR482914",
"itinerary_id": "9b8a7f6e-5d4c-4b3a-2f1e-0d9c8b7a6f5e",
"status": "SUCCESS",
"amount": 7112
}Keys and what they mean
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| booking_id | string | required | must read | A booking on hold (status ONHOLD), before its pay_till. |
| Total: 1 keys | ||||
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| status | string | always | must read | SUCCESS when paid and ticketed; read the booking details for the tickets. |
| amount | number | always | must read | What was taken from your balance or credit (INR). |
| booking_id | string | always | informational | The booking confirmed. |
| itinerary_id | string | always | informational | Its itinerary. |
| Total: 4 keys | ||||
Errors this call answers with (6)
| HTTP | code | message | detail | when |
|---|---|---|---|---|
| 401 | 9001 | Authentication required | Invalid token | |
| 403 | 9002 | You do not have permission for this action | Role without bookings.hold. | |
| 400 | 3000 | Invalid request | Booking_id is required | |
| 404 | 9005 | Not found | Booking not found | |
| 409 | 3102 | Booking is not pending | Not a held booking, or already confirmed. | |
| 500 | 9000 | Something went wrong | Insufficient wallet or payment faults that no translator knows. |
▸9.POST /flights/booking/releaseGive up a held booking: the PNR is released at the airline and the order becomes PNR_RELEASED.open pagekeys explained
Give up a held booking: the PNR is released at the airline and the order becomes PNR_RELEASED. A ticketed booking cannot be released.
Auth: Authorization: Bearer <token> from generate-token.
{
"booking_id": "AIOR482914"
}{
"booking_id": "AIOR482914",
"status": "PNR_RELEASED",
"pnr": "H7K2PQ"
}- success is false when every provider release failed; status then stays as it was.
Keys and what they mean
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| booking_id | string | required | must read | A booking on hold. A booking that is not on hold answers an error. |
| Total: 1 keys | ||||
| key | type | when present | importance | meaning |
|---|---|---|---|---|
| status | string | always | must read | PNR_RELEASED when the airline freed the seats. A release the airline refuses answers 409 (code 3105): the PNR is still held, try again later. |
| pnr | string | always | useful | The record locator that was released. |
| booking_id | string | always | informational | The booking released. |
| Total: 3 keys | ||||
Errors this call answers with (5)
| HTTP | code | message | detail | when |
|---|---|---|---|---|
| 401 | 9001 | Authentication required | Invalid token | |
| 403 | 9002 | You do not have permission for this action | Role without bookings.cancel. | |
| 400 | 3000 | Invalid request | Booking_id is required | |
| 404 | 9005 | Not found | Booking not found | |
| 409 | 3102 | Booking is not pending | Ticketed or already released. |
Questions developers ask (1)
- Release answered 409 3105. Is the booking released?
- No. The airline did not give the PNR back; it stays held until pay_till. Try again later.
▸ Error codes
Every error reply has the same body: code, message, optional detail, optional errors[] (field, rule, message) and traceId to quote to support.
Common to every call
| code | message | when |
|---|---|---|
| 9000 | 500 | Something went wrong An unexpected fault; the cause is logged under traceId. |
| 9001 | 401 | Authentication required No valid token or API key, or the token expired. |
| 9002 | 403 | You do not have permission for this action |
| 9003 | 400 | Some fields are missing or invalid Schema validation; errors[] lists field, rule, params. |
| 9004 | 429 | Too many requests Rate limit. |
| 9005 | 404 | Not found The record does not exist or is not the caller's. |
| 9006 | 499 | Request cancelled The caller closed the request before the answer. |
| Total: 7 codes | ||
Search, reprice, ancillaries, seat map
| code | message | when |
|---|---|---|
| 5000 | 400 | Invalid request |
| 5001 | 502 | The airline or supplier could not complete the request Supplier or the API error. |
| 5002 | 504 | A supplier or service did not answer in time Timeout. No raise site in the code. |
| 5003 | 503 | A service the API depends on is unavailable |
| 5004 | 502 | The payment could not be completed Not public. No raise site in the code. |
| 5100 | 400 | Invalid search request Search, review or itinerary request invalid. Raised by all four external the API routes. |
| 5101 | 404 | Search not found No raise site in the code. |
| 5102 | 410 | Search results have expired No raise site in the code. |
| 5103 | 404 | Flight not found Raised by review (and the UI's search details routes). |
| 5104 | 404 | Itinerary not found or expired Add-ons and seat map on an unknown itinerary. |
| 5105 | 400 | The supplier does not support this route or cabin No raise site in the code. |
| 5106 | 404 | Supplier account not found Not public. No raise site in the code. |
| 5200 | 404 | Booking not found No raise site in the code; the API's internal book routes answer 9000 instead. |
| Total: 13 codes | ||
Book, details, hold
| code | message | when |
|---|---|---|
| 3000 | 400 | Invalid request |
| 3001 | 400 | A required field is missing Declared on the internal create routes; never raised. |
| 3002 | 400 | A field has an invalid value Declared on the internal create routes; never raised. |
| 3003 | 503 | A service the API depends on is unavailable |
| 3100 | 404 | Booking not found Internal routes. The external routes answer the generic 9005 instead. |
| 3101 | 409 | Hold booking limit reached Hold path. |
| 3102 | 409 | Booking is not pending Confirm or release on a booking in the wrong state. |
| 3103 | 409 | Booking is not assigned Ops routes only. |
| 3104 | 409 | Booking fare does not match the airline PNR Import route only. |
| Total: 9 codes | ||