There should be some results according to the website, but I do not get any with below query:
{‘currency’: ‘JPY’, ‘eapid’: 37, ‘locale’: ‘en_JP’, ‘siteId’: 300000037, ‘destination’: {‘regionId’: ‘3593’}, ‘checkInDate’: {‘day’: 23, ‘month’: 3, ‘year’: 2023}, ‘checkOutDate’: {‘day’: 30, ‘month’: 3, ‘year’: 2023}, ‘rooms’: [{‘adults’: 1}], ‘resultsStartingIndex’: 0, ‘resultsSize’: 200, ‘sort’: ‘PRICE_LOW_TO_HIGH’}
Any idea what I am doing wrong?
加入讨论 - 在下面添加评论:
Hi, I am an engineer and doing the job as a supporter. I am not trained to be a supporter so you will receive straight advice for your issue, like it or not you won’t receive beautiful words from me =).
In addition, all communities always ask members to look for the same questions before posting something. You should learn to respect time of others.
Regards
Thank you for the suggested solution. However, I feel that your comment about my testing and communication skills was uncalled for and unprofessional. As a customer, I expect to be treated with respect and courtesy, even if I make mistakes. I appreciate your help with the issue at hand, but please refrain from making personal remarks in the future.
Hello,
You try it less, but talk so much. You are careless too, ‘locale’ does not support ‘en_JP’ (only en_US and ja_JP) https://prnt.sc/Sdw_0V9b2QW9
Now, try this
{
“currency”: “JPY”,
“eapid”: 37,
“locale”: “ja_JP”,
“siteId”: 300000037,
“destination”: {
“regionId”: “3593”
},
“checkInDate”: {
“day”: 5,
“month”: 4,
“year”: 2023
},
“checkOutDate”: {
“day”: 6,
“month”: 4,
“year”: 2023
},
“rooms”: [
{
“adults”: 2,
“children”: [
]
}
],
“resultsStartingIndex”: 0,
“resultsSize”: 200,
“sort”: “RECOMMENDED”
}
You mean between the URL and the request body? They were different indeed, but that is not the problem.
I can see that the check-in and check-out date are different. Don’t you see it?
I would like to read more about these parameters, but a field like gaiaId seems undocumented. If I am missing something, I would like to know. I only found the endpoints tab with some examples.
The URL on Hotels.com does show the gaiaId as regionId, by the way:
https://jp.hotels.com/Hotel-Search?adults=2&d1=2023-04-05&d2=2023-04-06&destination=Tokyo%2C Tokyo Prefecture%2C Japan&endDate=2023-04-06&latLong=35.681143%2C139.767208®ionId=3593&selected=&semdtl=&sort=RECOMMENDED&startDate=2023-04-05&theme=&useRewards=false&userIntent=
So maybe something else is going on…
Hello,
Please spend more time reading the parameter description, learning the response data, try making some requests before asking something.
Regards.
This was the body of the first request, by the way:
{‘q’: ‘Tokyo, Japan’, ‘locale’: ‘ja_JP’, ‘siteid’: ‘300000037’}
I tried rid as well, but it did not work either.
Thank you for the prompt response!
I queried the locations/v3/search endpoint and used what was in the gaiaId field. That was not the right field? Perhaps it was rid instead?