Get rates
Begin by initializing your system to recognize the rate plans configured in Apaleo. This can be achieved using the Rate Plan APIs:
GET /rateplan/v1/rate-plans
{
"ratePlans": [
{
"id": "BER-FLEX-SGL",
"code": "FLEX",
"name": "Flexible",
"description": "Stay fully flexible with free cancellation until midnight one day prior to arrival. Just put your CC on file to guarantee the booking.",
"minGuaranteeType": "CreditCard",
"priceCalculationMode": "Truncate",
"property": {
"id": "BER"
},
"unitGroup": {
"id": "BER-SGL"
},
"cancellationPolicy": {
"id": "BER-FLE"
},
"noShowPolicy": {
"id": "BER-NONREF",
"code": "NONREF",
"name": "Non Refundable",
"description": "No free no-show"
},
"channelCodes": [
"Direct",
"Ibe",
"BookingCom",
"ChannelManager"
],
"timeSliceDefinition": {
"id": "BER-NIGHT",
"name": "Over Night",
"template": "OverNight",
"checkInTime": "17:00:00",
"checkOutTime": "10:00:00"
},
"restrictions": {
"minAdvance": {
"hours": 0,
"days": 3,
"months": 0
},
"maxAdvance": {
"hours": 0,
"days": 180,
"months": 0
}
},
"isBookable": true,
"isSubjectToCityTax": true,
"isDerived": false,
"derivationLevel": 0,
"ratesRange": {
"from": "2024-10-16",
"to": "2025-04-17"
},
"accountingConfigs": [
{
"vatType": "Reduced",
"serviceType": "Accommodation",
"subAccountId": "BER-FLEX",
"validFrom": "1970-01-01"
}
]
}
]
}
Since it is not possible to modify the rates of derived rate plans, ensure you apply the filter isDerived=false to exclude them. Additional filters are available if you wish to narrow the data to specific properties or channels. Keep in mind that while you cannot update prices for derived rate plans, restrictions are not inherited and must be configured separately for each derived plan.
Now that you have the list of rate plans, you’re ready to retrieve and update rates. Here’s how you can proceed:
GET /rateplan/v1/rate-plans/{id}/rates
{
"rates": [
{
"from": "2025-01-27T17:00:00+01:00",
"to": "2025-01-28T10:00:00+01:00",
"price": {
"amount": 64,
"currency": "EUR"
},
"restrictions": {
"closed": false,
"closedOnArrival": true,
"closedOnDeparture": false
}
},
{
"from": "2025-01-28T17:00:00+01:00",
"to": "2025-01-29T10:00:00+01:00",
"price": {
"amount": 66,
"currency": "EUR"
},
"restrictions": {
"minLengthOfStay": 2,
"closed": false,
"closedOnArrival": false,
"closedOnDeparture": false
}
},
{
"from": "2025-01-29T17:00:00+01:00",
"to": "2025-01-30T10:00:00+01:00",
"price": {
"amount": 72,
"currency": "EUR"
}
}
],
"count": 3
}
This retrieves all rates within a specified time interval. If a price is not set, it indicates that no rates have been initialized for the corresponding time slice. The retrieved data also includes any applicable restrictions.