How are codeshares represented in the FIDS API?

Many flights have codeshare relationships. Every flight has a primary carrier who may, or may not, operate the flight.  They also may allow other carriers to sell seats on the flight.  In addition, the primary carrier may choose to hire another airline to actually operate the flight.  This is a special arrangement known as a wet lease.
 
The FlightStats FIDS data contains information that supports displaying these relationships correctly.
 
Here are some typical examples:
 
1) The primary carrier operates the flight as well as selling seats on the flight.  In addition, they allow certain other carriers to sell seats on the flight.  In these cases, the other carriers create their own flight number.  Here is one recent example.
 
AA 100 from JFK to LHR
- American Airlines is both the primary and operating carrier.
- There are six other airlines that sell seats on this flight. Each of these has its own flight number
(BA) British Airways 1511
(GF) Gulf Air 6654
(AY) Finnair 4012
(IB) Iberia 4218
(LY) El Al 8051
(QR) Qatar Airways 5290
 
2) Another case is where the primary carrier does not operate the flight. In this case they hire some other airline to actually operate the flight. They may, or may not, allow additional carriers to sell seats on the flight through a marketing arrangement.  This is known as a wet lease. 
 
Here is an example:  
AS 3448 from Portland to Fresno
- Alaska is the primary carrier.
- SkyWest is the operating carrier.
- The following carrier also sells seats on this flight.
(DL) Delta 9080
 
Note that in this case, FlightStats does not include a SkyWest flight number in the FIDS payload because you cannot purchase a ticket on this flight; it is not a normal, scheduled flight. 
 
FlightStats FIDS Data
 
In order to organize a FIDS board with these relationships presented, customers will want to include the following fields in their request, as well as others as desired for display.
 
airlineCode,
flightNumber,
city,
operatingAirlineCode,
operatingAirlineName, 
primaryMarketingAirlineName, 
primaryMarketingAirlineCode,
codesharesAsCodes, 
isCodeshare, 
codesharesAsNames
 
It is also helpful to sort the payload by: scheduledTime followed by primaryMarketingAirlineCode.
 
Here is an example of part of a payload that is requested this way.  This is AA 2281, with three marketing codeshares.  AA is both primary and operating. AA 2281 is flagged as 'isCodeshare' = false, whereas the other three are true because the AA flight is not a codeshare flight.  With this data you can list all four flights and indicate that passengers on all four of these flights will board AA 2281. 
 
  {
   "airlineCode": "AA",
   "flightNumber": "2281",
   "isCodeshare": false,
   "operatingAirlineName": "American Airlines",
   "operatingAirlineCode": "AA",
   "city": "Chicago",
   "codesharesAsNames": [
    "Alaska Airlines 1537",
    "Gulf Air 6583",
    "Malaysia Airlines 9608"
   ],
   "codesharesAsCodes": [
    "AS 1537",
    "GF 6583",
    "MH 9608"
   ],
   "primaryMarketingAirlineName": "American Airlines",
   "primaryMarketingAirlineCode": "AA"
  },
  {
   "airlineCode": "AS",
   "flightNumber": "1537",
   "isCodeshare": true,
   "operatingAirlineName": "American Airlines",
   "operatingAirlineCode": "AA",
   "city": "Chicago",
   "codesharesAsNames": [
    "Alaska Airlines 1537",
    "Gulf Air 6583",
    "Malaysia Airlines 9608"
   ],
   "codesharesAsCodes": [
    "AS 1537",
    "GF 6583",
    "MH 9608"
   ],
   "primaryMarketingAirlineName": "American Airlines",
   "primaryMarketingAirlineCode": "AA"
  },
  {
   "airlineCode": "GF",
   "flightNumber": "6583",
   "isCodeshare": true,
   "operatingAirlineName": "American Airlines",
   "operatingAirlineCode": "AA",
   "city": "Chicago",
   "codesharesAsNames": [
    "Alaska Airlines 1537",
    "Gulf Air 6583",
    "Malaysia Airlines 9608"
   ],
   "codesharesAsCodes": [
    "AS 1537",
    "GF 6583",
    "MH 9608"
   ],
   "primaryMarketingAirlineName": "American Airlines",
   "primaryMarketingAirlineCode": "AA"
  },
  {
   "airlineCode": "MH",
   "flightNumber": "9608",
   "isCodeshare": true,
   "operatingAirlineName": "American Airlines",
   "operatingAirlineCode": "AA",
   "city": "Chicago",
   "codesharesAsNames": [
    "Alaska Airlines 1537",
    "Gulf Air 6583",
    "Malaysia Airlines 9608"
   ],
   "codesharesAsCodes": [
    "AS 1537",
    "GF 6583",
    "MH 9608"
   ],
   "primaryMarketingAirlineName": "American Airlines",
   "primaryMarketingAirlineCode": "AA"
  },
 
 
Notice that in this next case, all three of these flights are flagged as 'isCodeshare' = true.  That is because neither NZ nor UA nor AC operate this flight.  This allows a FIDS board to display these three flights, and indicate that in all cases, passengers will fly on Jazz airlines.  (This is a wet lease.)
 
  {
   "airlineCode": "NZ",
   "flightNumber": "4754",
   "isCodeshare": true,
   "operatingAirlineName": "Jazz",
   "operatingAirlineCode": "QK",
   "city": "Vancouver",
   "codesharesAsNames": [
    "Air New Zealand 4754",
    "United Airlines 8220",
    "Air Canada 8124"
   ],
   "codesharesAsCodes": [
    "NZ 4754",
    "UA 8220",
    "AC 8124"
   ],
   "primaryMarketingAirlineName": "Air Canada",
   "primaryMarketingAirlineCode": "AC"
  },
  {
   "airlineCode": "UA",
   "flightNumber": "8220",
   "isCodeshare": true,
   "operatingAirlineName": "Jazz",
   "operatingAirlineCode": "QK",
   "city": "Vancouver",
   "codesharesAsNames": [
    "Air New Zealand 4754",
    "United Airlines 8220",
    "Air Canada 8124"
   ],
   "codesharesAsCodes": [
    "NZ 4754",
    "UA 8220",
    "AC 8124"
   ],
   "primaryMarketingAirlineName": "Air Canada",
   "primaryMarketingAirlineCode": "AC"
  },
  {
   "airlineCode": "AC",
   "flightNumber": "8124",
   "isCodeshare": true,
   "operatingAirlineName": "Jazz",
   "operatingAirlineCode": "QK",
   "city": "Vancouver",
   "codesharesAsNames": [
    "Air New Zealand 4754",
    "United Airlines 8220",
    "Air Canada 8124"
   ],
   "codesharesAsCodes": [
    "NZ 4754",
    "UA 8220",
    "AC 8124"
   ],
   "primaryMarketingAirlineName": "Air Canada",
   "primaryMarketingAirlineCode": "AC"
  },
 
 
Here is an example of a flight that has no codeshares and is not wet leased.  IsCodeshare = false and there is no list of codesharesAsCodes.  It also has the same primary and operating carrier. 
 
  {
   "airlineCode": "AS",
   "flightNumber": "714",
   "isCodeshare": false,
   "operatingAirlineName": "Alaska Airlines",
   "operatingAirlineCode": "AS",
   "city": "Salt Lake City",
   "primaryMarketingAirlineName": "Alaska Airlines",
   "primaryMarketingAirlineCode": "AS"
  },
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk