Overcharged for using FlightXML API


#1

Hello everyone.
I’ve been using the Flight XML API without any issues for the last period. However, yesterday I have encountered a big issue that I’d like to discuss and hopefully ask the relevant personnel to resolve for me.

I sell Airline Schedules to people via my website. I accept the orders and then manually run the .php script I have that utilizes the AirlineFlightSchedules endpoint of the API. I will repeat that I have not made any changes to the script and that is has worked perfectly for me over the past period. The scripts queries the API and then inserts the results into a DB table which I later send to my customers.

However, yesterday, upon trying to run it (via CLI, to avoid possibly running out of execution time or memory), I got the following response:

[16-Aug-2017 16:45:35 Europe/London] PHP Notice:  Undefined property: SoapFault::$AirlineFlightSchedulesResult in /home/upbeatho/public_html/schedules/pull.php on line 95
[16-Aug-2017 16:45:35 Europe/London] PHP Notice:  Trying to get property of non-object in /home/upbeatho/public_html/schedules/pull.php on line 95
[16-Aug-2017 16:45:35 Europe/London] PHP Warning:  Invalid argument supplied for foreach() in /home/upbeatho/public_html/schedules/pull.php on line 98

Basically, the object that should contain the results was empty, so nothing reached my server, and nothing was inserted into the database. I retried a few minutes later, with the same result, and then after a certain time period, I retried again and got all the results as I initially hoped I would get. So, you’d think that all went fine, but I was surprised, rather unpleasantly, to see I was charged for each of those unsuccessful requests that are not my fault, and have happened because of, what I believe, was a timeout or a significant delay from your API server.

Upon crosschecking the log entries and their timestamps against the billing information, I could confirm I was indeed charged for the unsuccessful attempts. I would have nothing against this if it was my fault, or my script wasn’t functioning as it should, but I will repeat that it has served without problems and wasn’t changed, accept the max results I change depending on the type of order I receive.

I’d like to ask your team to please look into this issue for me, and cancel the pending invoice, and re send one with the correct amount based on the results I got. I am happy to provide any information, DB exports, log exports or anything else, to prove my case, as I believe this is not a fair invoice.

I have been using Flightaware’s services for a long time, personally and through my previous employer, and I’d like to continue doing so.

Here is my script https://gist.github.com/savamarkovic/e927d6fa3e31b357a915b60b614e9caf


#2

In general, all FlightXML2 requests incur a usage charge when it is invoked, and then an additional charge for each “page of data” (15 results) that is actually returned beyond the initial page of data. Because of this, if your request returns 0, 1, or 15 results, you will still incur a single usage charge, but 30 results will incur two usage charges.

Charging for zero results is necessary because we still have server resources consumed to execute your query, and not charging for those encourages users to write applications that are unfriendly/malicious (eg: repeatedly requesting the same flight once a second until it appears, or simply running an invalid query or unvalidated search arguments).


#3

I understand that but I was charged for 18000+ requests which is the equivalent of getting 18000 x 15 results while I only got (and asked for) ~55 000 results.

The point is the API charged for results even thpugh they were not delivered, and not because of my fault.
Basically I am happy to pay the invoke charge but not the charge for 18000 requests of which around 3/4 gave 0 results.
Basically, for 55000 results I should be charged ~4000 requests, not 18000. The script for querying the API is I repeat the same so the only thing that could have hapenned is some sort of timeout your api servrer had or a Delayed response or whatever. But that should not be my fault. I took a fair financial loss on this and I would like to restate my wish for a revised invoice.


#4

Hey smarko,
You can contact our support department to discuss your invoice. The contact info is here: https://flightaware.com/about/contact/commercial. I’ve let them know to expect something from you.

I would also suggest that you modify your program to break up your calls a bit. When you set your howMany to 40k results, it’s going to take awhile to come back and potentially time out. You should set it to a lower value and then look at the nextOffset that is returned with the call and use that as your offset parameter to a subsequent call. This essentially pages the data and will help prevent things like this happening in the future.
Thanks,
chadd


#5

Thanks for your reply.
I got in touch with the support via phone. They marked down my email and told me they would be in touch. Thanks for your help until now.
Looking forward to my issue getting resolved.


#6

I still haven’t received a reply.