.. _Access: ************************** Accessing the NDC.ONE APIs ************************** .. raw:: html

URL construction

The domain “ndc.one” acts as central entry point for all accessible airlines. The APIs are available through the subdomain “api.ndc.one”. The client only needs to specify the base path, the carrier and the API version that should be used:: https://{carrier_code}.{environment}.ndc.one/{carrier_code}/{ndc_version}/{operation_path} **Environment**: Every API has an access point for the productive environment as well as for the integration/test environment. The client can select the environment by setting the parameters accordingly:: LIVE: api.ndc.one TEST: api-test.ndc.one **Carrier code**: To select a carrier, the client must add the official IATA carrier code to the path (see :ref:`Airline-Information`). To give an example: For a carrier with IATA code “ZZ” the URL for the live environment would be:: https://zz.api.ndc.one/zz/ **NDC version**: Following the carrier code, the API version must be added to the path:: https://zz.api.ndc.one/zz/21_3/ **Operation path**: The last part of the full URL is the operation path, which varies depending on the message the client wants to send (see **NDC Message Endpoints** below). **Full Example**: https://zz.api.ndc.one/zz/21_3/order/list .. raw:: html

Technical Aspects

NDC.one accepts XML-messages using HTTP-communication. HTTP-method and operation paths are listed in the table below. .. raw:: html

Base-Authentication

For all transactions, the HTTP-header “Authorization” is required. The value must contain the Base64-encoded user credentials that were provided to the client.:: Username: “ndc” Password: “nDc123!” Base64 Encoded (username:password): “bmRjOm5EYzEyMyE=” Authorization Header: “Basic bmRjOm5EYzEyMyE=” .. raw:: html

Bearer-Token-Authentication

Instead of basic auth a bearer token can be used. The HTTP-header “Authorization” is required. The value must contain a auth0 token that was acquired at the auth0 tenant by the client.:: Authorization Header: “Bearer ” .. raw:: html

Content-Encoding

All NDC server instances support GZIP-compressed communication. It is strongly recommended to add the header “Content-Encoding” with the value set to “gzip”. .. raw:: html

Content-Type

This NDC API supports both XML and JSON communication (all according to the IATA Schemas). To enable one of both kinds, it is just necessary to use the correct content type. XML: “Content-Type” for all messages must be set to “application/xml”. JSON: “Content-Type” for all messages must be set to “application/json”. Please note, that the response will by default be returned in the XML format, as this is the common IATA standard. If you want to receive JSON responses, please additionally set the header "Accept" to "application/json". .. raw:: html

NDC Message Endpoints

+---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Operation | HTTP Path | HTTP Method | Request | Response | Explained in detail | +=====================+=======================+==============+=========================+=========================+============================================================================+ | Flight Availability | /shopping/flight | POST | IATA_AirShoppingRQ | IATA_AirShoppingRS | :ref:`IATA_AirShoppingRQ/RS` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Flight Calendar | /shopping/calendar | POST | IATA_AirShoppingRQ | IATA_AirShoppingRS | :ref:`IATA_AirShoppingRQ/RS Calendar` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Seatmap | /shopping/seatmap | POST | IATA_SeatAvailabilityRQ | IATA_SeatAvailabilityRS | :ref:`IATA_SeatAvailabilityRQ/RS` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | ServiceList | /shopping/serviceList | POST | IATA_ServiceListRQ | IATA_ServiceListRS | :ref:`IATA_ServiceListRQ/RS` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Offer Price | /offer/price | POST | IATA_OfferPriceRQ | IATA_OfferPriceRS | :ref:`IATA_OfferPriceRQ/RS` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Offer Retrieve | /offer/retrieve | POST | OfferRetrieveRQ | IATA_OfferPriceRS | :ref:`OfferRetrieveRQ` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Create Order | /order/create | POST | IATA_OrderCreateRQ | IATA_OrderViewRS | :ref:`IATA_OrderCreateRQ` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Retrieve Order | /order/retrieve | POST | IATA_OrderRetrieveRQ | IATA_OrderViewRS | :ref:`IATA_OrderRetrieveRQ` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Order Reshop | /order/reshop | POST | IATA_OrderReshopRQ | IATA_OrderReshopRS | :ref:`IATA_OrderReshopRQ` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Change Inquiry | /order/changeInquiry | POST | IATA_OrderChangeRQ | IATA_OrderViewRS | :ref:`IATA_OrderChangeRQ` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Change Order | /order/change | PUT | IATA_OrderChangeRQ | IATA_OrderViewRS | :ref:`IATA_OrderChangeRQ` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Search Orders | /order/list | POST | IATA_OrderListRQ | IATA_OrderListRS | :ref:`IATA_OrderListRQ/RS` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Cancel Order | /order/cancel | DELETE | IATA_OrderChangeRQ | IATA_OrderViewRS | :ref:`IATA_OrderChangeRQ` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Order Rules | /order/rules | POST | IATA_OrderRulesRQ | IATA_OrderRulesRS | :ref:`IATA_OrderRulesRQ/RS` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | Airline Profile | /airline/profile | POST | IATA_AirlineProfileRQ | IATA_AirlineProfileRS | :ref:`IATA_AirlineProfileRQ/RS` | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+ | NDC Schema | /xsd.zip | GET | N/A | N/A | Can be used to retrieve the currently supported xsd-Files defined by IATA. | +---------------------+-----------------------+--------------+-------------------------+-------------------------+----------------------------------------------------------------------------+