Rates

Definition

Rates denote the pricing information for each room on each specific dates.

Retriving rates

Retrieve rates for a property

info

It is expected that this information might change in the near future.

Make sure to add the Authorization header as defined in the Authorization

One can retrieve the rates by accessing the following endpoint.

GET ${DOMAIN}/rates

In order to retrieve rates of a property, the reference to a room id, or a property id has to be passed to the request body.

Rates are returned for periods that start from the current date and we do not put a limit on the period of time, although this may change in the future. By default if you do not provide dates, we will limit the "to" date to 2 years.

Beside the required values of a room_id or property_id, you can pass the from and to parameters.

A minimal request for an inventory of a property would be: with the following JSON Body.

{
"pid":2262
}

As you may see that the rates call will return an array of price rates. Each of the price rates includes a rate that defines the dates when the pricing is applied. Daily prices are also attached to the price rates.

Combination denotes the combination per room that are allowed, where the first digit denotes Adults and the second one, the number of children per room.

The previous call will return results for all the rooms under this property. The call is handy for small accommodation properties, but the results might be too large in case of many rooms.

If you want to restrict the result by date, the following request should be past in the body of the request

{
"pid":9,
"from":"2020-05-15",
"to":"2022-12-31"
}

If you want to simple see the rates for a property, than you can send a simple request as the follows:

{
"pid":9
}

Retrieve rates by contract

Contract defines specific price agreements (and additional conditions, such as promotions), between accommodation properties and booking partners If you would like to rates related to a specific contract, then the following query will provide the required information

{
"contract_id":14
}

Retrieve rates for a room

It is also possible to search for a room_id inventory. In that case the request will look like:

{
"room_id":7796
}

Updating Rates

In order to update a response, a reference to the property, the room and the contract for which the update is occurring must be referenced in the request The date range defines the dates that the new rates will be applied.

In case the dates overlap a previous rate, then the old rate will be modified to make space (depending on the dates) of the new rate.

The following situation may occurr on update of a new price range.

  1. New Rate Overlaps
|-------------------|
|-------------------|

This is a desired scenario. All prices will be updated with the price information pushed in the request

  1. New Rate is contained and has same start period
|-------------------|
|---------|

In such case, a new rate will be added. The previous rate will be perserved and will have as start period new rate endperiod +1.day

  1. New Rate is contained and has same end period
|-------------------|
|---------|

In such case, a new rate will be added. The previous rate will be perserved and will have as end period the new rate's start period -1.day

  1. New Rate is contained
|-------------------|
|---------|

In such case, 2 new rates will be added, the previos rate will be contained in the leftmost segment

The last scenario is the one where the rates are not contained or attached and, as such simply a new rate will be added.

{
"property_id": 2262,
"rate": [
{
"room_id": 7796,
"contract_id": 2233,
"date_range": {
"from": "2020-04-24",
"to": "2020-04-25"
},
"prices": {
"default_price": 40
}
}
]
}

Upon push for rates, the following responses might be possible.

A status code 4248 indicates that everything was executed successfully.

A status code 4249 indicates that an error occurred

Contracts

Contract defines specific price agreements (and additional conditions, such as promotions), between accommodation properties and booking partners If you would like to rates related to a specific contract, then the following query will provide the required information You may retrieve contract information by sending a GET to the ${DOMAIN}/rates/contracts endpoind.

{
}

You can as well retrieve only one contract for review by passing the 'contract_id' in the request body.

{
"contract_id":71
}