定價與費率;Room 庫存 (交易) XML 參考資料

本頁提供以 XML 為基礎的交易訊息參考資料。

<Transaction>

交易訊息的根元素 為 <Transaction>。這是用來存放說明 客房、套裝方案,以及客房與套裝行程的價格與空房資訊。

<Transaction> 元素會顯示在以下位置的以下位置: 交易訊息 XML 階層:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

如果訊息以 <Transaction> 做為根元素,至少須有一項 子項元素。交易訊息可包含任意數量的子元素,例如 郵件大小不得超過 100 MB。

語法

<Transaction> 元素使用下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="timestamp" id="transaction_ID">

  <!-- Defines data about a room or package (Room Bundle) -->
  <PropertyDataSet>
    ...
  </PropertyDataSet>

  <!-- Updates/sets prices and availability for rooms and Room Bundles -->
  <!-- (Also removes itineraries from inventory) -->
  <Result>
    ...
  </Result>

</Transaction>

屬性

<Transaction> 元素的屬性如下:

屬性 必填與否 類型 說明
id Required string 每封交易訊息的專屬 ID。
partner Optional string 交易訊息所屬的合作夥伴帳戶。個人中心 如果後端為多個元素提供價格動態饋給,通常就會使用這個屬性 合作夥伴帳戶。這個字串值是「合作夥伴金鑰」列在 Hotel Center 的帳戶設定頁面
timestamp Required DateTime

交易訊息 已傳送。

如果訊息的時間戳記在過去 24 小時內傳送, 才會遭到系統處理,因此不會遭到捨棄。

訊息的處理順序是 timestamp,而非 接收順序。例如,使用 在以下項目後收到的 2019-05-03 14:09:00 時間戳記: 時間戳記為 2019-05-03 14:10:00 的訊息會 仍會按照順序處理,且訊息中傳送給 系統會使用 2019-05-03 14:10:00 的時間戳記。

子元素

<Transaction> 元素包含下列子元素:

子項元素 必填與否 類型 說明
<PropertyDataSet> Optional* <PropertyDataSet>

說明特定客房和房型套裝組合。您通常使用這個 元素來定義共用值, 使用 Room Bundle,並縮減交易訊息的大小。

<Result> Optional* <Result>

客房的行程價格資料 定義 Room Bundle 和<RoomBundle> 房源的其他類型客房。 <Result> 元素也可用於移除 來自商品目錄的行程資訊

* 至少要有 <PropertyDataSet><Result> 必填。

範例

會議室資料

以下範例說明交易訊息中的會議室資料:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>5440OF</RoomID>
      <Name>
        <Text text="Single King Bed Room" language="en"/>
        <Text text="Simple Lit de Roi" language="fr"/>
      </Name>
      <Description>
        <Text text="One king bed with pillowtop mattresses, 300-thread-count linens,
          and down comforters (bedspreads). City view. 300 square feet. Desk with
          rolling chair. Multi-line phone with voice mail. Cable/satellite TV with
          complimentary HBO and pay movies." language="en"/>
        <Text text="Un très grand lit avec matelas à plateau-coussin, ..." language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Bathroom View" language="en"/>
          <Text text="La salle de baines" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Capacity>4</Capacity>
    </RoomData>
  </PropertyDataSet>
</Transaction>

價格資料

以下範例定義了交易訊息中的定價資料:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
  </Result>
  <Result>
    <Property>052213</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">299.98</Baserate>
    <Tax currency="USD">26.42</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="otto"/>
      <PointOfSale id="simon"/>
    </AllowablePointsOfSale>
  </Result>
</Transaction>

每晚房價

以下範例定義自 1 至 7 晚開始的價格資料 2023 年 6 月 7 日:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-08-24T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">209.99</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">419.98</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>3</Nights>
    <Baserate currency="USD">614.97</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>4</Nights>
    <Baserate currency="USD">819.96</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>5</Nights>
    <Baserate currency="USD">999.95</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>6</Nights>
    <Baserate currency="USD">1193.94</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>7</Nights>
    <Baserate currency="USD">1259.93</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
</Transaction>


基準 &條件式費率

以下範例顯示包含基準的 Transaction 訊息 費率和條件式費率

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>1</Nights>

    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>

    <Rates>
      <!-- The rate_rule_id is required when using conditional rates -->
      <Rate rate_rule_id="mobile">
        <!-- Override base rate and taxes for conditional rates -->
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <!-- NOTE: OtherFees is inherited from the above setting -->
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

移除廣告空間

以下範例移除多個商品目錄 (入住 1 晚的住宿天數為 1 晚) 多個不同日期) 有空房的飯店:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-05-23T16:20:00-04:00" id="42">
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-23</Checkin>
    <Nights>1</Nights>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-24</Checkin>
    <Nights>1</Nights>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
  <!---Sending <Baserate> is optional with <Unavailable> -->
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-25</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">-1</Baserate>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
</Transaction>

<PropertyDataSet>

會議室及包裹 (或 Room Bundle) 資訊的容器 <Transaction> 訊息。在合作夥伴設定的飯店覆寫值上設定的值。 Google 會儲存這些資訊,因此您不必每次都輸入 你們傳送價格更新資訊時

<PropertyDataSet> 元素會顯示在以下位置的以下位置: 交易訊息 XML 階層:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>  // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

詳情請參閱「會議室套件中繼資料」。

語法

<PropertyDataSet> 元素使用下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet>
    <!-- (Required) ID that matches the Hotel List Feed -->
    <Property>hotel_ID</Property>

    <!-- (Optional) Defines metadata about a room -->
    <RoomData>
      ...
    </RoomData>

    <!-- (Optional) Defines package metadata to be paired with rooms (Room Bundles) -->
    <PackageData>
      ...
    </PackageData>
  </PropertyDataSet>
  ...
</Transaction>

屬性

<PropertyDataSet> 元素沒有屬性。

子元素

<PropertyDataSet> 元素包含下列子元素:

子項元素 必填與否 類型 說明
<PackageData> Optional* <PackageData> 說明 Room 套裝組合。這項資料已與合作夥伴建立關聯 但不以行程預訂的飯店這個元素類似於 <RoomData>,但這裡所指的設施和條款不屬於 實體房間說明的開頭

您會在價格更新時參照套件 ID。

如需更多資訊,請參閱 會議室套裝組合中繼資料

<Property> Required string 相關資料所套用的飯店 ID。 此元素的值必須是與清單項目相符的字串 飯店清單動態饋給中的<id>
<RoomData> Optional* <RoomData> 說明房間。這項資料會與合作夥伴和飯店建立關聯 而非行程

你可以在價格更新資訊中參照房型 ID。

* 至少要有 <PackageData><RoomData> 必填。

範例

Room 和套件資料

以下範例顯示 <PropertyDataSet>

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

傳送這個客房和房型套裝組合的價格和空房資訊後, 在定價訊息中參照客房和套裝方案 ID。結果是 可以大幅縮減郵件的大小 可能發生的錯誤數量如要 請參閱「會議室套件中繼資料」一文。

<RoomData>

定義與會議室獨立行程的中繼資料,以及 Room 的擴充功能中繼資料 套裝組合 (因為房型套裝組合是客房與其他設施)。使用 <RoomData>:減少價格中重複的描述性資料 動態消息。

<RoomData> 元素會顯示在以下位置的以下位置: 交易訊息 XML 階層:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

<RoomData> 元素包含與 合作夥伴和飯店,而非行程。產品用途是 非行程資料

<RoomData> 元素與 <PackageData> 相似,但其說明 實體房間,而不是 套裝行程的設施和條款使用 結合「<RoomData>」和「<PackageData>」,提供關於 房型套裝組合。至於不屬於套裝方案的個別房間,請直接使用 <RoomData>

您可以定義以下項目的 <RoomData><PackageData> 元素: 同一個房間或 Room Bundle。Google 在 搜尋結果會包含這兩份的說明,並以 連字號鍵。

詳情請參閱「會議室套件中繼資料」。

語法

<RoomData> 元素使用下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet>
    ...
    <RoomData>
      <RoomID>room_ID</RoomID>

      <Name>
        <Text text="room_name" language="language_code"/>
        ...
      </Name>

      <Description>
        <Text text="room_description" language="language_code"/>
        ...
      </Description>

      <Capacity>max_number_of_occupants</Capacity>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults, children, or seniors --></OccupancyDetails>
      <OccupancySettings>
        <MinOccupancy>min_number_of_occupants</MinOccupancy>
        <MinAge>min_age_of_occupants</MinAge>
      </OccupancySettings>

      <PhotoURL>
        <Caption>
          <Text text="photo_description" language="language_code"/>
          ...
        </Caption>
        <URL>photo_location</URL>
      </PhotoURL>
      <RoomFeatures>
        ...
      </RoomFeatures>
    </RoomData>
    ...
  </PropertyDataSet>
</Transaction>

屬性

<RoomData> 元素沒有屬性。

子元素

<RoomData> 元素包含下列子元素:

子項元素 必填與否 類型 說明
<Capacity> Optional integer 會議室可實際容納的房客人數上限 。房間的容量大於或等於 活動情形。

指定時,這個值必須等於或大於值 也就是 <Occupancy> 元素 特定房間的房客人數例如,某個大型套房 <Capacity> 可能是 6,但 <Occupancy> 等於 4。

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

<Description> Optional Object 房間的詳細說明。這個元素應該 包含未由其他元素描述的資訊, <Name> 元素。請勿全部用大寫 指定房間說明時所用的字母。

<Description> 元素採用單一子項 <Text> 元素,其中包含以下兩個 必要屬性:

  • text:聊天室的詳細說明。
  • language:雙字母語言代碼;例如 fr

