价格和客房空房情况(交易)XML 参考

本页提供了关于基于 XML 的交易消息的参考信息。

<Transaction>

事务消息的根元素是 <Transaction>。它是一个容器,用于存储有关会议室和套餐的描述性信息,以及客房和套餐的价格和可用性。

<Transaction> 元素显示在事务消息 XML 层次结构中的以下位置:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

使用 <Transaction> 作为根元素的消息至少需要一个子元素。事务消息可以具有任意数量的子元素,只要消息总大小不超过 100 MB 即可。

语法

<Transaction> 元素使用以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="timestamp" id="transaction_ID">

  <!-- Defines data about a room or package (Room Bundle) -->
  <PropertyDataSet>
    ...
  </PropertyDataSet>

  <!-- Updates/sets prices and availability for rooms and Room Bundles -->
  <!-- (Also removes itineraries from inventory) -->
  <Result>
    ...
  </Result>

</Transaction>

属性

<Transaction> 元素具有以下属性:

特性 是否必需? 类型 说明
id Required 字符串 每条交易消息的唯一标识符。
partner Optional string 交易消息所针对的合作伙伴账号。如果您的后端为多个合作伙伴账号提供价格 Feed,您通常可以使用这种方式。此字符串值是 Hotel Center 帐号设置页面上列出的“合作伙伴密钥”值。
timestamp Required DateTime

交易消息的发送时间。

系统会处理在之前 24 小时内发送的任何时间戳的消息,并舍弃那些未发送的消息。

消息按 timestamp 顺序(而不是按接收顺序)处理。例如,在时间戳为 2019-05-03 14:10:00 的消息之后收到的时间戳为 2019-05-03 14:09:00 的价格更新仍将按顺序处理,并且将使用时间戳为 2019-05-03 14:10:00 的消息中的价格。

子元素

<Transaction> 元素具有以下子元素:

子元素 是否必需? 类型 说明
<PropertyDataSet> Optional* <PropertyDataSet>

描述特定客房和客房套餐。您通常在单独的 Transaction 消息中使用此元素来定义客房套餐的共享值,并减小 Transaction 消息的大小。

<Result> Optional* <Result>

客房行程的价格数据,或为房源定义客房套餐和其他类型的客房的 <RoomBundle> 元素。<Result> 元素还可用于将行程从库存中移除。

* 至少需要 <PropertyDataSet><Result> 中的一个。

示例

房间数据

以下示例定义了 Transaction 消息中的会议室数据:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>5440OF</RoomID>
      <Name>
        <Text text="Single King Bed Room" language="en"/>
        <Text text="Simple Lit de Roi" language="fr"/>
      </Name>
      <Description>
        <Text text="One king bed with pillowtop mattresses, 300-thread-count linens,
          and down comforters (bedspreads). City view. 300 square feet. Desk with
          rolling chair. Multi-line phone with voice mail. Cable/satellite TV with
          complimentary HBO and pay movies." language="en"/>
        <Text text="Un très grand lit avec matelas à plateau-coussin, ..." language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Bathroom View" language="en"/>
          <Text text="La salle de baines" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Capacity>4</Capacity>
    </RoomData>
  </PropertyDataSet>
</Transaction>

价格数据

以下示例定义了交易消息中的价格数据:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
  </Result>
  <Result>
    <Property>052213</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">299.98</Baserate>
    <Tax currency="USD">26.42</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="otto"/>
      <PointOfSale id="simon"/>
    </AllowablePointsOfSale>
  </Result>
</Transaction>

每晚价格

以下示例定义了从 2023 年 6 月 7 日开始的 1 到 7 晚的价格数据:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-08-24T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">209.99</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">419.98</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>3</Nights>
    <Baserate currency="USD">614.97</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>4</Nights>
    <Baserate currency="USD">819.96</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>5</Nights>
    <Baserate currency="USD">999.95</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>6</Nights>
    <Baserate currency="USD">1193.94</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>7</Nights>
    <Baserate currency="USD">1259.93</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
</Transaction>


基本费率和条件式费率

以下示例展示了包含基本费率和条件费率的 Transaction 消息:

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>1</Nights>

    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>

    <Rates>
      <!-- The rate_rule_id is required when using conditional rates -->
      <Rate rate_rule_id="mobile">
        <!-- Override base rate and taxes for conditional rates -->
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <!-- NOTE: OtherFees is inherited from the above setting -->
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

移除广告资源

以下示例从产品目录中移除某酒店的若干产品目录(几个不同日期的 1 晚住宿):

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-05-23T16:20:00-04:00" id="42">
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-23</Checkin>
    <Nights>1</Nights>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-24</Checkin>
    <Nights>1</Nights>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
  <!---Sending <Baserate> is optional with <Unavailable> -->
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-25</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">-1</Baserate>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
</Transaction>

<PropertyDataSet>

<Transaction> 消息中房间和套餐(或房间包)信息的容器。在酒店上设置的值会覆盖在合作伙伴上设置的值。 Google 会存储此信息,因此您无需在每次发送价格更新时都定义此信息。

<PropertyDataSet> 元素显示在事务消息 XML 层次结构中的以下位置:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>  // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

如需了解详情,请参阅会议室套餐元数据

语法

<PropertyDataSet> 元素使用以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet>
    <!-- (Required) ID that matches the Hotel List Feed -->
    <Property>hotel_ID</Property>

    <!-- (Optional) Defines metadata about a room -->
    <RoomData>
      ...
    </RoomData>

    <!-- (Optional) Defines package metadata to be paired with rooms (Room Bundles) -->
    <PackageData>
      ...
    </PackageData>
  </PropertyDataSet>
  ...
</Transaction>

属性

<PropertyDataSet> 元素没有属性。

子元素

<PropertyDataSet> 元素具有以下子元素:

子元素 是否必需? 类型 说明
<PackageData> Optional* <PackageData> 描述 Room Bundle。此数据与合作伙伴和酒店相关联,但不会与行程相关联。此元素与 <RoomData> 类似,但它描述了不属于实际房间说明的设施和术语。

您可以在价格更新中引用套餐 ID。

如需了解详情,请参阅客房套餐元数据

<Property> Required string 适用相关数据的酒店的 ID。此元素的值必须是与您的酒店列表 Feed 中的商家信息 <id> 匹配的字符串。
<RoomData> Optional* <RoomData> 描述房间。此数据与合作伙伴和酒店相关联,但不会与行程相关联。

您可以在价格更新中引用客房 ID。

* 至少需要 <PackageData><RoomData> 中的一个。

示例

Room 和软件包数据

以下示例显示了 <PropertyDataSet> 中的房间和套餐数据:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

发送此客房和客房套餐的价格和空房情况时,您可以在价格消息中引用客房和套餐 ID。这样,您不仅可以大幅缩减消息的大小,还可以减少由于数据重复而可能遇到的错误数量。如需了解详情,请参阅 Room 软件包元数据

<RoomData>

定义有关客房以及客房套餐且与行程无关的元数据(因为客房套餐是客房及其他设施)。使用 <RoomData> 可减少 Price Feed 中重复的描述性数据。

<RoomData> 元素显示在事务消息 XML 层次结构中的以下位置:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

<RoomData> 元素包含与合作伙伴和酒店相关的信息,但不包含与行程相关的信息。预期用途适用于所有非行程数据。

<RoomData> 元素与 <PackageData> 类似,但它描述的是物理房间,而不是套餐的设施和条款。您可以结合使用 <RoomData><PackageData> 来提供客房套餐的详细信息。对于不属于软件包的各个房间,请仅使用 <RoomData>

您可以为同一房间或 Room Bundle 同时定义 <RoomData><PackageData> 元素。当 Google 在搜索结果中显示该房间或软件包时,将会包含两者的说明(用连字符分隔)。

如需了解详情,请参阅会议室套餐元数据

语法

<RoomData> 元素使用以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet>
    ...
    <RoomData>
      <RoomID>room_ID</RoomID>

      <Name>
        <Text text="room_name" language="language_code"/>
        ...
      </Name>

      <Description>
        <Text text="room_description" language="language_code"/>
        ...
      </Description>

      <Capacity>max_number_of_occupants</Capacity>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults, children, or seniors --></OccupancyDetails>
      <OccupancySettings>
        <MinOccupancy>min_number_of_occupants</MinOccupancy>
        <MinAge>min_age_of_occupants</MinAge>
      </OccupancySettings>

      <PhotoURL>
        <Caption>
          <Text text="photo_description" language="language_code"/>
          ...
        </Caption>
        <URL>photo_location</URL>
      </PhotoURL>
      <RoomFeatures>
        ...
      </RoomFeatures>
    </RoomData>
    ...
  </PropertyDataSet>
</Transaction>

属性

<RoomData> 元素没有属性。

子元素

<RoomData> 元素具有以下子元素:

子元素 是否必需? 类型 说明
<Capacity> Optional integer 客房可以实际容纳的房客数量上限。对于会议室,可容纳人数大于或等于入住人数。

指定后,此值必须等于或大于 <Occupancy> 元素的值(特定房间的预期房客数量)。例如,大型套件的 <Capacity> 可能是 6,但其 <Occupancy> 却是 4。

<Capacity> 的值必须是 1-20(含)之间的正整数。

<Description> Optional Object 房间的详细说明。此元素应包含其他元素或 <Name> 元素未描述的信息。在指定房间的说明时,不应全部使用大写字母。

<Description> 元素接受单个子元素 <Text>,该子元素具有以下两个必需属性:

  • text:房间的详细说明。
  • language:由两个字母组成的语言代码;例如 fr

为您的广告或免费预订链接可能会显示的每种语言分别使用单独的 <Text> 元素(language 属性的值不同)。

以下示例显示了法语和英语版本的房间说明:

<Description>
  <Text text="Two queen-sized beds" language="en"/>
  <Text text="Deux lits de la reine" language="fr"/>
</Description>
<Name> Required string 会议室类别的名称。此值应与酒店着陆页(以前称为销售终端)上显示的值一致。请勿将此元素的值全部设为大写字母。

此元素接受一个子元素 <Text>,该子元素具有以下两个必需属性:

  • text:房间的名称。
  • language:由两个字母组成的语言代码;例如 fr

