0
votes

I am using Java SDK and tried the Point of Interest API. I can only get the first page, if I try to get next or last I still get the original results.

PointOfInterest[] pointsOfInterest =  amadeus.referenceData.locations.pointsOfInterest.get(Params
   .with("latitude", "41.39715")
   .and("longitude", "2.160873"));
pointsOfInterest = (PointOfInterest[]) amadeus.last(pointsOfInterest[0]);

Both of these return the same results. Looks like the URL's for the next, last, etc fields are not properly encoded. This is what the original call returns for these fields: "next":"https://test.api.amadeus.com/v1/reference-data/locations/pois?latitude=41.39715&longitude=2.160873&page[offset]=10&page[limit]=10","last":"https://test.api.amadeus.com/v1/reference-data/locations/pois?latitude=41.39715&longitude=2.160873&page[offset]=260&page[limit]=10"

1

1 Answers

0
votes

This is a limitation of the test environment.

Amadeus for Developers Self-Service APIs comes with 2 environments: - Test: free of access but limited in terms of data (you can find the list here) and the number of transactions you can do per month. - Production: unlimited access to production live data with a fee for each transaction.

For Points Of Interest, the API returns data for a limited number of cities, and for each city, a limited number of points of interest. This is why the pagination returns the same POIs.