价格和客房空房情况(交易)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, 合作伙伴账号。此字符串值就是“合作伙伴密钥”值列于 <ph type="x-smartling-placeholder"></ph> 账号设置页面
timestamp Required DateTime

出现交易消息的时刻 已发送。

时间戳在过去 24 小时内发送的任何消息都将被 而未处理的则会被舍弃

邮件会按timestamp(而不是以 接收顺序例如,如果价格更新 2019-05-03 14:09:00 的时间戳,在 时间戳为 2019-05-03 14:10:00 的消息, 消息中的价格, 将使用 2019-05-03 14:10:00 的时间戳。

子元素

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

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

描述特定客房和客房套餐。您通常将 元素来定义 Room Bundle,并缩减 Transaction 消息的大小。

<Result> Optional* <Result>

客房行程或 <RoomBundle> 元素,用于定义 Room Bundle 和 该房源的其他客房类型。通过 <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>

每晚价格

以下示例定义了 1 到 7 晚的价格数据,从 2023 年 6 月 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>

移除商品目录

以下示例移除了一些广告资源(在 (例如,从广告资源中选出某家酒店预订的几个不同日期):

<?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。通过 此元素的值必须是与商家信息匹配的字符串 <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 和套餐 ID。结果是 可以大幅缩减邮件的大小, 因为数据重复而可能遇到的错误的数量。有关 信息,请参阅客房套餐元数据

<RoomData>

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

<RoomData> 元素会显示在 交易消息 XML 层次结构:

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

<RoomData> 元素包含与 合作伙伴和酒店,而不是行程。预期用途 非行程数据

<RoomData> 元素与 <PackageData> 类似, 实体房间,而不是套餐中的设施和条款。您所使用的 结合使用 <RoomData><PackageData>,提供有关 客房套餐。对于不属于套餐的单个会议室,只需使用 <RoomData>

您可以为以下元素同时定义 <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 之间(包括 1 和 20)。

<Description> Optional Object 房间的详细说明。此元素应 包含未被其他元素或 <Name> 元素。您不应将全部大写 字母。

<Description> 元素接受一个子元素 元素 <Text>,其中包含以下两个 必需属性:

  • text:房间的详细说明。
  • language:双字母语言代码;例如 fr

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

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

<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 属性的值)。

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

<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 之间的整数(包括 1 和 99)。

<Occupancy>可能伴有 <OccupancyDetails>:用于指定 房客(成人或儿童)。如需了解语法,请参阅 <OccupancyDetails> 子元素的说明和描述。

<OccupancySettings> Optional Object 可用于限制或修改酒店的入住人数要求的设置 房间。

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

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

    <MinOccupancy> 的值必须是正数 介于 1 和 99 之间的整数(包括 1 和 99)。

  • <MinAge>:所有房客的最低年龄要求 比如在房间里呆了例如,如果设为 18, 此会议室只能供所有房客都年满 18 周岁的团体预订 或更早版本。

    <MinAge> 的值必须是正整数 介于 0 和 99 之间(包括 0 和 99)。

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

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

<PhotoURL> Optional Object 指定房间照片的网址和可选图片说明,或 客房套餐。您可以指定多个 <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> 代码块。对于 如需了解详情,请参阅会议室套餐元数据。(您 也可以使用此 ID 引用单个 以内嵌方式定义会议室数据时的事务消息。)

示例

房间数据

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

<?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_doubledoublequeen、 和 king
。 每个 <Bed> 都具有以下子元素: <ph type="x-smartling-placeholder">
    </ph>
  • <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>

日式西式床铺

以下是包含 kingjapanese_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>
        <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>

您可以为<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) 如果房客可以选择在客房内享用早餐/晚餐 in;否则设置为 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 之间的整数(包括 1 和 99)。

如果您在 <RoomBundle><PackageData>,则 <RoomBundle> 中的值优先。

注意

<Occupancy>可能伴有 <OccupancyDetails>:用于指定邀请对象的类型 (成人或儿童)。请参阅<OccupancyDetails>中的语法和 子元素的说明。
<PackageID> Required string

文件包的唯一 ID。使用此 ID 匹配 包含 <Result> 块的 Room Bundle 数据, 价格更新。如需了解详情,请参阅 会议室 软件包元数据

(您也可以使用此 ID 来引用常见的 Room Bundle 定义) 定义客房套餐数据时,在单条事务消息中使用 inline.)

