Hotels

BEZAHLT
Verified
Durch Api Dojo | Aktualisiert 4 days ago | Travel
Popularität

9.8 / 10

Latenz

2,303ms

Service Level

100%

Health Check

N/A

Zurück zu allen Diskussionen

filter/price/currency

Rapid account: Fuflikpopl
fuflikpopl
एक वर्ष पहले

Hello!

Could you please specify what type of currency does the price filter (in the endpoint “properties/v2/list”, ex.: ““price”: {“max”: 300, “min”: 100}”) work with?

Thank you!

Rapid account: Apidojo
apidojo Commented एक वर्ष पहले

Hello,

1/ You may check it on hotels.com whether or not the “currency” and “locale” are supported https://prnt.sc/498bcltMgUsj . It is applied to price field returned in the response.
2/ In addition, you are leaking your token key.

Regards.

Rapid account: Fuflikpopl
fuflikpopl Commented एक वर्ष पहले

Ok. Is this filter is applied to the field ‘lead’: {“amount”}:?

I keep asking because when I make this request (example below) I get the results with price beyond my range

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

payload = {
“currency”: “RUB”,

"locale": "ru_RU",

"destination": {'coordinates': {'latitude': 43.222023, 'longitude': 76.851253}, 'regionId': '354'},
"checkInDate": {
	"day": 7,
	"month": 11,
	"year": 2022
},
"checkOutDate": {
	"day": 14,
	"month": 11,
	"year": 2022
},
"rooms": [
	{
		"adults": 2}],
		#"children": [{"age": 5}, {"age": 7}]
	#}

"resultsStartingIndex": 0,
"resultsSize": 10*10,
"sort": "PRICE_LOW_TO_HIGH",
"filters": {

	"price": {"max": 5000, "min": 2000}
}

}
headers = {
“content-type”: “application/json”,
“X-RapidAPI-Key”: “f9e50ee6c8msh82ec065cf56008bp1ba193jsn756f138fce3d”,
“X-RapidAPI-Host”: “hotels4.p.rapidapi.com
}

Here are the values of the keys “price” in some of the results:

{’__typename’: ‘PropertyPrice’,
‘displayMessages’: [{’__typename’: ‘PriceDisplayMessage’,
‘lineItems’: [{’__typename’: ‘DisplayPrice’,
‘disclaimer’: None,
‘price’: {’__typename’: ‘FormattedMoney’,
‘accessibilityLabel’: ‘The ‘
‘price is ‘
’$25,409’,
‘formatted’: ‘$25,409’},
‘role’: ‘LEAD’}]},
{’__typename’: ‘PriceDisplayMessage’,
‘lineItems’: [{’__typename’: ‘LodgingEnrichedMessage’,
‘accessibilityLabel’: None,
‘badge’: None,
‘mark’: None,
‘state’: None,
‘value’: ‘$199,205 total’}]}],
‘lead’: {’__typename’: ‘Money’,
‘amount’: 25408.81,
‘currencyInfo’: {’__typename’: ‘Currency’,
‘code’: ‘RUB’,
‘symbol’: ‘RUB’},
‘formatted’: ‘RUB\xa025,409’},
‘options’: [{’__typename’: ‘PropertyPriceOption’,
‘disclaimer’: None,
‘formattedDisplayPrice’: ‘RUB\xa025,409’,
‘strikeOut’: None}],
‘priceMessages’: [{’__typename’: ‘LodgingPlainMessage’, ‘value’: ‘per night’}],
‘priceMessaging’: None,
‘strikeOut’: None,
‘strikeOutType’: ‘STANDALONE’}


{’__typename’: ‘PropertyPrice’,
‘displayMessages’: [{’__typename’: ‘PriceDisplayMessage’,
‘lineItems’: [{’__typename’: ‘DisplayPrice’,
‘disclaimer’: {’__typename’: ‘LodgingPlainDialog’,
‘content’: [‘This price is ‘
‘the standard ‘
‘rate provided ‘
‘by the ‘
‘property ‘
‘based on your ‘
‘search.’],
‘title’: None},
‘price’: {’__typename’: ‘FormattedMoney’,
‘accessibilityLabel’: ‘The ‘
‘price ‘
‘was ‘
’$35,196’,
‘formatted’: ‘$35,196’},
‘role’: ‘STRIKEOUT’},
{’__typename’: ‘DisplayPrice’,
‘disclaimer’: None,
‘price’: {’__typename’: ‘FormattedMoney’,
‘accessibilityLabel’: ‘The ‘
‘price is ‘
’$31,677’,
‘formatted’: ‘$31,677’},
‘role’: ‘LEAD’}]},
{’__typename’: ‘PriceDisplayMessage’,
‘lineItems’: [{’__typename’: ‘LodgingEnrichedMessage’,
‘accessibilityLabel’: None,
‘badge’: None,
‘mark’: None,
‘state’: None,
‘value’: ‘$248,344 total’}]}],
‘lead’: {’__typename’: ‘Money’,
‘amount’: 31676.54,
‘currencyInfo’: {’__typename’: ‘Currency’,
‘code’: ‘RUB’,
‘symbol’: ‘RUB’},
‘formatted’: ‘RUB\xa031,677’},
‘options’: [{’__typename’: ‘PropertyPriceOption’,
‘disclaimer’: {’__typename’: ‘LodgingPlainMessage’,
‘value’: ‘This price is the standard rate ‘
‘provided by the property based on your ‘
‘search.’},
‘formattedDisplayPrice’: ‘RUB\xa031,677’,
‘strikeOut’: {’__typename’: ‘Money’,
‘amount’: 35196.16,
‘formatted’: ‘RUB\xa035,196’}}],
‘priceMessages’: [{’__typename’: ‘LodgingPlainMessage’, ‘value’: ‘per night’}],
‘priceMessaging’: None,
‘strikeOut’: {’__typename’: ‘Money’,
‘amount’: 35196.16,
‘currencyInfo’: {’__typename’: ‘Currency’,
‘code’: ‘RUB’,
‘symbol’: ‘RUB’},
‘formatted’: ‘RUB\xa035,196’},
‘strikeOutType’: ‘STANDALONE’}


Process finished with exit code 0


Process finished with exit code 0

Rapid account: Apidojo
apidojo Commented एक वर्ष पहले

Hello,

There is “currency” field, you may try it.
Ex : “currency”: “USD”

Regards.

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen