How to get From/Minimum prices?
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.
- 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.
You can locate the Minimum Price in the
hookData.minPricefield in the
accommodationobject. Here is an example:
200, if a minimum price could be calculated
204, if no minimum price is available
- Timestamp, when this data was lastly calculated
- Legacy, don't use
- Price for a double room (Price per person per night * 2)
- The lowest price for 1 week (Price per person per night * 7)
- Use for apartments
- Price per Night (can be used for aparments)
- Price per Person per Night (used for hotels)
- Type of the accommodation. Here you can detemine which minprice field to display
- Version of the MinPrice calculation
All prices are currently in Swiss Francs only.
The following rules describe how we determine the Minimum Price. The rules are applied in the order listed:
- 1.We only consider the following offers:
- 1.not older than 1 month (date of the offer)
- 2.checkout not farther than 6 month in the future
- 3.NEW: if type of accommodation is "hotel" or "bnb", only offers with 2 adults are taken into account
- 2.Per offer the following data is calculated:
- 1.Price per Week (Price / Number of nights * 7) [used for apartments]
- 2.Price per Person per Night (Price / Number of nights / Number of adults)
- 3.Price per night (Price / Number of nights)
- 3.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:
- 3.Number of Rooms
- 4.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.
We consider the 2nd price to be the new minimum for this offer
- 1.On Feb, 1st we get CHF 100 for 2021-03-01 - 2021-03-02, 1 room, CHF, BAR
- 2.On Feb 2nd we get CHF 120 for 2021-03-01 - 2021-03-02, 1 room, CHF, BAR
- 5.The price is now Price per adults per night, grouped for each month.
- 6.We find the cheapest month over the next 6 months.