Set rates and restrictions
Once you’ve optimized the rates and restrictions, it’s time to update them. Simply make the following call:
PUT /rateplan/v1/rate-plans/{id}/rates
{
"rates": [
{
"from": "2025-01-21T17:00:00+01:00",
"to": "2025-01-22T11:00:00+01:00",
"price": {
"amount": 123.5,
"currency": "EUR"
},
"restrictions": {
"minLengthOfStay": 1,
"maxLengthOfStay": 30,
"closed": false,
"closedOnArrival": true,
"closedOnDeparture": true
}
}
]
}
If you need to update rates for multiple time periods, include all the dates in the array rather than making separate calls. This approach is more efficient and reduces the number of API requests.
In the body above you see the supported restrictions: minLengthOfStay
, maxLengthOfStay
, closed
, closedOnArrival, closedOnDeparture
. Please note minLengthOfStay
and maxLengthOfStay
are based on arrival day and not stay through.
If you leave information out, it will be deleted. For example, not setting the restrictions in the PUT call will simply remove them.
If you need to update multiple rate plans simultaneously, such as applying the same restrictions to future dates, you can use the
PATCH /rateplan/v1/rates
This allows you to efficiently update multiple rates belonging in a single request.