Articles in this section
Category / Section

Sending Requests

Published:

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:

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:

AirShopping headers

  • 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-Request-timeout: value. This header is mandatory and sets the maximum number of seconds AGW will wait for airline responses or processing them. If you send a 5, for example, we’ll return all received and processed offers before those 5 seconds. All those after that will be just discarded. Airlines requested resulting in a timeout will receive this error:
{"code":"AGW_provider_time_out","detail":"provider response timeout","group":"provider_error","offerExpiration":"XXXXXXXX","provider":"XX"} 
  • 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-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: number value. Control how many offers will be returned per cabin for each provider.
  • AG-Request-Timeout: number value (seconds). Control maximum request lifetime using an integer number value in seconds.
  • AG-Avoid-Disclosures: boolean value. Disclosures information is not included in each offer so the response is lighter (true or false values).
  • 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…)
    • cheapest_fare_with_baggage_only-> The cheapest offer including baggage.
    • By default we’ll combine all possible offers, which can lead to lots of offers in some routes.

OrderRetrieve headers

Ag-OrderRetrieve-Mode: Controls execution flow of OrderRetrieve endpoint.

  • airline - Sends request to airline to get up-to-date content.
  • default (Or not provided) - cached order
Access denied
Access denied