Search code examples
amadeus

On-Demand Flight Status | Gate Information not working


using the Java SDK, trying to use the On-Demand Flight Status API will result in following error, if a Gate is specified: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at path $[0].flightPoints[0].departure.gate

From the documentation I assume that gate should be a JSONObject with the mainGate attribute, but apparently it has been encoded as a JSONArray in the SDK.

I would be grateful about some feedback on this. Maybe I am doing something wrong?

Thanks!

P.S.

If I may add some suggestions:

Would it be possible to make segments.partnership return the flight number of the operating carrier, if the search is done with a codeshare flight? Currently it seems to just return 0, if a codeshare flight number is entered. (e.g. searching for A37136 will return OA0, instead of OA136). Also, it would be great if segments.partnership was to return all codeshare flight numbers for particular flight, and not only one.

The possibility to access fare rules from Flight Offers would be great as well. I understand that displaying fares between two cities is a feature of the Enterprise API (which I probably am not eligible to use), but it would be great to be able to see data, such as Travel and Sales restrictions like these:

VALID FOR TRAVEL COMMENCING ON/AFTER 20SEP 21 AND ON/BEFORE 10MAR 22.


TICKETS MUST BE ISSUED ON/BEFORE 29SEP 21.

As always, thank you for your work!


Solution

  • Below you can find the answers on the topics mentioned in your questions:

    Java SDK - gate info not working

    Thanks for the report, we've opened the issue on GitHub where you can track its status.

    Flight Fare rules

    The fare rules can be found for each flight with the Flight Offers Price API where you would have to add the query parameter include=detailed-fare-rules your URL, such as: https://test.api.amadeus.com/v1/shopping/flight-offers/pricing?include=detailed-fare-rules

    Operating carrier in codeshare flight

    Indeed with the specific flight doesn't return properly the operating carrier flight number, however, we tested it with other codeshare flights and it worked fine. It seems that the issue is coming directly from the providers and the data they share.

    Return all codeshare flight numbers

    This is not possible from the legal point of view, as it means it would expose the partnerships and private business between the airlines.