Airlines

Airlines are used to identify the air travel companies selling and operating flights

conditions_of_carriage_url
stringnullable

URL to the airline's conditions of carriage.

Example: "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"
iata_code
stringnullable

The two-character IATA code for the airline. This may be null for non-IATA carriers.

Example: "BA"
id
string

Duffel's unique identifier for the airline

Example: "arl_00001876aqC8c5umZmrRds"
logo_lockup_url
stringnullable

Path to a svg of the airline lockup logo. A lockup logo is also called a combination logo, in which it combines the logotype and logomark. This may be null if no logo is available.

Example: "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg"
logo_symbol_url
stringnullable

Path to a svg of the airline logo. This may be null if no logo is available.

Example: "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg"
name
string

The name of the airline

Example: "British Airways"

Retrieves an airline by its ID

URL parameters

id
stringrequired

Duffel's unique identifier for the airline

Example: "arl_00001876aqC8c5umZmrRds"

Endpoint

GET https://api.duffel.com/air/airlines/{id}

Request

curl -X GET --compressed "https://api.duffel.com/air/airlines/{id}" \
-H "Accept-Encoding: gzip" \
-H "Accept: application/json" \
-H "Duffel-Version: v2" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"

Response

{
"data": {
"name": "British Airways",
"logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg",
"logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg",
"id": "arl_00001876aqC8c5umZmrRds",
"iata_code": "BA",
"conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"
}
}

Retrieves a paginated list of all airlines. The results may be returned in any order.

Query parameters

after
string

A cursor pointing to the previous page of records. For more information on how to paginate through records, see the Pagination section.

Example: "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
before
string

A cursor pointing to the next page of records. For more information on how to paginate through records, see the Pagination section.

Example: "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
limit
integer

The maximum number of records to return per page. Defaults to 50. May be set to any integer between 1 and 200. For more information on how to paginate through records, see the Pagination section.

Example: 1
Default value: 50

Endpoint

GET https://api.duffel.com/air/airlines

Request

curl -X GET --compressed "https://api.duffel.com/air/airlines?after=g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB=&before=g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB=&limit=1" \
-H "Accept-Encoding: gzip" \
-H "Accept: application/json" \
-H "Duffel-Version: v2" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"

Response

{
"meta": {
"limit": 50,
"after": "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
},
"data": [
{
"name": "British Airways",
"logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg",
"logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg",
"id": "arl_00001876aqC8c5umZmrRds",
"iata_code": "BA",
"conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"
}
]
}