amadeus4dev / developer-guides

Developer Guides
MIT License
37 stars 26 forks source link

Question: nearest airport service fails on certain locations? #7

Closed cglacet closed 5 years ago

cglacet commented 5 years ago

For some locations, the Airport Nearest Relevant service seems to return an empty list. For example, I'm trying to make this request work:

https://test.api.amadeus.com/v1/reference-data/locations/airports?latitude=33.929524&longitude=-4.981168&radius=50&page[limit]=10&page[offset]=0&sort=relevance

The location is somewhere inside Fès airport (FEZ), but the request returns no result:

Status: 200 OK

{
  "meta": {
    "count": 0,
    "links": {
      "self": "https://test.api.amadeus.com/v1/reference-data/locations/airports?latitude=33.929524&longitude=-4.981168&radius=50&sort=relevance&page%5Boffset%5D=0&page%5Blimit%5D=10"
    }
  },
  "data": []
}

I also tried to get the airport info to see if the location I have is wrong, I used this request:

https://test.api.amadeus.com/v1/reference-data/locations?subType=CITY&keyword=FEZ&page[limit]=10&page[offset]=0&sort=analytics.travelers.score&view=FULL

Which also outputs no result.

I've tried the same with other airports (for example Nantes airport NTE) with similar outcomes.

Is there something wrong in these request? And if nothing is wrong, how can I retrieve these airport codes?

anthonyroux commented 5 years ago

You are using our test environment. This environment contains a subset of our production data. You can find the list of supported airports and cities here.

For the location latitude=33.929524&longitude=-4.981168 our API returns 24 locations in production.

And NTE works with the Airport & City Search (for both the airport and the city).

This will be very soon published directly into the portal for more clarity.

If you want full coverage you will need to move to production (step 5)

cglacet commented 5 years ago

Going to production is sadly not an option for me right now. I'm only comparing different options for the moment. Unless there is a way to go to production and still have a "locked" account (get blocked once a given request quota is reached, instead of charging me if I do too many requests).

anthonyroux commented 5 years ago

We are not providing this feature for the moment (it's in our backlog). The quota you have per month can be used in production as well (so you are not paying for the first calls) but you have to monitor yourself to make sure you don't get over it.

czmarcos commented 5 years ago

@anthonyroux I'm trying to retrieve some results for Hotel Offers within the test environment, but I keep receiving the following error below. Does the test environment results are real or is just a fake sample data? If no results where found then I should get this message (NO HOTELS FOUND WHICH MATCH THIS INPUT), right?

{
  "errors": [
    {
      "status": 400,
      "code": 451,
      "title": "GUEST RECORD NOT FOUND"
    }
  ]
}

https://test.api.amadeus.com/v2/shopping/hotel-offers?latitude=-22.9132524&longitude=-43.7261862&adults=1&radius=10&radiusUnit=KM&paymentPolicy=NONE&includeClosed=false&bestRateOnly=true&view=FULL&sort=PRICE

anthonyroux commented 5 years ago

@czmarcos yes you are right, you are in a borderline case of our test environment. The test environment contains only a subset of the data of the production, plus, has some restrictions on the data it can access, so yes his case is that he doesn't find any data that it can return.

The exact same query in production (for this geolocation and a radius of 10km) I get this hotel: TULIP INN ITAGUAI.

Keep in mind that the test environment has limited data and it's better to use big cities to have data. In production the coverage is much better (and the response time too :))