Hotels by Country
GET
/api/v1/generic-api-service/content/hotel/filter?page=0&size=400
Returns the hotels located in a given country. Send a country id in the body and the service responds with the matching hotel list. Use this endpoint when a sales channel wants to pull hotels filtered by a single country instead of the full inventory returned by the Hotels endpoint. The result is paginated — use the page and size query parameters together with numberOfItems and numberOfPages to iterate through all records.
- cURL
- Request
- Response
- Request Details
- Response Details
- Errors
curl --location --request GET 'https://api.etscore.com/api/v1/generic-api-service/content/hotel/filter?page=0&size=400' \
--header 'Accept-Language: En-US' \
--header 'X-CURRENCY: EUR' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"countryId": 549
}'
{
"countryId": 549
}
{
"hotelList": [
0: {
"hotelId": "sx6vh6b0sce5",
"name": "Milaroom Hotel"
},
1: {
"hotelId": "sxjrrvdr367g",
"name": "Mahmudiye Resort"
},
2: {
"hotelId": "sxk6mv02he0f",
"name": "Bzn Airport Hotel"
}
],
"numberOfItems": 9471,
"numberOfPages": 24
}
| Name | Type | Required | Description |
|---|---|---|---|
| countryId | int | Yes | Identifier of the country whose hotels will be returned. Obtain it from the Country Codes endpoint. |
| page | int | No | Zero-based page index. Query parameter. Defaults to 0. |
| size | int | No | Number of records per page. Query parameter. Example: 400. |
| Name | Type | Required | Description |
|---|---|---|---|
| hotelList | object-array | Yes | Array of hotels located in the requested country. |
| hotelList/hotelId | string | Yes | Unique hotel code. Use it with Hotel Detail, Search and the reservation flow. |
| hotelList/name | string | Yes | Display name of the hotel. |
| numberOfItems | int | Yes | Total number of hotels matching the country across all pages. |
| numberOfPages | int | Yes | Total number of pages available for the current size value. |
This endpoint does not define service-specific errors. Common gateway and authentication errors still apply — see the central Error Codes reference.