Codeshare and wet lease relationships

A codeshare relationship is where an operating airline operates a flight that is sold by a marketing airline. This allows the marketing airline to expand its network of destinations.

A wet lease is an agreement where an operating airline provides an aircraft, complete with a crew, maintenance, and insurance to a marketing airline.

Codeshare relationships

A single airline isn’t large enough to fly to all the airports in the world. There might also be legal reasons why an airline isn’t allowed to operate in a particular country or region of the world. To circumvent these issues and provide a traveler with options in markets an airline doesn’t operate, an airline can make an agreement with another airline that operates flights in those countries or regions. This is called a codeshare agreement.

A codeshare agreement allows an airline to sell tickets to destinations they otherwise couldn’t serve. Both airlines in the arrangement benefit financially.

In a codeshare relationship, the airline that operates the flight is called the operating airline. The airline that markets the flight is called the marketing airline.

The marketing airline sells a ticket for the operating flight as if it were one of its own flights. The flight number of the marketing airline might be different than the operating flight number. Since an operating airline might have codeshare relationships with multiple airlines, a single flight might have multiple marketing flight numbers associated with it.

For example, as of this writing UA 1693 flies between Portland and Chicago. United Airlines operates this flight, but has codeshare relationships with Air Canada (AC 3423), Aer Lingus (EI 6193), Lufthansa (LH 9339), LOT Polish Airlines (LO 4384) and SAS (SK 8868).

Travelers benefit from these arrangements since they can book a route on a single airline without having to book each segment of a route independently. For example, the codeshare arrangement between United and LOT allows a traveler to book a flight from Portland to Warsaw through either United or LOT.

Another benefit is that the codeshare agreement extends to ensuring baggage from one airline is transferred to the other airline, without the traveler needing to check in with each airline. Note that one exception to this benefit is that travelers flying internationally might have to pick up their baggage before going through customs.

While travelers benefit from the relationships, codeshare agreements also introduce potential confusion.

  • The traveler might not realize that multiple airlines are involved with their trip, and then be surprised to be flying on a different airline than they expected.

  • A traveler might be confused at the departing airport, as they are required to check in with the operating airline, not the airline they booked the tickets through.

  • Codeshare agreements might introduce issues with redeeming miles, upgrading seats from miles, and other factors.

Wet lease relationships

Further complicating matters for the travelers are the leasing agreements that airlines make. There are multiple types of leases. One type is the wet lease agreement. In this case, an airline uses an aircraft they lease (acting as a lessee) from another company (who is the lessor).

The lessor airline in a wet lease provides the aircraft and crew and operates it, but the flight is sold as a flight of the lessee airline. This is typically so that the airline leasing the other carrier's flight doesn't carry the financial burden of owning the aircraft or employing the crew.

This arrangement is common with small commuter airlines managing flights on behalf of larger airlines. Travelers can’t purchase tickets from the lessor airline and must instead buy tickets from the lessee or one of the lessee’s codeshare partners. In this type of arrangement, we refer to the lessee airline as the primary marketing carrier. In many cases, the aircraft and crew colors are the brand colors of the lessee airline.

A dry lease is when an entity provides an aircraft without a crew or ground staff. The lessee is responsible for the aircraft’s operator certificate and registration. A damp lease is when an entity provides either pilots, or a crew.

An example of a wet lease flight is Delta 3613 flying between Portland and Seattle. This flight is operated by SkyWest. SkyWest has agreements with several airlines to staff, operate and maintain flights for their partner airline and in this case under a sub-brand of the airline. SkyWest operates flights for American Airlines (as American Eagle), Alaska Airlines (as Alaska SkyWest), Delta Airlines (as Delta Connection), and United Airlines (as United Express).

From a traveler’s perspective, they are purchasing tickets and checking in with the primary marketing carrier and may not even realize that another airline is involved. The primary marketing carrier might also have regular codeshare relationships in place as well. In the case of Delta 3613, there is a codeshare relationship with WestJet.

