Hotels

유료
Verified
분류별 Api Dojo | 업데이트됨 לפני 16 ימים | Travel
인기

9.8 / 10

지연 시간

2,263ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

"sort": "PRICE_LOW_TO_HIGH" does not work correctly

Rapid account: Ancous
Ancous
לפני 5 חודשים

request:

“sort”: “PRICE_LOW_TO_HIGH”,
“filters”: {
“price”: {
“max”: 300, <----------------- filters max
"min": 200 <----------------- filters min
}
}
}

response:

pinnedDetails:null
price:
__typename:“PropertyPrice”
options:
priceMessaging:null
lead:
__typename:“Money”
amount:2024.69 <==================== Why is that
currencyInfo:
formatted:"$2,025"

Why does it show the price not in the sorting range?

Is this your mistake or mine?

Rapid account: Apidojo
apidojo Commented לפני 5 חודשים

Hello,

Please check the screenshot https://prnt.sc/nfWlqLCdUyBh. I simply search for “priceRange” in the response, and there it is.
In addition, I believe you faked the response with the request OR the response and request are not related to each other. Your information is very useless to prove something.

Regards.

Rapid account: Ancous
Ancous Commented לפני 5 חודשים

Hello.

							My request:

url = “https://hotels4.p.rapidapi.com/properties/v2/list

payload = {
“currency”: “USD”,
“eapid”: 1,
“locale”: “en_US”,
“siteId”: 300000001,
“destination”: { “regionId”: “6054439” },
“checkInDate”: {
“day”: 20,
“month”: 12,
“year”: 2023
},
“checkOutDate”: {
“day”: 20,
“month”: 12,
“year”: 2023
},
“rooms”: [
{
“adults”: 2,
“children”: []
}
],
“resultsStartingIndex”: 0,
“resultsSize”: 200,
“sort”: “PRICE_LOW_TO_HIGH”,
“filters”: { “price”: {
“max”: 300, <----------------- filters max
“min”: 200 <----------------- filters min
} }
}
headers = {
“content-type”: “application/json”,
“X-RapidAPI-Key”: “???”,
“X-RapidAPI-Host”: “hotels4.p.rapidapi.com
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())

							My esponse:

data:propertySearch:
__typename:"PropertySearchResults"
filterMetadata:
universalSortAndFilter:
properties:0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
__typename:"Property"
id:"45636831"
featuredMessages:
name:"Casa Blanca Villas"
availability:
propertyImage:
destinationInfo:
legalDisclaimer:null
listingFooter:null
mapMarker:
neighborhood:
offerBadge:
offerSummary:
pinnedDetails:null
price:
__typename:"PropertyPrice"
options:
priceMessaging:null
lead:
__typename:“Money"
amount:2024.69 <==================== value that does not fit the filter . A filter is made using this field?
currencyInfo:
formatted:”$2,025"
strikeOut:
displayMessages:
strikeOutType:"STANDALONE"
priceMessages:
priceAfterLoyaltyPointsApplied:
propertyFees:
reviews:
sponsoredListing:null
star:null
supportingMessages:null
regionId:"6054439"
priceMetadata:
saveTripItem:
propertySearchListings:
summary:
searchCriteria:
shoppingContext:
map:
clickstream

Rapid account: Apidojo
apidojo Commented לפני 5 חודשים

Did you paste the response in a text editor and search for the field? You should always send along with your request so I can reproduce it. Otherwise, I cannot help you.

Regards.

Rapid account: Ancous
Ancous Commented לפני 5 חודשים

Hello,

I get the answer in json. There is no such key

No “priceRange” field in response from endpoint “properties/v2/list”

Rapid account: Apidojo
apidojo Commented לפני 5 חודשים

Hello,

You need to use the price range returned in the response, custom price range is not supported. You are interested in “priceRange” field returned in the response.

Regards.

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입