UPAs Examples

A Hub Backwards Compatible (UTAs and UPAs) endpoint request comprises a request header, a request parameter, and a request body. The request header contains information for partner authentication, API version, and language specification. It also specifies the host name for the application server, the endpoint name and the resources that represent the specific data sets to be returned by the request. The request parameter lists the categories to be returned. The request body contains information regarding the particular flight requested.

Request Header Example

(actual code text is below with explanations as # comments)

Copy
Copied
curl \
    # programming language used
"https://<ENDPOINT_URL?include=RESOURCES>" \
    # this URL includes the host server, the name of the endpoint and the // resources requested(See “Constructing Request URL” below)
-X POST \
    # should be POST, not GET
-H "x-api-key: <YOUR_API_KEY>" \
    # partner’s unique API key (for subscribed partners who do not yet
    # have an API key, please contact your ATPCO Sales Channel // Retailing manager)
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
    # your access token, obtained within the last 60 minutes from the
    # Access Token API - see the "Authorization" documentation for 
    # more details
-H "Content-Type: application/vnd.routehappy+json" \
    # current version of the API
-H "Accept: application/vnd.routehappy+json" \
    # current version of the API
-H "Accept-language: <lc>" \
    # lc is the 2-character language code (ex. ‘en’ for English)
    # See Language section 4.1.5 for a full list of language codes 

Constructing Request URL

Your request URL (shown above as ENDPOINT_URL?include=RESOURCES) consists of the endpoint URL followed by a single query parameter: include.

The ENDPOINT_URL was communicated to you by ATPCO when you registered for the Routehappy API.

Resources

The include parameter accepts a comma-separated list of resources, as shown below. Your request can include any combination of these resources. To return all content types for UPAs, please include all four of the following resources in your request URL:

Resource Purpose
legs.leg_fares.fare Returns all branded fare names included in the flight and requested cabin
legs.leg_fares.leg_fare_segments.upas.photo_attachments.photo Returns all UPAs with photos and/or graphics associated with requested flight and cabin
legs.leg_fares.leg_fare_segments.upas.video_attachments.video Returns all UPAs with videos associated with requested flight and cabin
legs.leg_fares.leg_fare_segments.upas.tour_attachments.tour Returns all UPAs with 360 tours associated with requested flight and cabin

Example URL

This example includes all four resources.

Copy
Copied
https://retailing.apis.atpco.net/routehappy/hub/legs_searches?include=legs.leg_fares.fare,legs.leg_fares.leg_fare_segments.upas.photo_attachments.photo,legs.leg_fares.leg_fare_segments.upas.video_attachments.video,legs.leg_fares.leg_fare_segments.upas.tour_attachments.tour

Constructing Request Body

Requests to the Hub Backwards Compatible endpoint require a request body. The following example shows the parameters that can be included in the request body along with explanations for each parameter:

Copy
Copied
{
  "data":{
    "type":"legs_search",
    "attributes":{
      "fare_source": "<IC>",     
          // IC is IATA Code for the fare source/GDS (ex.‘1S’ for Sabre)
      "categories": "<CATEGORY-ID>",
          // CATEGORY-ID is an optional category ID to limit responses to a
          // specific category
      "legs":[
        {
          "segments": [
            {
              "dep": "<ADC>",  
                  // ADC is Airport Departure Code (ex.‘IAD’ for Dulles, VA)
                  // City code (ex. ‘NYC’ for all New York City airports)
                  // can be used, but airport-specific codes are preferable   
              "arr": "<AAC>",  
                  // AAC is Airport Arrival Code (ex.‘ATL’ for Atlanta, GA)
              "carrier": "<CC>",  
                  // CC is airline’s IATA Carrier Code (ex.‘DL’ for Delta)
              "flt_no": "<FN>",   
                  // FN is the Flight Number (ex.‘74’)
              "dep_date": "<YYYY-MM-DD>",  
                  // Date of Departure (ex.‘2019-08-16’ for August 16, 2019)
              "cabin_id": <C>,  
                  // C is Cabin ID, where 1=ECON 2=PREMECON 3=BUSINESS and 
                  // 4=FIRST
              "fare_basis_code": "<FAREBCOD>" 
                  // fare basis code (up to 8 characters)
            }
          ]
        }
      ]
    }
  }
}

Accessing content for all 4 UPA Categories

To access all UPA categories' data, list all four resources within the include parameter.

Copy
Copied
https://retailing.apis.atpco.net/routehappy/hub/legs_searches?include=legs.leg_fares.fare,legs.leg_fares.leg_fare_segments.upas.photo_attachments.photo,legs.leg_fares.leg_fare_segments.upas.video_attachments.video,legs.leg_fares.leg_fare_segments.upas.tour_attachments.tour

The example below shows a sample request and response sent to the above URL. The request body is included in the -d curl parameter. We’ve used a United Airlines flight in this example for illustration purposes.

Note: Please see notes included in the below UPA response, which highlight which data should ultimately take precedence, as outlined in the “Data Hierarchy” section above

attention

Click response below to see what this request might return.

requestresponse
Copy
Copied
curl \
"retailing.apis.atpco.net/routehappy/hub/legs_searches?include=legs.leg_fares.fare,legs.leg_fares.leg_fare_segments.upas.photo_attachments.photo,legs.leg_fares.leg_fare_segments.upas.video_attachments.video,legs.leg_fares.leg_fare_segments.upas.tour_attachments.tour" \
-X POST \
-H "x-api-key: <YOUR_API_KEY>" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/vnd.routehappy+json" \
-H "Accept: application/vnd.routehappy+json" \
-H "Accept-language: en" \

-d{
  "data":{
    "type":"legs_search",
    "attributes":{
      "fare_source": "1S",
      "legs":[
        {
          "segments": [
            {
              "dep": "EWR",
              "arr": "LAX",
              "carrier": "UA",
              "flt_no": "240",
              "dep_date": "2020-08-20",
              "cabin_id": 1
            }
          ]
        }
      ]
    }
  }
}
Copy
Copied
{
  "meta": {
    "not_matched_leg_indexes": []
  },
  "data": {
    "type": "legs_search",
    "id": "77af3320-a948-4bf0-a1a8-8e1c0427f193",
    "relationships": {
      "legs": {
        "data": [
          {
            "type": "leg",
            "id": "1",
            "meta": {
              "index": 0
            }
          }
        ]
      }
    }
  },
  "included": [
    {
      "type": "leg",
      "id": "1",
      "relationships": {
        "leg_fares": {
          "data": [
            {
              "type": "leg_fare",
              "id": "1|667"
            },
            {
              "type": "leg_fare",
              "id": "1|668"
            },
            {
              "type": "leg_fare",
              "id": "1|666"
            },
            {
              "type": "leg_fare",
              "id": "1|2671"
            }
          ]
        }
      }
    },
    {
      "type": "photo",
      "id": "1182",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/ee8d59a5-951e-4e00-8bd1-0ab12d65ac37/square_thumb/Premier_Access_check-in.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/ee8d59a5-951e-4e00-8bd1-0ab12d65ac37/large_square_thumb/Premier_Access_check-in.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/ee8d59a5-951e-4e00-8bd1-0ab12d65ac37/large/Premier_Access_check-in.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/ee8d59a5-951e-4e00-8bd1-0ab12d65ac37/Premier_Access_check-in.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "1235",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/34082a56-deed-477f-9f1f-aa95293a475a/square_thumb/Premier_Access_security.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/34082a56-deed-477f-9f1f-aa95293a475a/large_square_thumb/Premier_Access_security.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/34082a56-deed-477f-9f1f-aa95293a475a/large/Premier_Access_security.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/34082a56-deed-477f-9f1f-aa95293a475a/Premier_Access_security.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "2357",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/49b0c048-39b3-4500-82ad-61b99ef09af6/square_thumb/United_Club_GreekYogurt_900x600.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/49b0c048-39b3-4500-82ad-61b99ef09af6/large_square_thumb/United_Club_GreekYogurt_900x600.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/49b0c048-39b3-4500-82ad-61b99ef09af6/large/United_Club_GreekYogurt_900x600.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/49b0c048-39b3-4500-82ad-61b99ef09af6/United_Club_GreekYogurt_900x600.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "2358",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/c2be4f73-ac59-4cd8-9176-aef0a502834f/square_thumb/Food_-_United_Club_Oatmeal.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/c2be4f73-ac59-4cd8-9176-aef0a502834f/large_square_thumb/Food_-_United_Club_Oatmeal.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/c2be4f73-ac59-4cd8-9176-aef0a502834f/large/Food_-_United_Club_Oatmeal.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/c2be4f73-ac59-4cd8-9176-aef0a502834f/Food_-_United_Club_Oatmeal.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "2520",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/84923610-adad-43b6-8362-ff8f1e7255cc/square_thumb/EWR_Terminal_C_Pay_with_Miles_or_Money.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/84923610-adad-43b6-8362-ff8f1e7255cc/large_square_thumb/EWR_Terminal_C_Pay_with_Miles_or_Money.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/84923610-adad-43b6-8362-ff8f1e7255cc/large/EWR_Terminal_C_Pay_with_Miles_or_Money.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/84923610-adad-43b6-8362-ff8f1e7255cc/EWR_Terminal_C_Pay_with_Miles_or_Money.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "2522",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/e28d3b35-f1d6-41ea-bbe9-0e810180701d/square_thumb/EWR_Terminal_C_ProofWhiskeyBar_02.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/e28d3b35-f1d6-41ea-bbe9-0e810180701d/large_square_thumb/EWR_Terminal_C_ProofWhiskeyBar_02.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/e28d3b35-f1d6-41ea-bbe9-0e810180701d/large/EWR_Terminal_C_ProofWhiskeyBar_02.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/e28d3b35-f1d6-41ea-bbe9-0e810180701d/EWR_Terminal_C_ProofWhiskeyBar_02.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "2525",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/254977d6-827d-462c-9bed-f226ae009363/square_thumb/EWR_Terminal_C_GateLounge_02.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/254977d6-827d-462c-9bed-f226ae009363/large_square_thumb/EWR_Terminal_C_GateLounge_02.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/254977d6-827d-462c-9bed-f226ae009363/large/EWR_Terminal_C_GateLounge_02.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/254977d6-827d-462c-9bed-f226ae009363/EWR_Terminal_C_GateLounge_02.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "2527",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/2de8bac9-60a7-4539-a3fc-6ff86b88b409/square_thumb/EWR_Terminal_C_CapsBeerGarden_01.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/2de8bac9-60a7-4539-a3fc-6ff86b88b409/large_square_thumb/EWR_Terminal_C_CapsBeerGarden_01.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/2de8bac9-60a7-4539-a3fc-6ff86b88b409/large/EWR_Terminal_C_CapsBeerGarden_01.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/2de8bac9-60a7-4539-a3fc-6ff86b88b409/EWR_Terminal_C_CapsBeerGarden_01.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "2945",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/22047a9d-3e03-48d0-92de-250e1729359d/square_thumb/United-PA-Priority-Boarding-8456.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/22047a9d-3e03-48d0-92de-250e1729359d/large_square_thumb/United-PA-Priority-Boarding-8456.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/22047a9d-3e03-48d0-92de-250e1729359d/large/United-PA-Priority-Boarding-8456.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/22047a9d-3e03-48d0-92de-250e1729359d/United-PA-Priority-Boarding-8456.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "3944",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/a0a6e9c6-f853-4fed-8ec9-657b110af6b3/square_thumb/rsz_nbb_5035_v2.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/a0a6e9c6-f853-4fed-8ec9-657b110af6b3/large_square_thumb/rsz_nbb_5035_v2.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/a0a6e9c6-f853-4fed-8ec9-657b110af6b3/large/rsz_nbb_5035_v2.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/a0a6e9c6-f853-4fed-8ec9-657b110af6b3/rsz_nbb_5035_v2.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "5216",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/d3af1d2b-80b7-4fe2-ac21-0e1f55ccce52/square_thumb/Eco-Skies_737_-_7.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/d3af1d2b-80b7-4fe2-ac21-0e1f55ccce52/large_square_thumb/Eco-Skies_737_-_7.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/d3af1d2b-80b7-4fe2-ac21-0e1f55ccce52/large/Eco-Skies_737_-_7.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/d3af1d2b-80b7-4fe2-ac21-0e1f55ccce52/Eco-Skies_737_-_7.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "7479",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/b9ca542a-2b39-4045-a9b6-c4e4cafc43c0/square_thumb/UA-Economy-787-9_0066.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/b9ca542a-2b39-4045-a9b6-c4e4cafc43c0/large_square_thumb/UA-Economy-787-9_0066.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/b9ca542a-2b39-4045-a9b6-c4e4cafc43c0/large/UA-Economy-787-9_0066.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/b9ca542a-2b39-4045-a9b6-c4e4cafc43c0/UA-Economy-787-9_0066.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "11409",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/d896354c-20b6-427c-9dee-183faf69fbe1/square_thumb/28299_Routehappy_1019-A5_v1a.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/d896354c-20b6-427c-9dee-183faf69fbe1/large_square_thumb/28299_Routehappy_1019-A5_v1a.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/d896354c-20b6-427c-9dee-183faf69fbe1/large/28299_Routehappy_1019-A5_v1a.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/d896354c-20b6-427c-9dee-183faf69fbe1/28299_Routehappy_1019-A5_v1a.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo",
      "id": "11411",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/28132c47-da2f-42b6-a5c2-6efa48a3b760/square_thumb/2019_Snacks_UA.jpeg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/28132c47-da2f-42b6-a5c2-6efa48a3b760/large_square_thumb/2019_Snacks_UA.jpeg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/28132c47-da2f-42b6-a5c2-6efa48a3b760/large/2019_Snacks_UA.jpeg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/28132c47-da2f-42b6-a5c2-6efa48a3b760/2019_Snacks_UA.jpeg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo_attachment",
      "id": "224039-11409",
      "attributes": {
        "caption": "Fill up on a hearty breakfast with fresh options from our Bistro on Board menu."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "11409"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "201816-2357",
      "attributes": {
        "caption": "In the morning, try our Greek yogurt bar with assorted toppings including fresh fruit and granola."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "2357"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "221280-7479",
      "attributes": {
        "caption": "Stretch out with 31 inches of legroom in United Economy® on our 787-10 Dreamliner."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "7479"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "207718-3944",
      "attributes": {
        "caption": "Re-energize with a cup of illy's signature scuro dark roast, made from a unique blend of the best Arabica beans."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "3944"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "223592-7479",
      "attributes": {
        "caption": "Stretch out in Economy with more legroom. Relax in 31 in. of space on United's new B787-10 Dreamliner."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "7479"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "200554-1235",
      "attributes": {
        "caption": "Premier Access available for purchase through United"
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "1235"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "201375-2522",
      "attributes": {
        "caption": "Have a drink or a meal at Proof whiskey bar before your flight."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "2522"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "200623-1182",
      "attributes": {
        "caption": "With Premier Access®, receive access to dedicated airport check-in lines and exclusive security lanes (select airports)."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "1182"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "224175-11411",
      "attributes": {
        "caption": "Tempt your taste buds with a choice of stroopwafel, Biscoff cookies or pretzels on all flights. "
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "11411"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "220855-5216",
      "attributes": {
        "caption": "United is committed to achieving the lowest gross carbon footprint of any U.S. network carrier."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "5216"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "201816-2358",
      "attributes": {
        "caption": "In the morning, try our old-fashioned oatmeal with toppings like cinnamon, raisins, honey and brown sugar."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "2358"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "201375-2527",
      "attributes": {
        "caption": "The redesigned space uses natural light and dramatic light fixtures to brighten up the terminal."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "2527"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "200623-2945",
      "attributes": {
        "caption": "Premier Access® lets you enjoy the convenience of priority boarding."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "2945"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "201375-2525",
      "attributes": {
        "caption": "We're constructing new gate areas to create a more lounge-like atmosphere."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "2525"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "201375-2520",
      "attributes": {
        "caption": "Order your meal from an iPad in the terminal. For the first time ever, you can use award miles for in-person purchases."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "2520"
          }
        }
      }
    },
    {
      "type": "upa",
      "id": "221280",
      "attributes": {
        "headline": "Recline into more legroom",
        "description": "Stretch out with 31 inches of legroom in United Economy® on our 787-10 Dreamliner.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/c2e128dd-6943-4fed-a301-30a21b5c78d2/small/Seat.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/c2e128dd-6943-4fed-a301-30a21b5c78d2/large/Seat.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "https://www.united.com/web/en-US/content/travel/inflight/aircraft/787/900/default.aspx",
        "categories": [
          "seat"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "221280-7479"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "upa",
      "id": "223592",
      "attributes": {
        "headline": "Recline into more legroom",
        "description": "Stretch out in Economy with more legroom. Relax in 31 in. of space on United's new B787-10 Dreamliner.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/c2e128dd-6943-4fed-a301-30a21b5c78d2/small/Seat.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/c2e128dd-6943-4fed-a301-30a21b5c78d2/large/Seat.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "https://www.united.com/web/en-US/content/travel/inflight/aircraft/787/900/default.aspx",
        "categories": [
          "seat"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "223592-7479"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "upa",
      "id": "224039",
      "attributes": {
        "headline": "An excellent start to your day",
        "description": "Fill up on a hearty breakfast with fresh options from our Bistro on Board menu.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/3f3fef3e-34e3-455f-8d04-f5615190cab7/small/meals-beverage-6.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/3f3fef3e-34e3-455f-8d04-f5615190cab7/large/meals-beverage-6.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "https://www.united.com/web/en-US/content/travel/inflight/first/dining.aspx#mainline",
        "categories": [
          "meals"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "224039-11409"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "upa",
      "id": "224175",
      "attributes": {
        "headline": "Choose from three complimentary snacks",
        "description": "Tempt your taste buds with a choice of stroopwafel, Biscoff cookies or pretzels on all flights. ",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/20132303-2146-4283-aa3f-c4800e615198/small/meals-beverage-7.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/20132303-2146-4283-aa3f-c4800e615198/large/meals-beverage-7.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "https://hub.united.com/united-inflight-snacks-available-economy-2639043925.html",
        "categories": [
          "meals"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "224175-11411"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "upa",
      "id": "207718",
      "attributes": {
        "headline": "Now on board: illy coffee",
        "description": "Re-energize with a cup of illy's signature scuro dark roast, made from a unique blend of the best Arabica beans.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/63fd8c17-d161-47f8-b337-cdf2750e180e/small/eco-sky.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/63fd8c17-d161-47f8-b337-cdf2750e180e/large/eco-sky.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "https://hub.united.com/en-us/news/products-services/pages/illy-coffee-is-brewing-at-united.aspx",
        "categories": [
          "beverages"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "207718-3944"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "upa",
      "id": "200623",
      "attributes": {
        "headline": "Purchase faster check-in and boarding",
        "description": "Purchase Premier Access® and enjoy the convenience of dedicated airport check-in lines and priority boarding.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/2bc8bd6b-398b-4e06-9d2d-3bad34c7dc0b/small/premier-access.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/2bc8bd6b-398b-4e06-9d2d-3bad34c7dc0b/large/premier-access.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "http://www.united.com/CMS/en-US/products/travelproducts/Pages/PremierAccess.aspx",
        "categories": [
          "check-in"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "200623-1182"
            },
            {
              "type": "photo_attachment",
              "id": "200623-2945"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "upa",
      "id": "200554",
      "attributes": {
        "headline": "Priority Security",
        "description": "Premier Access available for purchase through United",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/2bc8bd6b-398b-4e06-9d2d-3bad34c7dc0b/small/premier-access.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/2bc8bd6b-398b-4e06-9d2d-3bad34c7dc0b/large/premier-access.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "http://www.united.com/web/en-US/content/products/premieraccess/default.aspx",
        "categories": [
          "departure-terminal"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "200554-1235"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "upa",
      "id": "201375",
      "attributes": {
        "headline": "New dining & more at New York/Newark",
        "description": "In the redesigned Terminal C, you can indulge at the beer garden and restaurants, enjoy local art, and order your meal on an iPad.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/5407353e-4bb4-4636-befc-2c13f9d779d7/small/united-club.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/5407353e-4bb4-4636-befc-2c13f9d779d7/large/united-club.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "https://www.united.com/web/en-US/content/travel/airport/ewr-renovation.aspx",
        "categories": [
          "departure-terminal"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "201375-2522"
            },
            {
              "type": "photo_attachment",
              "id": "201375-2527"
            },
            {
              "type": "photo_attachment",
              "id": "201375-2525"
            },
            {
              "type": "photo_attachment",
              "id": "201375-2520"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "upa",
      "id": "201816",
      "attributes": {
        "headline": "Purchase a United Club℠ one-time pass",
        "description": "Purchase a United Club one-time pass and try our Greek yogurt bar or old-fashioned oatmeal.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/cdc8dc5b-39e7-4c9b-9efa-49c98dc2470b/small/meal.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/cdc8dc5b-39e7-4c9b-9efa-49c98dc2470b/large/meal.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "https://www.united.com/CMS/en-US/travel/UnitedClub/Pages/UnitedClubEnhancements.aspx",
        "categories": [
          "departure-lounge"
        ],
        "fees": [
          {
            "currency_code": "USD",
            "amount_min": "59.00",
            "amount_max": null
          }
        ]
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "201816-2357"
            },
            {
              "type": "photo_attachment",
              "id": "201816-2358"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "upa",
      "id": "220855",
      "attributes": {
        "headline": "Making the blue skies green",
        "description": "United is committed to achieving the lowest gross carbon footprint of any U.S. network carrier.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/834a1c35-202f-48a6-963e-387c34d366f3/small/aircraft-1.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/834a1c35-202f-48a6-963e-387c34d366f3/large/aircraft-1.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "http://view.ceros.com/united/eco-skies/p/1",
        "categories": [
          "brand"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "220855-5216"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1|667/0",
      "attributes": {
        "mk_flt_no": "240"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "221280"
            },
            {
              "type": "upa",
              "id": "223592"
            },
            {
              "type": "upa",
              "id": "224039"
            },
            {
              "type": "upa",
              "id": "224175"
            },
            {
              "type": "upa",
              "id": "207718"
            },
            {
              "type": "upa",
              "id": "200623"
            },
            {
              "type": "upa",
              "id": "200554"
            },
            {
              "type": "upa",
              "id": "201375"
            },
            {
              "type": "upa",
              "id": "201816"
            },
            {
              "type": "upa",
              "id": "220855"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1|668/0",
      "attributes": {
        "mk_flt_no": "240"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "221280"
            },
            {
              "type": "upa",
              "id": "223592"
            },
            {
              "type": "upa",
              "id": "224039"
            },
            {
              "type": "upa",
              "id": "224175"
            },
            {
              "type": "upa",
              "id": "207718"
            },
            {
              "type": "upa",
              "id": "200623"
            },
            {
              "type": "upa",
              "id": "200554"
            },
            {
              "type": "upa",
              "id": "201375"
            },
            {
              "type": "upa",
              "id": "201816"
            },
            {
              "type": "upa",
              "id": "220855"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1|666/0",
      "attributes": {
        "mk_flt_no": "240"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "221280"
            },
            {
              "type": "upa",
              "id": "223592"
            },
            {
              "type": "upa",
              "id": "224039"
            },
            {
              "type": "upa",
              "id": "224175"
            },
            {
              "type": "upa",
              "id": "207718"
            },
            {
              "type": "upa",
              "id": "200623"
            },
            {
              "type": "upa",
              "id": "200554"
            },
            {
              "type": "upa",
              "id": "201375"
            },
            {
              "type": "upa",
              "id": "201816"
            },
            {
              "type": "upa",
              "id": "220855"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1|2671/0",
      "attributes": {
        "mk_flt_no": "240"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "221280"
            },
            {
              "type": "upa",
              "id": "223592"
            },
            {
              "type": "upa",
              "id": "224039"
            },
            {
              "type": "upa",
              "id": "224175"
            },
            {
              "type": "upa",
              "id": "207718"
            },
            {
              "type": "upa",
              "id": "200623"
            },
            {
              "type": "upa",
              "id": "200554"
            },
            {
              "type": "upa",
              "id": "201375"
            },
            {
              "type": "upa",
              "id": "201816"
            },
            {
              "type": "upa",
              "id": "220855"
            }
          ]
        }
      }
    },
    {
      "type": "fare",
      "id": "667",
      "attributes": {
        "brand_name": "ECONOMY",
        "brand_codes": [
          "ECONOMY",
          "RE"
        ]
      }
    },
    {
      "type": "fare",
      "id": "668",
      "attributes": {
        "brand_name": "ECONOMY FLEXIBLE",
        "brand_codes": [
          "ECOFLEX",
          "FX"
        ]
      }
    },
    {
      "type": "fare",
      "id": "666",
      "attributes": {
        "brand_name": "BASIC ECONOMY",
        "brand_codes": [
          "BE",
          "ECOBASIC"
        ]
      }
    },
    {
      "type": "fare",
      "id": "2671",
      "attributes": {
        "brand_name": "ECONOMY PLUS",
        "brand_codes": [
          "ECOPLUS"
        ]
      }
    },
    {
      "type": "leg_fare",
      "id": "1|667",
      "relationships": {
        "fare": {
          "data": {
            "type": "fare",
            "id": "667"
          }
        },
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1|667/0"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare",
      "id": "1|668",
      "relationships": {
        "fare": {
          "data": {
            "type": "fare",
            "id": "668"
          }
        },
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1|668/0"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare",
      "id": "1|666",
      "relationships": {
        "fare": {
          "data": {
            "type": "fare",
            "id": "666"
          }
        },
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1|666/0"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare",
      "id": "1|2671",
      "relationships": {
        "fare": {
          "data": {
            "type": "fare",
            "id": "2671"
          }
        },
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1|2671/0"
            }
          ]
        }
      }
    }
  ]
}

Accessing content for a single UPAs Category

You can specify categories in your request, which will limit which UPA categories are returned. Below, we list all of the categories you can specify in the categories field of your request.

Categories

For Flight

  • aircraft
  • seat
  • meals
  • beverages
  • entertainment
  • power
  • wi-fi
  • service-inflight
  • upgrade

Other additional Category IDs

  • transport-to-airport
  • check-in
  • departure-terminal
  • department-lounge
  • gate-boarding
  • service-departure
  • stopover
  • connecting-ease
  • connecting-terminal
  • connecting-lounge
  • service-connecting
  • baggage-collection
  • arrival-terminal
  • arrival-lounge
  • arrival-transport
  • service-arrival
  • schedule-route
  • loyalty-program
  • brand
  • promotion

Example: Seat Category

The example below shows a full UPA Request and Response pair for the seat UPA category. We’ve used a United Airlines flight in this example for illustration purposes.

attention

Click response below to see what this request might return.

requestresponse
Copy
Copied
curl \
"retailing.apis.atpco.net/routehappy/hub/legs_searches?include=legs.leg_fares.fare,legs.leg_fares.leg_fare_segments.upas.photo_attachments.photo,legs.leg_fares.leg_fare_segments.upas.video_attachments.video,legs.leg_fares.leg_fare_segments.upas.tour_attachments.tour” \
-X POST \
-H "x-api-key: <YOUR_API_KEY>" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-H "Content-Type: application/vnd.routehappy+json" \
-H "Accept: application/vnd.routehappy+json" \
-H "Accept-language: en" \

-d ‘{
  "data":{
    "type":"legs_search",
    "attributes":{
      "fare_source": "1S",
      "categories": ["seat"],
      "legs":[
        {
          "segments": [
            {
              "dep": "EWR",
              "arr": "LAX",
              "carrier": "UA",
              "flt_no": "240",
              "dep_date": "2020-08-20",
              "cabin_id": 1
            }
          ]
        }
      ]
    }
  }
}
Copy
Copied
{
  "meta": {
    "not_matched_leg_indexes": []
  },
  "data": {
    "type": "legs_search",
    "id": "cbf7aaaa-1b3c-418f-b727-372e5588a513",
    "relationships": {
      "legs": {
        "data": [
          {
            "type": "leg",
            "id": "1",
            "meta": {
              "index": 0
            }
          }
        ]
      }
    }
  },
  "included": [
    {
      "type": "leg",
      "id": "1",
      "relationships": {
        "leg_fares": {
          "data": [
            {
              "type": "leg_fare",
              "id": "1|667"
            },
            {
              "type": "leg_fare",
              "id": "1|668"
            },
            {
              "type": "leg_fare",
              "id": "1|666"
            },
            {
              "type": "leg_fare",
              "id": "1|2671"
            }
          ]
        }
      }
    },
    {
      "type": "photo",
      "id": "7479",
      "attributes": {
        "thumb_url": "https://d13cihc9138cdj.cloudfront.net/photos/b9ca542a-2b39-4045-a9b6-c4e4cafc43c0/square_thumb/UA-Economy-787-9_0066.jpg?channel_id=cfrplx28",
        "medium_square_url": "https://d13cihc9138cdj.cloudfront.net/photos/b9ca542a-2b39-4045-a9b6-c4e4cafc43c0/large_square_thumb/UA-Economy-787-9_0066.jpg?channel_id=cfrplx28",
        "large_url": "https://d13cihc9138cdj.cloudfront.net/photos/b9ca542a-2b39-4045-a9b6-c4e4cafc43c0/large/UA-Economy-787-9_0066.jpg?channel_id=cfrplx28",
        "url": "https://d13cihc9138cdj.cloudfront.net/photos/b9ca542a-2b39-4045-a9b6-c4e4cafc43c0/UA-Economy-787-9_0066.jpg?channel_id=cfrplx28"
      }
    },
    {
      "type": "photo_attachment",
      "id": "221280-7479",
      "attributes": {
        "caption": "Stretch out with 31 inches of legroom in United Economy® on our 787-10 Dreamliner."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "7479"
          }
        }
      }
    },
    {
      "type": "photo_attachment",
      "id": "223592-7479",
      "attributes": {
        "caption": "Stretch out in Economy with more legroom. Relax in 31 in. of space on United's new B787-10 Dreamliner."
      },
      "relationships": {
        "photo": {
          "data": {
            "type": "photo",
            "id": "7479"
          }
        }
      }
    },
    {
      "type": "upa",
      "id": "221280",
      "attributes": {
        "headline": "Recline into more legroom",
        "description": "Stretch out with 31 inches of legroom in United Economy® on our 787-10 Dreamliner.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/c2e128dd-6943-4fed-a301-30a21b5c78d2/small/Seat.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/c2e128dd-6943-4fed-a301-30a21b5c78d2/large/Seat.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "https://www.united.com/web/en-US/content/travel/inflight/aircraft/787/900/default.aspx",
        "categories": [
          "seat"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "221280-7479"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "upa",
      "id": "223592",
      "attributes": {
        "headline": "Recline into more legroom",
        "description": "Stretch out in Economy with more legroom. Relax in 31 in. of space on United's new B787-10 Dreamliner.",
        "small_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/c2e128dd-6943-4fed-a301-30a21b5c78d2/small/Seat.png?channel_id=cfrplx28",
        "large_icon_url": "https://d13cihc9138cdj.cloudfront.net/icons/c2e128dd-6943-4fed-a301-30a21b5c78d2/large/Seat.png?channel_id=cfrplx28",
        "cta_text": "More",
        "cta_url": "https://www.united.com/web/en-US/content/travel/inflight/aircraft/787/900/default.aspx",
        "categories": [
          "seat"
        ],
        "fees": []
      },
      "relationships": {
        "photo_attachments": {
          "data": [
            {
              "type": "photo_attachment",
              "id": "223592-7479"
            }
          ]
        },
        "video_attachments": {
          "data": []
        },
        "tour_attachments": {
          "data": []
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1|667/0",
      "attributes": {
        "mk_flt_no": "240"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "221280"
            },
            {
              "type": "upa",
              "id": "223592"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1|668/0",
      "attributes": {
        "mk_flt_no": "240"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "221280"
            },
            {
              "type": "upa",
              "id": "223592"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1|666/0",
      "attributes": {
        "mk_flt_no": "240"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "221280"
            },
            {
              "type": "upa",
              "id": "223592"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare_segment",
      "id": "1|2671/0",
      "attributes": {
        "mk_flt_no": "240"
      },
      "relationships": {
        "upas": {
          "data": [
            {
              "type": "upa",
              "id": "221280"
            },
            {
              "type": "upa",
              "id": "223592"
            }
          ]
        }
      }
    },
    {
      "type": "fare",
      "id": "667",
      "attributes": {
        "brand_name": "ECONOMY",
        "brand_codes": [
          "ECONOMY",
          "RE"
        ]
      }
    },
    {
      "type": "fare",
      "id": "668",
      "attributes": {
        "brand_name": "ECONOMY FLEXIBLE",
        "brand_codes": [
          "ECOFLEX",
          "FX"
        ]
      }
    },
    {
      "type": "fare",
      "id": "666",
      "attributes": {
        "brand_name": "BASIC ECONOMY",
        "brand_codes": [
          "BE",
          "ECOBASIC"
        ]
      }
    },
    {
      "type": "fare",
      "id": "2671",
      "attributes": {
        "brand_name": "ECONOMY PLUS",
        "brand_codes": [
          "ECOPLUS"
        ]
      }
    },
    {
      "type": "leg_fare",
      "id": "1|667",
      "relationships": {
        "fare": {
          "data": {
            "type": "fare",
            "id": "667"
          }
        },
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1|667/0"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare",
      "id": "1|668",
      "relationships": {
        "fare": {
          "data": {
            "type": "fare",
            "id": "668"
          }
        },
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1|668/0"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare",
      "id": "1|666",
      "relationships": {
        "fare": {
          "data": {
            "type": "fare",
            "id": "666"
          }
        },
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1|666/0"
            }
          ]
        }
      }
    },
    {
      "type": "leg_fare",
      "id": "1|2671",
      "relationships": {
        "fare": {
          "data": {
            "type": "fare",
            "id": "2671"
          }
        },
        "leg_fare_segments": {
          "data": [
            {
              "type": "leg_fare_segment",
              "id": "1|2671/0"
            }
          ]
        }
      }
    }
  ]
}