針對每種語言使用不同的 <Text> 元素 可能會顯示您廣告或免費的預訂連結 (兩者的 language 屬性)。

以下範例是法文和英文版本的會議室 說明:

<Description>
  <Text text="Two queen-sized beds" language="en"/>
  <Text text="Deux lits de la reine" language="fr"/>
</Description>
<Name> Required string 聊天室類別的名稱。這個值應符合 刊登在飯店的到達網頁 (舊稱銷售點) 上。不要設定 將此元素的值設為全部大寫。

這個元素採用單一子元素 <Text>。 其中包含下列兩個必要屬性:

  • text:聊天室的名稱。
  • language:雙字母語言代碼;例如 fr

針對每種語言使用不同的 <Text> 元素 貴商家或免費的預訂連結可能會顯示 ( language 屬性的值)。

以下範例是法文和英文版本的會議室 名稱:

<Name>
  <Text text="Standard Double Room" language="en"/>
  <Text text="Le chambre double" language="fr"/>
</Name>
<Occupancy> Optional integer 會議室適用對象的邀請對像人數上限。 舉例來說,大型套房也許可以配合 6 部 共乘者 (容量 = 6),但最多可容納 4 人。

這個值必須小於或等於 <Capacity> 元素:也就是人數 可以實際操作

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

<Occupancy>可能伴隨 <OccupancyDetails>,用於指定 共乘者 (成人或兒童)。請參閱 <OccupancyDetails> 瞭解語法 和子元素的說明

<OccupancySettings> Optional Object 這些設定可以限製或修改 您可以啟用「攝影棚效果」選項

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

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

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

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

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

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

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

<PhotoURL> Optional Object 指定房間相片的網址和選用說明文字,或 房型套裝組合。您可以指定多個 <PhotoURL> 房間或 Room Bundle。每張相片網址都必須有自己的網址 <PhotoURL>

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

  • <URL>:指定相片的所在位置。 位置必須設為公開 (而非防火牆後方),並應包含 通訊協定 (例如 https://)。只能使用一個 每<PhotoURL> <URL>
  • <Caption>:定義相片的說明文字。 這個元素採用單一子元素 <Text>。 其中包含兩個必要屬性:textlanguagetext 屬性為說明文字 而 language 屬性則指定由兩個字母組成的 語言代碼 (例如 en)

範例:

<PhotoURL>
  <URL>https://www.example.com/static/bar/image1234.jpg</URL>
  <Caption>
    <Text text="A bright and breezy way to enjoy your mornin'
      cuppa tea." language="en"/>
    <Text text="Une façon lumineuse et aérée pour profiter
      de votre journée tasse de thé." language="fr"/>
  </Caption>
</PhotoURL>
<PhotoURL>
  <URL>https://www.foo.com/static/bar/image5678.jpg</URL>
  <Caption>
    <Text text="Or, perhaps you prefer coffee." language="en"/>
    <Text text="Ou peut-être préférez-vous le café." language="fr"/>
  </Caption>
</PhotoURL>
<RoomFeatures> Optional <RoomFeatures> 包含客房地圖項目的相關資訊。
<RoomID> Required string 客房的專屬 ID。請使用這個 ID 來比對會議室資料 價格更新的 <Result> 封鎖條件。適用對象 詳情請參閱「會議室套件中繼資料」。(你 也能使用這個 ID,在單一物件中參照一般會議室定義 定義內嵌會議室資料時的交易訊息)。

範例

會議室資料

以下示範如何定義會議室資料:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>5440OF</RoomID>
      <Name>
        <Text text="Single King Bed Room" language="en"/>
        <Text text="Simple Lit de Roi" language="fr"/>
      </Name>
      <Description>
        <Text text="One king bed with pillowtop mattresses, 300-thread-count linens,
          and down comforters (bedspreads). City view. 300 square feet. Desk with
          rolling chair. Multi-line phone with voice mail. Cable/satellite TV with
          complimentary HBO and pay movies." language="en"/>
        <Text text="Un très grand lit avec matelas à plateau-coussin, ..." language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Bathroom View" language="en"/>
          <Text text="La salle de baines" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Capacity>4</Capacity>
    </RoomData>
  </PropertyDataSet>
</Transaction>

客房與套件中繼資料

以下範例會定義會議室和套件中繼資料:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

多房套裝組合

以下範例定義了多個 Room 的會議室和套件中繼資料 套裝組合:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <!-- A transaction message with room types result. -->
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
      <RoomID>single</RoomID>
      <Name>
        <Text text="Single room" language="en"/>
        <Text text="Chambre simple" language="fr"/>
      </Name>
      <Description>
        <Text text="A single room" language="en"/>
        <Text text="Le chambre simple" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <PhotoURL>
        <URL>http://www.foo.com/static/bar/image1235.jpg</URL>
      </PhotoURL>
      <Capacity>2</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>double</RoomID>
      <Name>
        <Text text="Double room" language="en"/>
        <Text text="Chambre double" language="fr"/>
      </Name>
      <Occupancy>1</Occupancy>
    </RoomData>
    <PackageData>
      <PackageID>refundbreakfast</PackageID>
      <Name>
        <Text text="Refundable Room with Breakfast" language="en"/>
        <Text text="Chambre remboursable avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Continental Breakfast" language="en"/>
        <Text text="Petit déjeuner continental" language="fr"/>
      </Description>
      <ChargeCurrency>hotel</ChargeCurrency>
      <Refundable available="1" refundable_until_days="3"/>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
    <PackageData>
      <PackageID>prepaid</PackageID>
      <Name>
        <Text text="Nonrefundable" language="en"/>
        <Text text="Non remboursable" language="fr"/>
      </Name>
      <Description>
        <Text text="Blah blah blad" language="en"/>
        <Text text="Le blah blah blad" language="fr"/>
      </Description>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="0"/>
    </PackageData>
  </PropertyDataSet>
</Transaction>

<RoomFeatures>

定義在聊天室中找到的特徵,

<RoomFeatures> 元素會顯示在以下位置的以下位置: 交易訊息 XML 階層:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
            + <RoomFeatures>

語法

<RoomFeatures> 元素使用下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet ... >
    ...
    <RoomData>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>[western|japanese|japanese_western]</JapaneseHotelRoomStyle>
        <Beds>
           <Bed size="[single|semi_double|double|queen|king]">
             <Width unit="cm" number="width"/>
             <Length unit="cm" number="length"/>
           </Bed>
           <!-- Include with any additional beds. -->
        </Beds>
        <Suite/>
        <Capsule/>
        <Roomsharing>[shared|private]</Roomsharing>
        <Outdoor/>
        <MobilityAccessible/>
        <Smoking>[smoking|non_smoking]</Smoking>
        <BathAndToilet relation="[together|separate]">
          <Bath bathtub="[false|true]" shower="[false|true]"/>
          <Toilet electronic_bidet="[false|true]" mobility_accessible="[false|true]"/>
        </BathAndToilet>
        <OpenAirBath/>
        <AirConditioning/>
        <Balcony/>
        <Views>
          <!-- (Optional) Defines the type of views from the room. -->
          <!-- Example: <OceanView/> -->
        </Views>

      </RoomFeatures>
      ...
    </RoomData>
    ...
  </PropertyDataSet>
</Transactions>

屬性

<RoomFeatures> 元素沒有屬性。

子元素

<RoomFeatures> 元素包含下列子元素:

子項元素 必填與否 類型 說明
<JapaneseHotelRoomStyle> Optional enum

用於表示日式飯店客房樣式。

有效值如下:

  • western:提供床鋪的西式客房。
  • japanese:附日式床墊的日式客房。
  • japanese_western:日式西式客房, 西部風格床鋪和日式日式床墊
<Beds> Optional Object 包含聊天室的 <Bed> 數量。注意事項 不應該計算日文日式床墊的次數

每個 <Bed> 都具有以下屬性:

  • size (選用):有效值為 singlesemi_doubledoublequeen、 和 king
,瞭解如何調查及移除這項存取權。 每個 <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>
<Suite> Optional empty 當這個客房是套房時提供這項元素。
<Capsule> Optional empty 如果這個房間是膠囊客房,請提供這項元素。
<Roomsharing> Optional enum 這個聊天室是否與其他邀請對象 (例如擁有者或其他成員) 共用 共乘者。有效值為 sharedprivate
<Outdoor> Optional empty 當這間客房未設有戶外住宿時,請提供這項元素 固定牆、管線和氣候控制系統舉例來說 不是戶外住宿,而客人可入住帳篷 戶外住宿是露營車營地,客人可自行攜帶露營車。
<MobilityAccessible> Optional empty 當這個會議室可供行動時,請提供這項元素。
<Smoking> Optional enum 這個房間是禁煙房間,還是吸煙室。有效值 為 non_smokingsmoking
<BathAndToilet> Optional 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>
<OpenAirBath> Optional empty 如果這個房間有私人露天浴池,請提供這項元素。
<AirConditioning> Optional empty 在這間客房設有空調時提供這項元素。
<Balcony> Optional empty 如果這個房間有陽台或海報,請提供這項元素。
<Views> Optional 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/>

範例

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>

<PackageData>

定義房源的 Room Bundle 不相關行程中繼資料。 這個元素包含合作夥伴和飯店相關資訊 而非行程目的是定義所有非行程 並參考行程資料

<PackageData> 元素會顯示在以下位置的以下位置: 交易訊息 XML 階層:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

<PackageData> 元素與 <RoomData> 類似,但其 說明不屬於實體房間的房價功能和字詞 生成 3D 物件將 <RoomData><PackageData> 搭配使用: 提供房型套裝組合和費率功能的詳細資料。針對符合以下條件的個別會議室 並未包含在套件中,只要使用 <RoomData> 即可。

您可以同時定義 <RoomData><PackageData> 元素的 或 Room Bundle。Google 在 搜尋結果會包含這兩份的說明,並以 連字號鍵。

如要更新屬性的單一 <PackageData> 元素,您必須 更新屬性的所有 <PackageData><RoomData> 元素。 每個 <PropertyDataSet> 都視為關於資源的所有資料,且 覆寫任何現有資料

詳情請參閱「會議室套件中繼資料」。

語法

<PackageData> 元素使用下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet ... >
    <PackageData>
      <PackageID>package_ID</PackageID>
      <Name>
        <Text text="package_name" language="language_code"/>
        ...
      </Name>
      <Description>
        <Text text="package_description" language="language_code"/>
        ...
      </Description>
      <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
      <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails><!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>
      <!-- For these next 3 elements, boolean_value can be 0/1 or true/false -->
      <BreakfastIncluded>boolean_value</BreakfastIncluded>
      <InternetIncluded>boolean_value</InternetIncluded>
      <ParkingIncluded>boolean_value</ParkingIncluded>
      <PhotoURL>
        <Caption>
          <Text text="photo_description" language="language_code"/>
          ...
        </Caption>
        <URL>photo_location</URL>
      </PhotoURL>
      ...
      <Meals>
        <Breakfast
          included="[true|false]" buffet="[true|false]"
          in_room="[true|false]" in_private_space="[true|false]"/>
        <Dinner
          included="[true|false]" buffet="[true|false]"
          in_room="[true|false]" in_private_space="[true|false]"/>
      </Meals>
      <CheckinTime>checkin_time</CheckinTime>
      <CheckoutTime>checkout_time</CheckoutTime>
      <MembershipBenefitsIncluded>
        <ProgramName>
          <Text language="en" text="Special Rewards">
        </ProgramName>
        <ProgramLevel>
          <Text language="en" text="Platinum">
        </ProgramLevel>
      </MembershipBenefitsIncluded>
      <OnPropertyCredit>
        <Amount currency="USD">123.45</Amount>
      </OnPropertyCredit>
    </PackageData>
    <!-- a PackageID with a MilesIncluded rate feature -->
    <PackageData>
      <PackageID>room_with_miles</PackageID>
      <Name>
       <Text text="Room with Bundled Miles" language="en">
      </Name>
      <ChargeCurrency>hotel </ChargeCurrency>
      <MilesIncluded>
        <NumberOfMiles>1000 </NumberOfMiles>
        <Provider>
          <Text language="en" text="United Airlines">
        </Provider>
      </MilesIncluded>
    </PackageData>
    ...
    ...
  </PropertyDataSet>
  ...
</Transaction>

屬性

<PackageData> 元素沒有屬性。

子元素

<PackageData> 元素包含下列子元素:

子項元素 必填與否 類型 說明
<BreakfastIncluded> Optional boolean 指定這個套裝方案是否含房價的早餐。 有效值為 0 (或 false) 和 1 (或 true)。

我們建議您使用 <Meals> 取代 <BreakfastIncluded>

<ChargeCurrency> Optional enum 使用者支付預訂費用的時間和位置。這個元素使用相同的 在 <Result> 中使用 <ChargeCurrency> 語法。

預設值為 web

<CheckinTime> Optional Time 最早的入住時間。 時間必須早於飯店當地時間 24:00。
<CheckoutTime> Optional Time 最晚可能在飯店當地時間的退房時間。
<Description> Optional Object 套件的詳細說明。這個元素應該 包含未由其他元素描述的資訊, <Name> 元素。請勿全部用大寫 指定房間說明時所用的字母。

<Description> 元素會使用單一 <Text> 的子元素,其中包含兩個必要屬性 textlanguagetext 屬性是說明,language 屬性則是 會指定由兩個字母組成的語言代碼,如以下範例所示 顯示:

<Description>
  <Text text="Two breakfast buffet certificates for
    each night of stay." language="en"/>
  <Text text="Deux certificats petit-déjeuner buffet
    pour chaque nuit de séjour." language="fr"/>
</Description>
<InternetIncluded> Optional boolean 如果套裝方案提供免付費網際網路連線 其他包裹則不含該設施不要設定 飯店內客房套裝組合元素,提供免費網路給所有使用者 個房間這項元素不適用於會議室中的有線網路或無線網路 客房內沒有網際網路。有效值為 0 (或 false) 和 1 (或 true)。
<Meals> Optional Object 包含這個套裝中的餐點相關資訊。

<Meals> 元素會使用兩個選用的子項 <Breakfast><Dinner> 等元素 其屬性如下:

  • included (必要):設為 1 (或 true) 如果房價包含早餐/晚餐;否則設為 0false
  • in_room (選用):設為 1 (或 true) 如果房客可以選擇在入住的房間享用早餐/晚餐, in;否則設為 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 屬性一併提供

<Name> Required string 套件名稱。這個值應與 飯店的到達網頁請勿將這個元素的值設為全部大寫 字母。

這個元素採用單一子元素 <Text>。 其中包含兩個屬性:textlanguagetext 屬性是說明,而 language 屬性可指定雙字母的語言代碼。 如以下範例所示:

<Name>
  <Text text="Bed and Breakfast" language="en"/>
  <Text text="Lit et petit déjeuné" language="fr"/>
</Name>
<Occupancy> Optional integer 會議室套裝組合適用的邀請對像人數上限。 舉例來說,大型套房也許可以配合 6 部 但最多可容納 4 人入住。

這個值必須小於或等於 <Capacity> 元素:也就是人數 可以實際操作

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

如果同時在 <RoomBundle><PackageData><RoomBundle> 中的值的優先順序最高。

注意

<Occupancy>可能伴隨 <OccupancyDetails>,用於指定邀請對象類型 (成人或兒童)。請參閱 <OccupancyDetails> 瞭解語法和 子元素的說明。
<PackageID> Required string

檔案包的專屬 ID。使用這個 ID 來比對 在您的<Result> 價格更新。如需更多資訊,請參閱 會議室 套裝組合中繼資料

您也可以使用這個 ID 參照常見的 Room 套裝組合定義 用於定義 Room Bundle 資料,且在單一交易訊息中使用 inline.)

