交易(媒体资源数据)

请求

语法

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>
      <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 此消息所属的合作伙伴账号。此字符串值是 “合作伙伴密钥”值列于 <ph type="x-smartling-placeholder"></ph> 账号设置页面

注意:如果您的后端为以下对象提供 Feed 多个账号,此值需要与 ID 相匹配 在 <RequestorID> 中指定的属性值 的 <OTA_HotelRateAmountNotifRQ> 的元素和 同一账号的 <OTA_HotelAvailNotifRQ> 封邮件。

Transaction / PropertyDataSet 1.. PropertyDataSet 用于定义单个房源的客房类型和套餐的容器。
Transaction / PropertyDataSet / @action 0..1 enum

要应用于房价定义的更新类型。

有效值包括:

  • overlay : 会替换之前定义的所有字段 <RoomData><PackageData> 。只有 <RoomData> 和 当前消息中的“<PackageData>”有效。
  • delta : 添加之前未定义的 <RoomData><PackageData> 或修改现有规则

该属性是可选属性,否则默认为 delta

Transaction / PropertyDataSet / Property 1 string 房源的唯一标识符。该值必须与 使用 指定的酒店 ID <listing> 元素中的 <id>Hotel Center 中也会列出酒店 ID。
Transaction / PropertyDataSet / RoomData 0..n RoomData

描述房间。

注意:请至少指定以下其中一项:<RoomData><PackageData>

Transaction / PropertyDataSet / RoomData / RoomID 1 RoomID 房间类型的唯一标识符。此值使用 InvTypeCode 属性, <StatusApplicationControl> 元素 <OTA_HotelAvailNotifRQ><OTA_HotelRateAmountNotifRQ> 封邮件。
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> 元素的容器。

如果指定了 <AllowablePackageIDs>,则会议室 由 <RoomID> 标识的类型 在父 <RoomData> 元素中,只能是 同时与 <AllowablePackageID> 元素。

如果未指定 <AllowablePackageIDs>,则会议室 由父文件中的 <RoomID> 标识的类型 <RoomData>元素可与任意 价格方案

请使用 <AllowablePackageIDs><AllowableRoomIDs>,但不能同时设置这两者。

Transaction / PropertyDataSet / RoomData / AllowablePackageIDs / AllowablePackageID 1..n AllowablePackageID 指定可与此项结合使用的费率方案的 PackageID 客房类型。费率方案由 价格和空房情况。PackageID 对应于RatePlanCode OTA_HotelRateAmountNotifRQ 和 OTA_HotelAvailNotifRQ 消息。
Transaction / PropertyDataSet / RoomData / Capacity 0..1 integer 一个房间可容纳的成人和儿童数量上限 实际适应。此值应大于或等于 随费率发送的任何 NumberOfGuests 值。

<Capacity> 的值必须是正整数 介于 199 之间(包括这两个数值)。请参阅 此处获取示例。

注意:如果未设置 <Capacity>,则 的允许入住人数视为无限制。如果此字段 未设置,并且 ExtraGuestCharges 或 已定义AdditionalGuestAmounts和价格 可为任意人数生成通用规则。我们建议 如果 ExtraGuestCharges,则应设置 <Capacity>AdditionalGuestAmounts 这两个参数,以确保 不显示无效的入住人数选项。

Transaction / PropertyDataSet / RoomData / AdultCapacity 0..1 integer 一个房间实际拥有的成人人数上限 调整。此值应大于或等于 随费率一起发送的 NumberOfGuests 值。

<AdultCapacity> 的值必须是正数 介于 199 之间的整数(包括这两个数值)。请参阅 此处获取示例。

Transaction / PropertyDataSet / RoomData / ChildCapacity 0..1 integer 一个房间实际可以容纳的子项数量上限 调整

<ChildCapacity> 的值必须是正数 介于 1 和 99 之间的整数(包括 1 和 99)。请参阅 此处获取示例。

Transaction / PropertyDataSet / RoomData / OccupancySettings 0..1 OccupancySettings 可用于限制或修改酒店的入住人数要求的设置 房间。

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

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

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

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

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

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

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

Transaction / PropertyDataSet / RoomData / PhotoURL 0..n PhotoURL 指定房间照片的网址和可选图片说明,或 客房套餐。您可以指定多个 <PhotoURL> (如房间或客房套餐)。

