Thursday, July 9, 2015

Operating and Primary Carrier

On July 9th, 2015, we added some optional carrier fields to our FlightStatus Response element within certain Flex APIs. Details can be found in our developer center at:
https://developer.flightstats.com/api-docs/flightstatus/v2/flightstatusresponse#flightStatus

These fields explicitly identify the Primary and Operating carriers for all flights. Every flight has a designated Primary carrier. In most cases the Primary carrier also operates the flight. However, in certain instances they establish a business relationship with another carrier to operate the flight. Often this is described as "Operated by [ExpressJet] on behalf of [Delta]." This type of business relationship is commonly called a wet lease.

Please note that we are not making any changes to our existing fields. These are additions only. Also, since these are new fields, they are only provided if you add the includeNewFields parameter in your API request:
https://developer.flightstats.com/api-docs/extended_options#includeNewFields

The examples below show representations both with inline references and without.

=== If not using useInlinedReferences

<operatingCarrierFsCode>AA</carrierFsCode>0..1NEW (https://developer.flightstats.com/api-docs/version_policy) The FlightStats 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).

<primaryCarrierFsCode>AA</carrierFsCode>0..1NEW (https://developer.flightstats.com/api-docs/version_policy) The FlightStats unique code for the primary carrier to use as a reference for finding the entry in the appendix (unless the extended option to include inlined references is used).

=== Sample JSON snippet response for useInlinedReferences

operatingCarrier:

{
fs: "EV",
iata: "EV",
icao: "ASQ",
name: "ExpressJet",
active: true,
category: "I"
},

primaryCarrier:

{
fs: "DL",
iata: "DL",
icao: "DAL",
name: "Delta Air Lines",
phoneNumber: "1-800-221-1212",
active: true,
category: "I"
}

No comments:

Post a Comment