Codeshares and your application

There are several things to consider regarding codeshares and your application:

  • When your customer searches for a flight number, they might not know the true flight number, but instead have a codeshare flight number. You’ll want to support both in your application.

  • Applications typically display the operating carrier and flight number to travelers, as this is important for check-in purposes.

  • Applications can display the wet lease operator to travelers as additional information but shouldn't display a wet lease flight number by itself, since it has no real meaning to a traveler.

  • Primary and marketing airline flight numbers should all be present on flight listings, as the traveler might not know the marketing airline. For flight listings (departure, arrival, or route listings), developers often create an additional row of information for each marketing codeshare, as the traveler might be looking for a flight number that doesn’t belong to the primary carrier.

  • There shouldn’t be a separate row for the wet lease carrier. For example, an AS flight operated by Horizon shouldn’t have the Horizon flight listed on its own row. However, it might have an AA flight number that codeshares with AS.

How codeshares are surfaced in the Flight Status APIs

FlightStatus responses from FlightStats APIs and Trip APIs return a FlightStatus object. The FlightStatus object always returns the operating flight airline code and flight number (even for wet leases). It also returns an array of codeshares associated with the flight.

What follows is partial Flight Status By Flight response for DL 3622 on the date this article was written. Codeshare and airline schedules change frequently, so this might look different later. The response has been shortened to just those attributes that are necessary to illustrate codeshares.

The operator for this flight is (OO) SkyWest Airlines 3622. The codeshare array shows that this flight has codeshare relationships with (KE) Korean Air 3072, (WS) WestJet 6824, and (DL) Delta Air Lines 3622. The codes in the codeshare array indicate the type of codeshare relationship.

Code
Relationship
Details
L or Z
Commercial duplicate
When the letter L is specified, the operator is the one specified in the Aircraft Owner. When the letter Z is specified, the identity of the operator is specified by the use of Data Element Identifier 127 (Code Sharing and/or Wet Lease Operating Airline Disclosure).
S or X
Shared airline designator or wet lease
The flight is marketed by one airline and operated by another, but under the name of the marketing carrier. The operating carrier doesn’t sell tickets under their own name.

Based on these codes, the first thing to look for is wet lease flights. If there is an S or X, then the airline and flight number in that object is the primary marketing flight number and the carrier that the traveler would be looking for. The others are just regular codeshares.

In this example, DL 3622 is the primary marketing carrier and is the flight number that should be shown to a traveler, not OO 3622. The flight is also marketed as KE 3072 and WS 6824.

If includeNewFields is included in the API request, two new fields are returned. They are operatingCarrierFsCode and primaryCarrierFsCode. primaryCarrierFsCode is the primary marketing carrier. These can be used to display the right solution instead of having to look through the codeshare information. Here’s an example:

If there's no codeshare element with an S or X in it, it means that the operating carrier and primary carrier are the same. For example, UA 1693 doesn’t have a wet lease relationship, and the response for it looks like this:

This flight has codeshare relationships, but none with the S or X. This means that United Airlines is the operator and primary marketing carrier.

Pro tip

Always ask for includeNewFields and use the primaryCarrrierFSCode instead of the operatingCarrierFSCode or carrierFSCode.

How Flight Status API handles codeshares in a request

The Flight Status by Flight API allows you to search for any of the airline and flight numbers tied to a particular flight status response. For example, any of the flights returned for DL 3622 will return the same response. Your app can ask for OO 3622, KE 3072, WS 6824, or DL 3622 and get the same response.

In all cases, the flight status response for a single flight is the same. For example, if you use Flight Status by Airport for PDX and filter by KE as a carrier code, you’ll see the same response information for OO 3622. The API returns any flight where KE is the operator or codeshare.

How FlightStats.com uses codeshare information to display flight numbers

It is useful to illustrate how FlightStats.com uses the request and response information to determine which flight numbers to show.

