请求
语法
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 中 <listing>元素中使用<id>指定的酒店 ID 一致。酒店 ID 也列在 Hotel Center 中。 | 
| 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:00”。如果未设置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 客房类型将不再存在。请注意,移除套餐数据会影响 Transaction(房源数据)、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 名儿童。必须满足上述所有三项容量要求,此房间才可供预订。此配置代表一个典型的客房,其中有两张床,每张床可供两人入住。由于房间必须至少有一名成人入住,因此儿童入住人数比总入住人数少 1 人。
包含 <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>
日式西式客房(带床)
以下是带 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>
餐食照片
以下示例定义了餐食、照片以及入住和退房时间的客房和套餐元数据:
<?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 | 遇到的问题类型。 有效值为  | 
示例
成功
以下是对成功处理的 Transaction 消息的响应。
<?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>