Home
Developer Guide
Introduction
About the API
Integrating with the API
FAQ
Get Hotel Information
Information
Examples
List RoomRates (Room + RatePlan)
Information
Examples
Get Availability and Restrictions
Information
Examples
Get Inventory
Information
Examples
Update Availability and Restrictions
Information
Examples
List Rate Plans
Information
Examples
Get Rates
Information
Examples
Update Rates
Information
Examples
Booking Handling (Pull)
Information
Examples
Booking Handling (Push)
Information
Examples
Reference Tables
Warning Validation Codes
Error Validation Codes
Booking Data Structures
## 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](/portal/documentation/update-avail-restr) 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 Element | Number | Description ---------------------------------------------|--------|------------------- OTA_HotelInvCountRQ | 1 | Root element OTA_HotelInvCountRQ / HotelInvCountRequests | 1 | Collection of Inventory Count requests criteria. HotelInvCountRequests / HotelInvCountRequest | 1 | Provides the criteria to identify the date range and room type inventory to be returned. HotelInvCountRequest / DateRange | 1 | The code of the hotel to query the room inventory. @start | 1 | Data request start date (inclusive) @end | 1 | Data request end date (exclusive). HotelInvCountRequest / RoomTypeCandidates | 0..1 | Collection of room type candidates RoomTypeCandidates / RoomTypeCandidate | 1..n | Element used to identify available room products. @RoomTypeCode | 1 | Room identifier code. HotelInvCountRequest / HotelRef | 1 | Hotel identifier code. @HotelCode | 1 | The code of the hotel to query of rooms inventory #### Output: OTA_HotelInvCountRS Element | Number | Description -------------------------------------|--------|------------------- OTA_HotelInvCountRS | 1 | Root element OTA_HotelInvCountRS / Inventories | 1 | A collection of Inventory. Hotel identification information are the attributes of this element. @HotelCode | 1 | The code of the hotel to query of rooms inventory Inventories / Inventory | 0..n | This is the inventory information for a given room type. Inventory / InvCounts | 1 | A collection of inventory counts. InvCounts / InvCount | 1..n | Individual inventory count @ActionType | 1 | Values: - Allocation -Used @Count | 1 | Number @CountType | 1 | This 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 / StatusApplicationControl | 1 | Contains specific information regarding room availability @Start | 1 | Data request start date (inclusive) @end | 1 | Data request end date (exclusive). @InvCode | 1 | Room identifier code.