OpenBooking
Search…
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.

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:
1
{
2
"executed": "2016-11-18T09:43:51.219507",
3
"statusCode": 200,
4
"data": {
5
"base_price": 120,
6
"min_price_seen": 120,
7
"min_price_week": 840
8
}
9
}
Copied!
  • statusCode
    • 200, if a minimum price could be calculated
    • 204, if no minimum price is available
  • executed
    • Timestamp, when this data was lastly calculated
  • data.base_price
    • Legacy, don't use
  • data.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 apartments
  • data.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 display
  • data._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:
  1. 1.
    We only consider the following offers:
    1. 1.
      not older than 1 month (date of the offer)
    2. 2.
      checkout not farther than 6 month in the future
    3. 3.
      NEW: if type of accommodation is "hotel" or "bnb", only offers with 2 adults are taken into account
  2. 2.
    Per offer the following data is calculated:
    1. 1.
      Price per Week (Price / Number of nights * 7) [used for apartments]
    2. 2.
      Price per Person per Night (Price / Number of nights / Number of adults)
    3. 3.
      Price per night (Price / Number of nights)
  3. 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:
    1. 1.
      Checkin
    2. 2.
      Checkout
    3. 3.
      Number of Rooms
    4. 4.
      Currency
    5. 5.
      Ratecode
  4. 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.
    1. 1.
      On Feb, 1st we get CHF 100 for 2021-03-01 - 2021-03-02, 1 room, CHF, BAR
    2. 2.
      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
  5. 5.
    The price is now Price per adults per night, grouped for each month.
  6. 6.
    We find the cheapest month over the next 6 months.
Last modified 9mo ago