Availability and rates

Still works for simple pricing

📘

Availabilities & rates basics

  • Availabilities and rateplans need to always be used together
  • To update availabilities, you can just mark single days as available or unavailable, every push is just an update
  • To update a price, you need to always push the whole ratePlan object, updates for single rows are not possible

Keep in mind that we are deprecating this in the next version, so we recommend using LOS. When in doubt, reach out to your Technical Account Manager, she will be happy to help!

Availabilities are holding the information if an apartment is available at a certain date, rateplans are holding the information at which price and if a specific day is a possible check-in or check-out day.

Using this model, you need to provide availabilities and rates and make sure to keep them in sync. This model is only supported for very easy price structures and may cause problems if you try to implement more complex pricing models.

The Availability object

The first part are the availabilities. The availabiliy object contains the available days and the booked days of an apartment.

ParameterTypeRequiredUsage
"availableDays"array of datesYESlist of all dates available
"bookedDays"array of datesYESlist of all dates booked

Common missunderstandings

  • Pushing a day multiple times in the availableDays object does not make this day more then once available.
  • Pushing a day once in available and once in booked

Example

{
     "availableDays": [
          "2022-12-02",
          "2022-12-03"
     ],
     "bookedDays": [
          "2022-12-04"
     ]
}

Available days are not automaticly available for the customer to book, the day needs also to have a valid rate configured.

The Rate Plan object

On the rates object you can define multiple information for every specific day. You need to specify the information on an individul day level.

ParameterTypeRequiredUsage
"ratePlans"array of objectsYESContains rate plans
"ratePlans"[i]."ratePlanId"stringYESYou push an unique identifier for this rate plan
"ratePlans"[i]."guests"int32YESNumber of guests for which this rate applies
"ratePlans"[i]."currency"stringYESChoose from the list of supported currencies
"ratePlans"[i]."minumumStay"int32YESThe minimum length of stay for this rate plan to be applied
"ratePlans"[i]."maximumStay"int32The maximum length of stay for this rate plan to be applied
"ratePlans"[i]."dailyRates"array of objectsYESList of daily rates
"ratePlans"[i]."dailyRates"[i]."date"dateYESDate in format "YYYY-MM-DD"
"ratePlans"[i]."dailyRates"[i]."price"numberYESPrice per night
"ratePlans"[i]."dailyRates"[i]."priceForExtraPerson"numberPrice for any extra person between "guests"and the maximum apartment capacity
"ratePlans"[i]."dailyRates"[i]."checkinAllowed"booleanYESCan a customer check-in on this date ?
"ratePlans"[i]."dailyRates"[i]."checkoutAllowed"booleanYESCan a customer check-out on this date ?

Example

{
  "ratePlans": [
    {
      "ratePlanId": "SHORT_STAY_RATE",
      "guests": 2,
      "currency": "EUR",
      "minimumStay": 1,
      "maximumStay": 6,
      "dailyRates": [
        {
          "date": "2023-05-01",
          "price": 95,
          "priceForExtraPerson": 20,
          "checkinAllowed": true,
          "checkoutAllowed": false
        }
      ]
    }
    {
      "ratePlanId": "MEDIUM_STAY_RATE",
      "guests": 2,
      "currency": "EUR",
      "minimumStay": 7,
      "maximumStay": 13,
      "dailyRates": [
        {
          "date": "2023-05-01",
          "price": 90,
          "priceForExtraPerson": 15,
          "checkinAllowed": true,
          "checkoutAllowed": false
        }
      ]
    }
   {
      "ratePlanId": "LONG_STAY_RATE",
      "guests": 2,
      "currency": "EUR",
      "minimumStay": 14,
      "maximumStay": 30,
      "dailyRates": [
        {
          "date": "2023-05-01",
          "price":85,
          "priceForExtraPerson": 10,
          "checkinAllowed": true,
          "checkoutAllowed": false
        }
      ]
    }
  ]
}