AirlineFlightSchedules filter out duplicate schedules


#1

I’m retrieving multiple future routes for a single airline using the following php statements:


$args = array(
	'startDate' => $startDate,
	'endDate' => $startDate + (86400 * 20),
	'origin' => '',
	'destination' => '',
	'flightno' => '',
	'airline' => 'DAL',
	'howMany' => 15,
	'offset' => 0,
	);
$result = $client->AirlineFlightSchedules($args);

I only wish to retrieve distinct results in terms of departure/arrival times, origin, destination, and flight number. Yet the first two results returned from this query are as follows:


[0] => stdClass Object
                        (
                            [ident] => DAL1446
                            [actual_ident] => 
                            [departuretime] => 1487661300
                            [arrivaltime] => 1487677620
                            [origin] => KSFO
                            [destination] => KATL
                            [aircrafttype] => B753
                            [meal_service] => First: Refreshments / Economy: Refreshments
                            [seats_cabin_first] => 24
                            [seats_cabin_business] => 0
                            [seats_cabin_coach] => 200
                        )

                    [1] => stdClass Object
                        (
                            [ident] => AMX5932
                            [actual_ident] => DAL1446
                            [departuretime] => 1487661300
                            [arrivaltime] => 1487677620
                            [origin] => KSFO
                            [destination] => KATL
                            [aircrafttype] => B753
                            [meal_service] => 
                            [seats_cabin_first] => 24
                            [seats_cabin_business] => 0
                            [seats_cabin_coach] => 200
                        )

I notice the flights are identical except a small difference between ident and actual_ident. How can I pass a query to only retrieve distinct schedules?


#2

Those are codeshare flights that are sold and ticketed under multiple identities. Currently there is no way to exclude them from the API response.


#3

Can I create a feature request somewhere? I’d like to limit query results that are returned so that I don’t get charged more than necessary. If I’m pulling tens of thousands of flight schedules, I don’t want to be forced to pay for results I will discard immediately anyway, especially if it’s any more than 10% of my data set.