Don't see what you need? Submit a request

Airlines endpoint

Jaivin Anzalota -

This endpoint returns airlines for which you have access.

Request

GET /airlines

Parameters

NameDescription
ids Comma-delimited list of 2-letter airline IATA codes.
Used for filtering the airlines, omit to receive all.

Response

Resource Attributes

airline

NameDescription
id 2-letter airline IATA code
upa_categories An array of UPA category documents. Each document contains id and name.
fare_types An array of fare type documents. Each document contains id and name.

Examples

#1 Fetching only TS

Request

curl \
  -H "Auth: YOUR_PARTNER_ID:YOUR_API_KEY" \
  -H "Accept: application/vnd.api+json" \
  -G \
  -d ids=TS \
  YOUR_HOST/airlines

Response

{
  "airlines": [
    {
      "id": "TS",
      "upa_categories": [
        {
          "id": "food",
          "name": "Food"
        },
        {
          "id": "drink",
          "name": "Drink"
        }
      ],
      "fare_types": [
        {
          "id": 1,
          "name": "Economy Fare"
        },
        {
          "id": 2,
          "name": "Business Fare"
        }
      ]
    }
  ]
}

By using the Routehappy Hub API, you agree to our terms of use.

Have more questions? Submit a request