定價與費率;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:10:00 的訊息之後收到價格為 2019-05-03 14:09:00 的價格更新,系統仍會依序處理,且將使用時間戳記為 2019-05-03 14:10:00 的訊息中的價格。

子元素

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

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

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

<Result> Optional* <Result>

客房行程的定價資料,或是定義了客房套裝組合和額外客房類型的 <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>

每晚房價

以下範例定義自 2023 年 6 月 7 日起,1 到 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>


基本費率和條件式費率

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

<?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 晚住宿):

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

<Transaction> 訊息中的會議室和套件 (或 Room Bundle) 資訊容器。在合作夥伴設定的飯店覆寫值上設定的值。 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。

詳情請參閱 Room Bundle 中繼資料

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

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

* 至少必須有一個 <PackageData><RoomData>

示例

Room 和套件資料

以下範例顯示 <PropertyDataSet> 中的 Room 和 package 資料:

<?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。如此一來,您就能大幅縮減訊息大小,並減少因資料重複而導致的錯誤量。詳情請參閱「Room Bundle 中繼資料」。

<RoomData>

定義與客房無關,以及擴充功能的 Room 套裝組合 (因為 Room 套裝組合是客房與其他設施)。使用 <RoomData> 可減少價格動態饋給中重複的描述性資料。

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

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

<RoomData> 元素包含與合作夥伴和飯店相關的資訊,但不屬於行程的資訊。預定用途適用於所有非行程資料。

<RoomData> 元素與 <PackageData> 類似,但其說明的是實體房間,而不是套件的設施與條款。您將使用 <RoomData><PackageData> 來提供 Room Bundle 的詳細資料。如果是不屬於套件的個別房間,請使用 <RoomData>

您可以定義同一會議室或 Room Bundle 的 <RoomData><PackageData> 元素。當 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 指定房間或房型套裝組合的相片網址和選用說明文字。您可以為會議室或 Room Bundle 指定多個 <PhotoURL>。每張相片網址都必須有專屬的 <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> 模塊進行比對。詳情請參閱「Room Bundle 中繼資料」。定義內嵌會議室資料時,您也可以使用這個 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>

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>

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

兩張雙人床

以下範例是有兩張 double 張床的 western 風格日式客房。

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


無床的日式風格

以下是無床的日式客房範例。japanese 風格房間不需要床位資訊。

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

帶床的日本西部片

以下是採 king 尺寸床鋪的 japanese_western 風格房間範例。

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

如果合作夥伴沒有 japanese_western 間客房的床鋪資訊,請按照以下範例操作:

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

<PackageData>

定義房源的 Room Bundle 不相關行程中繼資料。這個元素包含與合作夥伴和飯店相關聯,但不屬於行程的資訊。其目的是將所有非行程資料定義一次,並從行程資料中參照。

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

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

<PackageData> 元素與 <RoomData> 類似,但所說明的費率功能和字詞不屬於實體客房說明。您可搭配使用 <RoomData><PackageData>,提供房型套裝組合和費率功能的詳細資料。如果是不屬於套件的個別會議室,請使用 <RoomData>

您可以為同一個會議室或 Room Bundle 定義 <RoomData><PackageData> 元素。當 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>,其中包含 textlanguage 這兩個必要屬性。text 屬性為說明,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);否則請設為 0 (或 false)。
  • in_private_space (選用):如果房客能在可避免與其他邀請對象聯絡的空間 (不包括住宿房間) 享用早餐/晚餐,請設為 1 (或 true)。其他屬性則設為 0 (或 false)。
  • buffet (選用):如果以自助餐形式提供早餐/晚餐,請設為 1 (或 true);否則請設為 0 (或 false)。

選用屬性只有在 included 為 true 時才會使用。

