ibelsaDocumentation
ibelsaAPI
Guide for rates (yield management)
---
created: 2020-10-01T00:00
updated: 2024-04-25T14:12
author: ibelsa API team
title: Guide for rates (yield management)
---
# Guide for rates (yield management)
ibelsa API allows to set prices in one or many rates in ibelsa.
To ensure that the prices are correctly imported in ibelsa, the target rate should be empty. Or
containing weekly time periods. Each existing rate period within the rate must have a length
of exact one week (Monday till Sunday)!
## Getting the statistic data of the hotels inventory
Returns the statistic data of the hotels inventory for the following 12 months
Endpoint: GET /api/get/inventory_message/{starts_at}/{ends_at}
* Return the statistic data of the hotels inventory
* Date period is optional (starts_at, ends_at). By default data for the following 12 months will be provided.
Endpoint Documentation: [Get Inventory](/api/doc#get--api-get-inventory_message-{starts_at}-{ends_at})
## Get rooms and room categories
Endpoint: GET /api/get/roomandcategory/{group}
* group can be ‘room’ or ‘category’
* Return all rooms with their categories or
* Returns all categories with their rooms
Endpoint Documentation: [Get Rooms and Categories](/api/doc#get--api-get-roomandcategory-{group})
## Get all rates
Get all active rates of the hotel
Endpoint: GET /api/get/allactiverates
Endpoint Documentation: [Get active Rates](/api/doc#get--api-get-allactiverates)
This request returns all active rates of the hotel.
Example:
```JSON
{
"success": "true",
"totalCount": 3,
"data": [
{
"rate_id": 1,
"rate_name": "Langzeitrate",
"rate_description": "ab 7 Tagen verfügbar",
"is_adds": false,
"promo_code": ""
},
{
"rate_id": 2,
"rate_name": "Firmenrate",
"rate_description": "Firmenrate 1 inkl. Frühstück",
"is_adds": false,
"promo_code": ""
},
{
"rate_id": 3,
"rate_name": "RackRate",
"rate_description": "Übernachtung ohne Frühstück.",
"is_adds": false,
"promo_code": "ADKEL-DKSHE-DSELJ"
}
]
}
```
## Getting all price information of a rate
Get all price information of rate
Endpoint: GET /api/get/allactiverates/prices/{rate_id}/{start_date}/{end_date}/{categories}/{person_counts}
Endpoint Documentation: [Get Price information of Rate](/api/doc#get--api-get-allactiverates-prices-{rate_id}-{start_date}-{end_date}-{categories}-{pax})
* rate_id, the internal id of the rate
* start_date, end_date, period under observation
* categories, comma separated list of intern ibelsa category ids
* person_counts, comma separated list of occupancy
## Set prices for a rate
Set prices for rates (write access required)
Endpoint: POST /api/set/priceforrate
Endpoint Documentation: [Set Price for Rate](/api/doc#post--api-set-priceforrate)
* Transfer prices always for one day. “Start” and “End” must be equal in this version of the endpoint
* This request works asynchronous. You will get the answer immediately.
* Return code of this endpoint is a token which can be used to check the status of the import process (Done. / In progress.)
See: [Get status of setting prices](#get-status-of-setting-prices)
Example:
```JSON
{
"ibelsarate": {
"Doubleroom": {
"Start" : "2019-12-31",
"End" : "2019-12-31",
"CurrencyCode": "EUR",
"prices": {
"NumberOfGuests" : "1",
"AmountAfterTax" : "237.00",
},{
"NumberOfGuests" : "2",
"AmountAfterTax" : "299.00",
}
},{
"Start" : "2020-01-01",
"End" : "2020-01-01",
"CurrencyCode": "EUR",
"prices": {
"NumberOfGuests" : "1",
"AmountAfterTax" : "240.00",
},{
"NumberOfGuests" : "2",
"AmountAfterTax" : "320.00",
}
}
},{
"Suite": {
"Start" : "2019-12-31",
"End" : "2019-12-31",
"CurrencyCode": "EUR",
"prices": {
"NumberOfGuests" : "1",
"AmountAfterTax" : "123.00",
},{
"NumberOfGuests" : "2",
"AmountAfterTax" : "190.00",
}
},{
"Start" : "2020-01-01",
"End" : "2020-01-01",
"CurrencyCode": "EUR",
"prices": {
"NumberOfGuests" : "1",
"AmountAfterTax" : "240.00",
},{
"NumberOfGuests" : "2",
"AmountAfterTax" : "320.00",
}
}
}
}
```
## Get status of setting prices
Check the status of the import process for rates
Endpoint: GET /api/check/priceforrate/{tolken}
* token is the return code of the endpoint ‘/api/set/priceforrate’
Endpoint Documentation: [Get status of setting prices](/api/doc#get--api-check-priceforrate-{token})
Example:\
`https://rooms.ibelsa.com/api/check/priceforrate/1432_20200706065045_850f9d`
Response if still working:
```JSON
{
"success": "true",
"data": "In progress."
}
```
Response if finished:
```JSON
{
"success": "true",
"data": "Done."
}
```
## Set restrictions for a rate period
Set restrictions for a rate period (write access required)
Endpoint: POST /api/set/restrictions/rateperiod
Endpoint Documentation: [Set Restrictions for Rateperiod](/api/doc#post--api-set-restrictions-rateperiod)
Transfer restrictions for a rate period within a rate.\
To remove minlos or maxlos send `"0"`.\
To remove cta or ctd send an empty list `"[]"`.\
Values for the parameters cta_action and ctd_action : `add , overwrite , remove`
Exception:\
Using the parameter all_restrictions with the value "remove" will remove all restrictions in the rate.\
All other parameters will be ignored!\
If you do not want to change a value, omit the parameter.
Only "start" and "end" are mandatory parameters.
Example:
```JSON
{
"testneu":[
{
"start":"2020-03-02",
"end":"2020-03-02",
"minlos":"3",
"maxlos":"0",
"cta":["Monday","Tuesday"],
"cta_action": "add",
"ctd":["Sunday"],
"all_restrictions": "remove"
},
{
"start":"2020-03-23",
"end":"2020-03-27",
"minlos":"4",
"maxlos":"0",
"cta":["Tuesday"],
"cta_action": "add",
"ctd":["Monday"],
"ctd_action": "overwrite"
}
]
}
```
Author:
Created:
Updated:
This page was generated from a Markdown file.
Would you like to view the content in your favourite Markdown reader? Raw Markdown
Would you like to view the content in your favourite Markdown reader? Raw Markdown