交易 (資源資料)

要求

語法

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>

元素和屬性

「交易 (資源資料)」訊息包含下列元素和 屬性:

元素 / @屬性 發生次數 類型 說明
Transaction 1 Complex element 在 ARI 實作中,這是訊息的根元素 為單一房源定義房型和套裝方案。
Transaction / @timestamp 1 DateTime 這則訊息的建立日期和時間。
Transaction / @id 1 string 此要求訊息的專屬 ID。系統會傳回這個值 。允許的字元為 a-z、A-Z、0-9、_ (底線) 和 - (破折號)。
Transaction / @partner 1 string 這則訊息的合作夥伴帳戶。這個字串值為 「合作夥伴金鑰」列在 Hotel Center 的帳戶設定頁面

注意:如果您的後端 多個帳戶,這個值必須符合 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。這個值必須符合 使用 指定飯店 ID <listing> 元素中的 <id> 自動擷取廣告飯店 ID 也會列在 Hotel Center 中。
Transaction / PropertyDataSet / RoomData 0..n RoomData

說明房間。

注意:至少其中一種 <RoomData> 必須提供或 <PackageData>

Transaction / PropertyDataSet / RoomData / RoomID 1 RoomID 房型的專屬 ID,這個值是使用以下規則參照: 呼叫物件中的 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,價格 可由任意數量的入住人數產生建議做法 您只要設定 <Capacity>ExtraGuestChargesAdditionalGuestAmounts,確保價格 如果入住選項無效,系統就不會顯示這類選項。

Transaction / PropertyDataSet / RoomData / AdultCapacity 0..1 integer 房間可實際顯示的成人人數上限 。該值必須大於或等於任何 您傳送的 NumberOfGuests 值。

<AdultCapacity> 的值必須是正數 介於 199 之間的整數 (含首尾)。詳情請見 這裡的範例。

Transaction / PropertyDataSet / RoomData / ChildCapacity 0..1 integer 房間可實際擁有的子項數量上限 。

<ChildCapacity> 的值必須是正數 介於 1 到 99 (含首尾) 之間的整數。詳情請見 這裡的範例。

Transaction / PropertyDataSet / RoomData / OccupancySettings 0..1 OccupancySettings 這些設定可以限製或修改 您可以啟用「攝影棚效果」選項

<OccupancySettings> 元素會採用 下列子元素:

  • <MinOccupancy>:房客人數下限 可以留在房間裡舉例來說,如果設為 2,你無法為單一邀請對象預訂這個會議室。

    <MinOccupancy> 的值必須是正數 介於 1 到 99 (含首尾) 之間的整數。

  • <MinAge>:所有房客的最低年齡 進而決定哪些差異舉例來說,如果設為 18 這個會議室只能預訂所有邀請對像都年滿 18 歲的群組 或更高級別。

    <MinAge> 的值必須是正整數 介於 0 到 99 (含首尾) 之間。

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

您不需要加入所有子元素。

Transaction / PropertyDataSet / RoomData / PhotoURL 0..n PhotoURL 指定房間相片的網址和選用說明文字,或 房型套裝組合。您可以指定多個 <PhotoURL> 房間或 Room Bundle。

這個元素會採用下列子元素:

  • <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> 都具有下列子元素:
  • <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 允許公告費率可全額退款或可取消。如未提供,就不會顯示退款相關資訊。

注意:建議您設定所有屬性。動態饋給 當有一或多個屬性 未設定。

如未設定任何屬性,費率就不會顯示為 。

設定屬性時,請注意下列事項:

  • 如果 availablerefundable_until_days 未設定,就無法將費率顯示為可退款。
  • 如果 available0false, 其他屬性都會被忽略。費率不會顯示 但可以退還。
Transaction / PropertyDataSet / PackageData / Refundable / @available 1 boolean (必要) 設為「1」或 true 表示費率是否允許 refund;否則設為 0false
Transaction / PropertyDataSet / PackageData / Refundable / @refundable_until_days 0..1 integer (如果符合,則為必要欄位: availabletrue) 指定 從入住前算起可全額退款的天數 。refundable_until_days 的值 必須是介於 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>

移除房型

以下範例說明如何移除現有的房型和 套件在這個情境中,如果「會議室和套件資料」中的訊息 以及「新增房間類型」已傳送至 Google,即 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 位兒童。三種容量 才能預訂這個房間。這個 代表一般房間的配置,每個房間都有兩張床 兩個人,子資源容量小於總容量 1 因為會議室中必須有至少一位成人

包含 <RoomFeatures> 和餐點的更多範例

JapaneseHotelRoomStyle」沒有預設值。 省略值並不會導致 XML 錯誤,但您的商店資訊則不會產生 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) 訊息包含下列內容 元素與屬性:

元素 / @屬性 發生次數 類型 說明
TransactionResponse 1 Complex element 表示接收端成功或問題的根元素 交易要求訊息。
TransactionResponse / @timestamp 1 DateTime 這則訊息的建立日期和時間。
TransactionResponse / @id 1 string 相關交易訊息的專屬 ID。
TransactionResponse / @partner 1 string 這則訊息的合作夥伴帳戶。
TransactionResponse / Success 0..1 Success 表示交易訊息已成功處理 而不會出現警告、錯誤或失敗

<Success><Issues> 為 。

TransactionResponse / Issues 0..1 Issues 用來存放處理 交易訊息。

<Success><Issues> 為 。

TransactionResponse / Issues / Issue 1..n Issue 出現警告、錯誤或失敗情形的說明 處理交易訊息查看這些問題的詳細資料 動態饋給狀態錯誤訊息一文中的指示。
TransactionResponse / Issues / Issue / @code 1 integer 問題的 ID。
TransactionResponse / Issues / Issue / @status 1 enum

遇到的問題類型。

有效值為 warningerror、 和 failure

範例

成功

以下為成功處理的交易訊息回應。

<?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>