本页提供了关于基于 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 小时内发送的任何时间戳的消息,并舍弃那些未发送的消息。 消息按 |
子元素
<Transaction>
元素具有以下子元素:
子元素 | 是否必需? | 类型 | 说明 |
---|---|---|---|
<PropertyDataSet> | Optional* | <PropertyDataSet> |
描述特定客房和客房套餐。您通常在单独的 Transaction 消息中使用此元素来定义客房套餐的共享值,并减小 Transaction 消息的大小。 |
<Result> | Optional* | <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 | 客房可以实际容纳的房客数量上限。对于会议室,可容纳人数大于或等于入住人数。
指定后,此值必须等于或大于
|
<Description> | Optional | Object | 房间的详细说明。此元素应包含其他元素或 <Name> 元素未描述的信息。在指定房间的说明时,不应全部使用大写字母。
为您的广告或免费预订链接可能会显示的每种语言分别使用单独的 以下示例显示了法语和英语版本的房间说明: <Description> <Text text="Two queen-sized beds" language="en"/> <Text text="Deux lits de la reine" language="fr"/> </Description> |
<Name> | Required | string | 会议室类别的名称。此值应与酒店着陆页(以前称为销售终端)上显示的值一致。请勿将此元素的值全部设为大写字母。
此元素接受一个子元素
为您的广告或免费预订链接可能会显示的每种语言分别使用单独的 以下示例显示了法语和英语版本的房间名称: <Name> <Text text="Standard Double Room" language="en"/> <Text text="Le chambre double" language="fr"/> </Name> |
<Occupancy> | Optional | integer | 客房适合入住的最多房客数量。
例如,大型套房可能实际上可容纳 6 位房客(可容纳 6 位客人),但最多只可供 4 位客人入住。
此值必须小于或等于
|
<OccupancySettings> | Optional | Object | 可用于限制或修改会议室入住人数要求的设置。
<OccupancySettings> <MinOccupancy>2</MinOccupancy> <MinAge>16</MinAge> </OccupancySettings> 并非所有子元素都需要包含在内。 |
<PhotoURL> | Optional | Object | 给定房间或房间包的照片的网址和可选图片说明。您可以为一个房间或 Room Bundle 指定多个 <PhotoURL> 。每张照片网址都必须位于自己的 <PhotoURL> 中。
该元素采用以下子元素:
例如: <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 | 表示日式酒店客房的样式。 有效值包括:
|
<Beds> | Optional | Object | 包含的 <Bed> 与聊天室中的一样多。请注意,此处不应统计日式日式床垫。
每个
<Bed> 都具有以下子元素:
<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 | 此会议室是否与其他房客(例如所有者或其他房客)共享。有效值为 shared 和 private 。 |
<Outdoor> | Optional | empty | 如果房间是没有固定墙壁、管道和空调的户外住宿,请提供此元素。例如,酒店客房不属于户外住宿,而房客入住帐篷的露营地,以及房客自带房车的房车营地为户外住宿。 |
<MobilityAccessible> | Optional | empty | 如果此会议室是无障碍设施,请提供此元素。 |
<Smoking> | Optional | enum | 此房间是无烟房间还是吸烟室。有效值为 non_smoking 和 smoking 。 |
<BathAndToilet> | Optional | Object | 包含房间内浴室和卫生间的相关信息。
该属性为:
该元素可选择接受以下子元素:
例如: <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 | 有效选项包括:
|
示例
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 )。
最好使用 |
<ChargeCurrency> | Optional | enum | 用户支付预订费用的时间和地点。此元素使用的语法与 <Result> 中的 <ChargeCurrency> 相同。默认值为 |
<CheckinTime> | Optional | Time | 尽可能早入住时间。 时间必须小于酒店当地时间的 24:00。 |
<CheckoutTime> | Optional | Time | 酒店当地时间的最晚退房时间。 |
<Description> | Optional | Object | 软件包的详细说明。此元素应包含其他元素或 <Name> 元素未描述的信息。在指定房间的说明时,不应全部使用大写字母。
<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 | 包含此包裹中的餐点的相关信息。
仅当 如需让膳食过滤器( |
<Name> | Required | string | 软件包的名称。此值应与酒店着陆页上显示的值一致。请勿将此元素的值全部设为大写字母。
此元素接受一个子元素 <Name> <Text text="Bed and Breakfast" language="en"/> <Text text="Lit et petit déjeuné" language="fr"/> </Name> |
<Occupancy> | Optional | integer | 客房套餐面向的房客数量上限。
例如,大型套房可能实际上可容纳 6 位客人,但最多只可供 4 位客人入住。
此值必须小于或等于
如果同时在 注意: <Occupancy> 可附带 <OccupancyDetails> ,后者用于指定访客的类型(成人或儿童)。如需了解子元素的语法和说明,请参阅 <OccupancyDetails> 。
|
<PackageID> | Required | string | 文件包的唯一 ID。使用此 ID 将客房套餐数据与价格更新中的 (在定义内嵌的 Room Bundle 数据时,您也可以使用此 ID 引用单个 Transaction 消息中使用的常用 Room Bundle 定义。) |
<ParkingIncluded> | Optional | boolean | 客房套餐是否包含免费停车,此酒店将免费停车。请勿为提供免费停车位的酒店指定此元素的值。
有效值为 |
<PhotoURL> | Optional | Object | (与 <RoomData> 中的 <PhotoURL> 相同,但适用于软件包(例如餐点照片)。)
|
<Refundable> | Optional | Object | 允许将房价列为全额退款或提供免费取消服务。如果未提供,则不会显示任何退款信息。
<PackageData> 级别的退款政策会覆盖 <Result> 级别的退款政策。<Rates> 级别的退款政策会覆盖 <PackageData> 级别的退款政策。您还可以通过替代选项向用户突出显示可退款价格,而无需直接修改交易消息架构。如需详细了解这些选项,请参阅退款价格政策。
以下示例展示了已设置其所有属性的 <Refundable available="1" refundable_until_days="7" refundable_until_time="18:00:00"/> 注意:我们建议设置所有属性。如果一个或多个属性未设置,系统会生成 Feed 状态警告消息。 如果您未设置任何属性,则房价不会显示为可退款。这些属性包括:
设置属性时,请注意以下事项:
|
<MembershipBenefits |
Optional | boolean | 房价包含住宿期间的贵宾等级福利。包含以下参数:
|
<CarRentalIncluded> | Optional | boolean | 房价包含入住期间免费租车的费用。 |
<MilesIncluded>> | Optional | boolean | 费率包含飞行常客奖励计划里程。参数包括:
|
<OnPropertyCredit> | Optional | boolean | 房价包含酒店内赠金(餐饮、度假村、水疗中心等)。参数:
|
<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 | 住宿的房间价格。此元素的值应反映以下内容:
当会议室无法用于行程时,应省略 如需移除客房套餐,请按照移除客房套餐中的说明操作。
<Baserate currency="USD">1200.40</Baserate>
|
<ChargeCurrency> | Optional | enum | 用户支付预订费用的时间和地点。此元素可在交易消息中使用,该消息位于酒店价格的 <Result> 元素中,或客房套餐的 <PackageData> 块中。
有效值包括:
默认值为 |
<Checkin> | Required | Date | 采用日期格式的行程的入住日期。<Nights> 元素和 <Checkin> 元素的组合构成了一次行程。 |
<Custom[1‑5]> | Optional | string | 定义可用于传递与酒店关联的其他数据的自定义字段。您可以使用以下元素名称传递最多五个自定义值:
|
<ExpirationTime> | Optional | DateTime | 价格被视为已过期的日期和时间(至少 3 小时)。
如果到期时间戳对价格结构来说并不是很重要,我们建议您不要提供到期时间戳。 Google 不会提供任何已过期的价格,并且任何价格已过期的行程都将符合 实时价格查询的条件。 |
<Nights> | Required | integer | 行程的住宿晚数。<Nights> 元素的值必须是正整数。
<Nights> 和 <Checkin> 的组合构成了一个行程。 |
<OtherFees> | Optional | float | 基本费率以外的费用以及影响客房最终价格的税费。<OtherFees> 元素接受一个必需属性 currency ,该属性定义了费用的三个字母货币代码。例如 USD 。如果 |
<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> 为客房/行程组合定义一个不同的价格。
如果同一客房/行程组合有多个房价,或者不允许在 注意:在 |
<Refundable> | Optional | Object | 允许将房价列为全额退款或提供免费取消服务。如果未提供,则不会显示任何退款信息。
<PackageData> 级别的退款政策会覆盖 <Result> 级别的退款政策。<Rates> 级别的退款政策会覆盖 <PackageData> 级别的退款政策。您还可以通过替代选项向用户突出显示可退款价格,而无需直接修改交易消息架构。详细了解退款价格政策。
以下示例展示了已设置其所有属性的 <Refundable available="1" refundable_until_days="7" refundable_until_time="18:00:00"/> 注意:我们建议设置所有属性。如果一个或多个属性未设置,系统会生成 Feed 状态警告消息。 如果您未设置任何属性,则房价不会显示为可退款。这些属性包括:
设置属性时,请注意以下事项:
|
<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> 标记下:
|
示例
多媒体资源示例
以下示例为两个房源定义了一个行程及其价格:
<?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> 相同。注意:不能将 |
<ChargeCurrency> | Optional | enum | 用户支付预订费用的时间和地点。此元素使用的语法与 <Result> 中的 <ChargeCurrency> 相同。 |
<Custom[1‑5]> | Optional | string | 自定义字段,可用于将与酒店相关的其他数据传递到着陆页。此元素使用的语法与 <Result> 中的 <Custom[1‑5]> 相同。每个自定义字段的字符数上限为 200。如需了解详情,请参阅
着陆页文件。
如果 |
<ExpirationTime> | Optional | DateTime | 房价被视为已过期的日期和时间。此元素使用的语法与 <Result> 中的 <ExpirationTime> 相同。 |
<Occupancy> | Optional | integer | 指定此房价允许的入住人数上限。如果未指定,系统会假定与父级费率相同。
|
<OtherFees> | Required | float | 基本费率以外的费用以及影响客房最终价格的税费。此元素使用的语法与 <Result> 中的 <OtherFees> 相同。 |
<Refundable> | Optional | Object | 允许将房价列为全额退款或提供免费取消服务。如果未提供,则不会显示任何退款信息。
<PackageData> 级别的退款政策会覆盖 <Result> 级别的退款政策。<Rates> 级别的退款政策会覆盖 <PackageData> 级别的退款政策。您还可以通过替代选项向用户突出显示可退款价格,而无需直接修改交易消息架构。如需详细了解这些选项,请参阅退款价格政策。
以下示例展示了已设置其所有属性的 <Refundable available="1" refundable_until_days="7" refundable_until_time="18:00:00"/> 注意:我们建议设置所有属性。如果一个或多个属性未设置,系统会生成 Feed 状态警告消息。 如果您未设置任何属性,则房价不会显示为可退款。这些属性包括:
设置属性时,请注意以下事项:
|
<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> 相同,但存在以下例外情况:
|
<BreakfastIncluded> | Optional | boolean | 指定此客房套餐是否包含含早餐的房价。 |
<ChargeCurrency> | Optional | enum | 用户支付预订费用的时间和地点。此元素使用的语法与 <Result> 中的 <ChargeCurrency> 相同。默认值为 |
<Custom[1‑5]> | Optional | string | 用于向 Room Bundle 的着陆页传递其他数据的自定义字段。这些元素使用的语法与 <Result> 中的 <Custom[1-5]> 相同。每个自定义字段的字符数上限为 200。如需了解详情,请参阅着陆页文件。
如果 |
<InternetIncluded> | Optional | boolean | 如果某个客房套餐包含免费互联网接入服务,而其他套餐不包含该酒店设施。如果酒店为所有客房提供免费互联网,请勿为客房套餐设置此元素。此元素不适用于客房内无法使用的有线互联网或无线互联网。 |
<Occupancy> | Required | integer | 指定此房价允许的入住人数上限。例如,大型套房可能可以容纳 6 位房客,但“蜜月套餐”仅允许 2 位房客。
此值必须小于或等于 在着陆页网址中定义入住人数时,请使用
注意:
|
<OtherFees> | Required | float | 基本费率以外的费用以及影响客房最终价格的税费。<OtherFees> 元素接受一个必需属性 currency ,该属性定义了费用的三个字母货币代码。例如,使用 USD 表示美元。 |
<PackageID> | Optional (recommended) | string | 软件包数据的唯一 ID。使用此 ID 可将客房套餐数据与 <PackageData> 中发送的数据进行匹配。如需了解详情,请参阅 Room Bundle 元数据。(在定义内嵌的 Room 软件包数据时,您还可以使用此 ID 来引用单个 Transaction 消息中使用的常用 Room Bundle 定义。) |
<ParkingIncluded> | Optional | boolean | 客房套餐是否包含免费停车,此酒店将免费停车。请勿为提供免费停车位的酒店指定此元素的值。
有效值为 |
<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 available="1" refundable_until_days="7" refundable_until_time="18:00:00"/> 注意:我们建议设置所有属性。如果一个或多个属性未设置,系统会生成 Feed 状态警告消息。 如果您未设置任何属性,则房价不会显示为可退款。这些属性包括:
设置属性时,请注意以下事项:
|
<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>