为您的广告或免费预订链接可能会显示的每种语言分别使用单独的 <Text> 元素(language 属性的值不同)。

以下示例显示了法语和英语版本的房间名称:

<Name>
  <Text text="Standard Double Room" language="en"/>
  <Text text="Le chambre double" language="fr"/>
</Name>
<Occupancy> Optional integer 客房适合入住的最多房客数量。 例如,大型套房可能实际上可容纳 6 位房客(可容纳 6 位客人),但最多只可供 4 位客人入住。

此值必须小于或等于 <Capacity> 元素(即房间可容纳的人数)。

<Occupancy> 的值必须是 1-99(含)之间的正整数。

<Occupancy> 可附带 <OccupancyDetails>,后者用于指定访客的类型(成人或儿童)。如需了解子元素的语法和说明,请参阅 <OccupancyDetails>

<OccupancySettings> Optional Object 可用于限制或修改会议室入住人数要求的设置。

<OccupancySettings> 元素接受以下子元素:

  • <MinOccupancy>:一个房间可以入住的最少房客数量。例如,如果设为 2,则无法为单个邀请对象预订此会议室。

    <MinOccupancy> 的值必须是 1-99(含)之间的正整数。

  • <MinAge>:入住客房的所有房客的最低年龄。例如,如果设为 18,则只有所有邀请对象均已年满 18 周岁的群组才能预订此会议室。

    <MinAge> 的值必须是 0 到 99(含 0 和 99)之间的正整数。

<OccupancySettings>
  <MinOccupancy>2</MinOccupancy>
  <MinAge>16</MinAge>
</OccupancySettings>

并非所有子元素都需要包含在内。

<PhotoURL> Optional Object 给定房间或房间包的照片的网址和可选图片说明。您可以为一个房间或 Room Bundle 指定多个 <PhotoURL>。每张照片网址都必须位于自己的 <PhotoURL> 中。

