The Inventory message (
OTA_HotelInvCountNotifRQ) defines the inventory counts
(number of physical rooms) that are available to be booked for specific room
types. When you send an Inventory message, you indicate how many rooms of that
type are available on a given date. If no rooms of that type are available,
products involving that room type and date will not display.
The following sections cover general guidelines, a basic example, and how-to scenarios to get you started with adding and updating inventory and sending Inventory messages.
For examples of various inventory-related scenarios, see How-tos.
Required and optional elements
The XML reference provides descriptions of the required and optional elements. For details on attributes and child elements, see Inventory elements & attributes.
Syntax and schemas
Use the Inventory syntax example as a reference when you create the Inventory message to ensure you are following the correct format.
You can use a third-party XML tool such as xmllint to validate your feeds with the published schemas before submitting them to Google. For the Inventory message schema, see Hotel ads schemas.
Use the following guidelines for an Inventory message:
Inventory is keyed by hotel, date, and room type.
Inventory count must be greater than
0for all nights of the stay in order to show the price for the associated rate plan and occupancy.
If inventory count is equal to
0, then rooms will be not be available to book for the specified Room ID and date range.
CountTypemust always have the value of
2to be valid since it indicates a count of "definite availability."
Send updated inventory whenever a reservation or cancellation for a room occurs in your system.
Inventory versus availability
Inventory is the number of bookable rooms based on physical count and availability indicates whether the combination of room type and rate plan is allowed to be booked. For ARI, availability and inventory can both vary based on a set of dates or type of accommodation, and both have corresponding message types. Inventory and availability are keyed by hotel, date, and room type, with the addition of rate plan for availability.
There can be "no availability" even when there is inventory since inventory and availability are independent of each other.
There are two concepts of availability. First, there's the overall availability
of a product for a given stay which is impacted by factors such as
whether every night has a defined rate, inventory for the associated room type,
and the availability restriction is open. Second, there's the specific
restriction for a product on a given date, represented by
Restriction="Master" Status="Open"/> in
OTA_HotelAvailNotifRQ, and closing
this availability is known as a "stop sell."
Inventory must be an integer greater than
0 for the room and the availability
restriction must be open in order to show the price for a product.
This section provides a basic example of an Inventory message using required and optional elements. Once you prepare your file, you will need to send it to Google via a POST message to this endpoint:
To learn more about how to push/POST the message, see Pushing messages.
HotelCode, use the unique Hotel ID you used within your system for
identifying the property. This value must match the Hotel ID specified using
<id> in the
element in the
Hotel List feed. For
<RoomID>, use the same ID you used within your system for
room types. Consistency with your system is critical for ensuring that Google
is correctly displaying your data.
This example shows how to set inventory for 13 bookable rooms for the month of December:
<?xml version="1.0" encoding="UTF-8"?> <OTA_HotelInvCountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="12345678" TimeStamp="2022-02-25T20:50:37-05:00" Version="3.0"> <POS><Source><RequestorID ID="partner_key" /></Source></POS> <Inventories HotelCode="HotelID"> <Inventory> <StatusApplicationControl Start="2022-12-01" End="2022-12-31" InvTypeCode="RoomID"/> <InvCounts> <InvCount Count="13" CountType="2"/> </InvCounts> </Inventory> </Inventories> </OTA_HotelInvCountNotifRQ>
For more examples, see Inventory examples.
This section provides a scenario you might encounter while sending an Inventory message.
Scenario: How to block rooms from being booked
You need to indicate that there are no remaining rooms that can be booked for this room type on a specific set of dates, most commonly because they are sold out.
<InvCount Count> to a
0 value and add the desired date range.
This sample shows how to use
InvCount to set inventory to
0 for the
specified room and dates (for example, the first few weeks in January).
<?xml version="1.0" encoding="UTF-8"?> <OTA_HotelInvCountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05" EchoToken="12345678" TimeStamp="2022-02-25T20:50:37-05:00" Version="3.0"> <POS><Source><RequestorID ID="partner_key" /></Source></POS> <Inventories HotelCode="Property_1"> <Inventory> <StatusApplicationControl Start="2023-01-01" End="2023-01-15" InvTypeCode="ROOMID"/> <InvCounts> <InvCount Count="0" CountType="2"/> </InvCounts> </Inventory> </Inventories> </OTA_HotelInvCountNotifRQ>