修改政策

總覽

這個 API 可讓您定義在符合條件時,動態套用至費率的動作,例如調整價格或啟用退款功能。與 Promotions API 不同,這個 API 可在符合特定條件時套用任何動作,包括可能會提高最終價格的價格調整。Promotions API 只能套用符合資格的促銷活動,且折扣幅度必須最優惠。

要求

語法

RateModifications 訊息使用以下語法:

<?xml version="1.0" encodin>g<="UTF-8"?
RateModifications partner="partner_key&quot;
                      id="message_ID"
   >   <                timestamp="timestamp"
  HotelRateM>odifi<cations hotel_id="HotelID" action="[overlay]&quo>t;
    <ItineraryRat>eModifica<tion id="ModificationID" action="[delete]&quot;
      BookingDates>
        <DateRange start="YYYY-MM-DD" end="YYYY-MM-DD&quot; days_of_week=&q>uot;&qu<ot;MTWHFSU_or>_subset<""/
        DateRange start=&quo>t;YYYY-<MM-DD" >end="<;YYYY-MM-DD" days_of_week=""MTWHFSU_or_subset""/
      />Booking<Dates
      B>ookingW<indow min=&qu>ot;intege<r" max="integer"/
      CheckinDates
        DateRange start=&quot>;YYYY-M<M-DD" end>="<YYYY-MM>-DD"< days_of_week=""MTWHFSU_or_s>ubset&q<uot;&quo>t;/
   <   /CheckinDates
      CheckoutDates
    >    Dat<eRange start="YYYY-MM-DD&quot; end=>"Y<YYY-MM-DD>" da<ys_of_week=&quot;"MTW>HFSU_or_s<ubset"&quot;/
      />Checkou<tDates
   >   Devi<ces
     >   Device< type="[desktop|ta>blet|mobi<le]"/
      /Devic>es
    <  L>engthOfStay mi<n="integer" max="i>nteger&qu<ot;/
      MinimumAmount before_discount="integer"/
      RatePlans
   >     Ra<tePlan id=>"P<ackageID_1"/
        RatePlan id=>"Pac<kageID_2"/
      /RateP>lans
  <    Roo>mTypes
       < RoomType id=">RoomID_1&<quot;/
        RoomType id=&quot;Ro>omID_2&qu<ot;/
      /RoomTypes
   >   StayDa<tes application="[all|any]&quot;
        DateRange start="YYYY-MM-DD&quot; end="YYYY-MM-DD" days_of_week=""MTWHFSU_or_su>bset"<;"/
      /StayDates
      User>Countri<es type="[inclu>de|ex<clude]"
        Count>ry <code="country_code>&<quot;/
      /User>Countries
      ModificationActions
        PriceAdjustment multiplier="float"/
        RateRule id="RateRuleID"/
        Refundable available="[false|true]"
                       refundable_until_days="number_of_days"
                       refundable_until_time="time"/
        Availability status="[unavailable]"/
      /ModificationActions
    /ItineraryRateModification
  /HotelRateModifications
/RateModifications

元素和屬性

RateModifications 訊息包含下列元素和屬性:

元素 / @Attribute 發生次數 類型 說明
RateModifications 1 Complex element 費率修改訊息的根元素。
RateModifications / @partner 1 string 這封郵件的合作夥伴帳戶。這個字串值是 Hotel Center 帳戶設定頁面中列出的「合作夥伴鍵」值。

注意:如果您有為多個帳戶提供動態饋給的後端,這個值必須與同一個帳戶 <OTA_HotelRateAmountNotifRQ><OTA_HotelAvailNotifRQ> 訊息的 <RequestorID> 元素中指定的 ID 屬性值相符。

RateModifications / @id 1 string 此要求訊息的專屬 ID。這個值會在回應訊息中傳回。允許的字元為 a-z、A-Z、0-9、_ (底線) 和 - (連字號)。
RateModifications / @timestamp 1 DateTime 這則訊息的建立日期和時間。
RateModifications / HotelRateModifications 0..n HotelRateModifications

資源的費率調整。每項費率異動都只會套用至單一房源。

注意:如果可對相同費率套用多個費率修改項目,系統會套用所有修改項目。我們無法保證特定順序。

