Facet Search API

This is a new feature for our REST API users. Please feel free to comment or ask support for extensions to fit your specific use case.

Use Facet Search to build dynamic filters in your user interface

Facet Search allows you to query the number of available accommodations with supplied filter parameters, broken down by different facets.

Facet Search in our White Label UI

For the best user experience, every click on a filter should update the counts immediately.

Endpoints

These endpoints are public. You don't need to supply an api-key or token.

post
Facet Search for Accommodations

https://api.openbooking.ch/facets/accommodations/:group
Count number of accommodations found for specific filters.
Request
Response
Request
Path Parameters
group
required
string
Your Group ID (assigned by OpenBooking)
Headers
Content-Type
required
string
application/json
Body Parameters
tags
optional
array
has all of these tags
features
optional
array
has all of these features
quality
optional
array
is starred with: 0,1,2,3,4,5
select
required
array
List of facets to return. One or more of: meta, type, quality, features, tags
type
optional
array
one or more of: apartment, hotel, offer, grac, camping
Response
200: OK
{
"meta": {
"total": 8
},
"features": {
"family-friendly": 4,
"balkon": 8,
"tiere": 7,
"tv": 4,
"rollstuhl": 8,
"klimaanlage": 8,
"lift": 8,
"nichtraucher": 8,
"gym": 8,
"spa": 8,
"parking": 8,
"bar-lounge": 8,
"businesscenter": 7,
"sauna-dampfbad": 8,
"wifi-internet": 8,
"restaurant": 8,
"bike-friendly": 8,
"waschmaschine": 8
}
},
{
"type": {
"hotel": 8
}
},
{
"quality": {
"4": 8
}
},
{
"tags": {
"bookingcom:type:Hotels": 8,
"biking": 1
}
}

‚Äč