Applying different filters to shopping requests (AirShopping)
Published:
API Documentation: AirShopping & OrderRetrieve Headers
AirShopping Endpoint HTTP Headers
| Header | Type | Description |
|---|---|---|
| AG-Providers | String | Required. Specifies which providers to query. Use "*" to request offers from all available providers, or use specific IATA codes (e.g., BA, IB, AA, LH) separated by commas. |
| AG-Request-Timeout | Integer | Required. Defines the maximum time (in seconds) the gateway waits for airline responses. If set to 5, any offers received within 5 seconds are returned; responses arriving after this limit are discarded. |
| AG-Connection | String | Use keep-alive to enable data streaming. This allows the gateway to return results as they are received from individual airlines, rather than waiting for all providers to respond. For non-streaming mode, the header should be omitted or sent with any other value different than keep-alive . |
| AG-Max-Stops | Integer | (WIP) Set to 0 for non-stop or 1 for up to 1 stop. This limits the number of connections (not technical stops) that provided offers might have. For no limit on stops, the header should be omitted. |
| AG-Max-Offers-Per-Cabin | Integer | Limits the number of offers returned per cabin type for each provider. |
| AG-Avoid-Disclosures | Boolean | Set to true or 1 to exclude disclosure information from the response, resulting in a lighter payload. |
AG-Request-Timeout Error
When an airline fails to respond within the specified timeout, the following error is returned for that specific provider:
{
"code": "AGW_provider_time_out",
"detail": "provider response timeout",
"group": "provider_error",
"offerExpiration": "XXXXXXXX",
"provider": "XX"
}
AG-Search-Mode
Use this header to filter or refine your results. Note: Including this header will overwrite your application’s default search configuration.
cheapest_flights: Returns only the single cheapest flight from each airline’s response.cheapest_flights_per_cabin: Returns the cheapest flight for each available cabin type.combine_same_fares_only: (Supported by specific airlines like EK and LH). Combines legs only if they share the same fare family (e.g., Economy Basic Plus with Economy Basic Plus).cheapest_fare_with_baggage_only: Filters results to show only the lowest-priced offer that includes a baggage allowance.- Default behavior: If omitted, the system combines all possible offers, which may result in a high volume of results for certain routes.