您需要提供 <Breakfast><Dinner> 屬性給 <Breakfast><Dinner>,餐點篩選器 (no mealsbreakfast onlydinner onlybreakfast and 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,將 Room Bundle 資料與價格更新中的 <Result> 區塊進行比對。詳情請參閱 Room 套裝組合中繼資料

定義 Room 套件資料內嵌時,您也可以使用這個 ID 參照單一交易訊息中使用的通用 Room 套件定義。

<ParkingIncluded> Optional boolean 房型套裝組合是否包含免費停車位,如果停車位為這間飯店的付費服務,則屬於付費服務。如果是提供免費停車位的飯店,請勿指定此元素的值。

有效值為 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:(必要) 設為 1true,表示房價是否允許全額退款;否則請設為 0false
  • refundable_until_days:(如果 availabletrue,則為必要) 指定在入住前可申請全額退款的天數。refundable_until_days 的值必須是介於 0 至 330 (含首尾) 之間的整數。
  • refundable_until_time:(如果 availabletrue,則強烈建議使用) 指定能夠全額退款要求的最晚時間 (以飯店的當地時間為準)。可與 refundable_until_days 結合使用,以指定「退款期限為報到報前兩天下午 4 點」。如未設定 refundable_until_time,該值會預設為午夜。

    此屬性的值使用 Time 格式。

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

  • 如未設定 availablerefundable_until_days,費率就不會顯示可退款。
  • 如果 available0false,系統會忽略其他屬性。即使同時設定了其中一個或兩項屬性,該費率也無法顯示為可退款。
<MembershipBenefits Included> Optional boolean 房價包含入住期間的菁英狀態福利。內含下列參數:
  • ProgramName:菁英狀態計畫名稱
  • ProgramLevel:計畫等級。例如:「Gold」。
  • NightlyValue (optional):享有每晚好處。
<CarRentalIncluded> Optional boolean 房價包含入住天數的免費租車服務。
<MilesIncluded>> Optional boolean 房價包含飛行常客里程數。參數包括:
  • NumberofMiles:每個行程的英里數。
  • Provider:飛行常客里程數。
<OnPropertyCredit> Optional boolean 房價包含房源中的抵免額 (F&B、度假村、SPA 等)。參數:
  • Amount:每個行程的抵免額值,以當地幣別計算。
<AirportTransportationIncluded> Optional Object 房價包含往返附近機場的免費接駁服務。選用的 direction 屬性可指定交通的方向。有效值包括:
    from:從機場提供前往房源的交通服務。如果沒有指定方向,則此為預設值。to:提供從房源前往機場的交通服務。round_trip:往返機場的交通運輸服務。

示例

單一房型套裝組合

以下範例定義了一個可住人數 2 人 (1 位成人與 1 位兒童) 的單一 Room Bundle,並包含早餐:

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


含房價的房型套裝組合

以下範例為提供房價功能的房型套裝組合定義客房和套件中繼資料:

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

<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 符合飯店資格的一或多個到達網頁。到達網頁是指可處理使用者預訂程序的網站。如要明確納入特定到達網頁 (並排除其他到達網頁),請在到達網頁檔案中加入一或多個與 <PointOfSale> 元素的 id 屬性相符的 <AllowablePointsOfSale> 元素。

如果您未納入這個元素,則到達網頁檔案中定義的所有到達網頁都可用來預訂客房。詳情請參閱到達網頁檔案語法

<Baserate> Optional float

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

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

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

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

<Baserate> 不得包含任何數字分組符號,例如半形逗號 (,) 或半形句號 (.)。請務必使用半形句號 (.) 來分隔分數。舉例來說,$1,200.40 代表 $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> 區塊。

以下為有效值:

  • 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 個半形字元。詳情請參閱到達網頁檔案

<Rate> 元素中提供的 <Custom> 元素不會沿用至 <RoomBundle> 元素。您應在每個 <RoomBundle> 中分別定義 <Custom> 屬性。

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

如果到期日對定價結構無關緊要,建議您不要提供到期時間戳記。

Google 不會提供任何已過期的價格,而且價格到期的行程就有資格使用 即時定價查詢功能。

<Nights> Required integer 行程住宿晚數。<Nights> 元素的值必須是正整數。 <Nights><Checkin> 的組合構成行程。
<OtherFees> Optional float 影響客房最終價格的基本費率和稅金以外的費用。<OtherFees> 元素會使用一個必要屬性 currency,該屬性定義了費用的三字母貨幣代碼。例如:USD

如果 <Baserate> 大於零,就必須使用 <OtherFees> 元素。

<Occupancy> Optional integer 指定這個房價允許的入住人數上限。當 <Occupancy> 直接顯示在 <Result> 下方時,則必須指定 2 以上。<Occupancy> 可與 <OccupancyDetails> 搭配使用,用於指定房客類型 (成人或兒童)。如未指定邀請對象類型,系統會假設其為成人。如需子項元素的語法和說明,請參閱 <OccupancyDetails>。如未提供 <Occupancy> 元素,可住人數會預設為 2

注意事項:如要啟用這項功能,請啟用傳送非雙人房價格的功能。

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

如果同一個客房/行程組合有多個費率,或是無法在 <Result> 層級指定費率,請使用 <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) 表示費率是否允許全額退款;否則請設為 0 (或 false)。
  • refundable_until_days:(如果 availabletrue,則為必要) 指定在入住前可申請全額退款的天數。refundable_until_days 的值必須是介於 0 至 330 (含首尾) 之間的整數。
  • refundable_until_time:(如果 availabletrue,則強烈建議使用) 指定能夠全額退款要求的最晚時間 (以飯店的當地時間為準)。可與 refundable_until_days 結合使用,以指定「退款期限為報到報前兩天下午 4 點」。如未設定 refundable_until_time,該值會預設為午夜。

    此屬性的值使用 Time 格式。

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

  • 如未設定 availablerefundable_until_days,費率就不會顯示可退款。
  • 如果 available0 (或 false),系統會忽略其他屬性。即使同時設定了其中一個或兩項屬性,該費率也無法顯示為可退款。
