OpenBooking provides additional meta-data about accommodation objects through Hooks. One of the Hooks that is available to any API user automatically is the "minPrice"-Hook.
Minimum Prices are calculated dynamically
OpenBooking routinely calculates the Minimum or From-Prices for every Accommodation based on actual bookable offers flowing through
OpenBooking ignores any arbitrary "Min-Price" information from the Booking providers
If accommodations never appear as bookable, there is no reason to display a Minimum Price, hence we do not provide this information for these objects.
Locate the Minimum Price
You can locate the Minimum Price in the hookData.minPrice
field in the accommodation
object. Here is an example:
{
"executed": "2023-11-18T09:43:51.219507",
"statusCode": 200,
"data": {
"base_price": 120,
"min_price_seen": 120,
"min_price_week": 840
}
}
statusCode
200
, if a minimum price could be calculated204
, if no minimum price is availableexecuted
Timestamp, when this data was lastly calculateddata.base_price
Legacy, don't usedata.min_price_seen
Price for a double room (Price per person per night * 2)data.min_price_week
The lowest price for 1 week (Price per person per night * 7)Use for apartmentsdata.price_per_night
Price per Night (can be used for aparments)data.price_per_night
Price per Person per Night (used for hotels)data.type
Type of the accommodation. Here you can detemine which minprice field to displaydata._v
Version of the MinPrice calculation
All prices are currently in Swiss Francs only.
How the Minimum Price is calculated
The following rules describe how we determine the Minimum Price. The rules are applied in the order listed:
- We only consider the following offers:
- not older than 1 month (date of the offer)
- checkout not farther than 6 month in the future
- if type of accommodation is "hotel" or "bnb", only offers with 2 adults are taken into account
- Per offer the following data is calculated:
- Price per Week (Price / Number of nights * 7) [used for apartments]
- Price per Person per Night (Price / Number of nights / Number of adults)
- Price per night (Price / Number of nights)
- We then group the offers per Accommodation by the following fields. Offers where all these fields are the same are considered to be in the same category:
- Checkin
- Checkout
- Number of Rooms
- Currency
- Ratecode
- Only the most recent price per offer for the Category from (3) is taken. That means as soon as a new offer for the same category comes, in it overwrites the price from all other previous offers. I.e.
- On Feb, 1st we get CHF 100 for 2021-03-01 - 2021-03-02, 1 room, CHF, BAR
- On Feb 2nd we get CHF 120 for 2021-03-01 - 2021-03-02, 1 room, CHF, BAR
- We consider the 2nd price to be the new minimum for this offer
- The price is now Price per adults per night, grouped for each month.
- We find the cheapest month over the next 6 months.