Skip to main content

1 Revision History

Date Version Description Author

27 October 2022

1.0

Initial documentation creation

L Kenny

2 Registration and API Signup

To access the APIs you will need to be issued an api key. These values are passed in as an HTTP header (or optionally query parameter).

2.1 API Key Usage

The API authentication key will be passed in an HTTP header as follows:

  • name of header: X-apiKey

  • value of header: The api key as generated for the application.

2.2 Security

All incoming requests will be REST over HTTPS. Users are authenticated using their registration (api) key.

3 SITA Airline Reference API

The SITA Airline Reference API is a REST based service which provides information about Airlines around the world.

3.1 Resources

This section describes the SITA Airline Reference API.

Detailed API structure, example requests and responses, JSON schema for request (where appropriate) and responses, and error response codes and formats are included.

3.2 Airline

3.2.1 Get All Airlines

Request headers
Name Description

Content-Type

The Content-Type of this request.

X-apiKey

The Authorization header that contains the Api Key.

Response fields
Path Type Description

airlines[].icaoCode

String

ICAO Airline code

airlines[].alias

String

Airline Alias code

airlines[].country

String

Airline’s country

success

Boolean

Indicates if request was correctly processed

airlines[]

Array

List of existing Airlines

airlines[].name

String

Airline name

airlines[].iataCode

String

IATA Airline code

Curl request
$ curl 'https://data-qa.api.aero/v1/airlines' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'X-apiKey: apikey_xyz'
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 326

{
  "success" : true,
  "airlines" : [ {
    "name" : "Virgin Australia",
    "iataCode" : "VA",
    "icaoCode" : "VOZ",
    "alias" : "VIRGIN",
    "country" : "Australia"
  }, {
    "name" : "Copa Airlines",
    "iataCode" : "CM",
    "icaoCode" : "CMP",
    "alias" : "COPA",
    "country" : "Panama"
  } ]
}

3.2.2 Get Airline by Code

Path parameters
Table 1. /v1/airlines/{airlineCode}
Parameter Description

airlineCode

Valid IATA Airline Code

Request headers
Name Description

Content-Type

The Content-Type of this request.

X-apiKey

The Authorization header that contains the Api Key.

Response fields
Path Type Description

airlines[].icaoCode

String

ICAO Airline code

airlines[].alias

String

Airline Alias code

airlines[].country

String

Airline’s country

success

Boolean

Indicates if request was correctly processed

airlines[]

Array

List of existing Airlines

airlines[].name

String

Airline name

airlines[].iataCode

String

IATA Airline code

Curl request
$ curl 'https://data-qa.api.aero/v1/airlines/VA' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'X-apiKey: apikey_xyz'
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 189

{
  "success" : true,
  "airlines" : [ {
    "name" : "Virgin Australia",
    "iataCode" : "VA",
    "icaoCode" : "VOZ",
    "alias" : "VIRGIN",
    "country" : "Australia"
  } ]
}

4 Error Response

4.1 Response fields

Path Type Description

errors

Object

Object that holds the error information

errors.error[].description

String

Error Description

errors.error[]

Array

Array of errors

errors.error[].invalidParam

String

Indicates the invalid query parameter

errors.error[].code

Number

API Internal Error Code

4.2 HTTP Response

HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 159
{
  "errors" : {
  "error" : [ {
  "description" : "Error Description",
  "code" : 9999,
  "invalidParam" : "parameterName"
  } ]
  }
}

5 Appendix A - Airline Reference Use Cases

Scenario:

As an API user I want to make a request to the Airline Reference API to return data for a specific airline

Request:

GET /data/v1/airlines/KL

Response:

Returns data for the airline KL

Scenario:

As an API user I want to make a request to the Airline Reference API to return data for all airlines

Request:

GET /data/v1/airlines

Response:

Returns data for all airlines

Scenario:

As an API user I want to make a request to the Airline Reference API to match airlines by name or by code (IATA or ICAO)

Request:

GET /data/v1/airlines/match/EI

Response:

Checks for airline with a name/code of EI and returns its data


Last updated 2022-10-27 16:05:49 +0100

About us

We are the world's leading specialist in air transport communications and IT solutions. 

 

bottom navigation SITA logo

Contact