RateModifications / HotelRateModifications / @hotel_id 1 string 房源的專屬 ID。這個值必須與飯店清單動態饋給中 <listing> 元素中使用 <id> 指定的飯店 ID 相符。Hotel Center 也會列出飯店 ID。
RateModifications / HotelRateModifications / @action 0..1 enum

如果未指定 action,系統會為這間飯店新增或更新這個元素中的修改內容。如果指定 action="overlay",系統會先刪除先前為此飯店定義的所有修改內容。接著,系統會寫入此處指定的修改內容。如果使用 action="overlay",且未在該元素中指定任何修改項目,系統會刪除這間飯店的所有修改項目。

RateModifications / HotelRateModifications / ItineraryRateModification 0..200 ItineraryRateModification

資源的單一費率修改項目。

注意:費率修改項目不易偵錯,因此建議您謹慎使用。如果用途需要超過 200 個費率修改,請與客戶技術顧問 (TAM) 聯絡。

RateModifications / HotelRateModifications / ItineraryRateModification / @id 1 string 費率異動項目的專屬 ID。允許的字元數上限為 40 個字元。允許的字元為 a-z、A-Z、0-9、_ (底線)、- (連字號) 和 . (句號)。
RateModifications / HotelRateModifications / ItineraryRateModification / @action 0..1 enum

如果未指定,且沒有儲存相同 id 的費率修改項目,則會儲存此費率修改項目。否則,如果未指定,且儲存了具有相同 id 的費率修改項目,則會更新現有的費率修改項目。

如有指定,值必須為 "delete"。如果指定 "delete",系統會刪除具有相同 id 的已儲存費率修改項目。使用 "delete" 時,請勿在 <ItineraryRateModification> 中加入任何子元素。此外,"delete" 也不得與 <HotelRateModifications action="overlay"/> 搭配使用。

RateModifications / HotelRateModifications / ItineraryRateModification / BookingDates 0..1 BookingDates 容器,用於定義一或多個日期範圍,以便定義必須預訂的時間,才能套用費率異動。
RateModifications / HotelRateModifications / ItineraryRateModification / BookingDates / DateRange 1..99 DateRange 指定必須在何時進行預訂,才能套用費率調整的日期範圍。
RateModifications / HotelRateModifications / ItineraryRateModification / BookingDates / DateRange / @start 0..1 Date 日期範圍的開始日期 (以資源所在時區為準),包括這一天。這個日期必須早於或等於 end 日期。如果未指定 start,則開始日期範圍實際上是無限的。
RateModifications / HotelRateModifications / ItineraryRateModification / BookingDates / DateRange / @end 0..1 Date 日期範圍的結束日期 (含此日期),以資源所在時區為準。這個日期必須等於或晚於 start 日期。如果未指定 end,則結束日期範圍實際上是無限的。
RateModifications / HotelRateModifications / ItineraryRateModification / BookingDates / DateRange / @days_of_week 0..1 string

在日期範圍內允許的星期幾。如果未指定,系統會允許在指定日期範圍內的所有日子。字串中的每個字元都會指定一天。舉例來說,「MTWHF」會指定日期範圍內允許的星期幾。

有效的字元包括:

  • M 代表星期一
  • T 代表星期二
  • W 代表星期三
  • H 代表星期四
  • F 代表星期五
  • S 代表星期六
  • U 代表星期日

任何字元組合皆可使用。

