We use HTTP/1.1 as communication protocol to accept requests to the gateway. All NDC requests are sent using the POST HTTP method.
The public endpoint to our NDC Gateway remains immutable for all NDC requests and it is:
- Version 1.2 (Sandbox): https://proxy.airgateway.net/v1.2/
- Version 1.2 (Production): https://proxy.airgateway.com/v1.2/
We require some mandatory basic HTTP headers intended for message formatting:
- Content-Type: application/json
- Accept: application/json
- Authorization: XXXXXXXXXXXXX. You’ll have to send your API token here or you won’t be able to use AirGateway.
We accept some extra headers to change default behaviour:
- AG-Providers: value. Check multi-provider and single-provider requests pages for more information. You’ll use “*” to request all your providers offers and the IATA code to select specific airlines (BA, IB, AA, LH…).
- AG-Connection: keep-alive. This will return data streamed as soon as we receive the response from the airlines instead of waiting to have all airlines responses before returning data.
- AG-Session-ID: XXXXX-XXXXX-XXXXXX. With the first request for a session (usually, an AirShopping) you’ll receive a AG-Session-ID header in response. You should use this header to allow us track full sessions combined with next header.
- AG-Trace: true. This is only accepted in sandbox environment and should only be used for debug purposes. If you experience any issue, please send your example requests with this header and using the same AG-Session-ID header. Then please, share the AG-Session-ID with us when reporting issue.
- Ag-Max-Offers-Per-Cabin: Control how many offers will be returned per cabin for each provider.
- AG-Request-Timeout: Control maximum request lifetime using an integer number value in seconds.
- AG-Search-Mode: Select the way the search works if you want to get fewer but more precise results. It has three possible values:
cheapest_flights-> This will return the cheapest flights from each airline response only.
cheapest_flights_per_cabin-> This will return the cheapest flights for each cabin type.
combine_same_fares_only-> This works for some airlines like EK or LH only. These airlines will send offers for each leg and rules for combinations. With this search mode we’ll just combine offers with the same fare (for example, Economy Basic Plus with Economy Basic Plus, Business Basic with Business Basic…)
- By default we’ll combine all possible offers, which can lead to lots of offers in some routes.
- Ag-OrderRetrieve-Mode: Controls execution flow of OrderRetrieve endpoint.
airline- Sends request to airline to get up-to-date content.
cached- Forces to get cached order.
default(Or not provided) - Sends request to airline.
- If any order change operation was executed.
- Or when last order retrieve time is older than 4 hours. Otherwise, cached version is returned.
It’s very relevant to distinguish between two types of requests to send to the NDC Gateway. Attending to the architecture, we have two types of requests with significant differences between them:
- MPR (Multiple provider requests)
- SPR (Single provider requests)