Channel Managers · API docs

Get Inventory

URL: /v1/hotels/inventory/get

Goals

To return all information about the inventory for a date range, either for the given property or for all or any rooms.

Notes

The OTA_HotelInvCountRS message provides all the data you need to make a subsequent update with the Update availability and restrictions API. In this message you will find the following information:

Flexible Allotment: CountType="2" (Definitive availability): Total Inventory to Sell– This value is the total number of rooms the hotel has set up to be sold. This value can be changed by the hotel.

Base Allotment: CountType="21" (Contract available): Total Inventory To Sell by Contract– This value is the total number of rooms the hotel has set up to be sold by contract. This is also known as the guaranteed allotment. This value can not be changed by the hotel.

Booked: CountType="4" (Definite sold): This value is the number of rooms booked in our site.

Our model works with the total number of rooms allotted, so when you update availability in OTA_AvailNotifRQ you are updating the flexible allotment. For this reason, you have to calculate the correct amount of available rooms to set in BookingLimit:

left-to-sell = flexible-allotment + base-allotment - booked

Example: The flow above becomes

  1. The hotel sends BookingLimit="3" (flexible-allotment = 3)
  2. A room is sold: In OTA_HotelInvCountRS you get flexible-allotment = 3, base-allotment = 0 and booked = 1, i.e., left-to-sell = flexible-allotment + base-allotment - booked = 3 + 0 - 1 = 2.
  3. The hotel wishes to give one more room to sell, so you need to send BookingLimit="4" because flexible-allotment = left-to-sell - base-allotment + booked = 3 - 0 + 1 = 4.
  4. If the room reservation is cancelled, in OTA_HotelInvCountRS you will get flexible-allotment = 4, base-allotment = 0, and booked = 0, meaning left-to-sell = flexible-allotment + base-allotment - booked = 4 + 0 - 0 = 4.

Message Detail

Input: OTA_HotelInvCountRQ

ElementNumberDescription
OTA_HotelInvCountRQ1Root element
OTA_HotelInvCountRQ / HotelInvCountRequests1Collection of Inventory Count requests criteria.
HotelInvCountRequests / HotelInvCountRequest1Provides the criteria to identify the date range and room type inventory to be returned.
HotelInvCountRequest / DateRange1The code of the hotel to query the room inventory.
@start1Data request start date (inclusive)
@end1Data request end date (exclusive).
HotelInvCountRequest / RoomTypeCandidates0..1Collection of room type candidates
RoomTypeCandidates / RoomTypeCandidate1..nElement used to identify available room products.
@RoomTypeCode1Room identifier code.
HotelInvCountRequest / HotelRef1Hotel identifier code.
@HotelCode1The code of the hotel to query of rooms inventory

Output: OTA_HotelInvCountRS

ElementNumberDescription
OTA_HotelInvCountRS1Root element
OTA_HotelInvCountRS / Inventories1A collection of Inventory. Hotel identification information are the attributes of this element.
@HotelCode1The code of the hotel to query of rooms inventory
Inventories / Inventory0..nThis is the inventory information for a given room type.
Inventory / InvCounts1A collection of inventory counts.
InvCounts / InvCount1..nIndividual inventory count
@ActionType1Values: - Allocation -Used
@Count1Number
@CountType1This identifies the type of inventory count being reported. Refer to OpenTravel Code List Inventory Count Type (INV). Values: 2: Definitive availability , 21: Contract available, 4: Definite sold
Inventory / StatusApplicationControl1Contains specific information regarding room availability
@Start1Data request start date (inclusive)
@end1Data request end date (exclusive).
@InvCode1Room identifier code.