<ParkingIncluded> Optional boolean Room Bundle 是否包含免費停車位,其中 免費停車將成為這間飯店的付費服務。不指定 免費停車場的此元素值。

有效值為 0 (或 false) 和 1 (或 true)。預設值為 false

<PhotoURL> Optional Object (與 <RoomData> 中的 <PhotoURL> 相同, 但關於包裹 (例如用餐)
<Refundable> Optional Object 允許刊登可全額退款或免費提供的費率 取消。如未提供,就不會顯示退款相關資訊。 <PackageData>層級的退款政策會覆寫以下退款政策: <Result> 層級。<Rates> 層級覆寫的退款政策 <PackageData>層級的退款政策。可退款的價格 也能透過替代選項醒目顯示 修改交易訊息結構定義進一步瞭解這些選項 可退款費率政策

以下範例顯示 <Refundable> 元素,且已設定所有屬性:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

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

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

  • available:(必要) 設為「1」或 true 表示費率是否允許 refund;否則設為 0false
  • refundable_until_days:(如果符合,則為必要欄位) availabletrue) 指定 從入住前算起可全額退款的天數 。refundable_until_days 的值 必須是介於 0 至 330 (含首尾) 之間的整數。
  • refundable_until_time:(如果符合以下情況,則強烈建議使用) availabletrue) 指定 完整時間 (以飯店當地時間為準) 我們會受理退款申請。這可以和 refundable_until_days 可指定為 例如:「退款期限為兩天前的下午 4:00 簽到。」如未設定 refundable_until_time,這個值 預設為午夜

    此屬性的值使用 Time 格式。

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

  • 如果不是 availablerefundable_until_days 稅率無法顯示可退款。
  • 如果 available0false, 其他屬性都會被忽略。費率不會顯示 但可以退還。
<MembershipBenefits Included> Optional boolean 房價包含入住期間的菁英狀態福利。收錄 分別是
  • ProgramName:菁英狀態計畫名稱
  • ProgramLevel:計畫等級。例如: 「金色。」
  • NightlyValue (optional):夜間值 好處
<CarRentalIncluded> Optional boolean 房價包含住宿期間免費租車服務。
<MilesIncluded>&gt; Optional boolean 房價包含飛行常客里程數。參數包括:
  • NumberofMiles:每個行程的英里數。
  • Provider:飛行常客里程數。
<OnPropertyCredit> Optional boolean 房價包含房源中的抵免額 (F&B、度假村、SPA 等)。參數:
  • Amount:每個行程的抵免額價值 (以當地時間為準) 貨幣。
<AirportTransportationIncluded> Optional Object 房價包含往返附近機場的免費接駁服務。您可視需要 direction 屬性可指定 以交通運輸業有效的值包括:
    from:從機場到機場的交通服務 資源。如果沒有指定方向,則此為預設值。 to:從 資源。 round_trip:往返 例如機場、終止機場等。

範例

單一房型套裝組合

以下範例定義了單一 Room 套裝組合,其中可住人數為 2 (一位成人與一位兒童) 內含早餐:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>1</NumAdults>
        <Children>
          <Child age="17"/>
        </Children>
      </OccupancyDetails>
      <PackageID>P54321</PackageID>
      <Name>
         <Text text="Breakfast Included" language="en"/>
         <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Two certificates for continental
          breakfast will be provided." language="en"/>
        <Text text="Deux certificats pour le petit déjeuner
          continental seront fournis." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Room 和套件中繼資料

