请求
语法
Transaction (Property Data) 消息使用以下语法:
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="timestamp"
id="message_ID"
partner="partner_key">
<PropertyDataSet action="[overlay|delta]">
<!-- (Required) ID that matches the Hotel List Feed -->
<Property>HotelID</Property>
<RoomData>
<!-- (Required) One room ID per RoomData element -->
<RoomID>RoomID</RoomID>
<Name>
<Text text="room_name" language="language_code"/>
</Name>
<Description>
<Text text="room_description" language="language_code"/>
</Description>
<!-- (Optional) Restricts the rate plans allowed for this room type to
those listed here. If specified, don't specify AllowableRoomIDs. -->
<AllowablePackageIDs>
<AllowablePackageID>PackageID</AllowablePackageID>
</AllowablePackageIDs>
<Capacity>max_number_of_occupants</Capacity>
<AdultCapacity>max_number_of_adult_occupants</AdultCapacity>
<ChildCapacity>max_number_of_child_occupants</ChildCapacity>
<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>
<JapaneseHotelRoomStyle>[western|japanese|japanese_western]</JapaneseHotelRoomStyle>
<Beds>
<Bed size="[single|semi_double|double|queen|king]">
<Width unit="cm" number="bed_width"/>
<Length unit="cm" number="bed_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>
<PackageData>
<!-- (Required) One package ID per PackageData element -->
<PackageID>PackageID</PackageID>
<Name>
<Text text="package_name" language="language_code"/>
</Name>
<Description>
<Text text="package_description" language="language_code"/>
</Description>
<!-- (Optional) Restricts the room types allowed for this rate plan to
those listed here. If specified, don't specify AllowablePackageIDs. -->
<AllowableRoomIDs>
<AllowableRoomID>RoomID</AllowableRoomID>
</AllowableRoomIDs>
<!-- Add Loyalty point information -->
<MilesIncluded>
<LoyaltyCampaignID>campaign-ID</LoyaltyCampaignID>
<!-- (Optional) Use <NumberOfMiles> if the rate plan earns fixed loyalty rewards-->
<NumberOfMiles>integer</NumberOfMiles>
</MilesIncluded>
<Refundable available="[false|true]" refundable_until_days="number_of_days"
refundable_until_time="time"/>
<!-- 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>
</PackageData>
</PropertyDataSet>
</Transaction>
元素和属性
交易(房源数据)消息具有以下元素和属性:
| 元素 / @Attribute | 出现次数 | 类型 | 说明 |
|---|---|---|---|
| Transaction | 1 | Complex element | 在 ARI 实现中,这是用于定义单个房源的房型和套餐的消息的根元素。 |
| Transaction / @timestamp | 1 | DateTime | 相应消息的创建日期和时间。 |
| Transaction / @id | 1 | string | 相应请求消息的唯一标识符。此值会在响应消息中返回。允许使用的字符包括 a-z、A-Z、0-9、_(下划线)和 -(短划线)。 |
| Transaction / @partner | 1 | string | 相应消息的合作伙伴账号。此字符串值是 Hotel Center 中
“账号设置”页面上列出的“合作伙伴密钥”值。
注意:如果您有可为多个账号提供 Feed 的后端,则此值需要与同一账号的 |
| Transaction / PropertyDataSet | 1.. | PropertyDataSet | 用于为单个房源定义房型和套餐的容器。
建议您只发送一次 |
| Transaction / PropertyDataSet / @action | 0..1 | enum | 要应用于客房价格定义的更新类型。 有效值包括:
此属性是可选属性,如果未指定,则默认为 |
| Transaction / PropertyDataSet / Property | 1 | string | 房源的唯一标识符。此值必须与酒店列表 Feed 中使用
<id> 在 <listing> 元素中指定的酒店 ID 相匹配。您还可以在 Hotel Center 中找到酒店 ID。 |
| Transaction / PropertyDataSet / RoomData | 0..n | RoomData | 描述房间。 注意:必须提供 |
| Transaction / PropertyDataSet / RoomData / RoomID | 1 | RoomID | 房型的唯一标识符。此值在 <OTA_HotelAvailNotifRQ>、<OTA_HotelRateAmountNotifRQ> 和 <OTA_HotelInvCountNotifRQ> 消息中通过 <StatusApplicationControl> 元素中的 InvTypeCode 属性进行引用。 |
| Transaction / PropertyDataSet / RoomData / Name | 1 | Name | 容器,用于存储一种或多种语言的房间类别名称。 |
| Transaction / PropertyDataSet / RoomData / Name / Text | 1..n | Text | 指定一种语言的房型类别名称。 |
| Transaction / PropertyDataSet / RoomData / Name / Text / @text | 1..n | string | language 属性指定的语言中的房型类别名称。 |
| Transaction / PropertyDataSet / RoomData / Description | 1 | Name | 用于存储一种或多种语言的房型类别说明的容器。 |
| Transaction / PropertyDataSet / RoomData / Description / Text | 1..n | Text | 指定一种语言的房型类别说明。 |
| Transaction / PropertyDataSet / RoomData / Description / Text / @text | 1..n | string | language 属性指定的语言的房型类别说明。 |
| Transaction / PropertyDataSet / RoomData / Description / Text / @language | 1..n | string | 双字母语言代码。 |
| Transaction / PropertyDataSet / RoomData / AllowablePackageIDs | 0..1 | AllowablePackageIDs | <AllowablePackageID> 元素的容器。
如果指定了 如果未指定 请使用 |
| Transaction / PropertyDataSet / RoomData / AllowablePackageIDs / AllowablePackageID | 1..n | AllowablePackageID | 指定可与相应房型组合的房价方案的 PackageID。房价方案由套餐、房价和可用性的组合来定义。PackageID 对应于 OTA_HotelRateAmountNotifRQ 和 OTA_HotelAvailNotifRQ 消息中的 RatePlanCode。
|
| Transaction / PropertyDataSet / RoomData / Capacity | 0..1 | integer | 一间客房实际可容纳的成人和儿童人数上限。此值应大于或等于您随费率发送的任何 NumberOfGuests 值。
注意:如果未设置 |
| Transaction / PropertyDataSet / RoomData / AdultCapacity | 0..1 | integer | 客房可实际容纳的成人人数上限。此值应大于或等于您随费率发送的任何 NumberOfGuests 值。
|
| Transaction / PropertyDataSet / RoomData / ChildCapacity | 0..1 | integer | 客房实际可容纳的儿童人数上限。
|
| Transaction / PropertyDataSet / RoomData / OccupancySettings | 0..1 | OccupancySettings | 可限制或修改房间入住要求的设置。
<OccupancySettings> <MinOccupancy>2</MinOccupancy> <MinAge>16</MinAge> </OccupancySettings> 并非所有子元素都需要包含在内。 |
| Transaction / PropertyDataSet / RoomData / PhotoURL | 0..n | PhotoURL | 指定客房或客房套餐的照片的网址和可选的图片说明。您可以为会议室或会议室套装指定多个 <PhotoURL>。
此元素采用以下子元素:
<PhotoURL> <URL>http://www.example.com/image1.jpg</URL> <Caption> <Text text="A bright way to enjoy your mornin' cuppa tea." language="en"/> <Text text="Une façon lumineuse pour profiter de votre tasse de thé." language="fr"/> </Caption> </PhotoURL> |
| Transaction / PropertyDataSet / RoomData / RoomFeatures | 0..1 | <RoomFeatures> |
包含会议室功能的相关信息。 |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / JapaneseHotelRoomStyle | 0..1 | enum | 表示日式酒店客房的风格。 有效值包括:
|
| Transaction / PropertyDataSet / RoomData / RoomFeatures / Beds | 0..1 | Object | 包含房间内尽可能多的 <Bed>。请注意,此处不应统计日式被褥。
每个
<Bed> 都有以下子元素:
<Beds>
<Bed size="double">
<Width unit="cm" number="140"/>
<Length unit="cm" number="195"/>
</Bed>
<Bed/> <!-- Size unknown -->
</Beds> |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / Suite | 0.. | enum | 如果相应房间是套房,请提供此元素。 |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / Capsule | 0..1 | enum | 如果相应客房是太空舱客房,请提供此元素。 |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / Roomsharing | 0..1 | enum | 相应房间是否与其他居住者(例如业主或其他房客)共用。有效值为 shared 和 private。 |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / Outdoor | 0..1 | enum | 如果相应客房是无固定墙壁、管道和温度控制的室外住宿,请提供此元素。例如,酒店客房不属于户外住宿,而客人住在帐篷中的露营地和客人自带房车的房车营地则属于户外住宿。 |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / MobileAccessible | 0..1 | enum | 如果相应会议室适合行动不便的人士使用,请提供此元素。 |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / Smoking | 0..1 | enum | 相应客房是无烟客房还是吸烟客房。有效值为 non_smoking 和 smoking。 |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / BathAndToilet | 0..1 | Object | 包含房间内浴室和卫生间的信息。
相应属性为:
该元素可以选择性地采用以下子元素:
示例: <BathAndToilet relation="separate">
<Bath bathtub="1" shower="1"/>
<Toilet
electronic_bidet="1"
mobility_accessible="1"/>
</BathAndToilet> |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / OpenAirBath | 0..1 | enum | 如果相应客房设有私人露天浴池,请提供此元素。 |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / AirConditioning | 0..1 | enum | 如果相应房间有空调,请提供此元素。 |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / Balcony | 0..1 | enum | 如果相应客房设有阳台或凉台,请提供此元素。 |
| Transaction / PropertyDataSet / RoomData / RoomFeatures / Views | 0..1 | Object | 有效选项包括:
|
| Transaction / PropertyDataSet / PackageData | 0..n | PackageData | 用于存放描述费率功能和条款(不属于实体客房描述)的元素的容器。 注意:必须提供 |
| Transaction / PropertyDataSet / PackageData / PackageID | 1 | string | 这些消息中的 PackageID 对应于 OTA_HotelRateAmountNotifRQ 和 OTA_HotelAvailNotifRQ 消息中的 RatePlanCode。 |
| Transaction / PropertyDataSet / PackageData / Name | 1 | Name | 用于存储一种或多种语言的软件包名称的容器。 |
| Transaction / PropertyDataSet / PackageData / Name / Text | 1..n | Text | 指定一种语言的软件包名称。 |
| Transaction / PropertyDataSet / PackageData / Name / Text / @text | 1..n | string | language 属性指定的语言的软件包名称。 |
| Transaction / PropertyDataSet / PackageData / Description | 1 | Description | 包含一种或多种语言的软件包说明的容器。 |
| Transaction / PropertyDataSet / PackageData / Description / Text | 1..n | Text | 指定软件包的说明(采用一种语言)。 |
| Transaction / PropertyDataSet / PackageData / Description / Text / @text | 1..n | string | 相应软件包的说明,采用 language 属性指定的语言。 |
| Transaction / PropertyDataSet / PackageData / Description / Text / @language | 1..n | string | 双字母语言代码。 |
| Transaction / PropertyDataSet / PackageData / AllowableRoomIDs | 0..1 | AllowableRoomIDs | <AllowableRoomID> 元素的容器。
如果指定了 如果未指定 请使用 |
| Transaction / PropertyDataSet / PackageData / AllowableRoomIDs / AllowableRoomID | 1..n | AllowableRoomID | 指定可与此房价方案组合的客房类型的 RoomID。房间类型在 <RoomData> 元素中定义。
|
| Transaction / PropertyDataSet / PackageData / MilesIncluded | 0..1 | MilesIncluded | 根据费率方案或套餐的定义方式,向套餐添加积分信息。在定义费率方案的 <PackageData> 元素中指定 <MilesIncluded> 元素。
<MilesIncluded> 具有以下子元素:
|
| Transaction / PropertyDataSet / PackageData / Refundable | 0..1 | Refundable | 允许将房价列为完全可退款或可取消。如果未提供,则不显示有关退款的任何信息。
注意:我们建议您设置所有属性。如果一个或多个属性未设置,系统会生成 Feed 状态警告消息。 如果您未设置任何属性,则相应价格不会显示为可退款。 设置属性时,请注意以下事项:
|
| Transaction / PropertyDataSet / PackageData / Refundable / @available | 1 | boolean | (必需)设置为 1 或 true 可表明相应费率是否允许全额退款;否则设置为 0 或 false。 |
| Transaction / PropertyDataSet / PackageData / Refundable / @refundable_until_days | 0..1 | integer | (如果 available 为 true,则为必需属性)指定可申请全额退款的最晚天数(以入住日期为准)。refundable_until_days 的值必须是介于 0 到 330 之间的整数(含边界值)。 |
| Transaction / PropertyDataSet / PackageData / Refundable / @refundable_until_time | 0.. | Time | (如果 available 为 true,强烈建议使用)指定支持全额退款的最晚时间(采用酒店的当地时间)。此元素可与 refundable_until_days 结合使用,以指定“退款截止时间为入住前两天的下午 4 点”。如果未设置 refundable_until_time,则该值默认为午夜。 |
| Transaction / PropertyDataSet / PackageData / BreakfastIncluded | 0..1 | boolean | 指定相应房型是否包含早餐。
有效值为 0(或 false)和 1(或 true)。
建议您使用 |
| Transaction / PropertyDataSet / PackageData / CheckinTime | 0..1 | Time | 最早可能的入住时间(采用酒店的当地时间)。 时间必须小于 24:00。 |
| Transaction / PropertyDataSet / PackageData / CheckoutTime | 0..1 | Time | 最晚退房时间(采用酒店的当地时间)。 |
| Transaction / PropertyDataSet / PackageData / InternetIncluded | 0..1 | boolean | 指定客房是否包含免费网络连接,而其他客房不包含此便利设施。如果酒店为所有客房提供免费互联网,请勿设置此元素。此元素不适用于客房内没有的有线网络或无线网络。有效值为 0(或 false)和 1(或 true)。
|
| Transaction / PropertyDataSet / PackageData / Meals | 0..1 | Object | 包含此套餐中餐食的相关信息。
仅当 为了使餐食过滤条件( |
| Transaction / PropertyDataSet / PackageData / ParkingIncluded | 0..1 | boolean | 客房是否包含免费停车位,否则停车位将是这家酒店的付费服务。对于提供免费停车位的酒店,请勿为此元素指定值。
有效值为 0(或 false)和 1(或 true)。默认值为 false。
|
| Transaction / PropertyDataSet / PackageData / PhotoURL | 0..1 | Object | (与 <RoomData> 中的 <PhotoURL> 相同,但适用于软件包,例如餐食照片。)
|
示例
客房和套餐数据
以下示例展示了如何在交易(房源数据)消息中定义房源的客房和套餐数据。overlay 属性用于确保,如果意外存在任何数据,则删除所有现有数据并将其替换为此消息中的数据:
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2020-05-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<PropertyDataSet action="overlay">
<Property>Property_1</Property>
<RoomData>
<RoomID>RoomID_1</RoomID>
<Name>
<Text text="King" language="en"/>
</Name>
<Description>
<Text text="Room with a king bed" language="en"/>
</Description>
<Capacity>2</Capacity>
<PhotoURL>
<URL>http://www.foo.com/static/bar/image.jpg</URL>
<Caption>
<Text text="Room with a king bed" language="en"/>
</Caption>
</PhotoURL>
</RoomData>
<RoomData>
<RoomID>RoomID_2</RoomID>
<Name>
<Text text="Double" language="en"/>
</Name>
<!-- Additional RoomData child elements omitted. -->
</RoomData>
<PackageData>
<PackageID>PackageID_1</PackageID>
<Name>
<Text text="Standard" language="en"/>
</Name>
<Description>
<Text text="Standard rate" language="en"/>
</Description>
<MilesIncluded>
<LoyaltyCampaignID>my_campaign</LoyaltyCampaignID>
</MilesIncluded>
<Refundable available="true" refundable_until_days="7" refundable_until_time="18:00:00"/>
<BreakfastIncluded>0</BreakfastIncluded>
</PackageData>
<PackageData>
<PackageID>PackageID_2</PackageID>
<Name>
<Text text="Free Breakfast" language="en"/>
</Name>
<Description>
<Text text="Free breakfast rate" language="en"/>
</Description>
<Refundable available="true" refundable_until_days="7" refundable_until_time="18:00:00"/>
<BreakfastIncluded>1</BreakfastIncluded>
</PackageData>
</PropertyDataSet>
</Transaction>
添加房间类型
以下示例展示了如何向现有 <Transaction> 数据添加房型和套餐:
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2020-07-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<PropertyDataSet action="delta">
<Property>Property_1</Property>
<RoomData>
<RoomID>RoomID_3</RoomID>
<Name>
<Text text="Queen" language="en"/>
</Name>
<!-- Additional RoomData child elements omitted. -->
</RoomData>
<PackageData>
<PackageID>PackageID_3</PackageID>
<Name>
<Text text="Non-Refundable" language="en"/>
</Name>
<!-- Additional PackageData child elements omitted. -->
<Refundable available="false"/>
</PackageData>
</PropertyDataSet>
</Transaction>
移除会议室类型
以下示例展示了如何移除现有房型和套餐。在此场景中,如果“客房和套餐数据”和“添加客房类型”中的消息之前已发送给 Google,那么在 Google 收到显示的消息后,King 和 Double 客房类型将不再存在。请注意,移除套餐数据会影响整个费率方案(如通过交易 [房源数据]、OTA_HotelRateAmountNotifRQ 和 OTA_HotelAvailNotifRQ 消息 [通过引用相同的 PackageID 值] 定义的费率方案),因此可能需要使用其他消息类型进行相应更新,以反映 PackageID_2 和 PackageID_3 不再在此处定义。
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2020-08-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<PropertyDataSet action="overlay">
<Property>Property_1</Property>
<RoomData>
<RoomID>RoomID_1</RoomID>
<Name>
<Text text="Queen" language="en"/>
</Name>
<!-- Additional RoomData child elements omitted. -->
<Capacity>2</Capacity>
<PhotoURL>
<URL>http://www.foo.com/static/bar/image.jpg</URL>
<Caption>
<Text text="Room with a queen bed" language="en"/>
</Caption>
</PhotoURL>
</RoomData>
<PackageData>
<PackageID>PackageID_1</PackageID>
<Name>
<Text text="Refundable" language="en"/>
</Name>
<!-- Additional PackageData child elements omitted. -->
<Refundable available="true" refundable_until_days="7" refundable_until_time="18:00:00"/>
<BreakfastIncluded>0</BreakfastIncluded>
</PackageData>
</PropertyDataSet>
</Transaction>
限制费率方案
以下示例展示了如何使用 <AllowablePackageIDs> 元素来限制允许的房型费率方案。在此示例中,Queen 房型 (RoomID_2) 只能与标识为 PackageID_1 的套餐和房价方案组合使用。
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2020-12-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<PropertyDataSet action="overlay">
<Property>Property_1</Property>
<RoomData>
<RoomID>RoomID_1</RoomID>
<Name>
<Text text="King" language="en"/>
</Name>
<!-- Additional RoomData child elements omitted. -->
</RoomData>
<RoomData>
<RoomID>RoomID_2</RoomID>
<Name>
<Text text="Queen" language="en"/>
</Name>
<AllowablePackageIDs>
<AllowablePackageID>PackageID_1</AllowablePackageID>
</AllowablePackageIDs>
<!-- Additional RoomData child elements omitted. -->
</RoomData>
<PackageData>
<PackageID>PackageID_1</PackageID>
<Name>
<Text text="Standard" language="en"/>
</Name>
<!-- Additional PackageData child elements omitted. -->
<Refundable available="true" refundable_until_days="7" refundable_until_time="18:00:00"/>
<BreakfastIncluded>0</BreakfastIncluded>
</PackageData>
<PackageData>
<PackageID>PackageID_2</PackageID>
<Name>
<Text text="Free Breakfast" language="en"/>
</Name>
<!-- Additional PackageData child elements omitted. -->
<Refundable available="true" refundable_until_days="7" refundable_until_time="18:00:00"/>
<BreakfastIncluded>1</BreakfastIncluded>
</PackageData>
</PropertyDataSet>
</Transaction>
限制会议室容纳人数
以下示例展示了如何使用 <Capacity>、<AdultCapacity>、<ChildCapacity> 元素来设置房间容量限制。
<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2020-12-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<PropertyDataSet action="overlay">
<Property>Property_1</Property>
<RoomData>
<RoomID>RoomID_1</RoomID>
<Name>
<Text text="Double" language="en"/>
</Name>
<Capacity>4</Capacity>
<AdultCapacity>4</AdultCapacity>
<ChildCapacity>3</ChildCapacity>
<!-- Additional RoomData child elements omitted. -->
</RoomData>
</PropertyDataSet>
</Transaction>
双人房类型 (RoomID_1) 最多可入住 4 位客人。此外,还可入住最多 4 位成人和最多 3 位儿童。必须满足所有这三项容量要求,才能预订此会议室。此配置代表的是一间配备两张床的典型客房,每张床可容纳两人。儿童入住人数上限比总入住人数上限少一人,因为客房内必须至少有一名成人。
包含 <RoomFeatures> 和餐食的扩展示例
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>
日西式客房(带床)
以下是 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
如果合作伙伴在 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>
餐食照片
以下示例定义了餐点、照片以及入住和退房时间的客房和套餐元数据:
<?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>
响应
语法
TransactionResponse (Property Data) 消息使用以下语法:
<?xml version="1.0" encoding="UTF-8"?>
<TransactionResponse timestamp="timestamp"
id="message_ID"
partner="partner_key">
<!-- Either Success or Issues will be populated. -->
<Success/>
<Issues>
<Issue code="issue_code" status="issue_type">issue_description</Issue>
</Issues>
</TransactionResponse>
元素和属性
TransactionResponse (Property Data) 消息具有以下元素和属性:
| 元素 / @Attribute | 出现次数 | 类型 | 说明 |
|---|---|---|---|
| TransactionResponse | 1 | Complex element | 根元素,用于指示收到的交易请求消息的成功情况或问题。 |
| TransactionResponse / @timestamp | 1 | DateTime | 相应消息的创建日期和时间。 |
| TransactionResponse / @id | 1 | string | 关联的交易消息中的唯一标识符。 |
| TransactionResponse / @partner | 1 | string | 相应消息的合作伙伴账号。 |
| TransactionResponse / Success | 0..1 | Success | 表示交易消息已成功处理,没有警告、错误或失败。
每条消息中都包含 |
| TransactionResponse / Issues | 0..1 | Issues | 一个容器,用于存放处理交易消息时遇到的一个或多个问题。
每条消息中都包含 |
| TransactionResponse / Issues / Issue | 1..n | Issue | 处理交易消息时遇到的警告、错误或失败的说明。如需详细了解这些问题,请参阅Feed 状态错误消息。 |
| TransactionResponse / Issues / Issue / @code | 1 | integer | 问题的标识符。 |
| TransactionResponse / Issues / Issue / @status | 1 | enum | 遇到的问题类型。 有效值为 |
示例
成功
以下是成功处理交易消息的响应。
<?xml version="1.0" encoding="UTF-8"?>
<TransactionResponse timestamp="2020-05-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<Success/>
</TransactionResponse>
问题
以下是因错误而未处理交易消息的响应。
<?xml version="1.0" encoding="UTF-8"?>
<TransactionResponse timestamp="2020-05-18T16:20:00-04:00"
id="12345678"
partner="partner_key">
<Issues>
<Issue code="1001" status="error">Example</Issue>
</Issues>
</TransactionResponse>