FlightAware Discussions

FlightXML3 API giving me wrong data

I am getting FlightInfo data for a flight which is delayed(from other flight sources) but flight aware is sending me as cancelled.
Flight Code: SJY-591
Scheduled Departure Time: 15th July, 2019, 9:30 AM
API Requested: https://flightxml.flightaware.com/json/FlightXML3/FlightInfoStatus?ident=SJY591-1562981400-schedule-0001&howMany=5

{
    "FlightInfoStatusResult": {
        "next_offset": -1,
        "flights": [
            {
                "ident": "SJY591",
                "faFlightID": "SJY591-1562981400-schedule-0001",
                "airline": "SJY",
                "airline_iata": "SJ",
                "flightnumber": "591",
                "type": "Form_Airline",
                "blocked": false,
                "diverted": false,
                "cancelled": true,
                "origin": {
                    "code": "WAAA",
                    "city": "Makassar / Ujung Pandang, South Sulawesi",
                    "alternate_ident": "UPG",
                    "airport_name": "Sultan Hasanuddin Int'l"
                },
                "destination": {
                    "code": "WIII",
                    "city": "Tangerang, Banten, Jakarta",
                    "alternate_ident": "CGK",
                    "airport_name": "Jakarta-Soekarno-Hatta Int'l"
                },
                "filed_ete": 6600,
                "filed_airspeed_kts": 358,
                "distance_filed": 891,
                "filed_departure_time": {
                    "epoch": 1563154200,
                    "tz": "WITA",
                    "dow": "Monday",
                    "time": "09:30AM",
                    "date": "07/15/2019",
                    "localtime": 1563183000
                },
                "estimated_departure_time": {
                    "epoch": 1563154800,
                    "tz": "WITA",
                    "dow": "Monday",
                    "time": "09:40AM",
                    "date": "07/15/2019",
                    "localtime": 1563183600
                },
                "actual_departure_time": {
                    "epoch": -1,
                    "tz": "WITA",
                    "dow": "Thursday",
                    "time": "07:59AM",
                    "date": "01/01/1970",
                    "localtime": 28799
                },
                "departure_delay": -1563154201,
                "filed_arrival_time": {
                    "epoch": 1563160800,
                    "tz": "WIB",
                    "dow": "Monday",
                    "time": "10:20AM",
                    "date": "07/15/2019",
                    "localtime": 1563186000
                },
                "estimated_arrival_time": {
                    "epoch": -1,
                    "tz": "WIB",
                    "dow": "Thursday",
                    "time": "06:59AM",
                    "date": "01/01/1970",
                    "localtime": 25199
                },
                "actual_arrival_time": {
                    "epoch": -1,
                    "tz": "WIB",
                    "dow": "Thursday",
                    "time": "06:59AM",
                    "date": "01/01/1970",
                    "localtime": 25199
                },
                "arrival_delay": -1563160801,
                "status": "result unknown",
                "progress_percent": 100,
                "aircrafttype": "B738",
                "full_aircrafttype": "B738",
                "adhoc": false
            }
        ]
    }
}

Flight Aware website is not showing any data for this flight at this date. Why am I getting invalid data?

It looks like SJY591 on July 15th experienced significant departure delay of over 6 hours. This resulted in faFlighID SJY591-1562981400-schedule-0001 being marked cancelled due to no updated flightplan information being received and no departure being detected within two hours of the filed or estimated departure time. When the flight did eventually depart it was tracked as new faFlightID SJY591-1563177339-adhoc-0.

While the flight was active it was considered position only. By default these flights are hidden on the site and in FlightXML. This option can be toggled in Section 6 of the Account Management Page.

Thanks dogrock.
I’m wondering if we can rely on status field in the response to say if it’s actually cancelled or it has been moved to ad hoc flights?
For this particular case, status is set to result unknown. I have seen other cases when status is set to cancelled.
Can you confirm if we can use status field to make sure that flight is actually cancelled?

The status field is intended to be a human friendly message and isn’t ideal for machine parsing. The result unknown status is the result of the plan being cancelled in system due to no new information received in a reasonable amount of time from the filed departure time.

Using the dedicated cancelled field or the actual times being set -1in the event of a flight plan cancellation is far more reliable. If this field is true then it can be safely assumed that the faFlightID will not receive further updates. However, that doesn’t preclude the same ident or tail flying under a different faFlightID if they re-file or suffer a large unannounced delay.