Airlines
Airlines are used to identify the air travel companies selling and operating flights
On this page
Schema
The two-character IATA code for the airline. This may be null
for non-IATA carriers.
"BA"
Duffel's unique identifier for the airline
"aln_00001876aqC8c5umZmrRds"
The name of the airline
"British Airways"
List airlines
Retrieves a paginated list of all airlines. The results may be returned in any order.
Endpoint
Query Parameters
A cursor pointing to the previous page of records. For more information on how to paginate through records, see the Pagination section.
"g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
A cursor pointing to the next page of records. For more information on how to paginate through records, see the Pagination section.
"g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
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.
1
Request example
curl -X GET --compressed "https://api.duffel.com/air/airlines" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: beta" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response example
{"meta": {"limit": 50,"after": "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="},"data": [{"name": "British Airways","id": "aln_00001876aqC8c5umZmrRds","iata_code": "BA"}]}
Get a single airline
Retrieves an airline by its ID
Endpoint
URL parameters
Duffel's unique identifier for the airline
"aln_00001876aqC8c5umZmrRds"
Request example
curl -X GET --compressed "https://api.duffel.com/air/airlines/{id}" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: beta" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response example
{"data": {"name": "British Airways","id": "aln_00001876aqC8c5umZmrRds","iata_code": "BA"}}