A codeshare is a commercial agreement: airline A flies the aircraft and airline B sells seats on it under B's own flight number. A Lufthansa passenger can hold a ticket for LH8320 and board an aircraft painted for United, operating as UA906. Alliances make this routine; a busy long-haul flight can carry five or six numbers.
Two words keep it straight:
- Operating carrier: the airline whose crew and aircraft fly the leg. Airport boards usually show its number.
- Marketing carrier: any airline selling the flight under a different number. The passenger's ticket shows this one.
Why it matters to an integration
The number on the booking is often a marketing number, and the number on the airport board is the operator's. A system that only knows one of them cannot match what the passenger sees to what the airport publishes, and a status lookup keyed on the wrong number returns nothing or, worse, a different flight.
In FlightByte
Look up or subscribe with the number the passenger holds. The snapshot names the operator when it differs and lists every other number the same aircraft flies under:
| Field | Meaning |
|---|---|
carrier | The airline of the number you asked for. |
operatedBy | The operating airline's name, when it is not carrier. Absent otherwise. |
codeshares[] | Every other number for this leg, each with carrier, name and flightNumber. |
The codeshares.changed event fires when that list changes, which is rare and usually happens days before departure. One subscription covers the aircraft, whichever number you subscribed with; there is no need to subscribe to each codeshare separately. The snapshot fields are described under Flights → The snapshot.