修改费率

概览

借助此 API,您可以定义在满足条件时向费率动态应用操作(例如调整价格或启用可退款)的方式。与 Promotions API 不同的是,该 API 只能应用符合条件且折扣力度最大的促销活动,而此 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 “账号设置”页面上列出的“合作伙伴键”值。

注意:如果您的后端为多个账号提供 Feed,则此值需要与同一账号的 <OTA_HotelRateAmountNotifRQ><OTA_HotelAvailNotifRQ> 消息的 <RequestorID> 元素中指定的 ID 属性值一致。

RateModifications / @id 1 string 此请求消息的唯一标识符。此值会在响应消息中返回。允许使用的字符包括 a-z、A-Z、0-9、_(下划线)和 -(短划线)。
RateModifications / @timestamp 1 DateTime 此消息的创建日期和时间。
RateModifications / HotelRateModifications 0..n HotelRateModifications

房源的费率修改。每项房价更改都适用于单个房源。

注意:如果可以对同一费率应用多项费率更改,系统会应用所有更改。无法保证任何特定顺序。

RateModifications / HotelRateModifications / @hotel_id 1 string 房源的唯一标识符。此值必须与酒店列表 Feed 中 <listing> 元素中使用 <id> 指定的酒店 ID 一致。酒店 ID 也列在 Hotel Center 中。
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 费率修改的唯一标识符。允许的字符数上限为 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 与费率规则定义文件中的费率规则不匹配,则系统会将其视为不符合条件。
如需了解不同的非公开价格界面处理方式,请参阅 这篇文章
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:00”。如果未设置 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 费率方案的唯一标识符。此值会映射到“交易(房源数据)”消息中的 <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> 值进行引用。(OTA_HotelRateAmountNotifRQ 消息中的 InvTypeCode 属性也会引用其 <RoomID> 值。)
RateModifications / HotelRateModifications / ItineraryRateModification / RoomTypes / RoomType / @id 1 string 房源(客房类型)的唯一标识符。此值在“交易(房源数据)”消息中映射到 <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 国家/地区代码与两个字母的 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 消息中的唯一标识符。
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 消息时遇到的警告、错误或失败的说明。如需详细了解这些问题,请参阅 Feed 状态错误消息
RateModificationsResponse / Issues / Issue / @code 1 integer 问题的标识符。
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