POST /api/air/search.POST /api/air/search only starts it and returns request_id. Call this method repeatedly (polling) until status is Ready.GET with the same parameters in the query string.etm-auth-key (string) - session key from POST /api/login. Required.Content-Type - application/json when parameters are sent in a JSON body.application/jsonrequest_id (string, UUID) - search ID from the POST /api/air/search response. Required.next_token (string) - token from the previous response of this method. Omit it or send null in the first request.sort (string) - price (default), duration or profit. Only price changes the order: carrier groups in the response are sorted by min_price. Sorting applies to one response only, so sort the accumulated results on your side. Optional.currency (string) - currency of prices, one of available_currencies from the search response. Default - session currency. Optional.locale (string) - language of names in the response, for example EN or RU. Default - session language. Optional.currency and locale in all requests of one search.POST /api/air/search and save request_id.request_id, without next_token.offers from the response to your list of results. Save next_token.status is InProcess, wait 2 seconds and call the method again with request_id and the saved next_token. Go to step 3.status is Ready. The Ready response can contain new offers too: add them before you stop.status becomes Ready when all suppliers have responded, or 60 seconds after the search started, whichever comes first. Suppliers that respond later are not waited for.Ready has not been received.next_token as a non-empty string, including the Ready response. Ready with a non-empty next_token is normal: it does not mean that more results will follow.next_token returns all results collected so far. Use it to rebuild the full list, for example after a restart of your service.carrier_code.ttl (integer) - seconds left until the search results expire. It is filled only in a Ready response that includes new supplier responses since the previous request, even if they contain no offers. In all other responses it is 0, so ttl: 0 does not mean that the results have expired.status is Ready, offers is an empty array, next_token is a string. ttl can be greater than 0.status: Ready, ttl: 0, next_token: null and empty offers. Returned when request_id does not exist, has expired, or belongs to another user. The response does not contain sort, ow_offers, travel_policy_id and is_schedule.next_token: null means an unknown or expired search.status (string) - InProcess: the search is still running; Ready: the search is finished.next_token (string or null) - token for the next request. null only for an unknown or expired search.ttl (integer) - see "Results lifetime".request_id (string) - search ID from the request.sort (string) - sort order from the request.offers (array) - new results in this response, grouped by carrier:carrier_code (string) - IATA code of the carrier.carrier_name (string) - carrier name.carrier_logo, carrier_icon (string or null) - logo URLs, null if there is no logo.min_price (number) - the lowest price in the group.offers (array) - options of this carrier:min_price (number) - the lowest price among the bookable segments of the option.segments (array) - one element per direction (dir_number). See "One-way, round trip and multi-city" below.ow_offers (array) - for internal use.travel_policy_id (string) - travel policy ID, empty if no travel policy is applied.is_schedule (boolean) - true for a schedule search.currency (string) - currency of prices.segments[]:buy_id (string or null) - ID of the bookable option. Use it in the next steps: Offer info, Availability, Create Order. null for elements that only describe earlier directions of a round trip or multi-city itinerary.segment_id (string) - ID of the element.dir_number (integer) - direction number: 1 - outbound, 2 - return or the second leg of a multi-city itinerary, and so on.departure_date, departure_time, arrival_date, arrival_time (string) - local time of the departure and arrival airports.departure_timestamp, arrival_timestamp (integer) - local airport time written as a Unix timestamp as if it were UTC. Not a real moment in time: do not convert them to another time zone and do not subtract them to get the flight duration.duration_minutes (integer) - duration of the direction in minutes. duration_formated (string) - the same as text.stops (integer) - number of connections.price (number) - price of the option in currency. price_details (array) - price breakdown by passenger type.class (string) - booking class (RBD) of the first flight, for example L. Not the service class.baggage (string) - baggage allowance, for example 23KG.fare_family (string) - fare family name.price_fare_family (boolean) - true if other fare families can be requested with GET /api/air/offers/{buy_id}/smart_ff.is_delayed_ticketing (boolean) - true if the supplier issues the ticket some time after payment (up to 24 hours). See 7 Availability of Offer.flights_info (array) - flights of the direction:marketing_airline_code, operating_airline_code, flight_number - flight data.departure_date, departure_local_time, arrival_date, arrival_local_time - local time of the airports.service_class (string) - service class name in the session language, for example Economy. Not a code: do not compare it with codes. The code (E, W, B, F) is returned by GET /api/air/offers/{buy_id}/info.booking_class (string) - booking class (RBD).baggage (string) - baggage allowance of the flight.self_dock (boolean or null) - true if the passenger makes a self-transfer after this flight.segments has a buy_id and is a separate bookable option.buy_id: null. Each element of the last direction has a buy_id. One bookable option = the elements of the earlier directions of this offers[] item + one element of the last direction. Its price is the price of the whole itinerary.dir_number 1 and 2 have buy_id: null, elements with dir_number 3 have buy_id.interline: true on a segment element means that the itinerary has at least one self-transfer.flights_info[].self_dock: true is set for the flight after which the passenger makes the transfer. For other flights the field is null, so check self_dock === true.flights_info[].bagsRecheck (string) - "1" if the passenger must collect the baggage and check it in again at this connection. Returned only by some suppliers. The field is absent otherwise.stop_time and stop_time_minutes.arrival_airport of a flight with departure_airport of the next flight.flights_info[].baggage and can differ between flights.interline: true, and highlighting the transfers with self_dock: true.request_id is missing or sort has an invalid value. Example: {"errors": {"request_id": ["The request id field is required."]}}etm-auth-key header is missing or the session has expired. See "Authentication troubleshooting" in AVIA API Documentation.{"status": "error", "message": "The payload is invalid."} - next_token was changed or issued by another environment. Repeat the request with the latest token, or without it to get all results.GET {{url}}/api/air/offers/{{buy_id}}/info (offer details) is optional.curl --location --globoff 'https://stage-api.etm-system.com/api/air/offers' \
--header 'Accept: application/json' \
--header 'Etm-Auth-Key: ' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'Content-Type: application/json' \
--data '{
"request_id": "string",
"next_token": "string",
"sort": "string",
"currency": "string",
"locale": "string"
}'{
"status": "Ready",
"next_token": "eyJpdiI6ImVxNDV1aVA0M0dYTU82empmWXM2MWc9PSIsInZhbHVlIjoidDlhazBOTTdLK2tveitGU3lzSTZvd2VsNkhieWJIdjlRZXYyZnlPT2hLdTYxcXp2K3hyRWdsM3RwVWN5a0NidHhzb3g5dnVQaHpSTVRlb2tJZW5pTlE9PSIsIm1hYyI6IjVkNmU5NmI3YjgyZGMzOGQxYjMwMDJkNjI3Y2JkZWZkZjQzZDc2NGU2YWM1ZDQ4ZjY4NTBhNWMzYjk2NGM1Y2EiLCJ0YWciOiIifQ==",
"request_id": "409e7bed-28b8-4a46-8425-3fbef0c890cd",
"sort": "price",
"offers": [
{
"carrier_code": "LO",
"carrier_name": "LOT ",
"carrier_logo": "{{url}}/images/airline/LO.svg",
"min_price": 221.92,
"offers": [
{
"min_price": 221.92,
"segments": [
{
"segment_id": "request_409e7bed-28b8-4a46-8425-3fbef0c890cd_87f643b5-6f12-45ff-b604-5c4293fa071d_0",
"buy_id": "request_409e7bed-28b8-4a46-8425-3fbef0c890cd_87f643b5-6f12-45ff-b604-5c4293fa071d_0",
"with_rules": true,
"is_policy_fail": null,
"policy_fail_details": null,
"is_ow": null,
"dir_number": 1,
"flight_number": "392",
"departure_airport": "BER",
"departure_airport_name": "BRANDENBURG",
"departure_city_name": "Берлин",
"departure_timestamp": 1732262400,
"departure_date": "2024-11-22",
"departure_time": "08:00:00",
"arrival_airport": "WAW",
"arrival_airport_name": "Варшава",
"arrival_city_name": "Варшава",
"arrival_timestamp": 1732266600,
"arrival_date": "2024-11-22",
"arrival_time": "09:10:00",
"duration_formated": "1 ч 10 мин",
"duration_minutes": 70,
"stops": 0,
"flights_info": [
{
"operating_airline_code": "LO",
"operating_airline_name": "LOT ",
"operating_airline_logo": "{{url}}/images/airline/LO.svg",
"marketing_airline_code": "LO",
"marketing_airline_name": "LOT ",
"marketing_airline_logo": "{{url}}/images/airline/LO.svg",
"flight_number": "392",
"flight_number_print": "LO-392",
"airplane_code": "E95",
"airplane_name": "EMBRAER 195",
"departure_country": "DE",
"departure_city": "Берлин",
"departure_city_code": null,
"route_locales": [],
"departure_airport": "BER",
"departure_airport_name": "BRANDENBURG",
"departure_terminal": "1",
"departure_date": "2024-11-22",
"departure_local_time": "08:00",
"departure_timezone": "GMT+01:00",
"departure_local_timestamp": 1732258800,
"arrival_country": "PL",
"arrival_city": "Варшава",
"arrival_city_code": null,
"arrival_airport": "WAW",
"arrival_airport_name": "Варшава",
"arrival_terminal": "",
"arrival_date": "2024-11-22",
"arrival_local_time": "09:10",
"arrival_timezone": "GMT+01:00",
"arrival_local_timestamp": 1732263000,
"duration_formated": "1 ч 10 мин",
"duration_minutes": 70,
"stop_time": null,
"stop_time_minutes": null,
"techstop": null,
"ifs": {},
"delays": false,
"baggage": "0PC",
"service_class": "Эконом",
"booking_class": "T",
"vehicle_type": "aircraft",
"is_charter": false
}
],
"services_available": false,
"other_price_available": false,
"seatmap_available": false,
"tariff": "T1SAV0",
"prov_fare_type": false,
"class": "T",
"seats": 9,
"price": 221.92,
"price_details": [
{
"passenger_type": "adult",
"type": "Взрослый",
"qty": 1,
"base": "170,00 EUR",
"base_amount": 170,
"tax": "51,92 EUR",
"tax_amount": 51.92,
"tax_dtl": [
{
"code": "YQ",
"amount": "5.00",
"currency": "EUR"
},
{
"code": "YR",
"amount": "13.00",
"currency": "EUR"
},
{
"code": "DE",
"amount": "9.87",
"currency": "EUR"
},
{
"code": "OY",
"amount": "15.53",
"currency": "EUR"
},
{
"code": "RA",
"amount": "8.52",
"currency": "EUR"
}
],
"fee": "0,00 EUR",
"fee_amount": 0,
"single": "221,92 EUR",
"single_amount": 221.92,
"total": "221,92 EUR",
"total_amount": 221.92,
"base_total": 170,
"fee_total": 0,
"tax_total": 51.92
}
],
"price_details_extra": [],
"pricelist": [],
"baggage": "0PC",
"price_fare_family": true,
"fare_type": "RP - Published fares",
"fare_messages": null,
"fare_family": "ECOSAVER",
"gds": "GDS",
"gds_type": "GDS",
"sita": false,
"sita_calculate": false,
"pcc_id": 1429,
"pcc_name": "PCC",
"pcc_office": "",
"fee": 0,
"comm": 0,
"is_subsidy": false,
"subsidy_instruction": null,
"discount_attention": null,
"discount_message": null,
"seats_required": false,
"only_ndc_acc": false,
"hash": "bdc14ee60723e02b3dabfd503751e75f",
"price_hash": "bedff872ea1b53e582c2f5c41fcd0a4b",
"bundled_fares": null,
"buy_message": null,
"consolidator_marker": "",
"consolidator_marker_color": null,
"tariff_rules": true,
"is_charter": false
},
{
"segment_id": "request_409e7bed-28b8-4a46-8425-3fbef0c890cd_87f643b5-6f12-45ff-b604-5c4293fa071d_2",
"buy_id": "request_409e7bed-28b8-4a46-8425-3fbef0c890cd_87f643b5-6f12-45ff-b604-5c4293fa071d_2",
"with_rules": true,
"is_policy_fail": null,
"policy_fail_details": null,
"is_ow": null,
"dir_number": 1,
"flight_number": "388",
"departure_airport": "BER",
"departure_airport_name": "BRANDENBURG",
"departure_city_name": "Берлин",
"departure_timestamp": 1732274700,
"departure_date": "2024-11-22",
"departure_time": "11:25:00",
"arrival_airport": "WAW",
"arrival_airport_name": "Варшава",
"arrival_city_name": "Варшава",
"arrival_timestamp": 1732279200,
"arrival_date": "2024-11-22",
"arrival_time": "12:40:00",
"duration_formated": "1 ч 15 мин",
"duration_minutes": 75,
"stops": 0,
"flights_info": [
{
"operating_airline_code": "LO",
"operating_airline_name": "LOT ",
"operating_airline_logo": "{{url}}/images/airline/LO.svg",
"marketing_airline_code": "LO",
"marketing_airline_name": "LOT ",
"marketing_airline_logo": "{{url}}/images/airline/LO.svg",
"flight_number": "388",
"flight_number_print": "LO-388",
"airplane_code": "E95",
"airplane_name": "EMBRAER 195",
"departure_country": "DE",
"departure_city": "Берлин",
"departure_city_code": null,
"route_locales": [],
"departure_airport": "BER",
"departure_airport_name": "BRANDENBURG",
"departure_terminal": "1",
"departure_date": "2024-11-22",
"departure_local_time": "11:25",
"departure_timezone": "GMT+01:00",
"departure_local_timestamp": 1732271100,
"arrival_country": "PL",
"arrival_city": "Варшава",
"arrival_city_code": null,
"arrival_airport": "WAW",
"arrival_airport_name": "Варшава",
"arrival_terminal": "",
"arrival_date": "2024-11-22",
"arrival_local_time": "12:40",
"arrival_timezone": "GMT+01:00",
"arrival_local_timestamp": 1732275600,
"duration_formated": "1 ч 15 мин",
"duration_minutes": 75,
"stop_time": null,
"stop_time_minutes": null,
"techstop": null,
"ifs": {},
"delays": false,
"baggage": "0PC",
"service_class": "Эконом",
"booking_class": "T",
"vehicle_type": "aircraft",
"is_charter": false
}
],
"services_available": false,
"other_price_available": false,
"seatmap_available": false,
"tariff": "T1SAV0",
"prov_fare_type": false,
"class": "T",
"seats": 9,
"price": 221.92,
"price_details": [
{
"passenger_type": "adult",
"type": "Взрослый",
"qty": 1,
"base": "170,00 EUR",
"base_amount": 170,
"tax": "51,92 EUR",
"tax_amount": 51.92,
"tax_dtl": [
{
"code": "YQ",
"amount": "5.00",
"currency": "EUR"
},
{
"code": "YR",
"amount": "13.00",
"currency": "EUR"
},
{
"code": "DE",
"amount": "9.87",
"currency": "EUR"
},
{
"code": "OY",
"amount": "15.53",
"currency": "EUR"
},
{
"code": "RA",
"amount": "8.52",
"currency": "EUR"
}
],
"fee": "0,00 EUR",
"fee_amount": 0,
"single": "221,92 EUR",
"single_amount": 221.92,
"total": "221,92 EUR",
"total_amount": 221.92,
"base_total": 170,
"fee_total": 0,
"tax_total": 51.92
}
],
"price_details_extra": [],
"pricelist": [],
"baggage": "0PC",
"price_fare_family": true,
"fare_type": "RP - Published fares",
"fare_messages": null,
"fare_family": "ECOSAVER",
"gds": "GDS",
"gds_type": "GDS",
"sita": false,
"sita_calculate": false,
"pcc_id": 1429,
"pcc_name": "PCC",
"pcc_office": "",
"fee": 0,
"comm": 0,
"is_subsidy": false,
"subsidy_instruction": null,
"discount_attention": null,
"discount_message": null,
"seats_required": false,
"only_ndc_acc": false,
"hash": "3bcbc1d093b06620e6fdee7731402444",
"price_hash": "c1a42febba4f36749abb067b8e1c1fc9",
"bundled_fares": null,
"buy_message": null,
"consolidator_marker": "",
"consolidator_marker_color": null,
"tariff_rules": true,
"is_charter": false
},
{
"segment_id": "request_409e7bed-28b8-4a46-8425-3fbef0c890cd_87f643b5-6f12-45ff-b604-5c4293fa071d_1",
"buy_id": "request_409e7bed-28b8-4a46-8425-3fbef0c890cd_87f643b5-6f12-45ff-b604-5c4293fa071d_1",
"with_rules": true,
"is_policy_fail": null,
"policy_fail_details": null,
"is_ow": null,
"dir_number": 1,
"flight_number": "390",
"departure_airport": "BER",
"departure_airport_name": "BRANDENBURG",
"departure_city_name": "Берлин",
"departure_timestamp": 1732300800,
"departure_date": "2024-11-22",
"departure_time": "18:40:00",
"arrival_airport": "WAW",
"arrival_airport_name": "Варшава",
"arrival_city_name": "Варшава",
"arrival_timestamp": 1732305000,
"arrival_date": "2024-11-22",
"arrival_time": "19:50:00",
"duration_formated": "1 ч 10 мин",
"duration_minutes": 70,
"stops": 0,
"flights_info": [
{
"operating_airline_code": "LO",
"operating_airline_name": "LOT ",
"operating_airline_logo": "{{url}}/images/airline/LO.svg",
"marketing_airline_code": "LO",
"marketing_airline_name": "LOT ",
"marketing_airline_logo": "{{url}}/images/airline/LO.svg",
"flight_number": "390",
"flight_number_print": "LO-390",
"airplane_code": "E75",
"airplane_name": "EMBRAER 175",
"departure_country": "DE",
"departure_city": "Берлин",
"departure_city_code": null,
"route_locales": [],
"departure_airport": "BER",
"departure_airport_name": "BRANDENBURG",
"departure_terminal": "1",
"departure_date": "2024-11-22",
"departure_local_time": "18:40",
"departure_timezone": "GMT+01:00",
"departure_local_timestamp": 1732297200,
"arrival_country": "PL",
"arrival_city": "Варшава",
"arrival_city_code": null,
"arrival_airport": "WAW",
"arrival_airport_name": "Варшава",
"arrival_terminal": "",
"arrival_date": "2024-11-22",
"arrival_local_time": "19:50",
"arrival_timezone": "GMT+01:00",
"arrival_local_timestamp": 1732301400,
"duration_formated": "1 ч 10 мин",
"duration_minutes": 70,
"stop_time": null,
"stop_time_minutes": null,
"techstop": null,
"ifs": {},
"delays": false,
"baggage": "0PC",
"service_class": "Эконом",
"booking_class": "T",
"vehicle_type": "aircraft",
"is_charter": false
}
],
"services_available": false,
"other_price_available": false,
"seatmap_available": false,
"tariff": "T1SAV0",
"prov_fare_type": false,
"class": "T",
"seats": 9,
"price": 221.92,
"price_details": [
{
"passenger_type": "adult",
"type": "Взрослый",
"qty": 1,
"base": "170,00 EUR",
"base_amount": 170,
"tax": "51,92 EUR",
"tax_amount": 51.92,
"tax_dtl": [
{
"code": "YQ",
"amount": "5.00",
"currency": "EUR"
},
{
"code": "YR",
"amount": "13.00",
"currency": "EUR"
},
{
"code": "DE",
"amount": "9.87",
"currency": "EUR"
},
{
"code": "OY",
"amount": "15.53",
"currency": "EUR"
},
{
"code": "RA",
"amount": "8.52",
"currency": "EUR"
}
],
"fee": "0,00 EUR",
"fee_amount": 0,
"single": "221,92 EUR",
"single_amount": 221.92,
"total": "221,92 EUR",
"total_amount": 221.92,
"base_total": 170,
"fee_total": 0,
"tax_total": 51.92
}
],
"price_details_extra": [],
"pricelist": [],
"baggage": "0PC",
"price_fare_family": true,
"fare_type": "RP - Published fares",
"fare_messages": null,
"fare_family": "ECOSAVER",
"gds": "GDS",
"gds_type": "GDS",
"sita": false,
"sita_calculate": false,
"pcc_id": 1429,
"pcc_name": "PCC",
"pcc_office": "",
"fee": 0,
"comm": 0,
"is_subsidy": false,
"subsidy_instruction": null,
"discount_attention": null,
"discount_message": null,
"seats_required": false,
"only_ndc_acc": false,
"hash": "5eeaf9f7121ce7c4857bdc405b072521",
"price_hash": "7579f46a2b877aa1c1a09e0fe2612ffb",
"bundled_fares": null,
"buy_message": null,
"consolidator_marker": "",
"consolidator_marker_color": null,
"tariff_rules": true,
"is_charter": false
}
]
}
]
}
],
"ow_offers": [],
"travel_policy_id": "",
"is_schedule": false,
"currency": "EUR"
}