<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,用于指明费率是否允许 refund;否则设为 0false
  • refundable_until_days:(如果 availabletrue)指定 提前几天办理全额退款 请求。refundable_until_days 的值 必须是 0 到 330 之间的整数(含 0 和 330)。
  • refundable_until_time:(如果存在以下情况,则强烈建议使用它: availabletrue)指定 一天当中的最新时间,即酒店的当地时间, 退款申请将被接受。这可与 用于指定 refundable_until_days,对于 例如,“退款可在第二天下午 4:00 之前退款 签到”。如果未设置 refundable_until_time,则应用此值 默认为午夜。

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

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

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

示例

单人间套餐

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

<?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>


包含房价的客房套餐

以下示例定义了 Room 软件包的客房和套餐元数据 具有费率功能:

<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 符合展示条件的一个或多个着陆页 酒店。着陆页是可处理 最终用户。要明确包含某些着陆页(并排除 其他),请添加一个或多个 <AllowablePointsOfSale><PointOfSale> 元素的 id 属性。

如果您不添加该元素,则系统将使用 着陆页文件就会被视为可用于预订 房间。如需了解详情,请参阅 着陆页文件语法

<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> 中的 Transaction 消息中使用 元素(针对酒店价格或 <PackageData> 块) 。

有效值包括:

  • web:用户于以下时间在线支付费用: 预订。此设置为默认值。 实际着陆页是 由 定义 着陆页文件,并且可能会受用户所用币种、 地理位置、语言或其他因素。
  • hotel:用户在 酒店。如果必须始终使用酒店的币种付款,请将 <ChargeCurrency> 的值设为 hotel。实际着陆页不受 用户的币种。
  • deposit:立即向用户收取一部分费用 通常情况下,我们会在晚些时候收取 当用户从酒店退房时。
  • installments:用户需要为初始部分付费 占应还款总额的比例,并且预计会定期支付固定的余额 定期更新

默认值为 web

<Checkin> Required Date 使用 Date 表示的行程的入住日期 格式。<Nights> 元素和 <Checkin> 元素构成行程。
<Custom[1‑5]> Optional string 定义可用于传递其他数据的自定义字段 与酒店相关联。您可以使用 元素名称: <ph type="x-smartling-placeholder">
    </ph>
  • <Custom1>
  • <Custom2>
  • <Custom3>
  • <Custom4>
  • <Custom5>

<Custom> 元素可让您传递任意数据。 例如,您可以在此字段中指定一个值 由着陆页文件用来为着陆页构建自定义网址 页面。每个自定义字段的字符数上限为 200。对于 请参阅 目标网页文件

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

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

如果存在以下情况,我们建议您不要提供过期时间戳 并非是定价结构的关键

Google 不会提供任何已过期的价格以及任何行程 并且价格已失效 <ph type="x-smartling-placeholder"></ph> 实时价格查询

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

如果存在以下情况,则必须指定 <OtherFees> 元素: <Baserate>大于零。

<Occupancy> Optional integer 指定此房价允许的入住人数上限。 当 <Occupancy> 直接显示在 <Result> 的正下方时, 它必须指定 2 或更大的值。<Occupancy>可能 与 <OccupancyDetails> 一起播放,用于指定 房客的类型(成人或儿童)。如果未指定访客类型 我们会将其认定为成年人欢迎咨询 <OccupancyDetails> 子元素的语法和说明。如果 未提供 <Occupancy> 元素,入住人数为 默认为 2

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

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

如果有多个房价,请使用 <Rates> 元素 同一客房/行程组合或不允许使用某个房价时 在 <Result> 级别指定。例如,您定义了多个 <ph type="x-smartling-placeholder"></ph>的费率 条件式费率 <ph type="x-smartling-placeholder"></ph> 不公开费率 条件式费率 或不同的入住人数。

注意:<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),用于指明费率是否允许 refund;否则设置为 0(或 false)。
  • refundable_until_days:(如果 availabletrue)指定 提前几天办理全额退款 请求。refundable_until_days 的值 必须是 0 到 330 之间的整数(含 0 和 330)。
  • refundable_until_time:(如果存在以下情况,则强烈建议使用它: availabletrue)指定 一天当中的最新时间,即酒店的当地时间, 退款申请将被接受。这可与 用于指定 refundable_until_days,对于 例如,“退款可在第二天下午 4:00 之前退款 签到”。如果未设置 refundable_until_time,则应用此值 默认为午夜。

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

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

  • 如果 availablerefundable_until_days 不是 设置后,该费率不会显示为可退款。
  • 如果 available0(或 false), 其他属性会被忽略。该费率并未显示为 即使设置了另外一个或两个属性,也仍然可以退款。