RateModifications / HotelRateModifications / ItineraryRateModification / BookingWindow 0..1 BookingWindow 指定相對於入住日期 (以房源時區為準),預訂必須發生的時間範圍。舉例來說,預訂時段可設為入住前至少 7 天,但不得超過 180 天。
RateModifications / HotelRateModifications / ItineraryRateModification / BookingWindow / @min 0..1 integer 預訂時,必須在入住前至少提前幾天,才能套用價格異動。如未指定,則代表沒有最低值。
RateModifications / HotelRateModifications / ItineraryRateModification / BookingWindow / @max 0..1 integer 在預訂時,必須在入住日期前幾天才能套用費率異動。如未指定,則代表沒有上限。
RateModifications / HotelRateModifications / ItineraryRateModification / CheckinDates 0..1 CheckinDates 容器,用於定義一或多個日期範圍,以便定義必須辦理入住手續的時間,才能套用費率異動。
RateModifications / HotelRateModifications / ItineraryRateModification / CheckinDates / DateRange 1..99 DateRange 日期範圍:指定必須在何時入住才能套用費率異動。如果您要刪除一或多個費率修改項目,則不需要使用這個元素。
RateModifications / HotelRateModifications / ItineraryRateModification / CheckinDates / DateRange / @start 0..1 Date 日期範圍的開始日期 (以資源所在時區為準),包括這一天。這個日期必須早於或等於 end 日期。如果未指定 start,則開始日期範圍實際上是無限的。
RateModifications / HotelRateModifications / ItineraryRateModification / CheckinDates / DateRange / @end 0..1 Date 日期範圍的結束日期 (含此日期),以資源所在時區為準。這個日期必須等於或晚於 start 日期。如果未指定 end,則結束日期範圍實際上是無限的。
RateModifications / HotelRateModifications / ItineraryRateModification / CheckinDates / DateRange / @days_of_week 0..1 string

在日期範圍內允許的星期幾。如果未指定,系統會允許在指定日期範圍內的所有日子。字串中的每個字元都會指定一天。舉例來說,「MTWHF」會指定日期範圍內允許的星期幾。

有效的字元包括:

  • M 代表星期一
  • T 代表星期二
  • W 代表星期三
  • H 代表星期四
  • F 代表星期五
  • S 代表星期六
  • U 代表星期日

任何字元組合皆可使用。

RateModifications / HotelRateModifications / ItineraryRateModification / CheckoutDates 0..1 CheckoutDates 容器,用於定義一或多個日期範圍,以便定義必須結帳才能套用費率異動時間。
RateModifications / HotelRateModifications / ItineraryRateModification / CheckoutDates / DateRange 1..99 DateRange 指定費率調整生效時的退房日期範圍。如果您要刪除一或多個費率修改項目,則不需要使用這個元素。
RateModifications / HotelRateModifications / ItineraryRateModification / CheckoutDates / DateRange / @start 0..1 Date 日期範圍的開始日期 (以資源所在時區為準),包括這一天。這個日期必須早於或等於 end 日期。如果未指定 start,則開始日期範圍實際上是無限的。
RateModifications / HotelRateModifications / ItineraryRateModification / CheckoutDates / DateRange / @end 0..1 Date 日期範圍的結束日期 (含此日期),以資源所在時區為準。這個日期必須等於或晚於 start 日期。如果未指定 end,則結束日期範圍實際上是無限的。
RateModifications / HotelRateModifications / ItineraryRateModification / CheckoutDates / DateRange / @days_of_week 0..1 string

在日期範圍內允許的星期幾。如果未指定,系統會允許在指定日期範圍內的所有日子。字串中的每個字元都會指定一天。舉例來說,「MTWHF」會指定日期範圍內允許的星期幾。

有效的字元包括:

  • M 代表星期一
  • T 代表星期二
  • W 代表星期三
  • H 代表星期四
  • F 代表星期五
  • S 代表星期六
  • U 代表星期日

任何字元組合皆可使用。

RateModifications / HotelRateModifications / ItineraryRateModification / Devices 0..1 Devices 列出可調整費率的使用者裝置的容器。如果指定了這項設定,只有在使用者符合所列裝置的其中一個時,系統才會套用費率修改項目。如果未指定,則不會限制費率修改作業。
RateModifications / HotelRateModifications / ItineraryRateModification / Devices / Device 1..3 Device 定義可用於費率修改的使用者裝置類型。
RateModifications / HotelRateModifications / ItineraryRateModification / Devices / Device / @type 1 enum 裝置類型。這個值必須是 desktoptabletmobile
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions 1 ModificationActions

在符合所有指定條件時,套用至費率的動作。

RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / PriceAdjustment 0..1 PriceAdjustment AmountBeforeTaxAmountAfterTax 乘以指定的乘數,藉此修改費率
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / PriceAdjustment / @multiplier 1 float AmountBeforeTaxAmountAfterTax 都會乘以這個值。
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / RateRule 0..1 RateRule 套用指定的費率規範 ID 來修改費率。
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / RateRule / @id 1 string 這個 ID 會將費率與 費率規範定義檔案中的定義相符。注意:
  • 這個欄位的字元限制為 40 個半形字元。
  • 每個費率只能與一項費率規則建立關聯。
  • 如果有多項修改會套用費率規則 ID,系統會將字典排序最小的費率規則 ID 指派給費率。
  • 如果這個 ID 與費率規範定義檔案中的費率規範不符,系統會將其視為不符合資格。
如要瞭解不同的不公開費率 UI 處理方式,請參閱 這篇文章
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / Refundable 0..1 Refundable 將費率的退款可行性覆寫為指定的值。

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

  • 這項修改動作會完全重寫符合資格的費率的退款設定,而非只重寫已填入資料的欄位。
  • 如果未設定 availablerefundable_until_days,系統不會將費率顯示為可退款。
  • 如果 available0false,系統會忽略其他屬性。即使設定了一個或兩個其他屬性,系統也不會將費率顯示為可退款。
  • 建議設定 refundable_until_time;如果未設定,系統會使用最早的時間 (午夜)。
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / Refundable / @available 1 boolean (必要) 將其設為 1true,表示費率是否允許全額退款;否則,請將其設為 0false
Transaction / PropertyDataSet / PackageData / Refundable / @refundable_until_days 0..1 integer (如果 availabletrue,則為必填項目) 指定在入住前幾天可申請全額退款的時間。refundable_until_days 的值必須是介於 0 至 330 之間的整數 (含兩者)。
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / Refundable / @refundable_until_time 0..1 Time (如果 availabletrue,建議使用此屬性) 指定能夠全額退款的最晚日期和時間 (以飯店所在地時間為準)。您可以將此參數與 refundable_until_days 搭配使用,指定「退款可在入住前兩天下午 4 點前提出」等內容。如果未設定 refundable_until_time,則預設值為午夜。
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / Availability 0..1 Availability 將費率的空房資訊覆寫為指定的值。我們只支援將費率設為 unavailable
RateModifications / HotelRateModifications / ItineraryRateModification / ModificationActions / Availability / @status 1 enum 如果 status="unavailable",系統會視費率為不可用,無論是否有有效價格。
RateModifications / HotelRateModifications / ItineraryRateModification / LengthOfStay 0..1 LengthOfStay 定義可套用此費率異動項目的住宿天數限制。如果住宿天數超出最小和最大限制,系統就不會套用費率調整。
RateModifications / HotelRateModifications / ItineraryRateModification / LengthOfStay / @min 0..1 integer 住宿晚數下限:住宿晚數必須達到這個數字,系統才會套用費率調整。如未指定,則代表沒有限制。
RateModifications / HotelRateModifications / ItineraryRateModification / LengthOfStay / @max 0..1 integer 住宿天數上限,以便套用費率調整。如未指定,則代表沒有上限。
RateModifications / HotelRateModifications / ItineraryRateModification / MinimumAmount 0..1 MinimumAmount 指定房價每日最低總額 (使用 AmountBeforeTaxAmountAfterTax 中較高者),必須超過這個金額才能套用價格異動。
RateModifications / HotelRateModifications / ItineraryRateModification / MinimumAmount / @before_discount 1 integer 必須超過這個值,系統才會套用費率異動。
RateModifications / HotelRateModifications / ItineraryRateModification / RatePlans 0..1 RatePlans 容器,其中列有房價異動適用的房價方案清單。如果未指定 <RatePlans>,則費率調整會套用至所有費率方案。
RateModifications / HotelRateModifications / ItineraryRateModification / RatePlans / RatePlan 1..n RatePlan 指定費率方案。費率方案的定義是套裝行程、費率和供應情形的組合,如交易 (資源資料)、OTA_HotelRateAmountNotifRQ 和 OTA_HotelAvailNotifRQ 訊息所定義,並由 PackageID 識別。
RateModifications / HotelRateModifications / ItineraryRateModification / RatePlans / RatePlan / @id 1 string 費率方案的專屬 ID。這個值會對應至交易 (資源資料) 訊息中 <PackageData> 的 PackageID 值,以及 <OTA_HotelRateAmountNotifRQ><OTA_HotelAvailNotifRQ> 訊息中 <StatusApplicationControl>RatePlanCode 屬性。允許的字元數上限為 50 個。
RateModifications / HotelRateModifications / ItineraryRateModification / RoomTypes 0..1 RoomTypes 容器,用於列出適用價格異動內容的房型。費率調整會套用至每個指定的 <RoomType>。如未指定 <RoomTypes>,則費率異動會套用至所有房間。
RateModifications / HotelRateModifications / ItineraryRateModification / RoomTypes / RoomType 1..n RoomType 指定房型。房型是在交易 (資源資料) 訊息的 <RoomData> 元素中定義,並使用其 <RoomID> 值參照。(其 <RoomID> 值也會由 OTA_HotelRateAmountNotifRQ 訊息中的 InvTypeCode 屬性參照)。
RateModifications / HotelRateModifications / ItineraryRateModification / RoomTypes / RoomType / @id 1 string 房源 (房型) 的專屬 ID。這個值會對應至交易 (資源資料) 訊息中的 <RoomID>。允許的字元數上限為 50 個。
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates 0..1 StayDates 用於容納一或多個日期範圍的容器,用於決定如何套用費率異動,例如因應季節性價格。
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates / @application 1 enum

