Tearlach
Tearlach

Reputation: 1

Why is the Hotel Search API returning me an empty response?

I am trying to access the Hotel Search API through the API Explorer (https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-search/api-reference/v/3.0). I can use all the other APIs without issue.

A fairly simple request (using the default parameters except the checkin date, because that's in the past now), is returning an empty response.

My entries in API Explorer

https://test.api.amadeus.com/v3/shopping/hotel-offers?hotelIds=MCLONGHM&adults=1&checkInDate=2023-01-22&roomQuantity=1&paymentPolicy=NONE&bestRateOnly=true

Empty response

I've tried with other combinations of hotel codes, dates, etc. And everything seems to be returning an empty response. I've also tried manually generating the access token and calling via Postman. It doesn't seem to be an issue with connection or server availability (since the status code is 200), I'm just seeing an empty response.

I'm not sure if this is a remote issue, or if I'm just doing something silly and missing something obvious.

Upvotes: 0

Views: 397

Answers (1)

anna_ts
anna_ts

Reputation: 721

That's because you are using the test environment. A working example of an API call that returns data in test is

GET https://test.api.amadeus.com/v3/shopping/hotel-offers?hotelIds=MCLONGHM&checkInDate=2023-01-27

For access to full data you would have to move to production.

Upvotes: 1

Related Questions