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.

GET ${DOMAIN}/inventory

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.

{
"pid":9,
"room_id":27,
"from":"2020-05-15",
"to":"2022-12-31 00:00:00"
}
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

{
"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
}

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:

{
"room_id":27,
"from":"2020-05-15",
"to":"2022-12-31 00:00:00"
}

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.

KeyValueRequiredInformation
pidintegernoThis is the property id. If this is missing, a room id should be provided
room_idintegernoRoom Id. If this is missing, the property_id should be set
fromStringnoIf missing, this takes the current date as a value
toStringnoIf 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:

POST ${DOMAIN/inventory}
{
"room_id": 7796,
"inventory": [
{
"occupiedRooms": 2,
"startPeriod": "2020-06-01",
"endPeriod": "2020-06-05",
"totalRooms": 3
},
{
"occupiedRooms": 0,
"startPeriod": "2020-06-06",
"endPeriod": "2021-06-05",
"totalRooms": 3
}
]
}

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.