0
votes

im having the following error with my Amadeus API integration, with the following hit as example:

https://test.api.amadeus.com/v2/shopping/hotel-offers?cityCode=MAD&roomQuantity=1&adults=2&radius=5&radiusUnit=KM&paymentPolicy=NONE&includeClosed=false&bestRateOnly=true&view=FULL&sort=NONE

In this example, im trying to find hotels in the MAD IATA code, which can be either Barajas Airport, or Madrid itself. This throws response 200 (meaning OK), but the data is empty like no hotels.

Another example of this happening is in AMS (Amsterdam or the airport itself)

I thought it could be some crash between cities and airport with the same IATA code, but BCN (Barcelona and El Pratt airport) works fine.

Have anyone else faced this issue?

2

2 Answers

0
votes

I just tried your example in test and it works for me:

https://test.api.amadeus.com/v2/shopping/hotel-offers?cityCode=MAD&roomQuantity=1&adults=2&radius=5&radiusUnit=KM&paymentPolicy=NONE&includeClosed=false&bestRateOnly=true&view=FULL&sort=NONE

"type": "hotel",

"hotelId": "BWMAD200",

"chainCode": "BW",

"dupeId": "700009576",

"name": "BEST WESTERN HOTEL LOS CONDES",

...

2 things to keep in mind:

  • You use the test environment, in this environment the data set is limited (enough to prototype) if you want to get access to the full set of data you will have to move to production.
  • You are doing a hotel search, it could that it didn't find available rooms at the moment you did the request for the provided parameters (link to the previous point where the data set is limited). You can play with the radius and the roomQuantity to find more hotels.
0
votes

I'm seeing this too.

I cannot find a combination of fields that returns any data for any of the MAD or NYC city codes.

LON is the only city code that I can get search results from, but only if I specify dates earlier than April.

Searching for MAD without dates

Query:

https://test.api.amadeus.com/v2/shopping/hotel-offers?cityCode=MAD&roomQuantity=1&adults=2&radius=5&radiusUnit=KM&paymentPolicy=NONE&includeClosed=false&bestRateOnly=true&view=FULL&sort=NONE

Results:

{
  "data": [],
  "meta": {
    "links": {
      "next": "https://test.api.amadeus.com/v2/shopping/hotel-offers?adults=2&bestRateOnly=true&cityCode=MAD&includeClosed=false&paymentPolicy=NONE&radius=5&radiusUnit=KM&roomQuantity=1&sort=NONE&view=FULL&page[offset]=H0227D1ADVO9_100"
    }
  }
}

Searching for LON in April

Query:

https://test.api.amadeus.com/v2/shopping/hotel-offers?cityCode=LON&checkInDate=2020-04-04&checkOutDate=2020-04-09&roomQuantity=1&adults=2&radius=5&radiusUnit=KM&paymentPolicy=NONE&includeClosed=false&bestRateOnly=true&view=FULL&sort=NONE

Results:

{
  "data": [],
  "meta": {
    "links": {
      "next": "https://test.api.amadeus.com/v2/shopping/hotel-offers?adults=2&bestRateOnly=true&checkInDate=2020-04-04&checkOutDate=2020-04-09&cityCode=LON&includeClosed=false&paymentPolicy=NONE&radius=5&radiusUnit=KM&roomQuantity=1&sort=NONE&view=FULL&page[offset]=IHNILC3OTZSM_100"
    }
  }
}

Searching for LON in March

Query:

https://test.api.amadeus.com/v2/shopping/hotel-offers?cityCode=LON&checkInDate=2020-03-04&checkOutDate=2020-03-09&roomQuantity=1&adults=2&radius=5&radiusUnit=KM&paymentPolicy=NONE&includeClosed=false&bestRateOnly=true&view=FULL&sort=NONE

Results:

Success

I agree that it's not very clear which searches we should expect to be successful. Is there a date limitation that I'm not aware of? Which cities are supported?

The only information around what limitations we should expect from hotel searches in the test environment that I've seen seems to code from your test dataset repository:

The content of Hotel Search comes directly from the hotel providers, so the content might change dynamically. For your test, use big cities like LON (London) or NYC (New-York).