以下範例會定義會議室和套件中繼資料:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

多房套裝組合

以下範例定義了多個 Room 的會議室和套件中繼資料 套裝組合:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <!-- A transaction message with room types result. -->
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
      <RoomID>single</RoomID>
      <Name>
        <Text text="Single room" language="en"/>
        <Text text="Chambre simple" language="fr"/>
      </Name>
      <Description>
        <Text text="A single room" language="en"/>
        <Text text="Le chambre simple" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <PhotoURL>
        <URL>http://www.foo.com/static/bar/image1235.jpg</URL>
      </PhotoURL>
      <Capacity>2</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>double</RoomID>
      <Name>
        <Text text="Double room" language="en"/>
        <Text text="Chambre double" language="fr"/>
      </Name>
      <Occupancy>1</Occupancy>
    </RoomData>
    <PackageData>
      <PackageID>refundbreakfast</PackageID>
      <Name>
        <Text text="Refundable Room with Breakfast" language="en"/>
        <Text text="Chambre remboursable avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Continental Breakfast" language="en"/>
        <Text text="Petit déjeuner continental" language="fr"/>
      </Description>
      <ChargeCurrency>hotel</ChargeCurrency>
      <Refundable available="1" refundable_until_days="3"/>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
    <PackageData>
      <PackageID>prepaid</PackageID>
      <Name>
        <Text text="Nonrefundable" language="en"/>
        <Text text="Non remboursable" language="fr"/>
      </Name>
      <Description>
        <Text text="Blah blah blad" language="en"/>
        <Text text="Le blah blah blad" language="fr"/>
      </Description>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="0"/>
    </PackageData>
  </PropertyDataSet>
</Transaction>


含房價的房型套裝組合

以下範例為 Room 套裝組合定義客房和套件中繼資料 新增房價功能:

<Transaction timestamp="2010-04-24T20:44:56-04:00" id="TXNID">
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
     ...
    </RoomData>
<!-- definitions of PackageData types including rate features -->
    <PackageData>
      <PackageID>room_with_addl_benefits</PackageID>
      <Name>
        <Text text="Acme Hotels 2017 Promotion Package" language="en"/>
      </Name>
      <ChargeCurrency>hotel</ChargeCurrency>
      <BreakfastIncluded>1</BreakfastIncluded>
      <MembershipBenefitsIncluded>
        <ProgramName>
          <Text language="en" text="Marriott Rewards"/>
        </ProgramName>
        <ProgramLevel>
          <Text language="en" text="Platinum"/>
        </ProgramLevel>
      </MembershipBenefitsIncluded>
      <OnPropertyCredit>
        <Amount currency="USD">123.45</Amount>
      </OnPropertyCredit>
    </PackageData>
    <PackageData>
      <PackageID>room_with_miles</PackageID>
      <Name>
        <Text text="Room with Bundled Miles" language="en"/>
      </Name>
      <ChargeCurrency>hotel</ChargeCurrency>
      <MilesIncluded>
        <NumberOfMiles>1000</NumberOfMiles>
        <Provider>
          <Text language="en" text="United Airlines"/>
        </Provider>
      </MilesIncluded>
      <AirportTransportationIncluded direction="from"/>
    </PackageData>
  </PropertyDataSet>

<!-- The actual list of prices -->
  <Result>
…
  </Result>
</Transaction>

餐點相片

以下範例為餐點定義客房和套裝內容中繼資料。 相片,以及入住和退房時間:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <PackageID>PackageID_1</PackageID>
      <Name>
        <Text text="Meals Included" language="en"/>
      </Name>
      <PhotoURL>
        <Caption>
          <Text text="Breakfast" language="en"/>
          <Text text="朝食" language="ja"/>
        </Caption>
        <URL>http://example.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Meals>
        <!-- Guests can choose to have breakfast in their room or in another
        space to avoid contact with other guests. -->
        <Breakfast included="1" in_room="1" in_private_space="1"/>
        <Dinner included="1" buffet="1"/>
      </Meals>
      <CheckinTime>15:00</CheckinTime>
      <CheckoutTime>11:00</CheckoutTime>
    </PackageData>
  </PropertyDataSet>
</Transaction>

早餐

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <PackageID>PackageID_1</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
      </Name>
      <PhotoURL>
        <Caption>
          <Text text="Breakfast" language="en"/>
          <Text text="朝食" language="ja"/>
        </Caption>
        <URL>http://example.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Meals>
        <Breakfast included="true"/>
        <!-- Dinner not included needs to be explicitly specified -->
        <Dinner included="false"/>
      </Meals>
      <CheckinTime>15:00</CheckinTime>
      <CheckoutTime>11:00</CheckoutTime>
    </PackageData>
  </PropertyDataSet>
</Transaction>

<Result>

<Transaction> 中用來更新價格和供應情形的容器 撰寫新的電子郵件訊息

<Result> 元素會顯示在以下位置的以下位置: 交易訊息 XML 階層:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

使用 <Result> 設定或更新房價,並定義 可用的廣告空間這個元素中定義的項目通常會參照 與客房或包裹的獨立行程中繼資料 (例如說明或 <PackageData><RoomData> 中定義的設施組合。

您通常會頻繁傳送價格更新的交易訊息。 具體的方式和頻率取決於您的放送模式

您可以在交易訊息中使用 <Result> 移除行程,如下所示: 相關說明,請參閱移除廣告空間一文。 進一步瞭解如何使用交易訊息更新價格和 供應情形、新增及更新廣告空間

單一交易訊息可包含任意數量的 <Result> 元素 附件,只要訊息大小不超過 100 MB 即可。

語法

<Result> 元素使用下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    <!-- Required -->
    <Property>hotel_ID</Property>
    <!-- Required -->
    <Checkin>YYYY-MM-DD</Checkin>
    <!-- Required -->
    <Nights>number_of_nights</Nights>

    <Baserate currency="currency_code">price</Baserate>
    <!-- Only required when <Baserate> contains a real price -->
    <Tax currency="currency_code">tax_amount</Tax>
    <!-- Only required when <Baserate> contains a real price  -->
    <OtherFees currency="currency_code">fee_amount</OtherFees>
    <Refundable available="[false|true]" refundable_until_days="number_of_days"
      refundable_until_time="time"/>

    <RoomID>room_ID</RoomID>
    <PackageID>package_ID</PackageID>
    <ExpirationTime>expiration_time</ExpirationTime>
    <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>

    <Occupancy>max_number_of_intended_occupants</Occupancy>
    <!-- For Baserate, occupancy value must be greater than or equal to 2.
         If a value is not provided for occupancy, it defaults to 2. -->
    <OccupancyDetails>occupancy_info</OccupancyDetails>

    <Rates>...</Rates>

    <RoomBundle>...</RoomBundle>

    <AllowablePointsOfSale>
      <PointOfSale id="landing_page_identifier"/>
      ...
    </AllowablePointsOfSale>

    <Custom[1-5]>custom_value</Custom[1-5]>
  </Result>
  ...
  </Transaction>

屬性

<Result> 元素的屬性如下:

屬性 必填與否 類型 說明
mergeable Optional boolean 根據預設,特定飯店和行程組合的新價格將會 覆寫 Google 快取中顯示的任何先前 (未過期) 價格。 合併屬性可讓您將其他價格儲存至 Google 的快取 而不刪除先前的定價資訊即時定價查詢: 背景資訊回應將一律設為 true (不論交易訊息回覆為何)。

子元素

<Result> 元素包含下列子元素:

子項元素 必填與否 類型 說明
<AllowablePointsOfSale> Optional Object 一或多個到達網頁符合 飯店。到達網頁是指可處理預訂程序 而非個別使用者的帳戶明確納入特定到達網頁 (並排除) 其他),新增一或多個<AllowablePointsOfSale> 符合 <PointOfSale> 元素的 id 屬性。

如果您沒有加入這個元素, 到達網頁檔案可以用來預訂 您可以啟用「攝影棚效果」選項如需更多資訊,請參閱 到達網頁檔案語法

<Baserate> Optional float

入住房價。這個元素的值 應反映下列情形:

  • 如果是私人客房,請設定價格最低的雙人房價格 個別業務計畫如果沒有,您可以在這裡設定較高的入住人數 雙人房房價,且帳戶包含非雙人入住 啟用費率如要啟用非雙人入住費率,請與我們聯絡。 這裡不允許單一入住費率, 必須在 <Rates> 底下設定。
  • 如果是共用聊天室,請將這個欄位留空並使用 <RoomBundle>
  • 這個值應為所有晚間的基本總價,而非 平均每晚房價。

如果行程無法預訂會議室, <Baserate> 應省略或設為 -1,而 <Unavailable> 應為 以及所有無法使用的已知原因。

如要移除 Room 套裝組合,請按照移除 Room 套件一文的說明操作。

<Baserate> 不得包含任何數字分組 符號,例如逗號 (,) 或半形句號 (.)。一律分開 小數點。例如: $1,200.40 美元,如下所示:

<Baserate currency="USD">1200.40</Baserate>

<Baserate> 元素會採用以下程式碼 選用屬性:

  • all_inclusive:指出這個費率是否採用的布林值 包含稅金和其他費用。一般來說,請將此值設為 適用於美國和加拿大的使用者,並提供價值:false 適用於<Tax><OtherFees> 元素。如果您使用全包式方案價格,可能無法享有 :如果價格可以單獨顯示稅金 費用。

    系統現在會向美國使用者顯示全包式價格。

    其他所有使用者通常都會納入稅金與費用 基本費率,然後將 all_inclusive 的值設為 屬性設為 true。如需更多資訊,請參閱 稅金與費用政策

    預設值為 false

  • currency貨幣代碼 (共三個字母)。適用對象 例如 USD 代表美元。
