Sample 1: Requesting UPAs

Austin Schneider -

Universal Product Attributes (UPAs) describe all aspects of the tangible and intangible experience of a flight, targeted down to the flight cabin and further segmented by category and fare_type (fare brand and or RBD code). Each UPA represents a single product attribute with descriptive text, an icon, photos, videos, virtual tours, and a link to more information. Below is an example request and response for requesting UPAs only.

Request

curl \
"YOUR_HOST/legs_searches?include=legs.leg_fares.leg_fare_segments.upas" \
-X POST \
-H "Auth: YOUR_API_KEY" \
-H 'Content-Type: application/vnd.routehappy+json' \
-H "Accept: application/vnd.routehappy+json" \
-H "Accept-language: en" \
-d '{
  "data": {
    "type": "legs_search",
    "attributes": {
      "legs": [
        {
          "key": "YYC-YYZ-TS-846-20180523-ECON~YYZ-AMS-TS-360-20180523-ECON"
        }
      ]
    }
  }
}'

Response

{
  "data": {
    "type": "legs_search",
    "id": "41d37f10-4cb0-ecbb-5643-8885daca27db",
    "relationships": {
      "legs": {
        "data": [
          {
            "type": "leg",
            "id": "1~2",
            "meta": {
              "index": 0
            }
          }
        ]
      }
    }
  },
  "included": [
    {
      "type": "leg",
      "id": "1~2",
      "relationships": {
        "leg_fares": {
          "data": [
            {
              "type": "leg_fare",
              "id": "1~2|54"
            },
            {
              "type": "leg_fare",
              "id": "1~2|51"
            },
            {
              "type": "leg_fare",
              "id": "1~2|52"
            },
            {
              "type": "leg_fare",
              "id": "1~2|53"
            }
          ]
        }
      }
    },
    {
      "type": "upa",
      "id": "200419",
      "attributes": {
        "headline": "Shared screen entertainment",
        "description": "Discover our selection of movies, TV shows and music playlists, including recent hits, on our shared screens.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/903fa192-8d6d-415c-8e4b-5d9880e711f1/small/entertainment.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/903fa192-8d6d-415c-8e4b-5d9880e711f1/large/entertainment.png?channel_id=ot5j870v",
        "cta_text": "Whats New",
        "cta_url": "http://www.airtransat.ca/en-CA/Travel-information/Inflight-services/Inflight-entertainment",
        "categories": [
          "entertainment",
          "ts"
        ],
        "fees": []
      }
    },
    {
      "type": "upa",
      "id": "200430",
      "attributes": {
        "headline": "Online check-in",
        "description": "Spend less time waiting at the airport and check in from the comfort of your own home.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/525453b1-0774-4fd4-9e0f-163764bdb68e/small/online_check-in.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/525453b1-0774-4fd4-9e0f-163764bdb68e/large/online_check-in.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en-CA/Travel-information/Airports-and-check-in/Online-check-in",
        "categories": [
          "check-in",
          "ts"
        ],
        "fees": []
      }
    },
    {
      "type": "upa",
      "id": "200451",
      "attributes": {
        "headline": "Premium airport lounge",
        "description": "Access the Chinook lounge where you can enjoy exclusive privileges at a special discounted rate.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/e5b196ad-391f-42fc-bf8e-d640194ede7b/small/airport_lounge.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/e5b196ad-391f-42fc-bf8e-d640194ede7b/large/airport_lounge.png?channel_id=ot5j870v",
        "cta_text": "Save now",
        "cta_url": "http://www.airtransat.ca/en-CA/Travel-information/Airports-and-check-in/Airport-lounges",
        "categories": [
          "departure-lounge",
          "ts"
        ],
        "fees": [
          {
            "currency_code": "CAD",
            "amount_min": "30.09",
            "amount_max": null
          }
        ]
      }
    },
    {
      "type": "upa",
      "id": "201672",
      "attributes": {
        "headline": "Eco promo fares",
        "description": "Eco Fares offer varying conditions for flight changes or cancellation, so that you can modify your travel dates or even cancel your trip.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/e2102811-6f4f-4150-b955-4c1174f19ffc/small/eco-promo.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/e2102811-6f4f-4150-b955-4c1174f19ffc/large/eco-promo.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en/More-flexibility-with-Eco-fares?ID=3186&type=gamme&tmpl=GEN",
        "categories": [],
        "fees": []
      }
    },
    {
      "type": "upa",
      "id": "200415",
      "attributes": {
        "headline": "Our redesigned cabin",
        "description": "With a brand new Economy Class, mood lighting and a personal entertainment system — it’s a whole new inflight experience.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/a67c9fa7-d915-422f-8eff-e7ba938c566d/small/eco.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/a67c9fa7-d915-422f-8eff-e7ba938c566d/large/eco.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en-CA/Travel-information/Our-fleet/Our-redesigned-cabin",
        "categories": [
          "aircraft",
          "ts"
        ],
        "fees": []
      }
    },
    {
      "type": "upa",
      "id": "200414",
      "attributes": {
        "headline": "All new Economy Class seat",
        "description": "Experience our brand new Economy seat with ergonomic Italian-leather seats, more living space, a four-way headrest and more.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/101a7022-a730-4dad-aa72-aa00a96a1771/small/redesigned_cabin.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/101a7022-a730-4dad-aa72-aa00a96a1771/large/redesigned_cabin.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en-CA/Travel-information/Our-fleet/Our-redesigned-cabin",
        "categories": [
          "seat",
          "ts"
        ],
        "fees": []
      }
    },
    {
      "type": "upa",
      "id": "200421",
      "attributes": {
        "headline": "Complimentary hot meal",
        "description": "We offer a complete meal with starter, a choice of hot main dishes, a dessert and glass of wine.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/8ed80f84-2a55-4e77-adac-a07ea16be918/small/meal.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/8ed80f84-2a55-4e77-adac-a07ea16be918/large/meal.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.com/en-CA/Travel-information/Inflight-services/Food-beverages-and-amenities",
        "categories": [
          "meals",
          "ts"
        ],
        "fees": []
      }
    },
    {
      "type": "upa",
      "id": "200417",
      "attributes": {
        "headline": "State-of-the-art entertainment",
        "description": "Enjoy more than 40 movies, 120 television series, 80 music albums and 9 radio channels.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/903fa192-8d6d-415c-8e4b-5d9880e711f1/small/entertainment.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/903fa192-8d6d-415c-8e4b-5d9880e711f1/large/entertainment.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en-CA/Travel-information/Inflight-services/Inflight-entertainment",
        "categories": [
          "entertainment",
          "ts"
        ],
        "fees": []
      }
    },
    {
      "type": "upa",
      "id": "200424",
      "attributes": {
        "headline": "Extra privileges",
        "description": "Upgrade to Option Plus for more privileges and services in Economy Class starting at just CA $59.50.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/0be40f42-f2f1-4ac9-95ce-3a38dba2c1ef/small/option_plus.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/0be40f42-f2f1-4ac9-95ce-3a38dba2c1ef/large/option_plus.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en-CA/Travel-information/Upgrades-options-and-seat-selection/Option-Plus-extra-privileges-in-Economy-Class?ici=vignette_footer&icn=optionplus-refonte2014",
        "categories": [
          "upgrade",
          "ts"
        ],
        "fees": [
          {
            "currency_code": "CAD",
            "amount_min": "59.50",
            "amount_max": "209.00"
          },
          {
            "currency_code": "EUR",
            "amount_min": "48.00",
            "amount_max": "168.00"
          },
          {
            "currency_code": "GBP",
            "amount_min": "39.00",
            "amount_max": "139.00"
          },
          {
            "currency_code": "CHF",
            "amount_min": "59.50",
            "amount_max": "209.00"
          }
        ]
      }
    },
    {
      "type": "upa",
      "id": "200425",
      "attributes": {
        "headline": "Travel in superior comfort",
        "description": "Upgrade for more comfort and refinement.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/30dbe2ba-1e85-4cc6-a338-d15e00911dbf/small/club.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/30dbe2ba-1e85-4cc6-a338-d15e00911dbf/large/club.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en-CA/Travel-information/Upgrades-options-and-seat-selection/Club-Class-travel-in-superior-comfort",
        "categories": [
          "upgrade",
          "ts"
        ],
        "fees": []
      }
    },
    {
      "type": "upa",
      "id": "200429",
      "attributes": {
        "headline": "Premium airport lounge",
        "description": "Access the Plaza Premium Lounge where you can enjoy exclusive privileges at a special discounted rate.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/e5b196ad-391f-42fc-bf8e-d640194ede7b/small/airport_lounge.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/e5b196ad-391f-42fc-bf8e-d640194ede7b/large/airport_lounge.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en-CA/Travel-information/Airports-and-check-in/Airport-lounges",
        "categories": [
          "departure-lounge",
          "ts"
        ],
        "fees": [
          {
            "currency_code": "CAD",
            "amount_min": "28.00",
            "amount_max": "70.00"
          }
        ]
      }
    },
    {
      "type": "upa",
      "id": "201669",
      "attributes": {
        "headline": "Eco fares",
        "description": "Eco Fares offer varying conditions for flight changes or cancellation, so that you can modify your travel dates or even cancel your trip.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/a67c9fa7-d915-422f-8eff-e7ba938c566d/small/eco.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/a67c9fa7-d915-422f-8eff-e7ba938c566d/large/eco.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en/More-flexibility-with-Eco-fares?ID=3186&type=gamme&tmpl=GEN",
        "categories": [],
        "fees": []
      }
    },
    {
      "type": "upa",
      "id": "201670",
      "attributes": {
        "headline": "Eco extra fares",
        "description": "Eco Fares offer varying conditions for flight changes or cancellation, so that you can modify your travel dates or even cancel your trip.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/93997ecc-f19d-4989-869b-c93516a424ca/small/eco-extra.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/93997ecc-f19d-4989-869b-c93516a424ca/large/eco-extra.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en/More-flexibility-with-Eco-fares?ID=3186&type=gamme&tmpl=GEN",
        "categories": [],
        "fees": []
      }
    },
    {
      "type": "upa",
      "id": "201671",
      "attributes": {
        "headline": "Eco max fares",
        "description": "Eco Fares offer varying conditions for flight changes or cancellation, so that you can modify your travel dates or even cancel your trip.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/31f95a87-f417-46b8-a41f-bc13cde69ca3/small/eco-max.png?channel_id=ot5j870v",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/31f95a87-f417-46b8-a41f-bc13cde69ca3/large/eco-max.png?channel_id=ot5j870v",
        "cta_text": "More",
        "cta_url": "http://www.airtransat.ca/en/More-flexibility-with-Eco-fares?ID=3186&type=gamme&tmpl=GEN",
        "categories": [],
        "fees": []
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1~2|54/0",
      "attributes": {
        "mk_flt_no": "846"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "200419"
            },
            {
              "type": "upa",
              "id": "200430"
            },
            {
              "type": "upa",
              "id": "200451"
            },
            {
              "type": "upa",
              "id": "201672"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1~2|54/1",
      "attributes": {
        "mk_flt_no": "360"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "200415"
            },
            {
              "type": "upa",
              "id": "200414"
            },
            {
              "type": "upa",
              "id": "200421"
            },
            {
              "type": "upa",
              "id": "200417"
            },
            {
              "type": "upa",
              "id": "200424"
            },
            {
              "type": "upa",
              "id": "200425"
            },
            {
              "type": "upa",
              "id": "200429"
            },
            {
              "type": "upa",
              "id": "201672"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1~2|51/0",
      "attributes": {
        "mk_flt_no": "846"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "200419"
            },
            {
              "type": "upa",
              "id": "200430"
            },
            {
              "type": "upa",
              "id": "200451"
            },
            {
              "type": "upa",
              "id": "201669"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1~2|51/1",
      "attributes": {
        "mk_flt_no": "360"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "200415"
            },
            {
              "type": "upa",
              "id": "200414"
            },
            {
              "type": "upa",
              "id": "200421"
            },
            {
              "type": "upa",
              "id": "200417"
            },
            {
              "type": "upa",
              "id": "200424"
            },
            {
              "type": "upa",
              "id": "200425"
            },
            {
              "type": "upa",
              "id": "200429"
            },
            {
              "type": "upa",
              "id": "201669"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1~2|52/0",
      "attributes": {
        "mk_flt_no": "846"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "200419"
            },
            {
              "type": "upa",
              "id": "200430"
            },
            {
              "type": "upa",
              "id": "200451"
            },
            {
              "type": "upa",
              "id": "201670"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1~2|52/1",
      "attributes": {
        "mk_flt_no": "360"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "200415"
            },
            {
              "type": "upa",
              "id": "200414"
            },
            {
              "type": "upa",
              "id": "200421"
            },
            {
              "type": "upa",
              "id": "200417"
            },
            {
              "type": "upa",
              "id": "200424"
            },
            {
              "type": "upa",
              "id": "200425"
            },
            {
              "type": "upa",
              "id": "200429"
            },
            {
              "type": "upa",
              "id": "201670"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1~2|53/0",
      "attributes": {
        "mk_flt_no": "846"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "200419"
            },
            {
              "type": "upa",
              "id": "200430"
            },
            {
              "type": "upa",
              "id": "200451"
            },
            {
              "type": "upa",
              "id": "201671"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1~2|53/1",
      "attributes": {
        "mk_flt_no": "360"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "200415"
            },
            {
              "type": "upa",
              "id": "200414"
            },
            {
              "type": "upa",
              "id": "200421"
            },
            {
              "type": "upa",
              "id": "200417"
            },
            {
              "type": "upa",
              "id": "200424"
            },
            {
              "type": "upa",
              "id": "200425"
            },
            {
              "type": "upa",
              "id": "200429"
            },
            {
              "type": "upa",
              "id": "201671"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare",
      "id": "1~2|54",
      "relationships": {
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1~2|54/0"
            },
            {
              "type": "leg_fare_segment",
              "id": "1~2|54/1"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare",
      "id": "1~2|51",
      "relationships": {
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1~2|51/0"
            },
            {
              "type": "leg_fare_segment",
              "id": "1~2|51/1"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare",
      "id": "1~2|52",
      "relationships": {
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1~2|52/0"
            },
            {
              "type": "leg_fare_segment",
              "id": "1~2|52/1"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare",
      "id": "1~2|53",
      "relationships": {
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1~2|53/0"
            },
            {
              "type": "leg_fare_segment",
              "id": "1~2|53/1"
            }
          ]
        }
      }
    }
  ]
}
Have more questions? Submit a request