该元素采用以下子元素:

  • <URL>:指定照片的位置。通过 位置应为公开位置(不在防火墙后面),并且应包含 协议 (http://)。
  • <Caption>:定义照片的说明。 该元素接受一个子元素 <Text>, 该属性有两个必需属性:TextlanguageText 属性是图片说明, language 属性指定由两个字母构成的 语言代码,例如 en
<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

表示日式酒店客房的样式。

有效值包括:

  • western:配有床的西式客房。
  • japanese:配有日式床垫的日式客房。
  • japanese_western:日式西式房间, 西式床和日式日式床垫。
Transaction / PropertyDataSet / RoomData / RoomFeatures / Beds 0..1 Object 包含的 <Bed> 与聊天室中的一样多。请注意 其中不应包含日式日式床垫

每个 <Bed> 都具有以下属性:

  • size(可选):有效值为 singlesemi_doubledoublequeenking
。 每个 <Bed> 都具有以下子元素: <ph type="x-smartling-placeholder">
    </ph>
  • <Width>(可选):指定床型的宽度。 必须具有属性 unit,其值为 cm 属性 number 替换为床宽度(以整数厘米为单位)。
  • <Length>(可选):指定睡床长度。 必须具有属性 unit,其值为 cm 属性 number 为床身长度 整数厘米。
。 示例:
<Beds>
  <Bed size="double">
    <Width unit="cm" number="140"/>
    <Length unit="cm" number="195"/>
  </Bed>
  <Bed/> <!-- Size unknown -->
</Beds>
Transaction / PropertyDataSet / RoomData / RoomFeatures / Suite 0.. enum 如果此房间是套房,请提供此元素。
Transaction / PropertyDataSet / RoomData / RoomFeatures / Capsule 0..1 enum 如果房间是胶囊房间,请提供此元素。
Transaction / PropertyDataSet / RoomData / RoomFeatures / Roomsharing 0..1 enum 此房间是否与其他房客(如所有者)共用 或其他访客。有效值为 sharedprivate
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_smokingsmoking
Transaction / PropertyDataSet / RoomData / RoomFeatures / BathAndToilet 0..1 Object 包含房间内浴室和卫生间的相关信息。

该属性为:

  • relation(可选):表示浴室和 马桶是相对于彼此相对放置的。有效值包括 together,例如,一个浴室,其中两个浴缸 和厕所位于同一房间内;和 separate,浴室和厕所均有专用 空格。当会议室没有 既有浴室又有卫生间

该元素可选择接受以下子元素:

  • <Bath>(可选):此元素是否存在 表示房间配备浴缸。

    这些属性包括:

    • bathtub(可选):表示浴室配有 浴室里的浴缸有效值为 0 (或 false)和 1(或 true)。
    • shower(可选):表示浴室配有 淋浴。有效值为 0(或 false)和 1(或 true)。
  • <Toilet>(可选):此元素是否存在 表示此房间设有卫生间。

    这些属性包括:

    • electronic_bidet(可选):表示 马桶配有电子坐浴盆。 有效值为 0(或 false)和 1(或 true)。
    • mobility_accessible(可选):表示 厕所提供无障碍设施。有效值为 0 (或 false)和 1(或 true)。

示例:

<BathAndToilet relation="separate">
  <Bath bathtub="1" shower="1"/>
  <Toilet
    electronic_bidet="1"
    mobility_accessible="1"/>
</BathAndToilet>
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 有效选项包括:

<AirportView/>
<BayView/>
<BeachView>/>
<CastleView/>
<CityView/>
<CountrysideView/>
<CourtyardView/>
<DuneView/>
<ForestView/>
<GardenView/>
<GolfCourseView/>
<HarborView/>
<LagoonView/>
<LakeView/>
<MarinaView/>
<MountainView/>
<NatureView/>
<OceanView/>
<ParkView/>
<PartialOceanView/>
<PisteView/>
<PoolView/>
<PyramidView/>
<RiverView/>
<StreetView/>

Transaction / PropertyDataSet / PackageData 0..n PackageData

用于描述费率特征和 未包含在实际房间说明中。

注意:请至少指定以下其中一项:<RoomData><PackageData>

Transaction / PropertyDataSet / PackageData / PackageID 1 string 这些消息中的 PackageID 对应于 OTA_HotelRateAmountNotifRQ 中的 RatePlanCode 和 OTA_HotelAvailNotifRQ 消息。
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> 元素的容器。

费率方案(如果指定 <AllowableRoomIDs>) 由<PackageID>标识 在父 <PackageData> 元素中,只能是 同时指定了 <AllowableRoomID> 元素。

如果未指定 <AllowableRoomIDs>,则 由父级中的 <PackageID> 标识的方案 <PackageData>元素可与任意 客房类型。

请使用 <AllowablePackageIDs><AllowableRoomIDs>,但不能同时设置这两者。

Transaction / PropertyDataSet / PackageData / AllowableRoomIDs / AllowableRoomID 1..n AllowableRoomID 指定可与此属性合并的房间类型的 RoomID。 价格方案客房类型在 <RoomData> 中定义 元素。
Transaction / PropertyDataSet / PackageData / Refundable 0..1 Refundable 允许将房价列为可全额退款或可取消的房价。如果未提供,则不会显示任何退款信息。

注意:我们建议设置所有属性。一个 Feed 一个或多个属性 未设置。

如果您未设置任何属性,则费率将显示为 可退款。

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

  • 如果为 availablerefundable_until_days 未设置,则相应费率不会显示为可退款。
  • 如果 available0false, 其他属性会被忽略。该费率并未显示为 即使设置了另外一个或两个属性,也仍然可以退款。
Transaction / PropertyDataSet / PackageData / Refundable / @available 1 boolean (必需)设置为 1true,用于指明费率是否允许 refund;否则设为 0false
Transaction / PropertyDataSet / PackageData / Refundable / @refundable_until_days 0..1 integer (如果 availabletrue)指定 提前几天办理全额退款 请求。refundable_until_days 的值 必须是 0 到 330 之间的整数(含 0 和 330)。
Transaction / PropertyDataSet / PackageData / Refundable / @refundable_until_time 0.. Time (如果 availabletrue)指定 一天当中的最新时间,即酒店的当地时间, 退款申请将被接受。这可与 用于指定 refundable_until_days,对于 例如,“退款可在第二天下午 4:00 之前退款 签到”。如果未设置 refundable_until_time,则应用此值 默认为午夜。
Transaction / PropertyDataSet / PackageData / BreakfastIncluded 0..1 boolean 指定此客房类型是否包含早餐。 有效值为 0(或 false)和 1 (或 true)。

最好使用 <Meals> 而非 <BreakfastIncluded>

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 包含此包裹中的餐点的相关信息。

<Meals> 元素有两个可选的子元素 <Breakfast><Dinner> 它具有以下属性:

  • included(必需):设置为 1(或 true)(如果房价包含早餐/晚餐);否则 设置为 0false
  • in_room(可选):设置为 1(或 true) 入住日期否则设置为 0(或 false)。
  • in_private_space(可选):设置为 1 (或 true) 在能够避免的房间(他们入住的房间除外)里吃晚饭 与其他房客联系;否则设置为 0(或 false)。
  • buffet(可选):设置为 1(或 true)(如果早餐/晚餐为自助餐); 否则设置为 0(或 false)。

可选属性仅在 included 为 true。

对于膳食过滤器(no mealsbreakfast onlydinner onlybreakfast and dinner)到单位, <Breakfast><Dinner>都需要 与 included 属性一起提供。

Transaction / PropertyDataSet / PackageData / ParkingIncluded 0..1 boolean 客房是否提供免费停车位,其中 如果不是,这家酒店将需要付费服务。不指定 酒店免费停车的该元素的值。 有效值为 0(或 false)和 1(或 true)。默认值为 false
Transaction / PropertyDataSet / PackageData / PhotoURL 0..1 Object (与 <RoomData> 中的 <PhotoURL> 相同, 而是针对套餐(例如餐点照片)。

示例

Room 和软件包数据

下面是一个基本示例,展示了如何定义房源的房间和 包含在交易(房源数据)消息中打包数据。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>
      <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>

移除客房类型

以下示例展示了如何移除现有房型和 软件包在此场景中,如果“Room and package data”中的消息 和“添加客房类型”King 和 Google 收到此消息后,Double 种房间类型将不再存在 。请注意,移除套餐数据会影响整个费率方案 针对交易(房源数据)、OTA_HotelRateAmountNotifRQ、 和 OTA_HotelAvailNotifRQ 消息(通过引用相同的 PackageID) 值),因此使用其他消息类型的相应更新 来反映 PackageID_2PackageID_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>

两张双人床

下面是一个 western 样式房间示例,其中包含两个 double 张床。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>western</JapaneseHotelRoomStyle>
        <Beds> <!-- Two double beds-->
          <Bed size="double"></Bed>
          <Bed size="double"></Bed>
        </Beds>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

日式(不睡床)

下面是一个不设床的日式房间示例。床 无需为japanese样式房间提供任何信息。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese</JapaneseHotelRoomStyle>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

带床的日式西部风格

以下是包含 kingjapanese_western 样式房间的示例 大小的床。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese_western</JapaneseHotelRoomStyle>
        <Beds>
          <Bed size="king"></Bed>
        </Beds>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

如果合作伙伴没有 japanese_western 中的床位数量信息 请参阅以下示例:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese_western</JapaneseHotelRoomStyle>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>


餐食

以下示例定义了用餐、照片 以及入住时间和退房时间:

<?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 指示交易消息已成功处理 而不会出现警告、错误或故障

<Success><Issues> 为 。

TransactionResponse / Issues 0..1 Issues 处理 交易消息。

<Success><Issues> 为 。

TransactionResponse / Issues / Issue 1..n Issue 对在调试过程中遇到的警告、错误或失败情况的说明 处理 Transaction 消息。如需详细了解这些问题,请访问 Feed 状态错误消息
TransactionResponse / Issues / Issue / @code 1 integer 问题的标识符。
TransactionResponse / Issues / Issue / @status 1 enum

遇到的问题类型。

有效值为 warningerror、 和 failure

示例

成功

以下是对已成功处理的 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>