<RoomBundle> Optional <RoomBundle> 此容器內含客房實體說明、各項設施包裝,以及指定飯店和行程的部分購買政策詳細資料。

一般來說,如要在同一個屬性中定義基本房型和不同房型的價格,請使用這個元素。雖然您可以以內嵌方式定義 Room Bundle 說明,但仍應使用個別的交易訊息來定義該項資訊。Google 會儲存中繼資料,方便您日後在價格更新時參考這些資料,而不必重複提交。

<RoomID> Optional string 會議室的專屬 ID,用於對應至預先定義的會議室資料。也可用來填入 PARTNER-ROOM-ID 到達網頁變數。 詳情請參閱「Room 套裝組合中繼資料」。
<Tax> Optional float 針對客房最終價格計算的稅金。 <Tax> 元素使用單一必要屬性 currency,該屬性定義了三字母的稅金貨幣代碼。例如:USD。如果 <Baserate> 大於零,就必須使用 <Tax> 元素。
<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>

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

您可以在 Google 儲存的獨立交易訊息中「一次」定義該資訊。之後,您就能在日後的所有定價和商品目錄更新中參照該版本。詳情請參閱「Room Bundle 中繼資料」。

多費率範例

以下範例定義單一行程與屬性,針對各種可住人數提供多種費率。<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> 區塊的容器。<Rates> 中的每個 <Rate> 會為房型或行程組合定義不同的價格。

只有在同一個客房或行程組合有多個房價時,才使用 <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> 中設定,這些欄位會沿用父項元素的值。只有 <RoomBundle> 元素會沿用 <AllowablePointsofSale>。

語法

<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 符合飯店資格的一或多個到達網頁。此元素使用的語法與 <Result> 上的 <AllowablePointsOfSale> 相同。
<Baserate> Required float 入住房價。此元素使用的語法與 <Result> 上的 <Baserate> 相同。

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

<ChargeCurrency> Optional enum 使用者支付預訂費用的時間和位置。這個元素使用的語法與 <Result> 中的 <ChargeCurrency> 相同。
<Custom[1‑5]> Optional string 自訂欄位,可用來將與飯店相關的其他資料傳送至到達網頁。此元素使用的語法與 <Result> 中的 <Custom[1‑5]> 相同。每個自訂欄位的長度上限為 200 個半形字元。詳情請參閱 到達網頁檔案

如果 <Result> 元素中提供 <Custom> 元素,就不會在 <RoomBundle> 元素中沿用,而應為每個 <RoomBundle> 個別定義,或者必要時可以在 <PackageData> 中加入該元素。

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

指定這個房價允許的入住人數上限。如未指定,系統會假設其與父項費率相同。<Occupancy> 可與 <OccupancyDetails> 搭配使用,用於指定房客類型 (成人或兒童)。如需子項元素的語法和說明,請參閱 <OccupancyDetails>

<OtherFees> Required float 影響客房最終價格的基本費率和稅金以外的費用。此元素使用的語法與 <Result> 中的 <OtherFees> 相同。
<Refundable> Optional Object 允許公告費率可全額退款,或提供免費取消服務。如未提供,就不會顯示退款相關資訊。 <PackageData> 層級的退款政策會覆寫 <Result> 層級的退款政策。<Rates> 層級的退款政策會覆寫 <PackageData> 層級的退款政策。您也可以在不直接修改交易訊息結構定義的情況下,透過替代選項向使用者強調可退款價格。進一步瞭解這些選項 可退款費率政策

以下範例顯示 <Refundable> 元素及其所有屬性集:

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

