Don't see what you need? Submit a request

Legs endpoint

Jaivin Anzalota -

This endpoint is compliant with version 1.0 of the JSON API spec.

Request

Requests must include the header: Accept: application/vnd.routehappy+json

GET /legs

Parameters

Name Required Description
filter[key] Yes Up to 150, comma-delimited leg keys. Extraneous keys are ignored.
filter[category] No Comma-delimited list of category IDs. Used for filtering UPAs and UTAs. For example, to return only UPAs/UTAs having the standard category seat and custom category children, send filter[category]=seat,children.
include No Comma-delimited list of related resources to include. By default, this endpoint does not return any related resources.
gc[POSITION] No Used to specify the governing carrier for a leg. The POSITION is the position (zero-based) of the leg key in the filter[key] param. For example, gc[0]=DL&gc[2]=DL sets the governing carrier to DL for the 1st and 3rd leg key.
pcc No A single pseudo city code associated with the request, used for determining data access privileges.

Note: UTA/UPA fare types are filtered based on the requested cabins. For example, consider a UPA associated with Economy and Business fare types. If only Economy legs are requested, the UPA will be related only with the Economy fare type in the response.

  • utas
  • utas.fare_types
  • utas.optional_service_identifier
  • leg_segments
  • leg_segments.upas
  • leg_segments.upas.fare_types
  • leg_segments.upas.optional_service_identifier
  • leg_segments.upas.photo_attachments
  • leg_segments.upas.video_attachments
  • leg_segments.upas.tour_attachments
  • leg_segments.upas.photo_attachments.photo
  • leg_segments.upas.video_attachments.video
  • leg_segments.upas.tour_attachments.tour

 


 

Response

Resource Attributes

leg

Name Type Description
key string Leg key

uta

Name Type Description
headline string Headline, up to 40 characters
description string Description, up to 140 characters
small_icon_url string URL for the 42x42 icon
large_icon_url string URL for the 84x84 icon
cta_text string Link text for cta_url
cta_url string External URL where the end user can learn more
assessment string Possible values: neutral, benefit, restriction
categories array Elements are standard category IDs and/or custom category IDs
fees array Additional fees. Elements are objects with members:
currency_code (string)
amount_min (string)
amount_max (string or null)

upa

Name Type Description
headline string Headline, up to 25 characters
description string Description, up to 125 characters
small_icon_url string URL for the 42x42 icon
large_icon_url string URL for the 84x84 icon
cta_text string Link text for cta_url
cta_url string External URL where the end user can learn more
categories array Elements are standard category IDs and/or custom category IDs
fees array Additional fees. Elements are objects with members:
currency_code (string)
amount_min (string)
amount_max (string or null)

photo_attachment

Name Type Description
caption string Photo caption

video_attachment

Name Type Description
caption string Video caption

tour_attachment

Name Type Description
caption string Tour caption

photo

Name Type Description
thumb_url string URL to the 150x150 image
medium_square_url string URL to the 350x350 image
large_url string URL to the large photo (no wider than 800px and or taller than 600px, scaled proportionately)

video

Name Type Description
image_thumb_url string URL to the 150x150 image
image_medium_square_url string URL to the 350x350 image
embed_url string Used for construction of the embed code.

tour

Name Type Description
image_thumb_url string URL to the 150x150 image
image_medium_square_url string URL to the 350x350 image
embed_url string Used for construction of the embed code.

fare_type

Name Type Description
name string Fare type name
rbds array RBD codes

optional_service_identifier

Name Type Description
code string The ATPCO optional services industry sub code associated with the UPA or UTA
group_code string The ATPCO optional services industry group code associated with the sub code
sub_group_code string The ATPCO optional services industry sub group code associated with the sub group

 


 

Samples

  1. Requesting UPAs
  2. Requesting UTAs
  3. Requesting UPAs and related photos
Have more questions? Submit a request