Reputation: 882
response = amadeus.shopping.flight_dates.get(origin='JTR', destination='SFO', oneWay='true', departureDate='2019-05-01,2019-06-01', nonStop=False)
This returns an error.
*** amadeus.client.errors.ServerError: [500]
This is not an auth error or some other parameter error, since the exact same code with different airport codes works.
response = amadeus.shopping.flight_dates.get(origin='NYC', destination='SFO', oneWay='true', departureDate='2019-05-01,2019-06-01', nonStop=False)
The client is using a production key and has hostname set to production.
Client(client_id=get_api_key(), client_secret=get_api_secret(), hostname='production')
Upvotes: 1
Views: 229
Reputation: 1481
The Flight Cheapest Date Search API is built on top of a pre-computed cache, it doesn't contain all the origins and destinations. The Flight Low-fare Search will provide you a coverage of (almost) all airports in the world.
We will update soon the data coverage we have for this API to drastically improve the list of origins and destinations.
That's why:
response = amadeus.shopping.flight_dates.get(origin='JTR', destination='SFO', oneWay='true', departureDate='2019-05-01,2019-06-01', nonStop=False)
Doesn't return any data.
For:
response = amadeus.shopping.flight_dates.get(origin='NYC', destination='SFO', oneWay='true', departureDate='2019-05-01,2019-06-01', nonStop=False)
It works, in production it returns a list of flight-dates.
Upvotes: 1