<RoomBundle> Optional <RoomBundle> 一种容器,用于存储房间的实物价格说明信息; 酒店设施和服务的任何包装, 特定酒店和行程

一般而言,使用此元素可定义基本房间和 同一房源内不同类型的客房。尽管可以 以内嵌方式定义客房套餐说明,则应使用单独的 交易消息来定义该信息。Google 会存储 这样,您就可以在所有代码中引用该查询,而不是重复该查询 价格更新。

<RoomID> Optional string 会议室的唯一 ID,用于将其映射到预定义的房间数据。此外, 用于填充 PARTNER-ROOM-ID 着陆页变量。 如需了解详情,请参阅 会议室 软件包元数据
<Tax> Optional float 针对客房最终价格计算的税费。 <Tax> 元素接受一个必需属性, currency,用于定义由三个字母组成的货币代码 。例如 USD。通过 如果出现以下情况,则必须指定 <Tax> 元素: <Baserate>大于零。

如果 <Baserate> 元素的 “all_inclusive”属性明确设置为 true,则将此 值是可选值。

<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 存储的信息。然后,您可以在所有渠道中 价格和广告资源更新如需了解详情,请参阅 客房套餐元数据

多速率示例

以下示例为单个行程和房源定义了 为不同入住人数提供不同的房价<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> 块的容器。每<Rate> <Rates> 为客房或行程组合定义了不同的价格。

仅当存在多种房价时,才使用 <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> 中设置它们, 它们会从父元素继承值。仅限 &lt;AllowablePointsofSale&gt;继承到 <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 一个或多个符合展示条件的着陆页 酒店。此元素使用的语法与 <AllowablePointsOfSale>,日期:<Result>
<Baserate> Required float 住宿的房间价格。该元素使用相同的 语法与 <Result> 上的 <Baserate> 相同。

注意<Baserate> 子元素位于 无法将“<Rate>”定义为不可用。

<ChargeCurrency> Optional enum 用户支付预订费用的时间和地点。该元素使用 语法与 <ChargeCurrency> 中的 <Result>
<Custom[1‑5]> Optional string 可用于传递与 将酒店与着陆页相关联此元素使用的语法与 <Result> 中的 <Custom[1‑5]>。存在限制 每个自定义字段 200 个字符。如需了解详情,请参阅 <ph type="x-smartling-placeholder"></ph> 着陆页文件

如果为 <Custom>提供的元素中 <Result> 元素,那么在 <RoomBundle> 元素,并且应针对每个 <RoomBundle>,或者它可包含在 <PackageData> 中如果 所需的资源。

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

指定此房价允许的入住人数上限。如果不是 则假定该费率与父级费率相同。 <Occupancy>可能伴有 <OccupancyDetails>:用于指定宾客的类型(成人或 子女)。请查阅 <OccupancyDetails>,了解 子元素。

<OtherFees> Required float 基本费率以外的费用以及影响最终价格的税费 空间此元素使用的语法与 <Result> 中的 <OtherFees>

如果 <Baserate> 元素的 “all_inclusive”属性明确设置为 true,则将此 值是可选值。

<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),用于指明费率是否允许 refund;否则设置为 0(或 false)。
  • refundable_until_days:(如果 availabletrue)指定 提前几天办理全额退款 请求。refundable_until_days 的值 必须是 0 到 330 之间的整数(含 0 和 330)。
  • refundable_until_time:(如果存在以下情况,则强烈建议使用它: availabletrue)指定 一天当中的最新时间,即酒店的当地时间, 退款申请将被接受。这可与 用于指定 refundable_until_days,对于 例如,“退款可在第二天下午 4:00 之前退款 签到”。如果未设置 refundable_until_time,则应用此值 默认为午夜。

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

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

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

示例

基本费率和条件式费率

以下示例显示了包含基本费率的交易消息 和条件式费率

