Amadeus Hotel Search 在某些城市返回空数组

Amadeus Hotel Search returning empty array on some cities

我的 Amadeus API 集成出现以下错误,以下命中为例:

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

在这个例子中,我试图找到 MAD IATA 代码中的酒店,它可以是巴拉哈斯机场,也可以是马德里本身。这会抛出响应 200(意思是 OK),但是数据是空的,就像没有酒店一样。

发生这种情况的另一个例子是在 AMS(阿姆斯特丹或机场本身)

我认为可能是使用相同 IATA 代码的城市和机场之间发生了一些崩溃,但 BCN(巴塞罗那和埃尔普拉特机场)工作正常。

还有其他人遇到过这个问题吗?

我刚刚在测试中尝试了您的示例,它对我有用:

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 条注意事项:

  • 你使用测试环境,在这个环境中数据集是有限的(足够原型)如果你想获得完整的数据集你将不得不move to production
  • 您正在搜索酒店,可能是在您对提供的参数进行请求时它没有找到可用房间(link 到数据集有限的前一点) .您可以使用半径和房间数量来查找更多酒店。

我也看到了。

我找不到 returns 任何 MAD 或 NYC 城市代码的任何数据的字段组合。

LON 是我可以从中获取搜索结果的唯一城市代码,但前提是我指定的日期早于 4 月。

正在搜索没有日期的 MAD

查询:

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

结果:

{
  "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"
    }
  }
}

4 月搜索 LON

查询:

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

结果:

{
  "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"
    }
  }
}

3 月搜索 LON

查询:

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

结果:

Success

我同意我们不太清楚应该期望哪些搜索成功。是否有我不知道的日期限制?支持哪些城市?

关于我所看到的测试环境中酒店搜索的限制的唯一信息似乎来自您的测试数据集存储库:

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).