Retrieve hotel IDs by filter
https://api.worldota.net/api/content/v1/hotel_ids_by_filter/
The call gets the identifiers for all required hotels. Use fields to search only for the desired hotels.
ℹ️
- Use this call instead of call Retrieve hotel dump.
- Use this call after Retrieve filter values call.
Request example
curl --user '<KEY_ID>:<API_KEY>' 'https://api.worldota.net/api/content/v1/hotel_ids_by_filter/' \
--header 'Content-Type: application/json' \
--data '{
"country": [52]
}'
Request body
The country.
ℹ️
- Use the
value
field from the call Retrieve filter values.
The hotel type.
ℹ️
- The list of possible
kind
field values is obtained from the call Retrieve filter values.
The hotel rating on a scale from 1
to 5
. Has the 0
value for no available rating.
ℹ️
- The list of possible
star_rating
field values is obtained from the call Retrieve filter values.
The list of amenities at the hotel.
ℹ️
- Use the
value
field from the call Retrieve filter values.
Hotels where the information has been updated.
ℹ️
The format of this field is: “2006-01-02 15:04:05”.
Response
Response example
{
"data": {
"hids": [
6325458,
6445894,
6493239,
6526863,
13350497
],
"ids": [
"hotel_1",
"hotel_2",
"hotel_3",
"hotel_4",
"hotel_5"
]
},
"debug": {
"request": {
"serp_filter": [
"air_conditioning",
"has_airport_transfer",
"beach",
"has_internet",
"has_kids",
"kitchen"
],
"kind": [
"Mini-hotel"
],
"country": [
153
],
"updated_since": "2006-01-02 15:04:05"
},
"key_id": 1234,
"validation_error": null
},
"status": "ok",
"error": null
}
Errors
The error
field has the value specified in the headers below.
invalid_params
One or more input parameters are incorrect. For more details, see the response field debug validation_error.
no_hotel_ids
An internal search error. Has 500
status code.