Problems registering to flight alerts with icao+flightnumber

Hello,

I am using the AeroAPI POST /alerts to register alerts for specific flights by setting the ident to [airlineICAO]+[flightNumber]. As advised I specifically use the ICAO rather than the IATA number to avoid ambiguity with registration numbers. However i am still seeing that some of the alerts do not get registered as the flight number but as a registration number. One the problematic airlines is AZA, it seems any ident sent to POST /alerts in the form AZAxxxx gets interpreted as a registration number. In the GET /alerts call i am also sending origin, destination, start and end but it doesnt seem to help.

I have considered several solutions but with no good outcome:

  1. using GET /flights to check if the ident with the ICAO code gets interpreted as a flight or as a registration and fallback to using the IATA code in case it isnt a flight, hoping that it gets interpreted as flight number. However there is a chance that the IATA flight number also gets interpreted as a registration.

  2. using GET /flights with ident_type set to ‘designator’ to force it to interpet it as flight number. This would give me the fa_flight_id, which is unique. However the POST /alerts api does not allow fa_flight_ids in the ident field.

  3. i also considered using GET /flights with ‘designator’ to obtain the registration number of the aircraft and use that as ident in the POST /alerts although i dont know if there is a possibility for the registration number to be empty or for the aircraft on that flight to change and possibily lose the alerts.

I need this system to be pretty precise. Any insight into this would be greatly appreciated.

Thank you!

P.S. if any of the flightaware devs are reading it would be pretty awesome to have the ident_type param also for the POST /alerts call =P

Nevermind, the issue is that the new ICAO code for AZ is ITY (ITA Airways) and not AZA (old Alitalia). I had a stale record for that airline in my db. Switching to ITY properly registers the alerts =)