Hi,
I have two flight number 9W120 and 9W8079.
When is search this flight number on flightaware search bar it shows me flight details for both the flight numbers.
But when I use web service of FlightXML2 with FlightInfo Method it show me error.
As from given screenshot it shows me search result of flight number which I entered on flight aware web site. (eg. 9W120 and 9W8079)
But when I hit the web service with other flight number which is provided beside searched flight number (eg.
JAI120 / 9W120 and JAI8079 / 9W8079) it gives me proper response.
Do you have ‘show position only’ flights enabled on your account? In that case the IATA to ICAO conversion is disabled. If you query with the ICAO and flight number (ie JAI8079 and JAI120) do you get the results you expect?
‘show position only’ flights disabled in our account.
If I use flight number (ie. JAI8079 and JAI120) I am getting proper response with all the detail which we require but when I use this flight number (ie. 9W120 and 9W8079) I am not getting any response except error.
The procedure that converts IATA to ICAO does not do that conversion if the IATA has a number in the IATA code, so you’d need to do that conversion in your application before making the request.
But, We are not doing any conversion at our end. This flight numbers 9W120 and 9W8079 are provided us when we buy ticket and same we are using to getting flight details but could not any details for the same and when we search this flight numbers on your website we are getting details but on other side from your API we are not getting any details.
That is the problem. You must perform the IATA-to-ICAO conversion of flight identifiers in your application if you want to avoid problems. FlightAware is only able to automatically perform the IATA-to-ICAO conversion in limited circumstances, but it cannot be relied upon for all carriers.
Can you please tell me how we can do the conversion of IATA-to-ICAO of flight identifiers ?
Is there any API available at your side for this type of conversion ?
Ideally you can simply ensure that your inputs are using ICAO to begin with. If you have a user interface where the user picks the airline and types a flight number, then you can simply change the airline dropdown/picker to substitute ICAO codes instead.
Otherwise, if you know that your inputs are always using IATA identifiers and you never will receive a registration/tailnumber, then you can simply take the first two characters as the IATA carrier code and look up the corresponding ICAO carrier code in a database.
If you have the possibility of ICAO or registrations/tailnumbers being in your inputs, then you have to do more careful discrimination to exclude those cases first and only doing the previous step if they are not.