<ChargeCurrency> Optional enum 使用者支付預訂費用的時間和位置。這個元素可以 用於 <Result> 中的交易訊息 飯店價格或 <PackageData> 區塊的元素 適用於 Room Bundle。

有效值如下:

  • web:使用者在以下時間進行線上收費 預訂。此為預設值。實際的到達網頁為 由 定義 到達網頁檔案,且會受到使用者貨幣、 例如地點、語言等因素
  • hotel:使用者在 飯店。如果一律須以飯店的貨幣付款,請設定 <ChargeCurrency> 的值到 hotel。實際的到達網頁不會受到 使用者的幣別
  • deposit:系統會立即向使用者收取部分費用 而剩餘部分會在稍後充電 當使用者退房時。
  • installments:以初始比例向使用者收取費用 ,且將會定期支付固定餘額 固定期間內

預設值為 web

<Checkin> Required Date 使用 Date 提供的行程入住日期 格式。<Nights> 元素和 <Checkin> 元素構成行程。
<Custom[1‑5]> Optional string 定義可用來傳送額外資料的自訂欄位 與飯店建立關聯您可以使用 下列元素名稱:
  • <Custom1>
  • <Custom2>
  • <Custom3>
  • <Custom4>
  • <Custom5>

<Custom> 元素可讓您傳遞任意資料。 舉例來說,你可以在這個欄位中指定值 ,用於建構到達網頁的自訂網址 頁面。每個自訂欄位的長度上限為 200 個半形字元。適用對象 如需更多資訊,請參閱 到達網頁檔案

&lt;Custom&gt;<Rate> 中提供的元素 元素不會沿用至 <RoomBundle> 元素。請 定義 <Custom>屬性,<RoomBundle>

<ExpirationTime> Optional DateTime 價格視為到期的日期和時間 (3 小時) 下限)。

建議你不要提供到期時間戳記 (如果有的話) 並非定價結構的關鍵因素

Google 不會提供任何已過期的價格和行程 但前提是價格已過期 即時價格查詢

<Nights> Required integer 行程住宿晚數。如果 <Nights> 元素必須是正整數。 <Nights> 和 「<Checkin>」構成行程。
<OtherFees> Optional float 除了基本費率和稅金以外,影響 房間的最終價格<OtherFees> 元素會取得 單一必要屬性 currency 定義 費用的幣別代碼 (三個字母)。例如 USD

如果發生以下情況,就必須提供 <OtherFees> 元素: <Baserate> 大於 0。

<Occupancy> Optional integer 指定這個房價允許的入住人數上限。 當 <Occupancy> 直接顯示在 <Result> 下方時, 則必須指定 2 以上的值。「<Occupancy>」可能會 搭配 <OccupancyDetails>,也就是指定 邀請對象的類型 (成人或兒童)。如未指定邀請對象類型 系統會認定他們是成人。諮詢 <OccupancyDetails>, 子元素的語法和說明如果 未提供 <Occupancy> 元素,但可住人數為 預設為 2

注意:如要啟用這項功能,請與支援團隊聯絡, 傳送非雙人入住價格。

<PackageID> Optional string 套件的專屬 ID,用於對應至預先定義的套件資料。 也可用來填入 PACKAGE-ID 到達網頁變數。 如需更多資訊,請參閱 會議室 套裝組合中繼資料
<Property> Required string 受相關資料 (價格、 行程、Room Bundle 或中繼資料)。這個元素的值必須是 字串。這個元素的值必須與清單 在飯店清單動態饋給中定義的<id>
<Rates> Optional <Rates> 用來存放一或多個 <Rate> 區塊的容器。每 <Rate> <Rates> 為房型/行程定義不同的價格 組合。

如果有多個不同房價,請使用 <Rates> 元素 同一個客房/行程組合,或費率不允許 在 <Result> 層級指定舉例來說,假設您定義了多個 的房價 條件式費率 不公開費率 條件式費率 等其他屬性。

注意:在 <Result>內,單人入住費率可 只會在 <Rates> 中指定。如要獲準,請與我們聯絡 非雙人入住價格。

<Refundable> Optional Object 允許刊登可全額退款或免費提供的費率 取消。如未提供,就不會顯示退款相關資訊。 <PackageData>層級的退款政策會覆寫以下退款政策: <Result> 層級。<Rates> 層級覆寫的退款政策 <PackageData>層級的退款政策。可退款的價格 也能透過替代選項醒目顯示 修改交易訊息結構定義進一步瞭解 可退款費率政策

以下範例顯示 <Refundable> 元素,且已設定所有屬性:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

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

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

  • available:(必要) 設為 1 (或 true),表示費率是否允許 refund;否則設為 0 (或 false)。
  • refundable_until_days:(如果符合,則為必要欄位) availabletrue) 指定 從入住前算起可全額退款的天數 。refundable_until_days 的值 必須是介於 0 至 330 (含首尾) 之間的整數。
  • refundable_until_time:(如果符合以下情況,則強烈建議使用) availabletrue) 指定 完整時間 (以飯店當地時間為準) 我們會受理退款申請。這可以和 refundable_until_days 可指定為 例如:「退款期限為兩天前的下午 4:00 簽到。」如未設定 refundable_until_time,這個值 預設為午夜

    此屬性的值使用 Time 格式。

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

  • 如果不是 availablerefundable_until_days 稅率無法顯示可退款。
  • 如果 available0 (或 false), 其他屬性都會被忽略。費率不會顯示 但可以退還。
<RoomBundle> Optional <RoomBundle> 用來存放客房房價實體說明的容器。 任何設施包裝及購買政策詳情 顯示的飯店和行程資訊。

一般來說,請使用這個元素來定義基本房型的價格, 同一個房源內不同類型的客房此做法雖然可行 如要以內嵌方式定義 Room Bundle 說明,則應使用 定義該資訊的交易訊息。Google 會儲存 無需重複上傳 日後的價格更新。

<RoomID> Optional string 會議室的專屬 ID,用於對應至預先定義的會議室資料。其他 ,用來填入 PARTNER-ROOM-ID 到達網頁變數。 如需更多資訊,請參閱 會議室 套裝組合中繼資料
<Tax> Optional float 針對客房最終價格計算的稅金。 <Tax> 元素採用單一必要屬性。 currency,定義由三個字母組成的貨幣代碼 就不須支付稅金例如:USD。 如果發生以下情況,必須指定 <Tax> 元素 <Baserate> 大於 0。

如果 <Baserate> 元素的 「全包式」屬性明確設為 true, 值為選用項目。

<Unavailable> Optional Object 表示無法預訂行程。主要服務 容器,進一步瞭解無法提供行程的原因。一 下列一或多個無法使用的原因,可能會以巢狀結構列於 <Unavailable> 標記:
  • <NoVacancy/>:沒有其他可銷售的房間 至少入住一晚。
  • <MinNightStay value=N/>:行程低於 住宿日期的最短入住天數為 N
  • <MaxNightStay value=N/>:行程高於 住宿日期的入住天數上限:N
  • <MinAdvancePurchase value=N/>:行程之前為 低於入住天數的最低提前預訂期 (N) 日期。
  • <MaxAdvancePurchase value=N/>:行程之前為 高於入住天數的最高提前預訂期 (N) 日期。
  • <ClosedToArrival/>:資源不允許 入住日期。
  • <ClosedToDeparture/>:資源不允許 退房日期。
  • <PropertyClosed first_open="YYYY-MM-DD" first_closed="YYYY-MM-DD"/>:房源因部分或期間關閉 全程享受建議屬性 first_openfirst_closed 可指定大於或等於第一個日期。 屬性的營業日。 如果是在抵達日期後關閉的房源,first_open 必須等於抵達日期,first_closed 則應 是房源結束的日期。停業的房源 抵達日期,first_closed 應等於抵達時間 日期,first_opened 則應該是 資源已開啟
  • <NotFetched/>:行程價格不是 由下游資料來源提供的
  • <InvalidProperty/>:要求的資源 ID 無法識別
  • <InvalidOccupancy/>:要求的可住人數非 該資源支援的系統。
  • <PriceIssue/>:價格發生問題,導致出現以下情況: 要求。
  • <InternalError reason=""/>:一些未列舉的錯誤 發生。選填的原因屬性可以用文字回報錯誤。
  • <OtherRestriction restriction=""/>:行程之前為 因部分未列舉的預訂限製而無法使用。選用 限制條件屬性可讓報表以文字形式回報限制。

範例

多資源範例

以下範例定義一個行程及其價格 資源:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
  </Result>
  <Result>
    <Property>052213</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">299.98</Baserate>
    <Tax currency="USD">26.42</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="otto"/>
      <PointOfSale id="simon"/>
    </AllowablePointsOfSale>
  </Result>
</Transaction>

這個範例中不會顯示會議室的詳細資料,例如 說明、相片、說明文字、房間名稱和容納人數。

您可以在另一項交易中「一次」定義該資訊 訊息。你就能在各處參照 後續定價和廣告空間更新如需更多資訊,請參閱 會議室套裝組合中繼資料

多費率範例

以下範例定義了含有多個 提供不同入住人數的費率<Rates> 元素可用於 針對特定房源提供多重費率價格。以下範例是 也非常適合度假民宿 (VR) 資源:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2020-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2021-01-13</Checkin>
    <Nights>9</Nights>
    <Baserate currency="USD">3196.1</Baserate>
    <Tax currency="USD">559.49</Tax>
    <OtherFees currency="USD">543.34</OtherFees>
    <Occupancy>2</Occupancy>
    <Rates>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>1</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>3</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>4</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>5</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>6</Occupancy>
      </Rate>
    </Rates>
  </Result>