注意:建議您設定所有屬性。如未設定一或多項屬性,系統就會產生動態饋給狀態警告訊息。

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

  • available:(必要) 設為 1 (或 true) 表示費率是否允許全額退款;否則請設為 0 (或 false)。
  • refundable_until_days:(如果 availabletrue,則為必要) 指定在入住前可申請全額退款的天數。refundable_until_days 的值必須是介於 0 至 330 (含首尾) 之間的整數。
  • refundable_until_time:(如果 availabletrue,則強烈建議使用) 指定能夠全額退款要求的最晚時間 (以飯店的當地時間為準)。可與 refundable_until_days 結合使用,以指定「退款期限為報到報前兩天下午 4 點」。如未設定 refundable_until_time,該值會預設為午夜。

    此屬性的值使用 Time 格式。

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

  • 如未設定 availablerefundable_until_days,費率就不會顯示可退款。
  • 如果 available0 (或 false),系統會忽略其他屬性。即使同時設定了其中一個或兩項屬性,該費率也無法顯示為可退款。
<Tax> Required float 針對客房最終價格計算的稅金。此元素使用的語法與 <Result> 中的 <Tax> 相同。

示例

基本費率和條件式費率

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

<?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 Bundle 的價格和供應情形定義為 <Transaction> 訊息中 <Result> 的子項。為每個套件或行程組合定義單獨的元素。如要定義 Room 套裝組合的套件和條款,請使用 <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 套件」一文。
<BreakfastIncluded> Optional boolean 指定這個房型套裝組合是否包含房價早餐。
<ChargeCurrency> Optional enum 使用者支付預訂費用的時間和位置。此元素使用與 <Result><ChargeCurrency> 相同的語法。

預設值為 web

<Custom[1‑5]> Optional string 用於將其他資料傳送至 Room 套裝組合到達網頁的自訂欄位。這些元素使用的語法與 <Result> 中的 <Custom[1-5]> 相同。每個自訂欄位的長度上限為 200 個字元。詳情請參閱「到達網頁檔案」一文。

如果 <Result> 元素中提供 <Custom> 元素,就不會在 <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>
  • 如果您同時在 <RoomBundle><PackageData> 中設定 <Occupancy>,系統會優先採用 <RoomBundle> 中的值。
<OtherFees> Required float 影響客房最終價格的基本費率和稅金以外的費用。<OtherFees> 元素會使用一個必要屬性 currency,該屬性定義了費用的三字母貨幣代碼。舉例來說,USD 代表美元。
<PackageID> Optional (recommended) string 套件資料的專屬 ID。請使用這個 ID,將 Room Bundle 資料與 <PackageData> 中傳送的資料進行比對。詳情請參閱 Room 套裝組合中繼資料。定義 Room 套件資料時,您也可以使用這個 ID 參照單一交易訊息中使用的一般 Room 套件定義。
<ParkingIncluded> Optional boolean 房型套裝組合是否包含免費停車位,如果停車位為這間飯店的付費服務,則屬於付費服務。如果是提供免費停車位的飯店,請勿指定此元素的值。

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

<RatePlanID> Optional string 費率方案 ID 代表客房和套裝行程組合的專屬 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) 表示費率是否允許全額退款;否則請設為 0 (或 false)。
  • refundable_until_days:(如果 availabletrue,則為必要) 指定在入住前可申請全額退款的天數。refundable_until_days 的值必須是介於 0 至 330 (含首尾) 之間的整數。
  • refundable_until_time:(如果 availabletrue,則強烈建議使用) 指定能夠全額退款要求的最晚時間 (以飯店的當地時間為準)。可與 refundable_until_days 結合使用,以指定「退款期限為報到報前兩天下午 4 點」。如未設定 refundable_until_time,該值會預設為午夜。

    此屬性的值使用 Time 格式。

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

  • 如未設定 availablerefundable_until_days,費率就不會顯示可退款。
  • 如果 available0 (或 false),系統會忽略其他屬性。即使同時設定了其中一個或兩項屬性,該費率也無法顯示為可退款。
<RoomID> Required string 客房資料的專屬 ID。請使用這個 ID,將 Room Bundle 資料與您在 <RoomData> 中傳送的資料進行比對。詳情請參閱 Room Bundle 中繼資料。定義內嵌會議室資料時,您也可以使用這個 ID 在單一交易訊息中參照一般會議室定義。
<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> 出現在 <Result><RoomBundle><Rates> 元素中,表示費率受到可住人數詳細資料的限制。

語法

<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 位成人和 1 位兒童 -- 以 <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 位兒童的行程及其價格定義。在本例中,系統會在 <Result><Rates> 元素中傳回 <OccupancyDetails>

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