<?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>。分别为每个元素定义一个元素 套餐或行程组合要定义 如要使用客房套餐,请使用 <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> 元素,用于指明房间不是 更多。如需了解详情,请参阅 <ph type="x-smartling-placeholder"></ph> 移除客房套餐
<BreakfastIncluded> Optional boolean 指定此客房套餐是否包含含早餐的房价。
<ChargeCurrency> Optional enum 用户支付预订费用的时间和地点。该元素使用相同的 语法为 <Result> 中的 <ChargeCurrency>

默认值为 web

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

如果为 <Custom>提供的元素中 <Result> 元素,那么在 <RoomBundle> 元素,并且应针对每个 <RoomBundle>,或者它可包含在 <PackageData> 中如果 所需的资源。

<InternetIncluded> Optional boolean 如果客房套餐包含免费互联网接入服务, 而其他套餐不包含该酒店设施。不设置 酒店内客房套餐元素,所有房客可免费上网 房间。此元素不适用于室内有线互联网或无线网络 客房没有网络。
<Occupancy> Required integer 指定此房价允许的入住人数上限。例如, 大型套房可能实际可容纳 6 位客人,但 “蜜月套票”只允许 2 人入住。

该值必须小于或等于 <Capacity>:指的是 空间可以容纳多少空间

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

<Occupancy> 的值必须是正数 介于 1 和 99 之间的整数(包括 1 和 99)。

注意

  • <RoomBundle><Occupancy> 强烈建议将其标记为必需,如果省略,则会 则抛出 1097 错误。
  • <Occupancy> 来自 订单:<RoomBundle><PackageData>,然后按 = <RoomData>。 如果上述各项中都没有值,则默认值为 2。
  • <Occupancy>可能伴有 <OccupancyDetails>, ,用于指定宾客类型(成人或儿童)。如果邀请对象类型 未指定,系统会假定他们是成年人。咨询 <OccupancyDetails>:用于子元素的语法和说明。
  • 在两个文件中均设置 <Occupancy> 时, <RoomBundle><PackageData><RoomBundle> 中的值 优先级。
<OtherFees> Required float 基本费率以外的费用以及影响 客房的最终价格<OtherFees> 元素接受 currency是必需属性 费用的三个字母货币代码。例如,使用 USD 表示美元。
<PackageID> Optional (recommended) string 软件包数据的唯一 ID。使用此 ID 匹配 包含 <PackageData> 中发送内容的 Room Bundle 数据。对于 请参阅 会议室 软件包元数据。(您 也可以使用此 ID 来引用常用的 Room Bundle 定义, 在单个 Transaction 消息中使用。 inline.)
<ParkingIncluded> Optional boolean 客房套餐是否包含免费停车位,其中 如果不是,这家酒店将需要付费服务。不指定 酒店免费停车的该元素的值。

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

<RatePlanID> Optional string “费率方案 ID”表示 客房和套餐组合例如,假设某个 <RoomID> 值为 5 和 a ABC 的 <PackageID> 值,则可以使用值 <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),用于指明费率是否允许 refund;否则设置为 0(或 false)。
  • refundable_until_days:(如果 availabletrue)指定 提前几天办理全额退款 请求。refundable_until_days 的值 必须是 0 到 330 之间的整数(含 0 和 330)。
  • refundable_until_time:(如果存在以下情况,则强烈建议使用它: availabletrue)指定 一天当中的最新时间,即酒店的当地时间, 退款申请将被接受。这可与 用于指定 refundable_until_days,对于 例如,“退款可在第二天下午 4:00 之前退款 签到”。如果未设置 refundable_until_time,则应用此值 默认为午夜。

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

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

  • 如果为 availablerefundable_until_days 未设置,则相应费率不会显示为可退款。
  • 如果 available0(或 false), 其他属性会被忽略。该费率并未显示为 即使设置了另外一个或两个属性,也仍然可以退款。
<RoomID> Required string 客房数据的唯一 ID。使用此 ID 匹配 包含您在 <RoomData> 中发送的内容的 Room Bundle 数据。 如需了解详情,请参阅 <ph type="x-smartling-placeholder"></ph> 客房套餐元数据。(您也可以使用此 ID 来引用 在单个事务消息中使用通用的会议室定义来定义 会议室数据内嵌。)
<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> 出现在 <Rates> 元素中时 为 <Result><RoomBundle>,则表示费率受 入住人数详细信息

语法

出现 <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 名成人和 一个子节点 - 在 <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><Rates> 中返回 <Result> 的元素。

<?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>