</Transaction>

無法提供示例

以下示例定義了無法預訂的行程 擷取自下游頻道,但兩者皆低於最低值 晚間住宿且已預訂的住宿日期,第三則預訂的 房源在抵達日期當天未營業,但在下列期間開始營業 住宿天數:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Unavailable>
      <NotFetched/>
    </Unavailable>
  </Result>
  <Result>
    <Property>073313</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Unavailable>
      <NoVacancy/>
      <MinNightStay value=3/>
    </Unavailable>
  </Result>
  <Result>
    <Property>052213</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>10</Nights>
    <Unavailable>
      <PropertyClosed first_open="2018-06-15" first_closed="2018-06-10"/>
    </Unavailable>
  </Result>
</Transaction>

<Rates>

用來存放一或多個 <Rate> 區塊的容器。每 <Rate> <Rates> 會為房型或行程組合定義不同的價格。

只有當下列屬性有多個費率時,才使用 <Rates> 元素 同一個房間或行程組合舉例來說,假設您定義了多個 條件式費率的費率 不公開費率,或 房型套裝組合中的條件式費率

<Rates> 元素會顯示在以下位置的以下位置: 交易訊息 XML 階層:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>         // Pricing and availability
        + <Rates>
        + <RoomBundle> (Can also contain <Rates>)
        + ...

<Rate> 中設定的值會覆寫 父項 <Result><RoomBundle> 元素。如果未在 <Rate> 中設定, 他們會沿用父項元素的值僅限 &lt;AllowablePointsofSale&gt;沿用至 <RoomBundle> 元素

語法

<Rates> 元素使用下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    <Rates>
      <Rate rate_rule_id="rate_rule_id">
        <Baserate currency="currency_code">price</Baserate>
        <Tax currency="currency_code">tax_amount</Tax>
        <OtherFees currency="currency_code">fee_amount</OtherFees>
        <ExpirationTime>expiration_time</ExpirationTime>
        <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
        <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
        <AllowablePointsOfSale>
          <PointOfSale id="landing_page_identifier"/>
        </AllowablePointsOfSale>
        <Occupancy>max_number_of_intended_occupants</Occupancy>
        <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>
          ...
        <Custom[1-5]>custom_value</Custom[1-5]>
      </Rate>
      ...
    </Rates>
  </Result>
  ...
</Transaction>

屬性

<Rates> 元素的屬性如下:

屬性 必填與否 說明
rate_rule_id Optional 適用於 條件式費率,這個 ID 會將費率與屬性中的定義相符 費率規範定義檔案。這個欄位的字元限制為 40 個半形字元 字元。

子元素

<Rates> 元素包含下列子元素:

子項元素 必填與否 類型 說明
<AllowablePointsOfSale> Optional Object 一或多個到達網頁符合 飯店。此元素使用的語法與 <AllowablePointsOfSale>,日期:<Result>
<Baserate> Required float 入住房價。這個元素使用相同的 做為 <Result> 上的 <Baserate>

注意:下方的 <Baserate> 子元素 無法將「<Rate>」定義為無法使用。

<ChargeCurrency> Optional enum 使用者支付預訂費用的時間和位置。此元素會使用 與指令中的 <ChargeCurrency> 語法相同 <Result>
<Custom[1‑5]> Optional string 自訂欄位,可用來傳送與下列項目相關的其他資料: 將飯店前往到達網頁此元素使用的語法與 在 <Result> 中的 <Custom[1‑5]>。達到上限 每個自訂欄位最多 200 個半形字元。如需更多資訊,請參閱 到達網頁檔案

如果為 <自訂>元素會在 <Result> 元素,那麼這些元素就不會沿用在 <RoomBundle> 元素,必須分別為每個 <RoomBundle> 也可以加入 <PackageData>如果 。

<ExpirationTime> Optional DateTime 系統認定稅率已過期的日期和時間。這個 元素使用的語法 在 <Result> 中的 <ExpirationTime>
<Occupancy> Optional integer

指定這個房價允許的入住人數上限。如果不是 系統會假設其費率與上層費率相同。 <Occupancy>可能伴隨 <OccupancyDetails>,用於指定邀請對象類型 (成人或 子項)。請參閱 <OccupancyDetails>,瞭解以下項目的語法和說明: 子元素。

<OtherFees> Required float 影響最終價格的基本費率和稅金以外的費用 此元素使用的語法與 在 <Result> 中的 <OtherFees>

如果 <Baserate> 元素的 「全包式」屬性明確設為 true, 值為選用項目。

<Refundable> Optional Object 允許刊登可全額退款或免費提供的費率 取消。如未提供,就不會顯示退款相關資訊。 <PackageData>層級的退款政策會覆寫退款政策 <Result> 層級。<Rates> 層級覆寫的退款政策 <PackageData>層級的退款政策。可退款的價格 也能透過替代選項醒目顯示 修改交易訊息結構定義進一步瞭解這些選項 可退款費率政策

以下範例顯示 <Refundable> 元素,且已設定所有屬性:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

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

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

  • available:(必要) 設為 1 (或 true),表示費率是否允許 refund;否則設為 0 (或 false)。
  • refundable_until_days:(如果符合,則為必要欄位) availabletrue) 指定 從入住前算起可全額退款的天數 。refundable_until_days 的值 必須是介於 0 至 330 (含首尾) 之間的整數。
  • refundable_until_time:(如果符合以下情況,則強烈建議使用) availabletrue) 指定 完整時間 (以飯店當地時間為準) 我們會受理退款申請。這可以和 refundable_until_days 可指定為 例如:「退款期限為兩天前的下午 4:00 簽到。」如未設定 refundable_until_time,這個值 預設為午夜

    此屬性的值使用 Time 格式。

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

  • 如果不是 availablerefundable_until_days 稅率無法顯示可退款。
  • 如果 available0 (或 false), 其他屬性都會被忽略。費率不會顯示 但可以退還。
<Tax> Required float 針對客房最終價格計算的稅金。這個 元素使用的語法與參數中的 <Tax> 相同 <Result>

範例

基本費率和條件式費率

以下範例顯示含有基本費率的交易訊息 和條件式費率

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>1</Nights>

    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>

    <Rates>
      <!-- The rate_rule_id is required when using conditional rates -->
      <Rate rate_rule_id="mobile">
        <!-- Override base rate and taxes for conditional rates -->
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <!-- NOTE: OtherFees is inherited from the above setting -->
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

多種條件式費率

以下範例定義基本費率和多個條件式費率 在 <RoomBundle> 內:

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>2</Nights>
    <!-- When Google receives new room bundle information for an itinerary, all
    previous room bundle pricing is dropped from Google's cache. Thus, if you
    want to delete a specific room bundle from Google's cache, you may do so
    by simply not providing that specific room bundle in subsequent transaction
    messages. -->
    <RoomBundle>
     ...
      <!-- RoomID is required, PackageID is recommended. -->
      <RoomID>5</RoomID>
      <PackageID>ABC</PackageID>
      <!-- Baserate is required. -->
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>

      <!-- RatePlanID is optional and represents the unique identifier for a
      room and package data combination. We strongly recommend using RatePlanID
      as a variable to build your dynamic landing page (formerly Point of Sale)
      URL. For details, see Using Variables and Conditions. -->
      <RatePlanID>5-ABC</RatePlanID>

      <!-- Occupancy is mandatory for RoomBundle elements. -->
      <!-- Elements below will get inherited to nested rate elements. -->
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
      </OccupancyDetails>
      <InternetIncluded>1</InternetIncluded>


      <!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <!-- Neither rate overrides Custom2. -->
      <Custom2>ratebasic</Custom2>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides ChargeCurrency from roombundle. -->
          <ChargeCurrency>hotel</ChargeCurrency>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode321</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode432</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

<RoomBundle>

定義 Room 套裝組合的定價和供應情形,做為子項 <Transaction>訊息中的<Result>。為每個元素定義 套裝行程或行程組合如要定義 SDK 的套件與條款 會議室套裝組合,請使用 <RoomData>

<RoomBundle> 元素會顯示在以下位置的以下位置: 交易訊息 XML 階層:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

詳情請參閱「使用 Room 套件」。

語法

<RoomBundle> 元素使用下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    ...
    <RoomBundle>
      <!-- Required unless specified inline under <RoomData> -->
      <RoomID>room_ID</RoomID>
      <!-- Required  <PackageData> -->
      <PackageID>package_ID</PackageID>

      <!-- Required -->
      <Baserate currency="currency_code">price</Baserate>
      <!-- Required -->
      <Tax currency="currency_code">taxes</Tax>
      <!-- Required -->
      <OtherFees currency="currency_code">other_fees</OtherFees>

      <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
      <!-- Required -->
      <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>

      <BreakfastIncluded>boolean_value</BreakfastIncluded>
      <InternetIncluded>boolean_value</InternetIncluded>
      <ParkingIncluded>boolean_value</ParkingIncluded>

      <RatePlanID>rate_plan_ID</RatePlanID>

      <Rates>...</Rates>

      <Custom1>custom_value_1</Custom1>
      <Custom2>custom_value_2</Custom2>
      <Custom3>custom_value_3</Custom3>
      <Custom4>custom_value_4</Custom4>
      <Custom5>custom_value_5</Custom5>
    </RoomBundle>
    ...
  </Result>
</Transaction>

屬性

<RoomBundle> 元素沒有屬性。

子元素

<RoomBundle> 元素包含下列子元素:

