OTA 酒店通知计数

请求

语法

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 一致。酒店 ID 也列在 Hotel Center 中。
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 房源(客房类型)的唯一标识符。此值会映射到 Transactions(Property Data) 消息中的 <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>