OTA_HotelInvCountNotifRQ

请求

语法

OTA_HotelInvCountNotifRQ 消息使用以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                          EchoToken="message_ID"
                          TimeStamp="timestamp"
                          Version="3.0">
  <POS>
    <Source>
      <RequestorID ID="partner_key"/>
    </Source>
  </POS>
  <Inventories HotelCode="HotelID">
    <Inventory>
      <StatusApplicationControl Start="YYYY-MM-DD"
                                End="YYYY-MM-DD"
                                Mon="boolean_value"
                                Tue="boolean_value"
                                Weds="boolean_value"
                                Thur="boolean_value"
                                Fri="boolean_value"
                                Sat="boolean_value"
                                Sun="boolean_value"
                                InvTypeCode="RoomID"/>
      <InvCounts>
        <InvCount Count="integer" CountType="2"/>
      </InvCounts>
    </Inventory>
  </Inventories>
</OTA_HotelInvCountNotifRQ>

元素和属性

OTA_HotelInvCountNotifRQ 消息具有以下元素和属性:

元素 / @Attribute 出现次数 类型 说明
OTA_HotelInvCountNotifRQ 1 Complex element 用于定义房费适用情况的消息的根元素。
OTA_HotelInvCountNotifRQ / @xmlns 0..1 string (URI) XML 命名空间。
OTA_HotelInvCountNotifRQ / @EchoToken 1 string 相应请求消息的唯一标识符。此值会在响应消息中返回。允许使用的字符包括 a-z、A-Z、0-9、_(下划线)和 -(短划线)。
OTA_HotelInvCountNotifRQ / @TimeStamp 1 DateTime 相应消息的创建日期和时间。
OTA_HotelInvCountNotifRQ / @Version 1 decimal OpenTravel 消息版本。
OTA_HotelInvCountNotifRQ / POS 0..1 POS 用于指定相应消息的合作伙伴账号的容器(通常在后端为多个合作伙伴账号提供价格 Feed 时使用)。
OTA_HotelInvCountNotifRQ / POS/ Source 1 Source 如果存在 <POS>,则此字段为必需字段。<RequestorID> 的容器。
OTA_HotelInvCountNotifRQ / POS / RequestorID 1 RequestorID 如果存在 <POS>,则此字段为必需字段。定义合作伙伴账号。
OTA_HotelInvCountNotifRQ / POS / RequestorID / @ID 1 string 相应消息的合作伙伴账号。此字符串值是 Hotel Center 中 “账号设置”页面上列出的合作伙伴密钥值。

注意:如果您有为多个账号提供 Feed 的后端,则此值需要与您的交易(房源数据)消息的 partner 属性值以及同一账号的 <OTA_HotelRateAmountNotifRQ> 消息的 <RequestorID> 元素中的 ID 属性值相匹配。

OTA_HotelInvCountNotifRQ / Inventories 1 Inventories 一个或多个 <Inventory> 元素的容器。
OTA_HotelInvCountNotifRQ / Inventories / @HotelCode 1 string 房源的唯一标识符。此值必须与酒店列表 Feed 的<listing> 元素中使用 <id> 指定的酒店 ID 相匹配。您还可以在 Hotel Center 中找到酒店 ID。
OTA_HotelInvCountNotifRQ / Inventories / Inventory 1..n Inventory 定义单个房源在不同时间范围内的可用客房数量。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl 1 StatusApplicationControl 定义日期范围以及房型的标识符 (InvTypeCode)。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Start 1 Date 日期范围的开始日期(含),以媒体资源所在的时区为准。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @End 1 Date 日期范围的结束日期(以媒体资源的时区为准,含)。必须等于或大于 start 值。 如果 startend 相等,则更新适用于该日期。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Mon 0..1 boolean 设置为 true1 可明确包含星期一。

如果设置为 true,则会排除未明确设置为 true 的其他星期几(实际上,这些星期几会从 StartEnd 中的日期中过滤掉)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Tue 0..1 boolean 设置为 true1 可明确包含星期二。

如果设置为 true,则会排除未明确设置为 true 的其他星期几(实际上,这些星期几会从 StartEnd 中的日期中过滤掉)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Weds 0..1 boolean 设置为 true1 可明确包含星期三。

如果设置为 true,则会排除未明确设置为 true 的其他星期几(实际上,这些星期几会从 StartEnd 中的日期中过滤掉)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Thur 0..1 boolean 设置为 true1 可明确包含星期四。

如果设置为 true,则会排除未明确设置为 true 的其他星期几(实际上,这些星期几会从 StartEnd 中的日期中过滤掉)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Fri 0..1 boolean 设置为 true1 可明确包含星期五。

如果设置为 true,则会排除未明确设置为 true 的其他星期几(实际上,这些星期几会从 StartEnd 中的日期中过滤掉)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Sat 0..1 boolean 设置为 true1 可明确包含周六。

如果设置为 true,则会排除未明确设置为 true 的其他星期几(实际上,这些星期几会从 StartEnd 中的日期中过滤掉)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @Sun 0..1 boolean 设置为 true1 可明确包含星期日。

如果设置为 true,则会排除未明确设置为 true 的其他星期几(实际上,这些星期几会从 StartEnd 中的日期中过滤掉)。

