Element |
Cardinality |
Description |
<connections> |
0..n |
Holder element for all returned connections |
<connection> |
0..n |
Holder element for a connection |
<elapsedTime>185</elapsedTime> |
1..1 |
The total time in minutes from the original departure to the final arrival |
<score>90303</score> |
1..1 |
A heuristic scoring of the connection, based on factors such as travel time, total connecting
flights, and closeness to desired departure/arrival time
|
<scheduledFlights>...</scheduledFlights> |
1..1 |
Holder element for the flights that compose the overall connection |
</connection> |
0..n |
|
</connections> |
|
|
Element |
Cardinality |
Description |
<carrierFsCode>AA</carrierFsCode> |
0..1 |
The Cirium unique code for the operating carrier to use as a reference for
finding the entry in the appendix (unless the extended option to include inlined references is used).
|
<flightNumber>100</flightNumber> |
1..1 |
The flight identification number and any additional characters (String). |
<departureAirportFsCode>JFK</departureAirportFsCode> |
0..1 |
The Cirium unique code for the departure airport to use as a reference for
finding the entry in the appendix (unless the extended option to include inlined references is used).
|
<arrivalAirportFsCode>LHR</arrivalAirportFsCode> |
0..1 |
The Cirium unique code for the arrival airport to use as a reference for
finding the entry in the appendix (unless the extended option to include inlined references is used).
|
<stops>0<stops> |
1..1 |
The number of stops between the departure and arrival airport. This will always be 0 unless the
extended option "includeDirects" is specified.
|
<departureTerminal>8</departureTerminal> |
0..1 |
The terminal from which the flight departed or will depart. |
<arrivalTerminal>3</arrivalTerminal> |
0..1 |
The terminal into which the flight arrived or will arrive. |
<departureTime>2013-05-21T18:05:00.000</departureTime> |
1..1 |
The published departure time (local to the airport) for the flight provided by the airline's
operating schedule.
|
<arrivalTime>2013-05-22T06:20:00.000</arrivalTime> |
1..1 |
The published arrival time (local to the airport) for the flight provided by the airline's operating
schedule.
|
<flightEquipmentIataCode>777</flightEquipmentIataCode> |
0..n |
The IATA code for the equipment scheduled to be flown to use as a reference for finding the entry in
the appendix (unless the extended option to include inlined references is used)
|
<isCodeshare>false</isCodeshare> |
1..1 |
Boolean value indicating if the marketed flight is a codeshare.
|
<isWetlease>false</isWetlease> |
1..1 |
Boolean value indicating if the marketed flight is a wetlease.
|
<serviceType>J</serviceType> |
1..1 |
The type of service offered for the flight:
Value |
Description |
Passenger |
Cargo |
Surface |
J |
Scheduled Passenger (Normal Service) |
Y |
N |
N |
S |
Scheduled Passenger (Shuttle Service) |
Y |
N |
N |
G |
Non-scheduled Passenger (Normal Service) |
Y |
N |
N |
B |
Non-scheduled Passenger (Shuttle Service) |
Y |
N |
N |
C |
Charter (Passenger Only) |
Y |
N |
N |
O |
Charter (Special handling - Migrants/Immigrants) |
Y |
N |
N |
L |
Charter (Passenger and Cargo and/or Mail) |
Y |
Y |
N |
R |
Additional Flights - Passenger/Cargo |
Y |
Y |
N |
Q |
Scheduled Passenger/Cargo in Cabin |
Y |
Y |
N |
F |
Scheduled Cargo/Mail (Loose loaded cargo and/or preloaded devices) |
N |
Y |
N |
M |
Scheduled Cargo/Mail (Mail Only) |
N |
Y |
N |
A |
Non-scheduled Cargo/Mail |
N |
Y |
N |
H |
Charter (Cargo and/or Mail) |
N |
Y |
N |
V |
Scheduled Cargo/Mail (Surface Vehicle) |
N |
Y |
Y |
U |
Scheduled Passenger (Service Vehicle) |
Y |
N |
Y |
|
<serviceClasses> |
0..1 |
IATA service classes
offered for the flight.
|
<serviceClass>R</serviceClass> |
1..n |
IATA service class offered for the flight. |
</serviceClasses> |
|
|
<trafficRestrictions> |
0..1 |
IATA restrictions imposed on the flight. |
<trafficRestriction>Q</trafficRestriction> |
1..n |
IATA restriction imposed on the flight. (One-letter string) |
</trafficRestrictions> |
|
|
<codeshares> |
0..1 |
Any codeshares for
this operated flight.
Codeshares are only possible if this flight leg is not itself a codeshare (the codeshare field must be false).
|
<codeshare> |
1..n |
codeshare for this operated flight. |
<carrierFsCode>LY</carrierFsCode> |
0..1 |
The Cirium unique code for the carrier that is marketing the codeshare (this
may be the operator or a codeshare partner) to use as a reference for finding the entry in the appendix (unless the
extended option 'useInlinedReferences' is used).
|
<flightNumber>8051</flightNumber> |
1..1 |
The flight number marketed by the codeshare partner. |
<serviceType>J</serviceType> |
0..n |
The type of service offered for the flight (see serviceType above). |
<serviceClasses> |
0..n |
IATA service classes
offered for the flight.
|
<serviceClass>F</serviceClass> |
1..n |
IATA service class offered for the flight. |
</serviceClasses> |
|
|
<trafficRestrictions> |
0..1 |
IATA restrictions imposed on the flight. |
<trafficRestriction>Q</trafficRestriction> |
1..n |
IATA restriction imposed on the flight. (One-letter string) |
</trafficRestrictions> |
|
|
</codeshare> |
|
|
</codeshares> |
|
|
<wetleaseOperatorFsCode>8051</wetleaseOperatorFsCode> |
1..1 |
The FS code of the wetlease operator. |
<elapsedTime>90303</elapsedTime> |
1..1 |
The total time in minutes from the departure to arrival for this specific flight |
Element |
Cardinality |
Description |
<fs>AA<fs> |
1..1 |
The Cirium code for the carrier, globally unique across time (String). |
<iata>AA<iata> |
0..1 |
The IATA code for the carrier (String). |
<icao>AAL<icao> |
0..1 |
The ICAO code for the carrier (String). |
<name>American Airlines<name> |
1..1 |
The name of the carrier (String). |
<phoneNumber>1-800-433-7300</phoneNumber> |
0..1 |
The primary customer service phone number for the carrier (String). |
<active>true</active> |
1..1 |
Boolean value indicating if the airline is currently active (Boolean). |
<category>A</category> |
0..1 |
NEW
The category of operation of the airline:
Value |
Description |
Passenger |
Cargo |
A |
Scheduled Passenger Carrier |
Y |
N |
B |
Non-Scheduled Passenger Carrier |
Y |
N |
C |
Scheduled Cargo Carrier |
N |
Y |
D |
Non-scheduled Cargo Carrier |
N |
Y |
E |
Railway Company |
Y |
Y |
F |
Ferry Company |
N |
Y |
G |
Non-airline ULD |
N |
Y |
H |
Computer Reservation System |
n/a |
n/a |
I |
Scheduled Passenger/Cargo Carrier |
Y |
Y |
J |
Non-scheduled Passenger/Cargo Carrier |
Y |
Y |
K |
Bus Company |
Y |
Y |
S |
Miscellaneous/Other |
n/a |
n/a |
|
Fields marked as
NEW will only be returned if the extended option "includeNewFields" is used.
See the Flex API
Version Policy page for details.
Element |
Cardinality |
Description |
<fs>PDX</fs> |
1..1 |
The Cirium code for the airport, globally unique across time (String). |
<iata>PDX</iata> |
0..1 |
The IATA code for the airport (String). |
<icao>KPDX</icao> |
0..1 |
The ICAO code for the airport (String). |
<faa>PDX</faa> |
0..1 |
The FAA code for the airport (String). |
<name>Portland International Airport</name> |
0..1 |
The name of the airport (String). |
<street1>7000 Northeast, Airport Way</street1> |
0..1 |
The street address of the airport, part 1 (String). |
<street2></street2> |
0..1 |
Street address of the airport, part 2 (String). |
<city>Portland</city> |
1..1 |
The city with which the airport is associated (String). |
<cityCode>PDX</cityCode> |
0..1 |
The city code with which the airport is associated (String). |
<district>Chaoyang</district> |
0..1 |
NEW
The district of the city in which the airport is located (String).
|
<stateCode>OR</stateCode> |
0..1 |
The State in which the airport is located (String). |
<postalCode>97216</postalCode> |
0..1 |
The postal code in which the airport resides (String). |
<countryCode>US</countryCode> |
1..1 |
The code for the country in which the airport is located (String). |
<countryName>United States</countryName> |
1..1 |
The name of the country in which the Airport is located (String). |
<regionName>North America</regionName> |
1..1 |
The name of the region in which the Airport is located (String). |
<timeZoneRegionName>America/Los_Angeles</timeZoneRegionName> |
1..1 |
The name of the Time Zone region in which the Airport is located (String). |
<weatherZone>ORZ006</weatherZone> |
0..1 |
The NOAA weather zone (US only) in which the Airport is located (String). |
<localTime>2012-08-09T11:02:59.571</localTime> |
1..1 |
The local time at the Airport when the request was made in ISO-8601 format. yyyy-MM-dd'T'HH:mm:ss.SSS. |
<utcOffsetHours>-7.0</utcOffsetHours> |
1..1 |
The current UTC offset at the Airport when the request was made (Double). |
<latitude>40.642335</latitude> |
1..1 |
The latitude of the airport in decimal degrees (Double). |
<longitude>-73.78817</longitude> |
1..1 |
The longitude of the airport in decimal degrees (Double). |
<elevationFeet>30</elevationFeet> |
1..1 |
The elevation above sea level of the airport in feet (Integer). |
<classification>1</classification> |
1..1 |
The Cirium classification of the airport, 1(max) to 5(min). (Integer). |
<active>true</active> |
1..1 |
Boolean value indicating if the airport is currently operational (Boolean). |
Fields marked as
NEW will only be returned if the extended option "includeNewFields" is used.
See the Flex API
Version Policy page for details.
Element |
Cardinality |
Description |
<iata>777</iata> |
1..1 |
The IATA code for the equipment type. (String) |
<name>Boeing 777 Passenger</name> |
1..1 |
The descriptive name for the equipment type. (String) |
<turboProp>false</turboProp> |
1..1 |
Boolean value indicating if the equipment type uses TurboProp propulsion (Boolean). |
<jet>true</jet> |
1..1 |
Boolean value indicating if the equipment type uses jet propulsion (Boolean). |
<widebody>true</widebody> |
1..1 |
Boolean value indicating if the equipment type is a wide-body airframe (Boolean). |
<regional>false</regional> |
1..1 |
Boolean value indicating if the equipment type is a regional airframe (Boolean). |
Example JSON Output (whitespace added for clarity)
{
"request": {
"endpoint": "LastFlightIn",
"departure": {
"requested": "PDX",
"interpreted": "PDX"
},
"arrival": {
"requested": "YYZ",
"interpreted": "YYZ"
},
"includeAirports": {
"interpreted": []
},
"excludeAirports": {
"interpreted": []
},
"includeAirlines": {
"interpreted": []
},
"excludeAirlines": {
"interpreted": []
},
"numHours": {
"requested": "16",
"interpreted": 16
},
"maxConnections": {
"requested": "3",
"interpreted": 3
},
"includeSurface": {
"requested": "false",
"interpreted": false
},
"payloadType": {
"requested": "all",
"interpreted": "all"
},
"includeCodeshares": {
"requested": "true",
"interpreted": true
},
"includeMultipleCarriers": {
"requested": "true",
"interpreted": true
},
"maxResults": {
"requested": "25",
"interpreted": 25
},
"url":
"https://api.flightstats.com/flex/connections/rest/v2/json/lastflightin/PDX/to/YYZ/arriving_before/2020/8/24/23/1?includeCodeshares=true&payloadType=all&maxResults=25&includeMultipleCarriers=true&numHours=16&includeSurface=false&maxConnections=3",
"dateTime": {
"year": "2020",
"month": "8",
"day": "24",
"hour": "23",
"minute": "1",
"interpreted": "2020-08-24T23:01"
}
},
"connections": [
{
"elapsedTime": 1509,
"score": 118200,
"scheduledFlight": [
{
"carrierFsCode": "DL",
"flightNumber": "4714",
"departureAirportFsCode": "PDX",
"arrivalAirportFsCode": "PHL",
"stops": 0,
"departureTerminal": "EM",
"arrivalTerminal": "D",
"departureTime": "2020-08-22T12:30:00.000",
"arrivalTime": "2020-08-22T14:11:00.000",
"flightEquipmentIataCode": "CR9",
"isCodeshare": true,
"isWetlease": true,
"serviceType": "V",
"serviceClasses": [
"J",
"Y"
],
"trafficRestrictions": [],
"codeshares": [
{
"carrierFsCode": "KE",
"flightNumber": "3237",
"serviceType": "V",
"trafficRestrictions": []
},
{
"carrierFsCode": "WS",
"flightNumber": "6777",
"serviceType": "V",
"trafficRestrictions": []
}
],
"elapsedTime": 101
},
{
"carrierFsCode": "DL",
"flightNumber": "1705",
"departureAirportFsCode": "PHL",
"arrivalAirportFsCode": "LAX",
"stops": 0,
"departureTime": "2020-08-22T15:55:00.000",
"arrivalTime": "2020-08-22T18:02:00.000",
"flightEquipmentIataCode": "319",
"isCodeshare": false,
"isWetlease": false,
"serviceType": "V",
"serviceClasses": [
"J",
"Y",
"O",
"R"
],
"trafficRestrictions": [],
"elapsedTime": 187
},
{
"carrierFsCode": "DL",
"flightNumber": "3085",
"departureAirportFsCode": "LAX",
"arrivalAirportFsCode": "LGA",
"stops": 0,
"arrivalTerminal": "D",
"departureTime": "2020-08-23T06:10:00.000",
"arrivalTime": "2020-08-23T10:13:00.000",
"flightEquipmentIataCode": "221",
"isCodeshare": false,
"isWetlease": false,
"serviceType": "J",
"serviceClasses": [
"J",
"Y"
],
"trafficRestrictions": [],
"codeshares": [
{
"carrierFsCode": "WS",
"flightNumber": "6721",
"serviceType": "J",
"trafficRestrictions": []
}
],
"elapsedTime": 183
},
{
"carrierFsCode": "DL",
"flightNumber": "1207",
"departureAirportFsCode": "LGA",
"arrivalAirportFsCode": "YYZ",
"stops": 0,
"departureTerminal": "C",
"arrivalTerminal": "3",
"departureTime": "2020-08-23T12:00:00.000",
"arrivalTime": "2020-08-23T13:39:00.000",
"flightEquipmentIataCode": "73W",
"isCodeshare": false,
"isWetlease": false,
"serviceType": "J",
"serviceClasses": [
"F",
"Y",
"O",
"R"
],
"trafficRestrictions": [],
"codeshares": [
{
"carrierFsCode": "DL",
"flightNumber": "7141",
"serviceType": "J",
"trafficRestrictions": []
}
],
"elapsedTime": 91
}
]
}
],
"appendix": {
"airlines": [
{
"fs": "DL",
"iata": "DL",
"icao": "DAL",
"name": "Delta Air Lines",
"active": true,
"category": "I"
},
{
"fs": "KE",
"iata": "KE",
"icao": "KAL",
"name": "Korean Air",
"active": true,
"category": "I"
},
{
"fs": "WS",
"iata": "WS",
"icao": "WJA",
"name": "WestJet",
"active": true,
"category": "I"
}
],
"airports": [
{
"fs": "LAX",
"iata": "LAX",
"icao": "KLAX",
"faa": "LAX",
"name": "Los Angeles International Airport",
"street1": "One World Way",
"street2": "",
"city": "Los Angeles",
"cityCode": "LAX",
"stateCode": "CA",
"postalCode": "90045-5803",
"countryCode": "US",
"countryName": "United States",
"regionName": "North America",
"timeZoneRegionName": "America/Los_Angeles",
"weatherZone": "CAZ041",
"localTime": "2020-08-31T11:47:42.535",
"utcOffsetHours": -7.0,
"latitude": 33.943399,
"longitude": -118.408279,
"elevationFeet": 126,
"classification": 1,
"active": true
},
{
"fs": "PHL",
"iata": "PHL",
"icao": "KPHL",
"faa": "PHL",
"name": "Philadelphia International Airport",
"street1": "Industrial Highway and Island Road",
"city": "Philadelphia",
"cityCode": "PHL",
"stateCode": "PA",
"postalCode": "19153",
"countryCode": "US",
"countryName": "United States",
"regionName": "North America",
"timeZoneRegionName": "America/New_York",
"weatherZone": "PAZ071",
"localTime": "2020-08-31T14:47:42.535",
"utcOffsetHours": -4.0,
"latitude": 39.876413,
"longitude": -75.243305,
"elevationFeet": 10,
"classification": 1,
"active": true
},
{
"fs": "PDX",
"iata": "PDX",
"icao": "KPDX",
"faa": "PDX",
"name": "Portland International Airport",
"street1": "7000 NE Airport Way",
"city": "Portland",
"cityCode": "PDX",
"stateCode": "OR",
"postalCode": "97218",
"countryCode": "US",
"countryName": "United States",
"regionName": "North America",
"timeZoneRegionName": "America/Los_Angeles",
"weatherZone": "ORZ006",
"localTime": "2020-08-31T11:47:42.535",
"utcOffsetHours": -7.0,
"latitude": 45.588995,
"longitude": -122.592901,
"elevationFeet": 30,
"classification": 1,
"active": true
},
{
"fs": "LGA",
"iata": "LGA",
"icao": "KLGA",
"faa": "LGA",
"name": "LaGuardia Airport",
"street1": "Hangar 7 Center",
"city": "New York",
"cityCode": "NYC",
"stateCode": "NY",
"postalCode": "11371",
"countryCode": "US",
"countryName": "United States",
"regionName": "North America",
"timeZoneRegionName": "America/New_York",
"weatherZone": "NYZ176",
"localTime": "2020-08-31T14:47:42.536",
"utcOffsetHours": -4.0,
"latitude": 40.774252,
"longitude": -73.871617,
"elevationFeet": 22,
"classification": 1,
"active": true
},
{
"fs": "YYZ",
"iata": "YYZ",
"icao": "CYYZ",
"faa": "",
"name": "Pearson International Airport",
"street1": "",
"street2": "",
"city": "Toronto",
"cityCode": "YTO",
"stateCode": "ON",
"postalCode": "L5P 1B2",
"countryCode": "CA",
"countryName": "Canada",
"regionName": "North America",
"timeZoneRegionName": "America/Toronto",
"weatherZone": "",
"localTime": "2020-08-31T14:47:42.536",
"utcOffsetHours": -4.0,
"latitude": 43.681585,
"longitude": -79.61146,
"elevationFeet": 569,
"classification": 1,
"active": true
}
],
"equipments": [
{
"iata": "221",
"name": "Airbus A220-100 Passenger",
"turboProp": false,
"jet": true,
"widebody": false,
"regional": false
},
{
"iata": "CR9",
"name": "Canadair (Bombardier) Regional Jet 900 and Challenger 890",
"turboProp": false,
"jet": true,
"widebody": false,
"regional": true
},
{
"iata": "319",
"name": "Airbus A319",
"turboProp": false,
"jet": true,
"widebody": false,
"regional": false
},
{
"iata": "73W",
"name": "Boeing 737-700 (winglets) Passenger/BBJ1",
"turboProp": false,
"jet": true,
"widebody": false,
"regional": false
}
]
}
}