We’ve been using the AirportBoards endpoint to retrieve flights and then using the AirlineInfo endpoint to print out the airline shortname. But for flights with codeshares, we’d really prefer to display the primary carrier’s name instead. For example, for flight JIA5588-1517793900-schedule-0000, we used ‘PSA Airlines’ because that’s the airline code, but would’ve preferred the codeshare AAL5588’S ‘American Airlines.’ Another example is ASQ4081-1517725600-airline-0093, whose airline is ExpressJet. We’d rather display codeshare UAL4081’s United Airlines.
We don’t want to assume that the codeshare is the major airline for every flight. Unless this is the case? (Seems risky to assume until you say otherwise) Is there another endpoint we can query for the primary carrier?