OTA_HotelInvCountNotifRQ / Inventories / Inventory / StatusApplicationControl / @InvTypeCode 1 string 相应房源(房型)的唯一标识符。此值会映射到交易(房源数据)消息中的 <RoomID>
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts 1 InvCounts 用于定义单个商品目录数量的容器。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts / InvCount 1 InvCount 定义可预订的空房数量。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts / InvCount / @Count 1 integer 可预订的相应房型的空房数量。 值为零表示相应房型已售完。负值被视为零。
OTA_HotelInvCountNotifRQ / Inventories / Inventory / InvCounts / InvCount / @CountType 1 enum

所指定库存数量的类型。有效值为:

  • 2:有货。

示例

剩余广告资源

将给定日期内RoomID_1的剩余会议室数量设置为 5。

<OTA_HotelInvCountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                          EchoToken="12345678"
                          TimeStamp="2023-07-13T20:50:37-05:00"
                          Version="3.0">
  <Inventories HotelCode="Property_1">
    <Inventory>
      <StatusApplicationControl Start="2023-07-18"
                                End="2023-07-23"
                                InvTypeCode="RoomID_1"/>
      <InvCounts>
        <InvCount Count="5" CountType="2"/>
      </InvCounts>
    </Inventory>
  </Inventories>
</OTA_HotelInvCountNotifRQ>

已售罄的广告资源

RoomID_1 在指定日期标记为已售完。

<OTA_HotelInvCountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                          EchoToken="12345678"
                          TimeStamp="2023-07-13T20:50:37-05:00"
                          Version="3.0">
  <Inventories HotelCode="Property_1">
    <Inventory>
      <StatusApplicationControl Start="2023-07-18"
                                End="2023-07-23"
                                InvTypeCode="RoomID_1"/>
      <InvCounts>
        <InvCount Count="0" CountType="2"/>
      </InvCounts>
    </Inventory>
  </Inventories>
</OTA_HotelInvCountNotifRQ>

响应

语法

OTA_HotelInvCountNotifRS 消息使用以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountNotifRS xmlns="http://www.opentravel.org/OTA/2003/05"
                          TimeStamp="timestamp"
                          EchoToken="echo_token"
                          Version="3.0">
  <!-- Either Success or Errors will be populated. -->
  <Success/>
  <Errors>
    <Error Type="12" Status="NotProcessed" ShortText="issue_code">issue_description</Error>
  </Errors>
</OTA_HotelInvCountNotifRS>

元素和属性

OTA_HotelInvCountNotifRS 消息具有以下元素和属性:

元素 / @Attribute 出现次数 类型 说明
1 Complex element 对有空/忙碌信息做出响应的根元素。
OTA_HotelInvCountNotifRS / @TimeStamp 1 DateTime 相应消息的创建日期和时间。
OTA_HotelInvCountNotifRS / @EchoToken 1 string 关联的 OTA_HotelInvCountNotifRQ 消息中的唯一标识符。
OTA_HotelInvCountNotifRS / Success 0..1 Success 表示 OTA_HotelInvCountNotifRQ 消息已成功处理。

每条消息中都包含 <Success><Errors>

OTA_HotelInvCountNotifRS / Errors 0..1 Errors 一个容器,用于存放处理 OTA_HotelInvCountNotifRQ 消息时遇到的一个或多个问题。

每条消息中都包含 <Success><Errors>

OTA_HotelInvCountNotifRS / Errors / Error 1..n Error 处理 OTA_HotelInvCountNotifRQ 消息时遇到的错误的说明。如需详细了解这些错误,请参阅Feed 状态错误消息
OTA_HotelInvCountNotifRS / Errors / Error / @Type 1 integer 与错误关联的 OpenTravel Alliance EWT(错误警告类型)。仅使用值 12 (Processing exception)
OTA_HotelInvCountNotifRS / Errors / Error / @Code 1 integer 与错误关联的 OpenTravel Alliance ERR(错误代码)。 仅使用值 450 (Unable to process)
OTA_HotelInvCountNotifRS / Errors / Error / @Code 1 enum 原始请求的状态。仅使用值 NotProcessed
OTA_HotelInvCountNotifRS / Errors / Error / @ShortText 1 string 问题的 Google 标识符。如需详细了解这些错误,请参阅Feed 状态错误消息

示例

成功

以下是成功处理 OTA_HotelInvCountNotifRQ 消息的响应。

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountNotifRS xmlns="http://www.opentravel.org/OTA/2003/05"
                          TimeStamp="2023-07-23T20:50:37-05:00"
                          Version="3.0">
  <Success/>
</OTA_HotelInvCountNotifRS>

错误

以下是因错误而未处理 OTA_HotelInvCountNotifRQ 消息的响应。

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelInvCountNotifRS xmlns="http://www.opentravel.org/OTA/2003/05"
                          TimeStamp="2023-07-23T20:50:37-05:00"
                          Version="3.0">
  <Errors>
    <Error Type="12" Code="450" Status="NotProcessed" ShortText="8001">Example</Error>
  </Errors>
</OTA_HotelInvCountNotifRS>