說明如何套用費率調整。

有效值如下:

  • all:如果行程中的所有日期都與住宿日期重疊,則會將費率調整套用至行程中的每晚。
  • any:如果行程中的任何日期與住宿日期範圍重疊,則會將費率調整套用至行程中的所有住宿夜數。

必須一律指定這個屬性。

RateModifications / HotelRateModifications / ItineraryRateModification / StayDates / DateRange 1..99 DateRange 指定費率調整生效日期的日期範圍。
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates / DateRange / @start 0..1 Date 日期範圍的開始日期 (以資源所在時區為準),包括這一天。這個日期必須早於或等於 end 日期。如果未指定 start,則開始日期範圍實際上是無限的。
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates / DateRange / @end 0..1 Date 日期範圍的結束日期 (含此日期),以資源所在時區為準。這個日期必須等於或晚於 start 日期。如果未指定 end,則結束日期範圍實際上是無限的。
RateModifications / HotelRateModifications / ItineraryRateModification / StayDates / DateRange / @days_of_week 0..1 string

在日期範圍內允許的星期幾。如果未指定,系統會允許在指定日期範圍內的所有日子。字串中的每個字元都會指定一天。舉例來說,「MTWHF」會指定日期範圍內允許的星期幾。

有效的字元包括:

  • M 代表星期一
  • T 代表星期二
  • W 代表星期三
  • H 代表星期四
  • F 代表星期五
  • S 代表星期六
  • U 代表星期日

任何字元組合皆可使用。

RateModifications / HotelRateModifications / ItineraryRateModification / UserCountries 0..1 UserCountries 如果您指定了某些國家/地區,系統只會在使用者位於其中一個指定國家/地區時,套用費率異動。如未指定,系統會不論使用者所在位置,一律套用費率修改項目。
RateModifications / HotelRateModifications / ItineraryRateModification / UserCountries / @type 0..1 enum UserCountries 規格類型。

有效值為 includeexclude

如果 UserCountries type 設為 include,則費率異動會套用至所列國家/地區的使用者。

如果 UserCountries typeexclude,則費率異動會套用至所列國家/地區以外的使用者。

如果未設定 UserCountries type,系統會將其視為 include,並將費率異動套用至所列國家/地區的使用者。

RateModifications / HotelRateModifications / ItineraryRateModification / UserCountries / Country 1..300 Country 指定允許修改費率的使用者國家/地區。
RateModifications / HotelRateModifications / ItineraryRateModification / UserCountries / Country / @code 1 string CLDR 國家/地區代碼,例如 DEFR。請注意,部分國家/地區的 CLDR 國家/地區代碼與 2 個字母的 ISO 國家/地區代碼不同。此外,系統也不支援 CLDR 區域代碼。

範例

