Don't see what you need? Submit a request

Sample 2: Requesting UTAs

Austin Schneider -

Universal Ticket Attributes (UTAs) are specific attributes of a fare, e.g. ticket refundability, structured using standardized terms and airline specific marketing language. As with UPAs, UTAs are targeted down to the flight cabin and further segmented by category and fare_type (fare brand and or RBD code). Each UTA represents a single ticket attribute with standardized headlines, descriptive text, an icon, and a link to more information. Below is an example request and response for requesting UTAs only.

Request

curl \
  -H "Auth: YOUR_API_KEY" \
  -H "Accept: application/vnd.routehappy+json" \
  -H "Accept-language: en" \
  -G \
  -d "filter[key]=YYC-YYZ-TS-882-20170904-ECON~YYZ-AMS-TS-350-20170904-ECON" \
  -d "include=utas,utas.fare_types" \
  "YOUR_HOST/legs"

Response

{
  "data": [
    {
      "type": "leg",
      "id": "3361868-1~3361754-1",
      "attributes": {
        "key": "YYC-YYZ-TS-882-20170904-ECON~YYZ-AMS-TS-350-20170904-ECON"
      },
      "relationships": {
        "utas": {
          "data": [
            {
              "type": "uta",
              "id": "200532"
            },
            ...
          ]
        }
      }
    }
  ],
  "included": [
    {
      "type": "fare_type",
      "id": "51",
      "attributes": {
        "name": "Eco",
        "rbds": [

        ]
      }
    },
    {
      "type": "fare_type",
      "id": "54",
      "attributes": {
        "name": "Eco Promo",
        "rbds": [

        ]
      }
    },
    {
      "type": "uta",
      "id": "200532",
      "attributes": {
        "headline": "For $300",
        "description": "Change your flight date for a fee of $300.",
        "small_icon_url": "http://d13cihc9138cdj.cloudfront.net/icons/09fc650a-57ab-42f6-93fa-4a9ab4949d1f/small/flight_schedule.png",
        "large_icon_url": "http://d13cihc9138cdj.cloudfront.net/icons/09fc650a-57ab-42f6-93fa-4a9ab4949d1f/large/flight_schedule.png",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en/More-flexibility-with-Eco-fares?ID=3186&type=gamme&tmpl=GEN",
        "assessment": "neutral",
        "categories": [
          "advance-change",
          "ts"
        ],
        "fees": [
          {
            "currency_code": "USD",
            "amount_min": "300.00",
            "amount_max": null
          }
        ]
      },
      "relationships": {
        "fare_types": {
          "data": [
            {
              "type": "fare_type",
              "id": "51"
            },
            {
              "type": "fare_type",
              "id": "54"
            }
          ]
        }
      }
    },
    ...
  ]
}
Have more questions? Submit a request