该元素采用以下子元素:

  • <URL>:指定照片的位置。该位置应为公开位置(不在防火墙后),并且应包含协议(例如 https://)。每个 <PhotoURL> 仅使用一个 <URL>
  • <Caption>:定义照片的说明。此元素接受一个子元素 <Text>,该子元素具有两个必需属性:textlanguagetext 属性是图片说明,language 属性指定双字母语言代码,例如 en

例如:

<PhotoURL>
  <URL>https://www.example.com/static/bar/image1234.jpg</URL>
  <Caption>
    <Text text="A bright and breezy way to enjoy your mornin'
      cuppa tea." language="en"/>
    <Text text="Une façon lumineuse et aérée pour profiter
      de votre journée tasse de thé." language="fr"/>
  </Caption>
</PhotoURL>
<PhotoURL>
  <URL>https://www.foo.com/static/bar/image5678.jpg</URL>
  <Caption>
    <Text text="Or, perhaps you prefer coffee." language="en"/>
    <Text text="Ou peut-être préférez-vous le café." language="fr"/>
  </Caption>
</PhotoURL>
<RoomFeatures> Optional <RoomFeatures> 包含客房设施的相关信息。
<RoomID> Required string 会议室的唯一 ID。使用此 ID 将客房数据与价格更新中的 <Result> 块进行匹配。如需了解详情,请参阅 Room 软件包元数据。(在以内嵌方式定义房间数据时,您也可以使用此 ID 在单个 Transaction 消息中引用公共房间定义。)

示例

房间数据

以下示例定义了房间数据:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>5440OF</RoomID>
      <Name>
        <Text text="Single King Bed Room" language="en"/>
        <Text text="Simple Lit de Roi" language="fr"/>
      </Name>
      <Description>
        <Text text="One king bed with pillowtop mattresses, 300-thread-count linens,
          and down comforters (bedspreads). City view. 300 square feet. Desk with
          rolling chair. Multi-line phone with voice mail. Cable/satellite TV with
          complimentary HBO and pay movies." language="en"/>
        <Text text="Un très grand lit avec matelas à plateau-coussin, ..." language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Bathroom View" language="en"/>
          <Text text="La salle de baines" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Capacity>4</Capacity>
    </RoomData>
  </PropertyDataSet>
</Transaction>

客房和套餐元数据

以下示例定义了房间和套餐元数据:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

多个客房套餐

以下示例定义了多个 Room 软件包的 Room 和软件包元数据:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <!-- A transaction message with room types result. -->
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
      <RoomID>single</RoomID>
      <Name>
        <Text text="Single room" language="en"/>
        <Text text="Chambre simple" language="fr"/>
      </Name>
      <Description>
        <Text text="A single room" language="en"/>
        <Text text="Le chambre simple" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <PhotoURL>
        <URL>http://www.foo.com/static/bar/image1235.jpg</URL>
      </PhotoURL>
      <Capacity>2</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>double</RoomID>
      <Name>
        <Text text="Double room" language="en"/>
        <Text text="Chambre double" language="fr"/>
      </Name>
      <Occupancy>1</Occupancy>
    </RoomData>
    <PackageData>
      <PackageID>refundbreakfast</PackageID>
      <Name>
        <Text text="Refundable Room with Breakfast" language="en"/>
        <Text text="Chambre remboursable avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Continental Breakfast" language="en"/>
        <Text text="Petit déjeuner continental" language="fr"/>
      </Description>
      <ChargeCurrency>hotel</ChargeCurrency>
      <Refundable available="1" refundable_until_days="3"/>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
    <PackageData>
      <PackageID>prepaid</PackageID>
      <Name>
        <Text text="Nonrefundable" language="en"/>
        <Text text="Non remboursable" language="fr"/>
      </Name>
      <Description>
        <Text text="Blah blah blad" language="en"/>
        <Text text="Le blah blah blad" language="fr"/>
      </Description>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="0"/>
    </PackageData>
  </PropertyDataSet>
</Transaction>

<RoomFeatures>

定义在会议室中找到的设施。

<RoomFeatures> 元素显示在事务消息 XML 层次结构中的以下位置:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
            + <RoomFeatures>

语法

<RoomFeatures> 元素使用以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet ... >
    ...
    <RoomData>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>[western|japanese|japanese_western]</JapaneseHotelRoomStyle>
        <Beds>
           <Bed size="[single|semi_double|double|queen|king]">
             <Width unit="cm" number="width"/>
             <Length unit="cm" number="length"/>
           </Bed>
           <!-- Include with any additional beds. -->
        </Beds>
        <Suite/>
        <Capsule/>
        <Roomsharing>[shared|private]</Roomsharing>
        <Outdoor/>
        <MobilityAccessible/>
        <Smoking>[smoking|non_smoking]</Smoking>
        <BathAndToilet relation="[together|separate]">
          <Bath bathtub="[false|true]" shower="[false|true]"/>
          <Toilet electronic_bidet="[false|true]" mobility_accessible="[false|true]"/>
        </BathAndToilet>
        <OpenAirBath/>
        <AirConditioning/>
        <Balcony/>
        <Views>
          <!-- (Optional) Defines the type of views from the room. -->
          <!-- Example: <OceanView/> -->
        </Views>

      </RoomFeatures>
      ...
    </RoomData>
    ...
  </PropertyDataSet>
</Transactions>

属性

<RoomFeatures> 元素没有属性。

子元素

<RoomFeatures> 元素具有以下子元素:

子元素 是否必需? 类型 说明
<JapaneseHotelRoomStyle> Optional enum

表示日式酒店客房的样式。

有效值包括:

  • western:配有床的西式客房。
  • japanese:配有日式床垫的日式客房。
  • japanese_western:日式西式客房,配有西式床和日式日式床垫。
<Beds> Optional Object 包含的 <Bed> 与聊天室中的一样多。请注意,此处不应统计日式日式床垫。

每个 <Bed> 都具有以下属性:

  • size(可选):有效值为 singlesemi_doubledoublequeenking
每个 <Bed> 都具有以下子元素:
  • <Width>(可选):指定床型的宽度。属性 unit 的值为 cm,属性 number 的值为整数厘米。
  • <Length>(可选):指定睡床长度。 属性 unit 的值为 cm,属性 number 的值为整数厘米。
示例:
<Beds>
  <Bed size="double">
    <Width unit="cm" number="140"/>
    <Length unit="cm" number="195"/>
  </Bed>
  <Bed/> <!-- Size unknown -->
</Beds>
<Suite> Optional empty 如果此房间是套房,请提供此元素。
<Capsule> Optional empty 如果房间是胶囊房间,请提供此元素。
<Roomsharing> Optional enum 此会议室是否与其他房客(例如所有者或其他房客)共享。有效值为 sharedprivate
<Outdoor> Optional empty 如果房间是没有固定墙壁、管道和空调的户外住宿,请提供此元素。例如,酒店客房不属于户外住宿,而房客入住帐篷的露营地,以及房客自带房车的房车营地为户外住宿。
<MobilityAccessible> Optional empty 如果此会议室是无障碍设施,请提供此元素。
<Smoking> Optional enum 此房间是无烟房间还是吸烟室。有效值为 non_smokingsmoking
<BathAndToilet> Optional Object 包含房间内浴室和卫生间的相关信息。

该属性为:

  • relation(可选):指示浴室和马桶之间的相对放置方式。有效值为 together(浴室和卫生间都位于同一房间内(如浴室),彼此相邻)和 separate(浴室和卫生间都有专用空间)。如果房间没有浴缸和马桶,则不得设置此属性。

该元素可选择接受以下子元素:

  • <Bath>(可选):此元素的存在表示房间内有浴室。

    这些属性包括:

    • bathtub(可选):表示浴缸的浴室里有浴缸。有效值为 0(或 false)和 1(或 true)。
    • shower(可选):表示浴室配有淋浴间。有效值为 0(或 false)和 1(或 true)。
  • <Toilet>(可选):此元素的存在表示此房间配备卫生间。

    这些属性包括:

    • electronic_bidet(可选):表示马桶配有电子马桶。 有效值为 0(或 false)和 1(或 true)。
    • mobility_accessible(可选):表示厕所无障碍。有效值为 0(或 false)和 1(或 true)。

例如:

<BathAndToilet relation="separate">
  <Bath bathtub="1" shower="1"/>
  <Toilet
    electronic_bidet="1"
    mobility_accessible="1"/>
</BathAndToilet>
<OpenAirBath> Optional empty 如果房间内有私人露天浴池,请提供此元素。
<AirConditioning> Optional empty 如果房间内有空调,请提供此元素。
<Balcony> Optional empty 如果房间内有阳台或阳台,请提供此元素。
<Views> Optional Object 有效选项包括:

<AirportView/>
<BayView/>
<BeachView>/>
<CastleView/>
<CityView/>
<CountrysideView/>
<CourtyardView/>
<DuneView/>
<ForestView/>
<GardenView/>
<GolfCourseView/>
<HarborView/>
<LagoonView/>
<LakeView/>
<MarinaView/>
<MountainView/>
<NatureView/>
<OceanView/>
<ParkView/>
<PartialOceanView/>
<PisteView/>
<PoolView/>
<PyramidView/>
<RiverView/>
<StreetView/>

示例

JapaneseHotelRoomStyle 没有默认值。省略某个值不会导致 XML 错误,但当用户按房间样式或床位进行过滤时,您的商家信息不会显示在搜索结果中。

两张单人床

以下示例展示了如何使用 <RoomFeatures>

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>western</JapaneseHotelRoomStyle>
        <Beds> <!-- Two single beds -->
          <Bed size="single">
            <Width unit="cm" number="97"/>
            <Length unit="cm" number="195"/>
          </Bed>
          <Bed size="single">
            <Width unit="cm" number="97"/>
            <Length unit="cm" number="195"/>
          </Bed>
        </Beds>
        <Suite/>
        <Capsule/>
        <Roomsharing>private</Roomsharing>
        <Outdoor/>
        <MobilityAccessible/>
        <Smoking>non_smoking</Smoking>
        <BathAndToilet relation="separate">
          <Bath bathtub="1" shower="1"/>
          <Toilet electronic_bidet="1" mobility_accessible="1"/>
        </BathAndToilet>
        <OpenAirBath/>
        <AirConditioning/>
        <Balcony/>
        <Views>
          <LakeView/>
          <MarinaView/>
          <BeachView/>
          <ForestView/>
          <MountainView/>
          <NatureView/>
        </Views>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

两张双人床

下面是一个 western 样式的日式客房,配有两张 double 床。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>western</JapaneseHotelRoomStyle>
        <Beds> <!-- Two double beds-->
          <Bed size="double"></Bed>
          <Bed size="double"></Bed>
        </Beds>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>


日式(不睡床)

下面是一个不设床的日式房间示例。japanese 式客房不需要提供床信息。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese</JapaneseHotelRoomStyle>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

日式西式床铺

下面是一个 japanese_western 样式的房间,配备了尺寸为 king 的床。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese_western</JapaneseHotelRoomStyle>
        <Beds>
          <Bed size="king"></Bed>
        </Beds>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

如果合作伙伴没有 japanese_western 房间内的床数信息,请遵循以下示例:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese_western</JapaneseHotelRoomStyle>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

<PackageData>

定义有关房源客房套餐且与行程无关的元数据。 此元素包含与合作伙伴和酒店相关的信息,但不包含与行程相关的信息。预期目的是一次性定义所有非行程数据,并从行程数据中引用这些数据。

<PackageData> 元素显示在事务消息 XML 层次结构中的以下位置:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

<PackageData> 元素与 <RoomData> 类似,但它描述的是不在实体房间说明中的费率功能和术语。您可以结合使用 <RoomData><PackageData> 来提供客房套餐和房价功能的详细信息。对于不属于软件包的各个房间,请仅使用 <RoomData>

您可以为同一房间或 Room Bundle 同时定义 <RoomData><PackageData> 元素。当 Google 在搜索结果中显示该房间或软件包时,将会包含两者的说明(用连字符分隔)。

如果您更新某个属性的单个 <PackageData> 元素,则必须更新该属性的所有 <PackageData><RoomData> 元素。每个 <PropertyDataSet> 都会被视为有关属性的所有数据,并覆盖所有现有数据。

如需了解详情,请参阅会议室套餐元数据

语法

<PackageData> 元素使用以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet ... >
    <PackageData>
      <PackageID>package_ID</PackageID>
      <Name>
        <Text text="package_name" language="language_code"/>
        ...
      </Name>
      <Description>
        <Text text="package_description" language="language_code"/>
        ...
      </Description>
      <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
      <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails><!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>
      <!-- For these next 3 elements, boolean_value can be 0/1 or true/false -->
      <BreakfastIncluded>boolean_value</BreakfastIncluded>
      <InternetIncluded>boolean_value</InternetIncluded>
      <ParkingIncluded>boolean_value</ParkingIncluded>
      <PhotoURL>
        <Caption>
          <Text text="photo_description" language="language_code"/>
          ...
        </Caption>
        <URL>photo_location</URL>
      </PhotoURL>
      ...
      <Meals>
        <Breakfast
          included="[true|false]" buffet="[true|false]"
          in_room="[true|false]" in_private_space="[true|false]"/>
        <Dinner
          included="[true|false]" buffet="[true|false]"
          in_room="[true|false]" in_private_space="[true|false]"/>
      </Meals>
      <CheckinTime>checkin_time</CheckinTime>
      <CheckoutTime>checkout_time</CheckoutTime>
      <MembershipBenefitsIncluded>
        <ProgramName>
          <Text language="en" text="Special Rewards">
        </ProgramName>
        <ProgramLevel>
          <Text language="en" text="Platinum">
        </ProgramLevel>
      </MembershipBenefitsIncluded>
      <OnPropertyCredit>
        <Amount currency="USD">123.45</Amount>
      </OnPropertyCredit>
    </PackageData>
    <!-- a PackageID with a MilesIncluded rate feature -->
    <PackageData>
      <PackageID>room_with_miles</PackageID>
      <Name>
       <Text text="Room with Bundled Miles" language="en">
      </Name>
      <ChargeCurrency>hotel </ChargeCurrency>
      <MilesIncluded>
        <NumberOfMiles>1000 </NumberOfMiles>
        <Provider>
          <Text language="en" text="United Airlines">
        </Provider>
      </MilesIncluded>
    </PackageData>
    ...
    ...
  </PropertyDataSet>
  ...
</Transaction>

属性

<PackageData> 元素没有属性。

子元素

<PackageData> 元素具有以下子元素:

子元素 是否必需? 类型 说明
<BreakfastIncluded> Optional boolean 指定此套餐是否包含早餐以及相应的房价。有效值为 0(或 false)和 1(或 true)。

最好使用 <Meals>,而不是 <BreakfastIncluded>

<ChargeCurrency> Optional enum 用户支付预订费用的时间和地点。此元素使用的语法与 <Result> 中的 <ChargeCurrency> 相同。

默认值为 web

<CheckinTime> Optional Time 尽可能早入住时间。 时间必须小于酒店当地时间的 24:00。
<CheckoutTime> Optional Time 酒店当地时间的最晚退房时间。
<Description> Optional Object 软件包的详细说明。此元素应包含其他元素或 <Name> 元素未描述的信息。在指定房间的说明时,不应全部使用大写字母。

<Description> 元素接受一个子元素 <Text>,该子元素有两个必需属性:textlanguagetext 属性是说明,language 属性指定两个字母的语言代码,如以下示例所示:

<Description>
  <Text text="Two breakfast buffet certificates for
    each night of stay." language="en"/>
  <Text text="Deux certificats petit-déjeuner buffet
    pour chaque nuit de séjour." language="fr"/>
</Description>
<InternetIncluded> Optional boolean 如果套餐包含免费互联网接入服务,而其他套餐不包含该酒店设施。如果酒店为所有客房提供免费互联网,请勿为客房套餐设置此元素。此元素不适用于客房内无法使用的有线互联网或无线互联网。有效值为 0(或 false)和 1(或 true)。
<Meals> Optional Object 包含此包裹中的餐点的相关信息。

<Meals> 元素接受两个可选的子元素(<Breakfast><Dinner>),这两个子元素具有以下属性:

  • included(必需):如果房价包含早餐/晚餐,则设置为 1(或 true);否则设置为 0false
  • in_room(可选):如果房客可以选择在入住的房间内享用早餐/晚餐,请设置为 1(或 true);否则设置为 0(或 false)。
  • in_private_space(可选):如果房客可以选择在可以避免与其他房客接触的空间(入住的房间除外)享用早餐/晚餐,则设置为 1(或 true);否则设置为 0(或 false)。
  • buffet(可选):如果早餐/晚餐作为自助餐提供,则设置为 1(或 true);否则设置为 0(或 false)。

仅当 included 为 true 时,才会使用可选属性。

如需让膳食过滤器(no mealsbreakfast onlydinner onlybreakfast and dinner)发挥作用,需要为 <Breakfast><Dinner> 提供 included 属性。

<Name> Required string 软件包的名称。此值应与酒店着陆页上显示的值一致。请勿将此元素的值全部设为大写字母。

此元素接受一个子元素 <Text>,该子元素有两个属性:textlanguagetext 属性是说明,language 属性指定两个字母的语言代码,如以下示例所示:

<Name>
  <Text text="Bed and Breakfast" language="en"/>
  <Text text="Lit et petit déjeuné" language="fr"/>
</Name>
<Occupancy> Optional integer 客房套餐面向的房客数量上限。 例如,大型套房可能实际上可容纳 6 位客人,但最多只可供 4 位客人入住。

此值必须小于或等于 <Capacity> 元素(即房间可容纳的人数)。

<Occupancy> 的值必须是 1-99(含)之间的正整数。

如果同时在 <RoomBundle><PackageData> 中指定此元素,则 <RoomBundle> 中的值优先。

注意

<Occupancy> 可附带 <OccupancyDetails>,后者用于指定访客的类型(成人或儿童)。如需了解子元素的语法和说明,请参阅 <OccupancyDetails>
<PackageID> Required string

文件包的唯一 ID。使用此 ID 将客房套餐数据与价格更新中的 <Result> 块进行匹配。如需了解详情,请参阅 Room 软件包元数据

(在定义内嵌的 Room Bundle 数据时,您也可以使用此 ID 引用单个 Transaction 消息中使用的常用 Room Bundle 定义。)

<ParkingIncluded> Optional boolean 客房套餐是否包含免费停车,此酒店将免费停车。请勿为提供免费停车位的酒店指定此元素的值。

有效值为 0(或 false)和 1(或 true)。默认值为 false

<PhotoURL> Optional Object (与 <RoomData> 中的 <PhotoURL> 相同,但适用于软件包(例如餐点照片)。)
<Refundable> Optional Object 允许将房价列为全额退款或提供免费取消服务。如果未提供,则不会显示任何退款信息。 <PackageData> 级别的退款政策会覆盖 <Result> 级别的退款政策。<Rates> 级别的退款政策会覆盖 <PackageData> 级别的退款政策。您还可以通过替代选项向用户突出显示可退款价格,而无需直接修改交易消息架构。如需详细了解这些选项,请参阅退款价格政策

以下示例展示了已设置其所有属性的 <Refundable> 元素:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

注意:我们建议设置所有属性。如果一个或多个属性未设置,系统会生成 Feed 状态警告消息。

如果您未设置任何属性,则房价不会显示为可退款。这些属性包括:

  • available:(必需)设置为 1true,以指明费率是否允许全额退款;否则设置为 0false
  • refundable_until_days:(如果 availabletrue,则为必需)指定在入住前多少天可以申请全额退款。refundable_until_days 的值必须是 0 到 330(含)之间的整数。
  • refundable_until_time:(如果 availabletrue,则强烈建议提供)指定接受全额退款请求的最晚时间(酒店的当地时间)。例如,可与 refundable_until_days 结合使用以指定“退款在入住前两天下午 4 点之前均可退款”。如果未设置 refundable_until_time,则该值默认为午夜。

    此属性的值采用时间格式。

设置属性时,请注意以下事项:

  • 如果未设置 availablerefundable_until_days,则费率不会显示为可退款。
  • 如果 available0false,则忽略其他属性。即使设置了另外一个或两个属性,房价也不会显示为可退款。
<MembershipBenefits Included> Optional boolean 房价包含住宿期间的贵宾等级福利。包含以下参数:
  • ProgramName:精英等级计划的名称
  • ProgramLevel:课程的级别。例如:“黄金”。
  • NightlyValue (optional):福利的每晚价值。
<CarRentalIncluded> Optional boolean 房价包含入住期间免费租车的费用。
<MilesIncluded>> Optional boolean 费率包含飞行常客奖励计划里程。参数包括:
  • NumberofMiles:每条行程的英里数。
  • Provider:提供飞行常客奖励计划。
<OnPropertyCredit> Optional boolean 房价包含酒店内赠金(餐饮、度假村、水疗中心等)。参数:
  • Amount:每个行程的赠金价值(以本地货币计算)。
<AirportTransportationIncluded> Optional Object 房价包含往返附近机场的免费交通费用。可选的 direction 属性用于指定交通的方向。有效值包括:
    from:提供从机场到房源的接送服务。如果未指定方向,则此值为默认值。to:提供从酒店到机场的接送服务。 round_trip:提供往返机场的接送服务。

示例

单人间套餐

以下示例定义了一个客房套餐,入住人数为 2 人(一名成人和一名儿童),包含早餐:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>1</NumAdults>
        <Children>
          <Child age="17"/>
        </Children>
      </OccupancyDetails>
      <PackageID>P54321</PackageID>
      <Name>
         <Text text="Breakfast Included" language="en"/>
         <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Two certificates for continental
          breakfast will be provided." language="en"/>
        <Text text="Deux certificats pour le petit déjeuner
          continental seront fournis." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Room 和软件包元数据

以下示例定义了房间和套餐元数据:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

多个客房套餐

以下示例定义了多个 Room 软件包的 Room 和软件包元数据:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <!-- A transaction message with room types result. -->
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
      <RoomID>single</RoomID>
      <Name>
        <Text text="Single room" language="en"/>
        <Text text="Chambre simple" language="fr"/>
      </Name>
      <Description>
        <Text text="A single room" language="en"/>
        <Text text="Le chambre simple" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <PhotoURL>
        <URL>http://www.foo.com/static/bar/image1235.jpg</URL>
      </PhotoURL>
      <Capacity>2</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>double</RoomID>
      <Name>
        <Text text="Double room" language="en"/>
        <Text text="Chambre double" language="fr"/>
      </Name>
      <Occupancy>1</Occupancy>
    </RoomData>
    <PackageData>
      <PackageID>refundbreakfast</PackageID>
      <Name>
        <Text text="Refundable Room with Breakfast" language="en"/>
        <Text text="Chambre remboursable avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Continental Breakfast" language="en"/>
        <Text text="Petit déjeuner continental" language="fr"/>
      </Description>
      <ChargeCurrency>hotel</ChargeCurrency>
      <Refundable available="1" refundable_until_days="3"/>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
    <PackageData>
      <PackageID>prepaid</PackageID>
      <Name>
        <Text text="Nonrefundable" language="en"/>
        <Text text="Non remboursable" language="fr"/>
      </Name>
      <Description>
        <Text text="Blah blah blad" language="en"/>
        <Text text="Le blah blah blad" language="fr"/>
      </Description>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="0"/>
    </PackageData>
  </PropertyDataSet>
</Transaction>


包含房价的客房套餐

以下示例定义了包含房价功能的客房套餐的客房和套餐元数据:

<Transaction timestamp="2010-04-24T20:44:56-04:00" id="TXNID">
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
     ...
    </RoomData>
<!-- definitions of PackageData types including rate features -->
    <PackageData>
      <PackageID>room_with_addl_benefits</PackageID>
      <Name>
        <Text text="Acme Hotels 2017 Promotion Package" language="en"/>
      </Name>
      <ChargeCurrency>hotel</ChargeCurrency>
      <BreakfastIncluded>1</BreakfastIncluded>
      <MembershipBenefitsIncluded>
        <ProgramName>
          <Text language="en" text="Marriott Rewards"/>
        </ProgramName>
        <ProgramLevel>
          <Text language="en" text="Platinum"/>
        </ProgramLevel>
      </MembershipBenefitsIncluded>
      <OnPropertyCredit>
        <Amount currency="USD">123.45</Amount>
      </OnPropertyCredit>
    </PackageData>
    <PackageData>
      <PackageID>room_with_miles</PackageID>
      <Name>
        <Text text="Room with Bundled Miles" language="en"/>
      </Name>
      <ChargeCurrency>hotel</ChargeCurrency>
      <MilesIncluded>
        <NumberOfMiles>1000</NumberOfMiles>
        <Provider>
          <Text language="en" text="United Airlines"/>
        </Provider>
      </MilesIncluded>
      <AirportTransportationIncluded direction="from"/>
    </PackageData>
  </PropertyDataSet>

<!-- The actual list of prices -->
  <Result>
…
  </Result>
</Transaction>

餐点和照片

以下示例定义了用餐、照片以及入住时间和退房时间的客房和套餐元数据:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <PackageID>PackageID_1</PackageID>
      <Name>
        <Text text="Meals Included" language="en"/>
      </Name>
      <PhotoURL>
        <Caption>
          <Text text="Breakfast" language="en"/>
          <Text text="朝食" language="ja"/>
        </Caption>
        <URL>http://example.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Meals>
        <!-- Guests can choose to have breakfast in their room or in another
        space to avoid contact with other guests. -->
        <Breakfast included="1" in_room="1" in_private_space="1"/>
        <Dinner included="1" buffet="1"/>
      </Meals>
      <CheckinTime>15:00</CheckinTime>
      <CheckoutTime>11:00</CheckoutTime>
    </PackageData>
  </PropertyDataSet>
</Transaction>

早餐

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <PackageID>PackageID_1</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
      </Name>
      <PhotoURL>
        <Caption>
          <Text text="Breakfast" language="en"/>
          <Text text="朝食" language="ja"/>
        </Caption>
        <URL>http://example.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Meals>
        <Breakfast included="true"/>
        <!-- Dinner not included needs to be explicitly specified -->
        <Dinner included="false"/>
      </Meals>
      <CheckinTime>15:00</CheckinTime>
      <CheckoutTime>11:00</CheckoutTime>
    </PackageData>
  </PropertyDataSet>
</Transaction>

<Result>

<Transaction> 消息中用于存储价格和可用性更新的容器。

<Result> 元素显示在事务消息 XML 层次结构中的以下位置:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

使用 <Result> 可设置或更新房价,以及定义可用的空房。此元素中定义的项通常引用 <PackageData><RoomData> 中定义的有关客房或套餐且与行程无关的元数据(例如说明或设施集)。

通常,您会非常频繁地发送包含价格更新的交易消息。您执行此操作的确切方式和频率取决于您的投放模式

您可以在交易消息中使用 <Result> 来移除行程,如移除商品目录中所述。如需详细了解如何使用交易消息更新价格和库存状况,请参阅添加和更新商品目录

单个事务消息可以包含任意数量的 <Result> 元素,只要该消息的大小不超过 100MB 即可。

语法

<Result> 元素使用以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    <!-- Required -->
    <Property>hotel_ID</Property>
    <!-- Required -->
    <Checkin>YYYY-MM-DD</Checkin>
    <!-- Required -->
    <Nights>number_of_nights</Nights>

    <Baserate currency="currency_code">price</Baserate>
    <!-- Only required when <Baserate> contains a real price -->
    <Tax currency="currency_code">tax_amount</Tax>
    <!-- Only required when <Baserate> contains a real price  -->
    <OtherFees currency="currency_code">fee_amount</OtherFees>
    <Refundable available="[false|true]" refundable_until_days="number_of_days"
      refundable_until_time="time"/>

    <RoomID>room_ID</RoomID>
    <PackageID>package_ID</PackageID>
    <ExpirationTime>expiration_time</ExpirationTime>
    <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>

    <Occupancy>max_number_of_intended_occupants</Occupancy>
    <!-- For Baserate, occupancy value must be greater than or equal to 2.
         If a value is not provided for occupancy, it defaults to 2. -->
    <OccupancyDetails>occupancy_info</OccupancyDetails>

    <Rates>...</Rates>

    <RoomBundle>...</RoomBundle>

    <AllowablePointsOfSale>
      <PointOfSale id="landing_page_identifier"/>
      ...
    </AllowablePointsOfSale>

    <Custom[1-5]>custom_value</Custom[1-5]>
  </Result>
  ...
  </Transaction>

属性

<Result> 元素具有以下属性:

特性 是否必需? 类型 说明
mergeable Optional boolean 默认情况下,特定酒店和行程组合的新价格将覆盖 Google 缓存中存在的任何先前(未过期)的价格。借助可合并的属性,您可以将其他价格存储到 Google 的缓存中,而无需删除之前的价格信息。具有上下文响应的实时价格查询将始终将此属性设置为 true(无论您的交易消息响应如何)。

子元素

<Result> 元素具有以下子元素:

子元素 是否必需? 类型 说明
<AllowablePointsOfSale> Optional Object 一个或多个符合酒店条件的着陆页。着陆页是可为最终用户处理预订流程的网站。如需明确包含某些着陆页(并排除其他着陆页),请在着陆页文件中添加一个或多个与 <PointOfSale> 元素的 id 属性匹配的 <AllowablePointsOfSale> 元素。

如果您未添加此元素,着陆页文件中定义的所有着陆页都将被视为可用于预订客房。如需了解详情,请参阅着陆页文件语法

<Baserate> Optional float

住宿的房间价格。此元素的值应反映以下内容:

  • 对于私人单间,请设置您提供的最低的双人入住费率。如果您没有设置双人入住费率且您的账号启用了非双人入住费率,则此处允许提高入住人数。如需启用非双人入住费率,请与我们联系。 此处不允许为单人入住费率,必须在 <Rates> 下设置。
  • 对于共享房间,请将此字段留空并使用<RoomBundle>
  • 此值应为所有晚间的基本价格总和,而不是每晚的平均价格。

当会议室无法用于行程时,应省略 <Baserate> 或设置为 -1,并指定 <Unavailable> 以及任何不可用的已知原因。

如需移除客房套餐,请按照移除客房套餐中的说明操作。

<Baserate> 不得包含任何数字分组符号,例如英文逗号 (,) 或句点 (.)。请始终使用句点 (.) 作为小数点来分隔分数。例如,将 $1,200.40 表示为:

<Baserate currency="USD">1200.40</Baserate>

<Baserate> 元素采用以下可选属性:

  • all_inclusive:一个布尔值,表示此房价是否包含税费及其他费用。通常,对于美国和加拿大最终用户,请将此值设置为 false,并为 <Tax><OtherFees> 元素提供值。如果您使用的是全包价格,且您的价格未针对加拿大用户显示税费和其他费用,则可能不符合在商品详情中展示的条件。

    全包价现已向美国用户显示。

    对于所有其他最终用户,您通常应在基本费率中包含税费和其他费用,并将 all_inclusive 属性的值设置为 true。如需了解详情,请参阅税费和其他费用政策

    默认值为 false

  • currency:由三个字母组成的货币代码。例如,USD 表示美元。
<ChargeCurrency> Optional enum 用户支付预订费用的时间和地点。此元素可在交易消息中使用,该消息位于酒店价格的 <Result> 元素中,或客房套餐的 <PackageData> 块中。

有效值包括:

  • web:系统会在用户预订时在线扣款。此设置为默认值。 实际着陆页由 着陆页文件定义,且可能会受用户的币种、地理位置、语言或其他因素的影响。
  • hotel:用户入住酒店时需要付费。如果必须始终使用酒店的货币付款,请将 <ChargeCurrency> 的值设置为 hotel。实际着陆页不受用户所用币种的影响。
  • deposit:系统会立即向用户收取部分费用,然后在稍后的某个时间点(通常是在用户退房时)收取剩余费用。
  • installments:用户需支付应付总额的初始部分,且应在固定时间段内定期支付设定的余额。

默认值为 web

<Checkin> Required Date 采用日期格式的行程的入住日期。<Nights> 元素和 <Checkin> 元素的组合构成了一次行程。
<Custom[1‑5]> Optional string 定义可用于传递与酒店关联的其他数据的自定义字段。您可以使用以下元素名称传递最多五个自定义值:
  • <Custom1>
  • <Custom2>
  • <Custom3>
  • <Custom4>
  • <Custom5>

<Custom> 元素可让您传递任意数据。例如,您可以在此字段中指定值,着陆页文件随后会使用该值为着陆页构建自定义网址。每个自定义字段的字符数上限为 200。如需了解详情,请参阅着陆页文件

<Rate> 元素中提供的 <Custom> 元素不会继承到 <RoomBundle> 元素。您应在每个 <RoomBundle> 中单独定义 <Custom> 属性。

<ExpirationTime> Optional DateTime 价格被视为已过期的日期和时间(至少 3 小时)。

如果到期时间戳对价格结构来说并不是很重要,我们建议您不要提供到期时间戳。

Google 不会提供任何已过期的价格,并且任何价格已过期的行程都将符合 实时价格查询的条件。

<Nights> Required integer 行程的住宿晚数。<Nights> 元素的值必须是正整数。 <Nights><Checkin> 的组合构成了一个行程。
<OtherFees> Optional float 基本费率以外的费用以及影响客房最终价格的税费。<OtherFees> 元素接受一个必需属性 currency,该属性定义了费用的三个字母货币代码。例如 USD

如果 <Baserate> 大于零,则需要 <OtherFees> 元素。

<Occupancy> Optional integer 指定此房价允许的入住人数上限。当 <Occupancy> 直接显示在 <Result> 下方时,它必须指定 2 或更大的值。<Occupancy> 可附带 <OccupancyDetails>,后者用于指定访客的类型(成人或儿童)。如果未指定访客类型,则假定访客为成人。有关子元素的语法和说明,请参阅 <OccupancyDetails>。如果未提供 <Occupancy> 元素,则入住人数默认为 2

注意:请联系您的支持团队,启用此功能以发送非双人入住价格。

<PackageID> Optional string 软件包的唯一 ID,用于将其映射到预定义的软件包数据。也用于填充 PACKAGE-ID 着陆页变量。 如需了解详情,请参阅 Room 软件包元数据
<Property> Required string 受相关数据(价格、行程、客房套餐或元数据)影响的酒店的 ID。此元素的值必须是字符串。此元素的值必须与您在酒店列表 Feed 中定义的商家信息 <id> 一致。
<Rates> Optional <Rates> 包含一个或多个 <Rate> 块的容器。<Rates> 中的每个 <Rate> 为客房/行程组合定义一个不同的价格。

如果同一客房/行程组合有多个房价,或者不允许在 <Result> 级别指定房价,请使用 <Rates> 元素。例如,您可以为 条件式费率 不公开费率客房套餐中的条件式费率或不同的入住人数定义多个费率。

注意:在 <Result> 中,单人入住费率只能在 <Rates> 中指定。如需提供非双人入住价格,请与我们联系

<Refundable> Optional Object 允许将房价列为全额退款或提供免费取消服务。如果未提供,则不会显示任何退款信息。 <PackageData> 级别的退款政策会覆盖 <Result> 级别的退款政策。<Rates> 级别的退款政策会覆盖 <PackageData> 级别的退款政策。您还可以通过替代选项向用户突出显示可退款价格,而无需直接修改交易消息架构。详细了解退款价格政策

以下示例展示了已设置其所有属性的 <Refundable> 元素:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

注意:我们建议设置所有属性。如果一个或多个属性未设置,系统会生成 Feed 状态警告消息。

如果您未设置任何属性,则房价不会显示为可退款。这些属性包括:

  • available:(必需)设置为 1(或 true)指明房价是否允许全额退款;否则设置为 0(或 false)。
  • refundable_until_days:(如果 availabletrue,则为必需)指定在入住前多少天可以申请全额退款。refundable_until_days 的值必须是 0 到 330(含)之间的整数。
  • refundable_until_time:(如果 availabletrue,则强烈建议提供)指定接受全额退款请求的最晚时间(酒店的当地时间)。例如,可与 refundable_until_days 结合使用以指定“退款在入住前两天下午 4 点之前均可退款”。如果未设置 refundable_until_time,则该值默认为午夜。

    此属性的值采用时间格式。

设置属性时,请注意以下事项:

  • 如果未设置 availablerefundable_until_days,则费率不会显示为可退款。
  • 如果 available0(或 false),则系统会忽略其他属性。即使设置了另外一个或两个属性,房价也不会显示为可退款。
<RoomBundle> Optional <RoomBundle> 用于存放客房实物价格信息的容器、酒店设施的任何包装以及指定酒店和行程的一些购买政策详情。

通常,您可以使用此元素定义基本房间和同一房源内不同类型房间的价格。虽然您可以内嵌定义客房套餐说明,但您应使用单独的 Transaction 消息来定义该信息。Google 将存储元数据,因此您可以在以后的所有价格更新中引用这些元数据,而不是重复该元数据。

<RoomID> Optional string 会议室的唯一 ID,用于将其映射到预定义的房间数据。也用于填充 PARTNER-ROOM-ID 着陆页变量。 如需了解详情,请参阅 Room 软件包元数据
<Tax> Optional float 针对客房最终价格计算的税费。 <Tax> 元素接受一个必需属性 currency,该属性定义了税费的三个字母货币代码。例如 USD。如果 <Baserate> 大于零,则需要 <Tax> 元素。
<Unavailable> Optional Object 表示无法预订行程。用作容器,用于更详细地说明行程不可用的原因。以下一个或多个不可用的原因可能嵌套在 <Unavailable> 标记下:
  • <NoVacancy/>:已没有可供入住的一晚或多晚的客房。
  • <MinNightStay value=N/>:行程低于住宿日期的最短住宿晚数 N
  • <MaxNightStay value=N/>:行程超出了住宿日期内 N 的最长住宿晚数。
  • <MinAdvancePurchase value=N/>:行程低于住宿日期的最短提前预订期限 N
  • <MaxAdvancePurchase value=N/>:行程超出了住宿日期最长提前预订期限 N
  • <ClosedToArrival/>:酒店不允许在行程到达日期入住。
  • <ClosedToDeparture/>:酒店不允许在行程出发日期退房。
  • <PropertyClosed first_open="YYYY-MM-DD" first_closed="YYYY-MM-DD"/>:酒店的部分或全部住宿时间已停业。建议的属性 first_openfirst_closed 会分别指定大于或等于到达日期且酒店开始营业或停业的日期。 对于在到达日期之后关闭的房源,first_open 应等于到达日期,first_closed 应等于房源的关闭日期。对于在入住日期停业的房源,first_closed 应等于入住日期,first_opened 应为房源开业的下一个日期。
  • <NotFetched/>:下游数据源未提供行程价格。
  • <InvalidProperty/>:无法识别请求的媒体资源标识符。
  • <InvalidOccupancy/>:该房源不支持所请求的入住人数。
  • <PriceIssue/>:价格问题导致其无法发送。
  • <InternalError reason=""/>:发生了一些未枚举的错误。可选的原因属性能够以文本形式报告错误。
  • <OtherRestriction restriction=""/>:由于某些未枚举的预订限制,行程不可用。可选的限制条件属性允许以文本形式报告限制。

示例

多媒体资源示例

以下示例为两个房源定义了一个行程及其价格:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
  </Result>
  <Result>
    <Property>052213</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">299.98</Baserate>
    <Tax currency="USD">26.42</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="otto"/>
      <PointOfSale id="simon"/>
    </AllowablePointsOfSale>
  </Result>
</Transaction>

此示例中未显示有关房间的详细信息,例如说明、图片和图片说明、房间名称及可容纳人数。

您可以在 Google 存储的单独 Transaction 消息中定义该信息一次。然后,您可以在后续的所有价格和库存更新中引用此名称。如需了解详情,请参阅客房套餐元数据

多速率示例

以下示例定义了单个行程和房源,其中包含针对不同入住人数的多种房价。<Rates> 元素可用于为特定房源提供多费率价格。以下示例也适用于民宿 (VR) 媒体资源:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2020-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2021-01-13</Checkin>
    <Nights>9</Nights>
    <Baserate currency="USD">3196.1</Baserate>
    <Tax currency="USD">559.49</Tax>
    <OtherFees currency="USD">543.34</OtherFees>
    <Occupancy>2</Occupancy>
    <Rates>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>1</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>3</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>4</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>5</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>6</Occupancy>
      </Rate>
    </Rates>
  </Result>
</Transaction>

不可用的示例

以下示例定义了一个行程的空房情况无法从下游渠道检索,第二个行程的入住天数低于最短住宿晚数且已在指定日期预订,第三个行程在入住日期停业,但在入住期间打开:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Unavailable>
      <NotFetched/>
    </Unavailable>
  </Result>
  <Result>
    <Property>073313</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Unavailable>
      <NoVacancy/>
      <MinNightStay value=3/>
    </Unavailable>
  </Result>
  <Result>
    <Property>052213</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>10</Nights>
    <Unavailable>
      <PropertyClosed first_open="2018-06-15" first_closed="2018-06-10"/>
    </Unavailable>
  </Result>
</Transaction>

<Rates>

包含一个或多个 <Rate> 块的容器。<Rates> 中的每个 <Rate> 为客房或行程组合定义了一个不同的价格。

仅当同一客房或行程组合有多个房价时,才使用 <Rates> 元素。例如,您可以为条件式费率不公开费率客房套餐中的条件式费率定义多个费率。

<Rates> 元素显示在事务消息 XML 层次结构中的以下位置:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>         // Pricing and availability
        + <Rates>
        + <RoomBundle> (Can also contain <Rates>)
        + ...

<Rate> 中设置的值会替换父 <Result><RoomBundle> 元素上的价格相关值。如果未在 <Rate> 中设置,它们会继承父元素的值。只有 <AllowablePointsofSale> 会继承到 <RoomBundle> 元素。

语法

<Rates> 元素使用以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    <Rates>
      <Rate rate_rule_id="rate_rule_id">
        <Baserate currency="currency_code">price</Baserate>
        <Tax currency="currency_code">tax_amount</Tax>
        <OtherFees currency="currency_code">fee_amount</OtherFees>
        <ExpirationTime>expiration_time</ExpirationTime>
        <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
        <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
        <AllowablePointsOfSale>
          <PointOfSale id="landing_page_identifier"/>
        </AllowablePointsOfSale>
        <Occupancy>max_number_of_intended_occupants</Occupancy>
        <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>
          ...
        <Custom[1-5]>custom_value</Custom[1-5]>
      </Rate>
      ...
    </Rates>
  </Result>
  ...
</Transaction>

属性

<Rates> 元素具有以下属性:

特性 是否必需? 说明
rate_rule_id Optional 对于 条件式费率,此 ID 会将费率与费率规则定义文件中的定义进行匹配。此字段的字符数限制为 40 个字符。

子元素

<Rates> 元素具有以下子元素:

子元素 是否必需? 类型 说明
<AllowablePointsOfSale> Optional Object 一个或多个符合酒店条件的着陆页。此元素使用的语法与 <Result> 上的 <AllowablePointsOfSale> 相同。
<Baserate> Required float 住宿的房间价格。此元素使用的语法与 <Result> 上的 <Baserate> 相同。

注意:不能将 <Rate> 下的 <Baserate> 子元素定义为不可用。

<ChargeCurrency> Optional enum 用户支付预订费用的时间和地点。此元素使用的语法与 <Result> 中的 <ChargeCurrency> 相同。
<Custom[1‑5]> Optional string 自定义字段,可用于将与酒店相关的其他数据传递到着陆页。此元素使用的语法与 <Result> 中的 <Custom[1‑5]> 相同。每个自定义字段的字符数上限为 200。如需了解详情,请参阅 着陆页文件

如果 <Result> 元素中提供了 <Custom> 元素,则这些元素不会在 <RoomBundle> 元素中继承,而应为每个 <RoomBundle> 单独定义,或者可以根据需要包含在 <PackageData> 中。

<ExpirationTime> Optional DateTime 房价被视为已过期的日期和时间。此元素使用的语法与 <Result> 中的 <ExpirationTime> 相同。
<Occupancy> Optional integer

指定此房价允许的入住人数上限。如果未指定,系统会假定与父级费率相同。 <Occupancy> 可附带 <OccupancyDetails>,后者用于指定访客的类型(成人或儿童)。有关子元素的语法和说明,请参阅 <OccupancyDetails>

<OtherFees> Required float 基本费率以外的费用以及影响客房最终价格的税费。此元素使用的语法与 <Result> 中的 <OtherFees> 相同。
<Refundable> Optional Object 允许将房价列为全额退款或提供免费取消服务。如果未提供,则不会显示任何退款信息。 <PackageData> 级别的退款政策会覆盖 <Result> 级别的退款政策。<Rates> 级别的退款政策会覆盖 <PackageData> 级别的退款政策。您还可以通过替代选项向用户突出显示可退款价格,而无需直接修改交易消息架构。如需详细了解这些选项,请参阅退款价格政策

以下示例展示了已设置其所有属性的 <Refundable> 元素:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

注意:我们建议设置所有属性。如果一个或多个属性未设置,系统会生成 Feed 状态警告消息。

如果您未设置任何属性,则房价不会显示为可退款。这些属性包括:

  • available:(必需)设置为 1(或 true)指明房价是否允许全额退款;否则设置为 0(或 false)。
  • refundable_until_days:(如果 availabletrue,则为必需)指定在入住前多少天可以申请全额退款。refundable_until_days 的值必须是 0 到 330(含)之间的整数。
  • refundable_until_time:(如果 availabletrue,则强烈建议提供)指定接受全额退款请求的最晚时间(酒店的当地时间)。例如,可与 refundable_until_days 结合使用以指定“退款在入住前两天下午 4 点之前均可退款”。如果未设置 refundable_until_time,则该值默认为午夜。

    此属性的值采用时间格式。

设置属性时,请注意以下事项:

  • 如果未设置 availablerefundable_until_days,则费率不会显示为可退款。
  • 如果 available0(或 false),则系统会忽略其他属性。即使设置了另外一个或两个属性,房价也不会显示为可退款。
<Tax> Required float 针对客房最终价格计算的税费。此元素使用的语法与 <Result> 中的 <Tax> 相同。

示例

基本费率和条件式费率

以下示例展示了包含基本费率和条件费率的事务消息:

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>1</Nights>

    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>

    <Rates>
      <!-- The rate_rule_id is required when using conditional rates -->
      <Rate rate_rule_id="mobile">
        <!-- Override base rate and taxes for conditional rates -->
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <!-- NOTE: OtherFees is inherited from the above setting -->
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

多个条件式费率

以下示例在 <RoomBundle> 中定义了一个基本费率和多个条件费率:

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>2</Nights>
    <!-- When Google receives new room bundle information for an itinerary, all
    previous room bundle pricing is dropped from Google's cache. Thus, if you
    want to delete a specific room bundle from Google's cache, you may do so
    by simply not providing that specific room bundle in subsequent transaction
    messages. -->
    <RoomBundle>
     ...
      <!-- RoomID is required, PackageID is recommended. -->
      <RoomID>5</RoomID>
      <PackageID>ABC</PackageID>
      <!-- Baserate is required. -->
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>

      <!-- RatePlanID is optional and represents the unique identifier for a
      room and package data combination. We strongly recommend using RatePlanID
      as a variable to build your dynamic landing page (formerly Point of Sale)
      URL. For details, see Using Variables and Conditions. -->
      <RatePlanID>5-ABC</RatePlanID>

      <!-- Occupancy is mandatory for RoomBundle elements. -->
      <!-- Elements below will get inherited to nested rate elements. -->
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
      </OccupancyDetails>
      <InternetIncluded>1</InternetIncluded>


      <!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <!-- Neither rate overrides Custom2. -->
      <Custom2>ratebasic</Custom2>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides ChargeCurrency from roombundle. -->
          <ChargeCurrency>hotel</ChargeCurrency>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode321</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode432</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

<RoomBundle>

<Transaction> 消息中 <Result> 的子级形式定义客房套餐的价格和空房情况。为每个套餐或行程组合定义单独的元素。如需定义 Room 软件包的软件包和术语,请使用 <RoomData>

<RoomBundle> 元素显示在事务消息 XML 层次结构中的以下位置:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

如需了解详情,请参阅使用 Room Bundle

语法

<RoomBundle> 元素使用以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    ...
    <RoomBundle>
      <!-- Required unless specified inline under <RoomData> -->
      <RoomID>room_ID</RoomID>
      <!-- Required  <PackageData> -->
      <PackageID>package_ID</PackageID>

      <!-- Required -->
      <Baserate currency="currency_code">price</Baserate>
      <!-- Required -->
      <Tax currency="currency_code">taxes</Tax>
      <!-- Required -->
      <OtherFees currency="currency_code">other_fees</OtherFees>

      <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
      <!-- Required -->
      <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>

      <BreakfastIncluded>boolean_value</BreakfastIncluded>
      <InternetIncluded>boolean_value</InternetIncluded>
      <ParkingIncluded>boolean_value</ParkingIncluded>

      <RatePlanID>rate_plan_ID</RatePlanID>

      <Rates>...</Rates>

      <Custom1>custom_value_1</Custom1>
      <Custom2>custom_value_2</Custom2>
      <Custom3>custom_value_3</Custom3>
      <Custom4>custom_value_4</Custom4>
      <Custom5>custom_value_5</Custom5>
    </RoomBundle>
    ...
  </Result>
</Transaction>

属性

<RoomBundle> 元素没有属性。

子元素

<RoomBundle> 元素具有以下子元素:

子元素 是否必需? 类型 说明
<Baserate> Required float 定义住宿期间的客房套餐价格。此元素使用的语法与 <Result> 中的 <Baserate> 相同,但存在以下例外情况:
  • 当相应会议室无法用于行程时,请移除 <RoomBundle> 元素,以表明该会议室已不在商品目录中。如需了解详情,请参阅 移除 Room 软件包
<BreakfastIncluded> Optional boolean 指定此客房套餐是否包含含早餐的房价。
<ChargeCurrency> Optional enum 用户支付预订费用的时间和地点。此元素使用的语法与 <Result> 中的 <ChargeCurrency> 相同。

默认值为 web

<Custom[1‑5]> Optional string 用于向 Room Bundle 的着陆页传递其他数据的自定义字段。这些元素使用的语法与 <Result> 中的 <Custom[1-5]> 相同。每个自定义字段的字符数上限为 200。如需了解详情,请参阅着陆页文件

如果 <Result> 元素中提供了 <Custom> 元素,则这些元素不会在 <RoomBundle> 元素中继承,而应为每个 <RoomBundle> 单独定义,或者可以根据需要包含在 <PackageData> 中。

<InternetIncluded> Optional boolean 如果某个客房套餐包含免费互联网接入服务,而其他套餐不包含该酒店设施。如果酒店为所有客房提供免费互联网,请勿为客房套餐设置此元素。此元素不适用于客房内无法使用的有线互联网或无线互联网。
<Occupancy> Required integer 指定此房价允许的入住人数上限。例如,大型套房可能可以容纳 6 位房客,但“蜜月套餐”仅允许 2 位房客。

此值必须小于或等于 <Capacity>(即该房间实际可容纳的人数)。

在着陆页网址中定义入住人数时,请使用 NUM-ADULTSNUM-CHILDREN 变量,如使用变量和条件中所述。默认值为 2 个成人和 0 个儿童。

<Occupancy> 的值必须是 1-99(含)之间的正整数。

注意

  • 强烈建议针对 <RoomBundle> 使用 <Occupancy>,以便将其标记为必需,如果省略,则会抛出 1097 错误。
  • <Occupancy> 按以下顺序来自数据对象:<RoomBundle><PackageData>,然后 = <RoomData>。如果上述各项中都没有值,则默认值为 2。
  • <Occupancy> 可附带 <OccupancyDetails>,后者用于指定宾客类型(成人或儿童)。如果未指定访客类型,则假定访客为成人。有关子元素的语法和说明,请参阅 <OccupancyDetails>
  • 如果您在 <RoomBundle><PackageData> 中都设置了 <Occupancy>,则 <RoomBundle> 中的值优先。
<OtherFees> Required float 基本费率以外的费用以及影响客房最终价格的税费。<OtherFees> 元素接受一个必需属性 currency,该属性定义了费用的三个字母货币代码。例如,使用 USD 表示美元。
<PackageID> Optional (recommended) string 软件包数据的唯一 ID。使用此 ID 可将客房套餐数据与 <PackageData> 中发送的数据进行匹配。如需了解详情,请参阅 Room Bundle 元数据。(在定义内嵌的 Room 软件包数据时,您还可以使用此 ID 来引用单个 Transaction 消息中使用的常用 Room Bundle 定义。)
<ParkingIncluded> Optional boolean 客房套餐是否包含免费停车,此酒店将免费停车。请勿为提供免费停车位的酒店指定此元素的值。

有效值为 0(或 false)和 1(或 true)。默认值为 false

<RatePlanID> Optional string “价格方案 ID”表示客房和套餐组合的唯一标识符。例如,假设 <RoomID> 值为 5,<PackageID> 值为 ABC,您可以为 <RatePlanID> 使用值 5-ABC。我们强烈建议您使用 RatePlanID 作为变量来构建动态着陆页(以前称为销售终端)网址。

如需了解详情,请参阅使用变量和条件

<Rates> Optional <Rates> 用于替换此客房套餐默认设置的房价。此元素使用的语法与 <Result> 中的 <Rates> 相同。
<Refundable> Optional Object 允许将房价列为全额退款或提供免费取消服务。如果未提供,则不会显示任何退款信息。 <PackageData> 级别的退款政策会覆盖 <Result> 级别的退款政策。<Rates> 级别的退款政策会覆盖 <PackageData> 级别的退款政策。您还可以通过替代选项向用户突出显示可退款价格,而无需直接修改交易消息架构。如需详细了解这些选项,请参阅退款价格政策

以下示例展示了已设置其所有属性的 <Refundable> 元素:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

注意:我们建议设置所有属性。如果一个或多个属性未设置,系统会生成 Feed 状态警告消息。

如果您未设置任何属性,则房价不会显示为可退款。这些属性包括:

  • available:(必需)设置为 1(或 true)指明房价是否允许全额退款;否则设置为 0(或 false)。
  • refundable_until_days:(如果 availabletrue,则为必需)指定在入住前多少天可以申请全额退款。refundable_until_days 的值必须是 0 到 330(含)之间的整数。
  • refundable_until_time:(如果 availabletrue,则强烈建议提供)指定接受全额退款请求的最晚时间(酒店的当地时间)。例如,可与 refundable_until_days 结合使用以指定“退款在入住前两天下午 4 点之前均可退款”。如果未设置 refundable_until_time,则该值默认为午夜。

    此属性的值采用时间格式。

设置属性时,请注意以下事项:

  • 如果未设置 availablerefundable_until_days,则费率不会显示为可退款。
  • 如果 available0(或 false),则系统会忽略其他属性。即使设置了另外一个或两个属性,房价也不会显示为可退款。
<RoomID> Required string 客房数据的唯一 ID。使用此 ID 将客房套餐数据与您在 <RoomData> 中发送的数据进行匹配。如需了解详情,请参阅 客房套餐元数据。(在以内嵌方式定义会议室数据时,您也可以使用此 ID 在单个 Transaction 消息中引用通用的会议室定义。)
<Tax> Required float 针对客房最终价格计算的税费。 <Tax> 元素接受一个必需属性 currency,该属性定义了税费的三个字母货币代码。例如,使用 USD 表示美元。

示例

单人入住套餐

以下示例定义了包含单个入住人数包的响应。当用户在入住人数选择器中选择 1 时,Google 会显示符合条件的最低价格,而不考虑入住人数。

如果没有单人入住价格,Google 会显示最低的双人入住价格。请注意,如果行程已缓存双人或更多价格,则不会查询单人入住价格。

此示例通过 <RoomID><PackageID> 元素引用了预定义的客房和套餐元数据。使用 <RoomData><PackageData> 元素定义该信息。

<!-- Efficient method of defining Room Bundles-->
<!----- Occupancy of 1 example ----->

<Transaction timestamp="2017-07-18T16:20:00-04:00" id="12345678">
  <!-- Part1: Define RoomData and PackageData in PropertyDataSet -->
  <!-- Note:  Once defined it does not have to be repeated for future
              Transaction Messages.
              PropertyDataSets can also be defined and sent in their own
              Transaction Message separately from pricing. Google can be
              configured to pull just PropertyDataSets once per day
              (or on a predefined frequency). -->
  <PropertyDataSet>
    <Property>180054</Property>
    <!-- Can be reused by multiple Room Bundles -->
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Queen Room - Non-Smoking" language="en"/>
        <Text text="Chambre de la Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <!-- Room can accommodate up to 4, but package data specifies occupancy
           between 1 to 4 -->
      <Capacity>4</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>436233</RoomID>
      <Name>
        <Text text="Premium King Room - Non-Smoking" language="en"/>
        <Text text="Chambre de le Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <Capacity>4</Capacity>
    </RoomData>
    <!-- Can be reused by multiple Room Bundles -->
    <PackageData>
      <PackageID>P11111</PackageID>
      <Occupancy>1</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P12345</PackageID>
      <Occupancy>4</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="1"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
  </PropertyDataSet>

    <!-- Efficient method of defining Room Bundles -->
    <!-- Part 2: Reference RoomData and PackageData through ID -->
  <Result>
    <!-- Single occupancy pricing will be specified in a room bundle below -->
    <Property>180054</Property>
    <Checkin>2017-10-07</Checkin>
    <Nights>2</Nights>
    <!-- Base Room Bundle -->
    <RoomBundle>
      <RoomID>060773</RoomID>
      <PackageID>P54321</PackageID>
      <Baserate currency="USD">199.99</Baserate>
      <Tax currency="USD">25.12</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RatePlanID>060773-P54321</RatePlanID>
    </RoomBundle>
    <RoomBundle>
      <RoomID>060773</RoomID>
      <PackageID>P11111</PackageID>
      <!-- Price for 1 ("occupancy") is the lowest price and will be
           displayed -->
      <Baserate currency="USD">174.99</Baserate>
      <Tax currency="USD">22.08</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RatePlanID>060773-P11111</RatePlanID>
    </RoomBundle>
    <!-- Premium Room Bundle -->
    <RoomBundle>
      <RoomID>436233</RoomID>
      <PackageID>P12345</PackageID>
      <!-- Price for 4 ("occupancy"), any eligible room bundle with 1 or more
           occupancy will be displayed-->
      <Baserate currency="USD">298.88</Baserate>
      <Tax currency="USD">42.12</Tax>
      <OtherFees currency="USD">10.00</OtherFees>
      <RatePlanID>436233-P12345</RatePlanID>
    </RoomBundle>
    <!-- ..Continue providing all available RoomBundle rates under matched
         property for 1 or more occupancies..-->
  </Result>
</Transaction>


两人或更多人

以下示例定义了包含两个或更多入住人数的响应。

此示例通过 <RoomID><PackageID> 元素引用了预定义的客房和套餐元数据。使用 <RoomData><PackageData> 元素定义该信息。

<!-- Efficient method of defining Room Bundles-->
<!----- Occupancy of 3 example ----->

<Transaction timestamp="2017-07-18T16:20:00-04:00" id="12345678">
  <!-- Efficient method of defining Room Bundles-->
  <!-- Part1: Define RoomData and PackageData in PropertyDataSet -->
  <PropertyDataSet>
    <Property>180054</Property>
    <!-- Can be reused by multiple Room Bundles -->
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Queen Room - Non-Smoking" language="en"/>
        <Text text="Chambre de la Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <!-- Room can accommodate up to 4, but package data specifies occupancy
           between 1 to 4 -->
      <Capacity>4</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>436233</RoomID>
      <Name>
        <Text text="Premium King Room - Non-Smoking" language="en"/>
        <Text text="Chambre de le Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <Capacity>4</Capacity>
    </RoomData>
    <!-- Can be reused by multiple Room Bundles -->
    <PackageData>
      <PackageID>P33333</PackageID>
      <Occupancy>3</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P12345</PackageID>
      <Occupancy>4</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="1"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
  </PropertyDataSet>

  <Result>
    <Property>180054</Property>
    <Checkin>2017-10-07</Checkin>
    <Nights>2</Nights>
    <!-- Efficient method of defining Room Bundles -->
    <!-- Part 2: Reference RoomData and PackageData through ID -->
    <!-- Base Room Bundle -->
    <RoomBundle>
      <!-- Baserate above and attributes must match atleast one room bundle
           below -->
      <RoomID>060773</RoomID>
      <PackageID>P33333</PackageID>
      <Baserate currency="USD">499.99</Baserate>
      <Tax currency="USD">55.12</Tax>
      <OtherFees currency="USD">22.00</OtherFees>
    </RoomBundle>
    <!-- Premium Room Bundle -->
    <RoomBundle>
      <RoomID>436233</RoomID>
      <PackageID>P12345</PackageID>
      <!-- Lowest price for 3 ("occupancy"), shown below, will be displayed -->
      <Baserate currency="USD">598.88</Baserate>
      <Tax currency="USD">62.12</Tax>
      <OtherFees currency="USD">30.00</OtherFees>
    </RoomBundle>
    <!-- ..Continue providing all available RoomBundle rates under matched
         property for 2 or more occupancies..-->
  </Result>
</Transaction>


多个客房套餐

以下示例展示了如何在多个客房套餐中设置“入住人数”来展示可能的招待所客房价格。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    ...
    <!-- Suite Room Bundle -->
    <RoomBundle>
      <RoomID>suite1</RoomID>
      <PackageID>standard</PackageID>
      <Occupancy>2</Occupancy>
      <!-- Price for room -->
      <Baserate currency="USD">80.00</Baserate>
      <Tax currency="USD">5.12</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="Suite for 2" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>

    <!-- Small Dorm Room Bundle -->
    <RoomBundle>
      <RoomID>small_dorm</RoomID>
      <PackageID>economy</PackageID>
      <Occupancy>1</Occupancy>
      <!-- Price per bed -->
      <Baserate currency="USD">35.00</Baserate>
      <Tax currency="USD">3.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="1 bed in small dorm" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>

    <!-- Large Dorm Room Bundle -->
    <RoomBundle>
      <RoomID>large_dorm</RoomID>
      <PackageID>economy</PackageID>
      <Occupancy>1</Occupancy>
      <!-- Price per bed -->
      <Baserate currency="USD">20.00</Baserate>
      <Tax currency="USD">2.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="1 bed in large dorm" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>
    ...
  </Result>
</Transaction>

多个条件式费率

以下示例在 <RoomBundle> 中定义了一个基本费率和多个条件费率:

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>2</Nights>
    <!-- When Google receives new room bundle information for an itinerary, all
    previous room bundle pricing is dropped from Google's cache. Thus, if you
    want to delete a specific room bundle from Google's cache, you may do so
    by simply not providing that specific room bundle in subsequent transaction
    messages. -->
    <RoomBundle>
     ...
      <!-- RoomID is required, PackageID is recommended. -->
      <RoomID>5</RoomID>
      <PackageID>ABC</PackageID>
      <!-- Baserate is required. -->
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>

      <!-- RatePlanID is optional and represents the unique identifier for a
      room and package data combination. We strongly recommend using RatePlanID
      as a variable to build your dynamic landing page (formerly Point of Sale)
      URL. For details, see Using Variables and Conditions. -->
      <RatePlanID>5-ABC</RatePlanID>

      <!-- Occupancy is mandatory for RoomBundle elements. -->
      <!-- Elements below will get inherited to nested rate elements. -->
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
      </OccupancyDetails>
      <InternetIncluded>1</InternetIncluded>


      <!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <!-- Neither rate overrides Custom2. -->
      <Custom2>ratebasic</Custom2>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides ChargeCurrency from roombundle. -->
          <ChargeCurrency>hotel</ChargeCurrency>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode321</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode432</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

<OccupancyDetails>

交易消息中的 <Occupancy> 指定客房或套餐的房客数量上限。<OccupancyDetails> 可以包含其他信息,如房客的数量和类型(成人或儿童)。

<Occupancy><OccupancyDetails> 出现在 <Result><RoomBundle><Rates> 元素中时,表示房价受入住人数详细信息的限制。

语法

出现 <OccupancyDetails> 时,其前面始终有 <Occupancy>。请注意以下语法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
  ...
    <Occupancy>max_number_of_intended_occupants</Occupancy>
    <OccupancyDetails>
      <NumAdults>number_of_adults</NumAdults>
      <Children>
        <Child age=age_of_one_child_guest/>
        <Child age=age_of_one_child_guest/>
      </Children>
    </OccupancyDetails>
  </Result>
</Transaction>

子元素

<OccupancyDetails> 元素具有以下子元素:

子元素 是否必需? 类型 说明
<NumAdults> Required integer 成人房客的数量。最小值:1,最大值:20。
<Children> Optional Object 包含一个或多个 <Child> 元素的容器。
<Child age> Optional integer 此儿童的年龄上限,例如 <Child age="17">

示例

以下示例展示了 <OccupancyDetails><Results><RoomBundle><Rates> 子元素中的显示方式。

结果响应

以下示例针对用户指定了房客数量和类型的实时价格查询,为一个房源定义了一个行程及其价格。此处,<OccupancyDetails>(2 名成人和 1 名儿童)在 <Result> 中返回。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
    <Occupancy>3</Occupancy>
    <OccupancyDetails>
      <NumAdults>2</NumAdults>
      <Children>
        <Child age="17"/>
      </Children>
    </OccupancyDetails>
  </Result>
</Transaction>

针对房价的回复

以下示例定义了一个行程以及包含 1 名成人和 1 名儿童的行程价格。此处,<OccupancyDetails><Result><Rates> 元素中返回。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Transaction id="Wtdj8QoQIWcAAbaTGlIAAAC4" timestamp="2018-04-18T11:27:45-04:00">
  <Result>
    <Property>8251</Property>
    <Checkin>2018-06-20</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">62.18</Baserate>
    <Tax currency="USD">2.45</Tax>
    <OtherFees currency="USD">0.00</OtherFees>
    <Rates>
      <Rate rate_rule_id="rule-951">
        <Occupancy>2</Occupancy>
        <OccupancyDetails>
          <NumAdults>1</NumAdults>
          <Children>
            <Child age="17"/>
          </Children>
        </OccupancyDetails>
        <Baserate currency="USD">42.61</Baserate>
        <Tax currency="USD">5.70</Tax>
        <OtherFees currency="USD">0.00</OtherFees>
        <Custom1>abc4</Custom1>
        <AllowablePointsOfSale>
          <PointOfSale id="yourhotelpartnersite.com"/>
        </AllowablePointsOfSale>
      </Rate>
    </Rates>
  </Result>
</Transaction>

客房套餐

以下示例定义了 2 名成人和 1 名儿童入住两晚的入住人数,采用可退款费率。在这里,<OccupancyDetails> 显示在 <RoomBundle>

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>6781291</Property>
    <Checkin>2017-08-05</Checkin>
    <Nights>2</Nights>
    ...
    <RoomBundle>
      <RoomID>10291</RoomID>
      <RatePlanID>564739</RatePlanID>
      <PackageID>564739</PackageID>
      <Occupancy>3</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
        <Children>
          <Child age="17"/>
        </Children>
      </OccupancyDetails>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="true" refundable_until_days="1" refundable_until_time="23:59:00" />
      <Baserate currency="USD">185.34</Baserate>
      <Tax currency="USD">37.06</Tax>
      <OtherFees currency="USD">2.22</OtherFees>
    </RoomBundle>
  </Result>
</Transaction>

多个客房套餐

以下示例定义了多个 <RoomBundle> 费率,仅限 2 名成人和 2 名儿童入住。在这里,<OccupancyDetails> 出现在 <RoomBundle><Rates> 元素中。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">275.00</Baserate>
    <Tax currency="USD">27.50</Tax>
    <OtherFees currency="USD">0</OtherFees>
    <RoomBundle>
      <RoomID>5</RoomID>
      <PackageID>STD</PackageID>
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">0</OtherFees>
      <InternetIncluded>1</InternetIncluded>
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <Custom2>ratebasic</Custom2>
      <Occupancy>4</Occupancy>
      <OccupancyDetails>
          <NumAdults>2</NumAdults>
          <Children>
              <Child age="17"/>
              <Child age="17"/>
          </Children>
      </OccupancyDetails>
      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <ChargeCurrency>hotel</ChargeCurrency>
          <Custom1>ratecode321</Custom1>
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <Custom1>ratecode432</Custom1>
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>