本页提供了基于 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> |
描述特定客房和客房套餐。您通常需要在单独的交易消息中使用此元素来定义客房套餐的共享值,并缩减交易消息的大小。 |
<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>
基本费率和条件式费率
以下示例展示了一条包含基本费率和条件式费率的交易消息:
<?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> |
描述客房套餐。此数据与合作伙伴和酒店相关联,但与行程无关。此元素与 <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。其结果是,您可以大大减小消息的大小,同时减少因重复数据而可能遇到的错误数量。如需了解详情,请参阅会议室包元数据。
<RoomData>
定义有关客房的与行程无关的元数据,进而定义客房套餐(因为客房套餐是客房以及其他酒店设施)。使用 <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 | 房间可以实际容纳的宾客数量上限。会议室的可容纳人数大于或等于入住人数。
指定后,此值必须等于或大于
|
<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 | 指定房间或客房套餐的照片的网址和可选图片说明。您可以为单个房间或客房套餐指定多个 <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> ”区块进行匹配。如需了解详情,请参阅会议室包元数据。(在以内嵌方式定义会议室数据时,您也可以使用此 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 软件包的会议室和软件包元数据:
<?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>
两张双人床
下例展示了一个具有两张 double
床的 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>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>
日式西餐配床
下例展示了一个配有 king
尺寸床的 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>
<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 )。
最好使用 |
<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 可将客房套餐数据与价格更新中的 (在以内嵌方式定义客房套餐数据时,您也可以使用此 ID 引用单个交易消息中使用的通用客房套餐定义。) |
<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 人(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>
会议室和软件包元数据
以下示例定义了会议室和软件包元数据:
<?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 软件包的会议室和软件包元数据:
<?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>
元素,只要消息大小不超过 100 MB 即可。
语法
<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 | 用户支付预订费用的时间和地点。此元素可用于酒店价格块或客房套餐的 <PackageData> 块的 <Result> 元素中的交易消息中。
有效值包括:
默认值为 |
<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> |
一个容器,用于存储有关指定酒店和行程的带价房间物理描述的信息、任何设施包装,以及一些购买政策详细信息。
一般来说,可以使用此元素定义基本房间和同一房源内不同类型的房间的价格。虽然可以内嵌定义 Room Bundle 说明,但您应使用单独的事务消息来定义该信息。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 存储的单独事务消息中定义该信息一次。然后,您可以在后续的所有价格和库存更新中引用它。如需了解详情,请参阅 Room 软件包元数据。
多费率示例
以下示例定义了单个行程和房源,针对各种入住人数提供多种费率。<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>
+ ...
如需了解详情,请参阅使用客房套餐。
语法
<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 | 用于向客房套餐的着陆页传递其他数据的自定义字段。这些元素使用的语法与 <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 软件包元数据。(在以内嵌方式定义客房套餐数据时,您也可以使用此 ID 引用单个交易消息中使用的通用客房套餐定义。) |
<ParkingIncluded> | Optional | boolean | 客房套餐是否包含免费停车位(提供停车位属于此酒店的付费服务)。对于提供免费停车位的酒店,请勿为此元素指定值。 有效值为 |
<RatePlanID> | Optional | string | 费率方案 ID 表示客房和套餐组合的唯一标识符。例如,如果 <RoomID> 值为 5,<PackageID> 值为 ABC,那么您可以将值 5-ABC 用于 <RatePlanID> 。我们强烈建议您使用 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 在单个交易消息中引用公共会议室定义。) |
<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>
子元素中的显示方式。
结果响应
以下示例定义了一个行程及其价格,以响应用户指定了房客数量和类型的实时价格查询。此处,<Result>
中返回了 <OccupancyDetails>
(2 名成人和 1 名儿童)。
<?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 名儿童入住 2 晚,且采用可退款费率。在这里,<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>