基本訊息

以下範例顯示基本的 RateModifications` 訊息:

<?xml version="1.0" encodin>g<="UTF-8"?
RateModifications partner="account_xyz"
                   id="123_abc"
                >   <timestamp="2023-05-22T16:20:00-04:00&qu>ot;
 < HotelRateModifications hotel_id>="<Property_1&q>uot;
    I<tineraryRateModification id="1"
      BookingDates
      >   DateRan<ge start="2023-07-01" end="2023>-07-31&<quot; days_of>_week=&<quot;MTWHF"/
         DateR>ange st<art="20>23-09-01&q<uot; end="2023-09-30"/
      /BookingDates
      Bookin>gWindow< min="7&>quot; m<ax="330&>quot;/
   <   CheckinDates
         DateRange start="2023-10-01" e>nd=&quo<t;2023-10-31&q>uot; da<ys_of_w>eek="<;FSU"/
      /Ch>eckinDate<s
      CheckoutDates>
      <   DateRange st<art="2023-10-08" end>="<2023-11-0>7" da<ys_of_week="F>SU"/
<      /CheckoutDat>es
    <  D>evices
       < Device t>ype="<mobile"/
    >    Device< type="tablet>"/<
      /De>vices
 <     L>engthOfStay min=<"2" max=>"14&<quot;/
      RateP>lans
  <       >RatePlan id=&q<uot;234"/
    >     Rate<Plan id="567"/
      /R>atePlan<s
      RoomTypes
  >     <  RoomType id="123&qu>ot;</
         RoomType id=>&<quot;456"/
  >    /RoomTypes
      UserCountries
        Country code="US"/
        Country code="GB"/
      /UserCountries
      ModificationActions
        PriceAdjustment multiplier="1.2"/
      /ModificationActions
    /ItineraryRateModification
  /HotelRateModifications
/RateModifications


刪除單一費率修改內容

以下範例說明如何刪除房源的一個費率修改項目:

<?xml version="1.0" encodin>g<="UTF-8"?
RateModifications partner="account_xyz"
                   id="123_abc"
                >   <timestamp="2023-05-22T16:20:00-04:00&qu>ot;
 < HotelRateModifications hotel_id="Property_1>&qu<ot;
    ItineraryRateMo>d<ification id=">;1" action="delete"/
  /HotelRateModifications
/RateModifications

刪除所有費率修改

以下範例說明如何刪除房源的所有費率修改項目:

<?xml version="1.0" encodin>g<="UTF-8"?
RateModifications partner="account_xyz"
                   id="123_abc"
                >   <timestamp="2023-05-22T16:20:00-04:00"
  HotelRateMod>i<fications hotel_id>=&quot;Property_1" action="overlay"/
/RateModifications


重疊所有費率調整

以下範例說明如何為物件疊加 <HotelRateModifications>,並使用一或多項新的費率修改項目。當 action="overlay" 時,系統會先刪除所有已儲存的費率修改項目,再儲存目前訊息中指定的費率修改項目:

<?xml version="1.0" encodin>g<="UTF-8"?
RateModifications partner="account_xyz"
                   id="123_abc"
                >   <timestamp="2023-05-22T16:20:00-04:00"
  HotelRateMod>ifica<tions hotel_id="Property_1&>quot; a<ction=">overlay&qu<ot;/
    ItineraryRateModification id="1&>quot;
 <     B>ookingDates
  <       DateRange st>art="<;2023-09-01" end="2023->09-30&q<uot;/
      /Booking>Dates
 <     ModificationAc<tions
        Pric>eAdjustmen<t multiplier=">;1.2&qu<ot;/
     > /Modif<icationAc>tions
    <  RoomTypes
      >   RoomTyp<e id="123&quo>t;/
   <      RoomType <id="456"/
      >/Ro<omTypes
      RatePlans>
<         RatePlan >id="234"/
         RatePlan id="567"/
      /RatePlans
    /ItineraryRateModification
  /HotelRateModifications
/RateModifications

多項修改動作

以下範例說明如何一次執行多個修改動作:

<?xml version="1.0" encodin>g<="UTF-8"?
RateModifications partner="account_xyz"
                   id="123_abc"
                >   <timestamp="2023-05-22T16:20:00-04:00&qu>ot;
 < HotelRateModifications hotel_id>="<Property_1&q>uot;
    I<tineraryRateModification id="1"
    >  Booki<ngDates
     >    Dat<eRange start=">2023-01-0<1" end="2023-02-28">;/
      </BookingDates
      ModificationActions
        PriceAdjustment multiplier=".95"/
        Refundable available=">true&qu<ot;
                >    r<efundable_until_days=">;1&<quot;
                 > <  refundabl>e_until_time="12:00:00"/
      /ModificationActions
    /ItineraryRateModification
  /HotelRateModifications
/RateModifications


為使用者所在國家/地區關閉費率方案

以下範例說明如何將費率方案限制為僅適用於日本 (JP) 使用者:

<?xml version="1.0" encodin>g<="UTF-8"?
RateModifications partner="account_xyz"
                   id="123_abc"
                >   <timestamp="2023-05-22T16:20:00-04:00&qu>ot;
 < HotelRateModifications hotel_id>="<Property_>1"
  <  ItineraryRate>Modification i<d="1&>quot;
 <     RatePlans
         Rate>Plan id=&<quot;jp_only">/
     < /RatePlans
  >    Use<rCountries type=&qu>ot;exclud<e"
        Country code=">;JP&quo<t;/
      /UserCount>ries
<      ModificationActions
>   <     Availability statu>s<="unavailable>&quot;/
      /ModificationActions
    /ItineraryRateModification
  /HotelRateModifications
/RateModifications


回應

語法

RateModificationsResponse 訊息使用以下語法:

<?xml version="1.0" encodin>g<="UTF-8"?
RateModificationsResponse timestamp="timestamp&quot;
                    id="message_ID"
 >   <                partner="partner_key"
  >!--< Either >Suc<cess o>r Iss<ues will be populated. --
  Success/
  Issu><es
>    Issue code=&q<uot;><issue_>cod<e"> <status="issue_type&qu>ot;varissue_description/var/Issue
  /Issues
/RateModificationsResponse

元素和屬性

RateModificationsResponse 訊息包含下列元素和屬性:

元素 / @Attribute 發生次數 類型 說明
RateModifications 1 Complex element 根元素,指出收到的 RateModifications 要求訊息是否成功或有問題。
RateModificationsResponse / @timestamp 1 DateTime 這則訊息的建立日期和時間。
RateModificationsResponse / @id 1 string 相關 RateModifications 訊息的專屬 ID。
RateModificationsResponse / @partner 1 string 這封郵件的合作夥伴帳戶。
RateModificationsResponse / Success 0..1 Success 表示已成功處理 RateModifications 訊息,且未發生警告、錯誤或失敗。

每則訊息都會提供 <Success><Issues>

RateModificationsResponse / Issues 0..1 Issues 處理 RateModifications 訊息時遇到一或多個問題的容器。

每則訊息都會提供 <Success><Issues>

RateModificationsResponse / Issues / Issue 1..n Issue 處理「RateModifications」訊息時發生的警告、錯誤或失敗情形說明。如要進一步瞭解這些問題,請參閱「動態饋給狀態錯誤訊息」。
RateModificationsResponse / Issues / Issue / @code 1 integer 問題的 ID。
RateModificationsResponse / Issues / Issue / @status 1 enum

遇到的問題類型。

有效值為 warningerrorfailure

範例

成功

以下是成功處理 RateModifications 訊息的回應。

<?xml version="1.0" encodin>g<="UTF-8"?
RateModificationsResponse timestamp="2023-05-22T16:20:00-04:00"
                    id="12345678"
 >   <        > <       partner=&quo>t;partner_key"
  Success/
/RateModificationsResponse

問題

以下是針對因錯誤而未處理的 RateModifications 訊息回應。

<?xml version="1.0" encodin>g<="UTF-8"?
RateModificationsResponse timestamp="2023-05-22T16:20:00-04:00"
                    id="12345678"
 >   <      >     <     partner="partne>r_key"
  <Issues>
  <  Issue <code="1001" stat>us="error"Example/Issue
  /Issues
/RateModificationsResponse