Inventory
Definition
An inventory is the number of rooms available for a hotel to sell or distribute across all channels. Across the documentation, you may find other concepts such as availability denoting the available part of an inventory for a given hotel.
Sometime the documentation may refer to the term ARI which refers to the availability and rates that apply to the available rooms.
Retriving inventory
Retrieve inventory for a property
Make sure to add the Authorization header as defined in the Authorization
One can retrieve the inventory by accessing the following endpoint.
In order to retrieve a property, the reference to a room id, or a property id has to be passed to the request body.
Inventory is 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.
Beside the required values of a room_id or property_id, you can pass the check_in and check_out parameters. A typical request for an inventory of a property would be: with the following JSON Body.
- Request
- Response
info
The Date Interval search defines a search for inventories that include the start and end date in their range. It will not return intervals of dates outside of the range defined between start & end period (e.g. searching for range 15.05.2020 - 15.05.2021 may not return any result if a range that includes both dates exist!)
If we just want to receive inventories for a property (all rooms), then simple omit the room_id
If you want to simple see the rates for a property, than you can send a simple request as the follows:
The query above will check for the inventory with starting period the current date and end period the current date + 30 days.
caution
Careful, the request without dates retrieve only inventories in a 1 year date span (now()+1.year)
Retrieve inventory for a room
It is also possible to search for a room_id inventory. In that case the request will look like:
Restrictions
Some restrictions apply in the Retrieval of ARI.
e.g ~The date range cannot be longer than 31 days.~
Every request must contain a valid property ID that partner has access to.
Key | Value | Required | Information |
---|---|---|---|
pid | integer | no | This is the property id. If this is missing, a room id should be provided |
room_id | integer | no | Room Id. If this is missing, the property_id should be set |
from | String | no | If missing, this takes the current date as a value |
to | String | no | If this is missing, the value is current date + 30 days |
Updating Inventory
In order to update the inventory, you have to make a POST at the following endpoint:
- Request
- Response
There are 2 main restrictions in this call: the dates should respect the order of start date being smaller than end date; and the end date cannot be in the past.