SITA Airline Reference API
1 Revision History
Date | Version | Description | Author |
---|---|---|---|
|
|
|
|
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 |
---|---|
|
The Content-Type of this request. |
|
The Authorization header that contains the Api Key. |
Response fields
Path | Type | Description |
---|---|---|
|
|
ICAO Airline code |
|
|
Airline Alias code |
|
|
Airline’s country |
|
|
Indicates if request was correctly processed |
|
|
List of existing Airlines |
|
|
Airline name |
|
|
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
Parameter | Description |
---|---|
|
Valid IATA Airline Code |
Request headers
Name | Description |
---|---|
|
The Content-Type of this request. |
|
The Authorization header that contains the Api Key. |
Response fields
Path | Type | Description |
---|---|---|
|
|
ICAO Airline code |
|
|
Airline Alias code |
|
|
Airline’s country |
|
|
Indicates if request was correctly processed |
|
|
List of existing Airlines |
|
|
Airline name |
|
|
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 |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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