子項元素 必填與否 類型 說明
<Baserate> Required float 定義入住房型套裝組合的價格。此元素會使用 語法與 <Result> 中的 <Baserate> 相同,並使用 例外狀況:
  • 如果行程無法提供會議室,請移除 <RoomBundle> 元素,表示會議室並非 需要在廣告空間中 繼續放送如需更多資訊,請參閱 移除 Room Bundle。
<BreakfastIncluded> Optional boolean 指定這個房型套裝組合是否包含房價早餐。
<ChargeCurrency> Optional enum 使用者支付預訂費用的時間和位置。這個元素使用相同的 在 <Result> 中使用 <ChargeCurrency> 語法。

預設值為 web

<Custom[1‑5]> Optional string 將額外資料傳送至到達網頁的自訂欄位 。這些元素使用的語法與 <Result> 中的 <Custom[1-5]>。上限為 200 個 每個自訂欄位的字元數。如需更多資訊,請參閱 到達網頁檔案

如果為 <自訂>元素會在 <Result> 元素,那麼這些元素就不會沿用在 <RoomBundle> 元素,必須分別為每個 <RoomBundle> 也可以加入 <PackageData>如果 。

<InternetIncluded> Optional boolean 如果 Room 套裝組合包含免付費網路 其他套裝組合則不含該設施不要設定 飯店內客房套裝組合元素,提供免費網路給所有使用者 個房間這項元素不適用於會議室中的有線網路或無線網路 客房內沒有網際網路。
<Occupancy> Required integer 指定這個房價允許的入住人數上限。舉例來說 大型套房或許能容納 6 位房客,不過 「蜜月套裝方案」只允許 2 位房客。

這個值必須小於或等於 <Capacity>,也就是有多少人 可以實際操作

如要在到達網頁網址中定義可住人數,請使用 NUM-ADULTSNUM-CHILDREN 變數,如 所述,請參閱使用 變數和條件:預設值為 2。 成人和 0 位兒童。

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

注意事項

  • <RoomBundle> 專用 <Occupancy> 因此強烈建議您標為「必填」 系統會擲回 1097 錯誤。
  • <Occupancy> 來自 訂單:<RoomBundle><PackageData>,然後 = <RoomData>。 如果上述任一值沒有任何值,則預設值為 2。
  • <Occupancy>可能伴隨 <OccupancyDetails>, 用於指定邀請對象類型 (成人或兒童)。如果客戶類型 未指明,則系統會假設他們為成人。諮詢 <OccupancyDetails> 適用於子項元素的語法和說明。
  • 如果兩者都設定 <Occupancy> <RoomBundle><PackageData><RoomBundle> 中的值 優先順序較高。
<OtherFees> Required float 除了基本費率和稅金以外,影響 房間的最終價格<OtherFees> 元素會取得 單一必要屬性 currency 定義 費用的幣別代碼 (三個字母)。舉例來說,請使用 USD 代表美元。
<PackageID> Optional (recommended) string 套件資料的專屬 ID。使用這個 ID 來比對 含有 <PackageData> 中傳送內容的 Room Bundle 資料。適用對象 如需更多資訊,請參閱 會議室 套裝組合中繼資料。(你 也能透過這個 ID 參照常用的 Room Bundle 定義 定義 Room Bundle 資料時,單一交易訊息 inline.)
<ParkingIncluded> Optional boolean Room Bundle 是否包含免費停車位,其中 免費停車將成為這間飯店的付費服務。不指定 免費停車場的此元素值。

有效值為 0 (或 false) 和 1 (或 true)。預設值為 false

<RatePlanID> Optional string 費率方案 ID 代表 房間和套裝行程舉例來說,假設 <RoomID> 值為 5 和 <PackageID> 值設為 ABC,您可以使用 「<RatePlanID>」的「5-ABC」。我們強烈建議您使用 RatePlanID 做為變數,建立動態到達網頁 (舊稱「銷售點」) 網址。

如需更多資訊,請參閱 使用變數和 條件

<Rates> Optional <Rates> 費率會覆寫這個房型套裝組合的預設值。這個 元素使用的語法與 <Result> 中的 <Rates> 相同。
<Refundable> Optional Object 允許刊登可全額退款或免費提供的費率 取消。如未提供,就不會顯示退款相關資訊。 <PackageData>層級的退款政策會覆寫以下退款政策: <Result> 層級。<Rates> 層級覆寫的退款政策 <PackageData>層級的退款政策。可退款的價格 也能透過替代選項醒目顯示 修改交易訊息結構定義進一步瞭解這些選項 可退款費率政策

以下範例顯示 <Refundable> 元素,且已設定所有屬性:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

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

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

  • available:(必要) 設為 1 (或 true),表示費率是否允許 refund;否則設為 0 (或 false)。
  • refundable_until_days:(如果符合,則為必要欄位) availabletrue) 指定 從入住前算起可全額退款的天數 。refundable_until_days 的值 必須是介於 0 至 330 (含首尾) 之間的整數。
  • refundable_until_time:(如果符合以下情況,則強烈建議使用) availabletrue) 指定 完整時間 (以飯店當地時間為準) 我們會受理退款申請。這可以和 refundable_until_days 可指定為 例如:「退款期限為兩天前的下午 4:00 簽到。」如未設定 refundable_until_time,這個值 預設為午夜

    此屬性的值使用 Time 格式。

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

  • 如果 availablerefundable_until_days 未設定,就無法將費率顯示為可退款。
  • 如果 available0 (或 false), 其他屬性都會被忽略。費率不會顯示 但可以退還。
<RoomID> Required string 客房資料的專屬 ID。使用這個 ID 來比對 含有你在 <RoomData> 中傳送的郵件的 Room Bundle 資料。 如需更多資訊,請參閱 房型套裝組合中繼資料。(您也可以使用這個編號 定義時,單一交易訊息中的通用會議室定義 。)
<Tax> Required float 針對客房最終價格計算的稅金。 <Tax> 元素採用單一必要屬性。 currency,定義由三個字母組成的貨幣代碼 就不須支付稅金舉例來說,USD 可用來代表美元。

範例

單人入住組合

以下範例定義包含單一可住人數組合的回應。 當使用者在入住人數挑選器中選取 1 時,Google 會顯示最低值 符合資格的價格,無論實際入住人數為何。

如果沒有單一入住價格,Google 會顯示 最低雙人房價格請注意,單人入住價格並非 即時查詢價格, 行程。

這個範例參照了 <RoomID><PackageID> 元素。使用 <RoomData> 和 定義該資訊的 <PackageData> 元素。

<!-- Efficient method of defining Room Bundles-->
<!----- Occupancy of 1 example ----->

<Transaction timestamp="2017-07-18T16:20:00-04:00" id="12345678">
  <!-- Part1: Define RoomData and PackageData in PropertyDataSet -->
  <!-- Note:  Once defined it does not have to be repeated for future
              Transaction Messages.
              PropertyDataSets can also be defined and sent in their own
              Transaction Message separately from pricing. Google can be
              configured to pull just PropertyDataSets once per day
              (or on a predefined frequency). -->
  <PropertyDataSet>
    <Property>180054</Property>
    <!-- Can be reused by multiple Room Bundles -->
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Queen Room - Non-Smoking" language="en"/>
        <Text text="Chambre de la Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <!-- Room can accommodate up to 4, but package data specifies occupancy
           between 1 to 4 -->
      <Capacity>4</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>436233</RoomID>
      <Name>
        <Text text="Premium King Room - Non-Smoking" language="en"/>
        <Text text="Chambre de le Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <Capacity>4</Capacity>
    </RoomData>
    <!-- Can be reused by multiple Room Bundles -->
    <PackageData>
      <PackageID>P11111</PackageID>
      <Occupancy>1</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P12345</PackageID>
      <Occupancy>4</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="1"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
  </PropertyDataSet>

    <!-- Efficient method of defining Room Bundles -->
    <!-- Part 2: Reference RoomData and PackageData through ID -->
  <Result>
    <!-- Single occupancy pricing will be specified in a room bundle below -->
    <Property>180054</Property>
    <Checkin>2017-10-07</Checkin>
    <Nights>2</Nights>
    <!-- Base Room Bundle -->
    <RoomBundle>
      <RoomID>060773</RoomID>
      <PackageID>P54321</PackageID>
      <Baserate currency="USD">199.99</Baserate>
      <Tax currency="USD">25.12</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RatePlanID>060773-P54321</RatePlanID>
    </RoomBundle>
    <RoomBundle>
      <RoomID>060773</RoomID>
      <PackageID>P11111</PackageID>
      <!-- Price for 1 ("occupancy") is the lowest price and will be
           displayed -->
      <Baserate currency="USD">174.99</Baserate>
      <Tax currency="USD">22.08</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RatePlanID>060773-P11111</RatePlanID>
    </RoomBundle>
    <!-- Premium Room Bundle -->
    <RoomBundle>
      <RoomID>436233</RoomID>
      <PackageID>P12345</PackageID>
      <!-- Price for 4 ("occupancy"), any eligible room bundle with 1 or more
           occupancy will be displayed-->
      <Baserate currency="USD">298.88</Baserate>
      <Tax currency="USD">42.12</Tax>
      <OtherFees currency="USD">10.00</OtherFees>
      <RatePlanID>436233-P12345</RatePlanID>
    </RoomBundle>
    <!-- ..Continue providing all available RoomBundle rates under matched
         property for 1 or more occupancies..-->
  </Result>
</Transaction>


兩個以上可住人數

以下範例定義包含兩個以上可住人數的回應。

這個範例參照了 <RoomID><PackageID> 元素。使用 <RoomData> 和 定義該資訊的 <PackageData> 元素。

<!-- Efficient method of defining Room Bundles-->
<!----- Occupancy of 3 example ----->