Here’s an example for UA 1693 which, as shown above, is not a wet lease, but did have several codeshare relationships.

When you search for the United flight, we return that flight number since it’s the primary flight. When you search for one codeshare flight number, we return the flight you searched for, but append an operated by string.

For example, if you search for AC 3423, the flight number displayed is (AC) Air Canada 3423. Under the flight number we display: “Operated by United Airlines 1693.”

Here’s what you’ll see:

Codeshares flight tracker

FlightStats.com displays wet lease information differently. Using the DL 3622 example above, here’s what you’ll see:

Flight number
Description
OO 3622
The flight number displayed is (DL) Delta Air Lines 3622. This is regardless of the fact you searched for OO 3622, because the flight is a wet lease and the main flight number is DL 3622. Under the flight number we display: ”Operated by SkyWest Airlines on behalf of Delta Air Lines.”
DL 3622
The flight number displayed is (DL) Delta Air Lines 3622. Under the flight number we display: ”Operated by SkyWest Airlines on behalf of Delta Air Lines.”
KE 3072
The flight number displayed is (KE) Korean Air 3072. Under the flight number we display: ”Operated by SkyWest Airlines on behalf of Delta Air Lines 3622.”
WS 6824
The flight number displayed is (WS) WestJet 6824. Under the flight number we display: ”Operated by SkyWest Airlines on behalf of Delta Air Lines 3622.”

On the flight tracker page for a particular flight, FlightStats also displays the flight numbers of marketing carriers, as shown in this example:

Codeshares flight numbers

In the case of arrival and departure displays, FlightStats expands the display listings to include rows with the codeshares, as shown in this example.

Codeshare arrivals and departures

Since this can make the results list very long, FlightStats.com lets you choose whether you want to see codeshares or not. If not enabled, FlightStats.com only displays a single record for the flight with the primary flight number. If enabled, it displays the same row and then repeats the same information for each codeshare a flight has using the codeshare carrier and flight number.

You may filter based on the airline code of a wet lease operator, but FlightStats.com shows the primary flight numbers for those flights in the results (with indicators that they are operated by the wet lease airline).

This is one example of how FlightStats.com uses this information. Your application is free to display the information however you like.

How codeshares are surfaced in the FIDS APIs

The FIDS APIs simplify things when it comes to displaying codeshare information. Please see the Update the Flight Information Display System (FIDS) article for details on codeshares using this API.

How codeshares are surfaced in the Flight Schedules APIs

The Flight Schedules API returns codeshare differently than the Flight Status APIs. This is an example response for DL 3622. This is only a partial response, focused on the codeshare information.

Unlike with the Flight Status API, the operating flight number is not the main flight shown, but rather the airline and flight number that was requested. A wet lease operator flight number is also not supported in the schedule API request.

Codeshare information is returned in a codeshare array, but there is no codeshare indicator as these codeshares are always other marketing airlines. The isCodeshare indicator tells you if the flight is a marketing flight number, while the isWetlease indicator tells you if the particular flight is a wet lease. If so, the airline code for the wet lease is shown in wetleaseOperatorFsCode.

The example illustrates that DL 3622 is the primary flight with marketing codeshare relationships with KE and WS, and that it’s a wet lease operated by OO. If you search for KE 3072 with the schedules API, you’ll see the following:

This example shows a schedule for KE 3072. It indicates that it’s a codeshare, and the operator structure contains the primary flight number. It shows that it's a wet lease and displays the wet lease operator code. The codeshares array in this case is empty. To see the other codeshares, you must use the primary flight number.

Unlike the Flight Status APIs, the Flight Schedules API returns brand information in the brand attribute for all flights where the brand is not the primary airline name. In this example the DL brands these flights as “Delta Connection”.

Resources

What are Codeshare Flights and How Do They Work?. A good source of in-depth information about codeshares.

Codeshare agreement. This Wikipedia article has information about codeshare agreements.

Aircraft lease. This Wikipedia article explains aircraft leases.