Hotels

付费
Verified
通过 Api Dojo | 已更新 il y a un mois | Travel
人气

9.8 / 10

延迟

2,188ms

服务等级

100%

Health Check

N/A

返回所有讨论

Filters are not working how to use it ?

Rapid account: Desi 007
desi007
il y a 8 jours

I want to see properties which type is HOTEL. I have tried 3 ways but its not working. sort is properly working but filter is not. tell me how to do that ?
‘resultsStartingIndex’ => 0,
‘resultsSize’ => 10,
‘sort’ => ‘REVIEW’,
‘lodging’ => ‘HOTEL’,
‘filters’ => [
‘price’ => [
‘max’ => 1000,
‘min’ => 10
],
‘lodging’ => ‘HOTEL’,
‘lodging’ => [
‘type’ => ‘HOTEL’
],
]

Rapid account: Desi 007
desi007 Commented il y a 6 jours

You should check it again as I don’t see option HOTEL (but HOTEL_RESORT). Fix your careless first, then everything should work as expected.

Finally I got it.
When i pass only single value in lodging then its not showing good result but when i pass in array format then its showing good results.

do like this ‘lodging’ => [‘HOTEL_RESORT’]

not like this ‘lodging’ => ‘HOTEL_RESORT’

now i got it i can pass multiple values in array format like this.

‘lodging’ => [‘HOTEL_RESORT’,‘APARTMENT’,‘VILLA’]

Thanks again 😃

Rapid account: Apidojo
apidojo Commented il y a 7 jours

You should check it again as I don’t see option HOTEL (but HOTEL_RESORT). Fix your careless first, then everything should work as expected.

Rapid account: Desi 007
desi007 Commented il y a 7 jours

I am not confused with pricing.

I want to get list of properties which “lodging” type is “HOTEL” not (APARTMENT, VILLA, VACATION_RENTALS, HOTEL_RESORT, VACATION_HOME, CONDO_RESORT, CONDO).

I am using PHP and I want to apply that filter “lodging” => “HOTEL”

I dont know correct schema structure for that filter.

I have seen this code in docs which show how to apply pricing filter.
"resultsStartingIndex": 0, "resultsSize": 200, "sort": "PRICE_LOW_TO_HIGH", "filters": { "price": { "max": 150, "min": 100 } }
its working and i am getting all data i want but tell me how to apply this lodging filter ?
Is that correct way ? if yes then why its not working ?

"resultsStartingIndex": 0, "resultsSize": 200, "sort": "PRICE_LOW_TO_HIGH", "filters": { "price": { "max": 150, "min": 100 }, "lodging":"HOTEL" }

Rapid account: Apidojo
apidojo Commented il y a 8 jours

Hello,

1/ I cannot help you to check your code. Please manually make a request with an HTTP client such as postman.com to test the endpoint and see whether or not it works as expected. You then share with me your body request, it will tell me why your request does not work.

2/ You may be simply confused with the regular price and sale price. You have to learn the response carefully to understand it correctly.

Regards.

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论