不公開費率

不公開費率是一種費率規範,可用於為目標對象名單或會員方案的成員提供優惠費率。舉例來說,你採用的標準費率可能為 $150 美元,但為會員方案成員提供 $135 美元的不公開費率。

不公開費率有各種使用者介面樣式,可向符合資格的使用者顯示專屬折扣價格。如要進一步瞭解這些選項,請參閱「不公開費率的詳細資料和範例」。

建立私人費率

如要使用不公開費率,請按照下列步驟操作:

  1. 為每項不公開費率新增費率規範,在費率規範 XML 檔案中定義費率條件。詳情請參閱費率規範 XML 參考資料

  2. 在價格動態饋給中,將私人房價新增至適當的行程。如要這麼做,請使用與條件式費率相同的語法。 將 rate_rule_id 屬性設為 <Rate> 元素中的 ID。

  3. 更新到達網頁檔案 (如有必要),確認符合資格的使用者可透過網站的深層連結預訂折扣房價。到達網頁網址是由公開費率產生。不公開費率的費率規範會填入 CLOSE-RATE-RULE-IDS,而 IF-CLOSE-RATE-RULE-IDS 會解析為 true

範例

基本不公開費率

以下是不公開費率的基本範例:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction>
  <Result>
    <Property>1234</Property>
    <Checkin>2023-05-23</Checkin>
    <Nights>1</Nights>

    <!-- An eligible non-hidden rate is required in order to display the UI treatment. -->
    <!-- This example uses a public rate, but a conditional rate where the
        user meets all conditions could also be used. -->
    <!-- This would be the strikethrough price. -->
    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>

    <Rates>
      <Rate rate_rule_id="sample_qr">
        <!-- Price will not be displayed, but is required for calculating discounts. -->
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

條件式不公開費率

以下範例僅顯示美國使用者的條件式費率。

<?xml version="1.0" encoding="UTF-8"?>
<Transaction>
  <Result>
    <Property>1234</Property>
    <Checkin>2025-08-23</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>
    <Rates>
      <Rate rate_rule_id="sample_qr">
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <Custom1>ratecode123</Custom1>
        <RateRuleSettings>
          <RateRule id="US_users">
            <UserRateCondition>
              <UserCountry>US</UserCountry>
            </UserRateCondition>
          </RateRule>
        </RateRuleSettings>
      </Rate>
    </Rates>
  </Result>
</Transaction>

如需更多範例,請參閱費率規範 XML 參考資料