<Transaction timestamp="2017-07-18T16:20:00-04:00" id="12345678">
  <!-- Efficient method of defining Room Bundles-->
  <!-- Part1: Define RoomData and PackageData in PropertyDataSet -->
  <PropertyDataSet>
    <Property>180054</Property>
    <!-- Can be reused by multiple Room Bundles -->
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Queen Room - Non-Smoking" language="en"/>
        <Text text="Chambre de la Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <!-- Room can accommodate up to 4, but package data specifies occupancy
           between 1 to 4 -->
      <Capacity>4</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>436233</RoomID>
      <Name>
        <Text text="Premium King Room - Non-Smoking" language="en"/>
        <Text text="Chambre de le Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <Capacity>4</Capacity>
    </RoomData>
    <!-- Can be reused by multiple Room Bundles -->
    <PackageData>
      <PackageID>P33333</PackageID>
      <Occupancy>3</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P12345</PackageID>
      <Occupancy>4</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="1"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
  </PropertyDataSet>

  <Result>
    <Property>180054</Property>
    <Checkin>2017-10-07</Checkin>
    <Nights>2</Nights>
    <!-- Efficient method of defining Room Bundles -->
    <!-- Part 2: Reference RoomData and PackageData through ID -->
    <!-- Base Room Bundle -->
    <RoomBundle>
      <!-- Baserate above and attributes must match atleast one room bundle
           below -->
      <RoomID>060773</RoomID>
      <PackageID>P33333</PackageID>
      <Baserate currency="USD">499.99</Baserate>
      <Tax currency="USD">55.12</Tax>
      <OtherFees currency="USD">22.00</OtherFees>
    </RoomBundle>
    <!-- Premium Room Bundle -->
    <RoomBundle>
      <RoomID>436233</RoomID>
      <PackageID>P12345</PackageID>
      <!-- Lowest price for 3 ("occupancy"), shown below, will be displayed -->
      <Baserate currency="USD">598.88</Baserate>
      <Tax currency="USD">62.12</Tax>
      <OtherFees currency="USD">30.00</OtherFees>
    </RoomBundle>
    <!-- ..Continue providing all available RoomBundle rates under matched
         property for 2 or more occupancies..-->
  </Result>
</Transaction>


多房套裝組合

以下範例說明如何在多個房型套裝組合中設定可住人數 可能的青年旅館房價。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    ...
    <!-- Suite Room Bundle -->
    <RoomBundle>
      <RoomID>suite1</RoomID>
      <PackageID>standard</PackageID>
      <Occupancy>2</Occupancy>
      <!-- Price for room -->
      <Baserate currency="USD">80.00</Baserate>
      <Tax currency="USD">5.12</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="Suite for 2" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>

    <!-- Small Dorm Room Bundle -->
    <RoomBundle>
      <RoomID>small_dorm</RoomID>
      <PackageID>economy</PackageID>
      <Occupancy>1</Occupancy>
      <!-- Price per bed -->
      <Baserate currency="USD">35.00</Baserate>
      <Tax currency="USD">3.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="1 bed in small dorm" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>

    <!-- Large Dorm Room Bundle -->
    <RoomBundle>
      <RoomID>large_dorm</RoomID>
      <PackageID>economy</PackageID>
      <Occupancy>1</Occupancy>
      <!-- Price per bed -->
      <Baserate currency="USD">20.00</Baserate>
      <Tax currency="USD">2.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="1 bed in large dorm" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>
    ...
  </Result>
</Transaction>

多種條件式費率

以下範例定義基本費率和多個條件式費率 在 <RoomBundle> 內:

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>2</Nights>
    <!-- When Google receives new room bundle information for an itinerary, all
    previous room bundle pricing is dropped from Google's cache. Thus, if you
    want to delete a specific room bundle from Google's cache, you may do so
    by simply not providing that specific room bundle in subsequent transaction
    messages. -->
    <RoomBundle>
     ...
      <!-- RoomID is required, PackageID is recommended. -->
      <RoomID>5</RoomID>
      <PackageID>ABC</PackageID>
      <!-- Baserate is required. -->
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>

      <!-- RatePlanID is optional and represents the unique identifier for a
      room and package data combination. We strongly recommend using RatePlanID
      as a variable to build your dynamic landing page (formerly Point of Sale)
      URL. For details, see Using Variables and Conditions. -->
      <RatePlanID>5-ABC</RatePlanID>

      <!-- Occupancy is mandatory for RoomBundle elements. -->
      <!-- Elements below will get inherited to nested rate elements. -->
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
      </OccupancyDetails>
      <InternetIncluded>1</InternetIncluded>


      <!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <!-- Neither rate overrides Custom2. -->
      <Custom2>ratebasic</Custom2>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides ChargeCurrency from roombundle. -->
          <ChargeCurrency>hotel</ChargeCurrency>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode321</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode432</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

<OccupancyDetails>

交易訊息中的 <Occupancy> 可指定房客人數上限 空房或套裝行程「<OccupancyDetails>」可以包含其他資訊 例如房客人數和類型 (成人或兒童)。

<Occupancy><OccupancyDetails> 出現在 <Rates> 元素中時 <Result><RoomBundle>,表示頻率受限於 以及可住人數詳細資料

語法

<OccupancyDetails> 出現時,一律會在前面加上 <Occupancy>。 請注意下列語法:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
  ...
    <Occupancy>max_number_of_intended_occupants</Occupancy>
    <OccupancyDetails>
      <NumAdults>number_of_adults</NumAdults>
      <Children>
        <Child age=age_of_one_child_guest/>
        <Child age=age_of_one_child_guest/>
      </Children>
    </OccupancyDetails>
  </Result>
</Transaction>

子元素

<OccupancyDetails> 元素包含下列子元素:

子項元素 必填與否 類型 說明
<NumAdults> Required integer 成人房客人數。最小值:1,最大值:20。
<Children> Optional Object 一或多個 <Child> 元素的容器。
<Child age> Optional integer 這位孩子的最高年齡,例如:<Child age="17">

範例

以下範例說明 <OccupancyDetails><Results><RoomBundle><Rates> 子元素。

結果回應

以下範例定義一個行程及其價格 屬性來回應即時定價查詢,而這個查詢是 活動的號碼和類型。以下是《<OccupancyDetails>》 -- 2 位成人和 一個子項 -- 會在 <Result> 中傳回。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
    <Occupancy>3</Occupancy>
    <OccupancyDetails>
      <NumAdults>2</NumAdults>
      <Children>
        <Child age="17"/>
      </Children>
    </OccupancyDetails>
  </Result>
</Transaction>

為回覆評分

以下範例為 1 位成人定義一個行程及其價格 和 1 位兒童。這裡,系統會在 <Rates> 中傳回 <OccupancyDetails> <Result> 的元素。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Transaction id="Wtdj8QoQIWcAAbaTGlIAAAC4" timestamp="2018-04-18T11:27:45-04:00">
  <Result>
    <Property>8251</Property>
    <Checkin>2018-06-20</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">62.18</Baserate>
    <Tax currency="USD">2.45</Tax>
    <OtherFees currency="USD">0.00</OtherFees>
    <Rates>
      <Rate rate_rule_id="rule-951">
        <Occupancy>2</Occupancy>
        <OccupancyDetails>
          <NumAdults>1</NumAdults>
          <Children>
            <Child age="17"/>
          </Children>
        </OccupancyDetails>
        <Baserate currency="USD">42.61</Baserate>
        <Tax currency="USD">5.70</Tax>
        <OtherFees currency="USD">0.00</OtherFees>
        <Custom1>abc4</Custom1>
        <AllowablePointsOfSale>
          <PointOfSale id="yourhotelpartnersite.com"/>
        </AllowablePointsOfSale>
      </Rate>
    </Rates>
  </Result>
</Transaction>

房型套裝組合

以下範例定義了 2 位成人和 1 位兒童的可住人數 並支付可退款費率。這裡會顯示 <OccupancyDetails><RoomBundle>

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>6781291</Property>
    <Checkin>2017-08-05</Checkin>
    <Nights>2</Nights>
    ...
    <RoomBundle>
      <RoomID>10291</RoomID>
      <RatePlanID>564739</RatePlanID>
      <PackageID>564739</PackageID>
      <Occupancy>3</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
        <Children>
          <Child age="17"/>
        </Children>
      </OccupancyDetails>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="true" refundable_until_days="1" refundable_until_time="23:59:00" />
      <Baserate currency="USD">185.34</Baserate>
      <Tax currency="USD">37.06</Tax>
      <OtherFees currency="USD">2.22</OtherFees>
    </RoomBundle>
  </Result>
</Transaction>

多房套裝組合

以下範例定義多個 <RoomBundle> 費率, 僅限 2 位成人和 2 位兒童入住。在這裡, <OccupancyDetails> 會顯示在 <RoomBundle><Rates> 元素中。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">275.00</Baserate>
    <Tax currency="USD">27.50</Tax>
    <OtherFees currency="USD">0</OtherFees>
    <RoomBundle>
      <RoomID>5</RoomID>
      <PackageID>STD</PackageID>
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">0</OtherFees>
      <InternetIncluded>1</InternetIncluded>
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <Custom2>ratebasic</Custom2>
      <Occupancy>4</Occupancy>
      <OccupancyDetails>
          <NumAdults>2</NumAdults>
          <Children>
              <Child age="17"/>
              <Child age="17"/>
          </Children>
      </OccupancyDetails>
      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <ChargeCurrency>hotel</ChargeCurrency>
          <Custom1>ratecode321</Custom1>
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <Custom1>ratecode432</Custom1>
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>