تبلیغات

نمای کلی

این API به شما امکان می دهد تخفیف های احتمالی را مشخص کنید. از میان تبلیغات مشخص شده، Google تبلیغات واجد شرایط یا مجموعه تبلیغاتی را که به پایین‌ترین قیمت منجر می‌شود، اعمال می‌کند. اگر به دنبال API هستید که از تنظیمات نرخ دلخواه پشتیبانی می‌کند که می‌تواند در صورت برآورده شدن شرایط، قیمت را افزایش یا کاهش دهد، API تغییرات نرخ ما را در نظر بگیرید. توجه داشته باشید که اگر هر دو API وجود داشته باشد، تغییرات نرخ قبل از تبلیغات اعمال می شود.

درخواست ها

نحو

پیام Promotions از دستور زیر استفاده می کند:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner= "partner_key"
            id="message_ID"
            timestamp="timestamp">
  <HotelPromotions hotel_id="HotelID" action="[overlay]">
    <Promotion id="PromotionID" action="[delete]">
      <BookingDates>
        <DateRange start="YYYY-MM-DD[THH:mm:ss]" end="YYYY-MM-DD[THH:mm:ss]"
          days_of_week="MTWHFSU_or_subset"/>
        <DateRange start="YYYY-MM-DD[THH:mm:ss]" end="YYYY-MM-DD[THH:mm:ss]"
          days_of_week="MTWHFSU_or_subset"/>
      </BookingDates>
      <BookingWindow min="integer_or_duration" max="integer_or_duration"/>
      <Ceiling amount_per_night="float"/>
      <Floor amount_per_night="float"/>
      <CheckinDates>
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </CheckinDates>
      <CheckoutDates>
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </CheckoutDates>
      <!-- Specify only one of percentage, percentage_of_base, fixed_amount,
           fixed_amount_per_night, fixed_price, or fixed_price_per_night;
           applied_nights is only used with percentage, fixed_amount_per_night,
           and fixed_price_per_night. -->
      <Discount percentage="float" percentage_of_base="float"
                fixed_amount="float" fixed_amount_per_night="float"
                fixed_price="float" fixed_price_per_night="float"
                applied_nights="integer_1_to_99" rank="integer_1_to_99">
        <!-- FreeNights may not be used in conjunction with attributes on Discount -->
        <FreeNights stay_nights="integer" discount_nights="integer"
                    discount_percentage="float" night_selection="[cheapest|last]"
                    repeats="boolean"/>
      </Discount>
      <!-- Exactly one of Discount or BestDailyDiscount must be specified.
           Specify only one of percentage, fixed_amount, or fixed_price. -->
      <BestDailyDiscount percentage="float" fixed_amount="float" fixed_price="float"/>
      <Devices>
        <Device type="[desktop|tablet|mobile]"/>
      </Devices>
      <InventoryCount min="integer" max="integer"/>
      <LengthOfStay min="integer" max="integer"/>
      <MembershipRateRule id="RateRuleID"/>
      <MinimumAmount before_discount="integer"/>
      <Occupancy min="integer" max="integer"/>
      <RatePlans>
        <RatePlan id="PackageID_1"/>
        <RatePlan id="PackageID_2"/>
      </RatePlans>
      <RoomTypes>
        <RoomType id="RoomID_1"/>
        <RoomType id="RoomID_2"/>
      </RoomTypes>
      <Stacking type="[any|base|none|second]"/>
      <StayDates application="[all|any|overlap]">
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </StayDates>
      <UserCountries type="[include|exclude]">
        <Country code="country_code"/>
      </UserCountries>
    </Promotion>
  </HotelPromotions>
</Promotions>

عناصر و صفات

پیام تبلیغات دارای عناصر و ویژگی های زیر است:

عنصر / @Attribute رخدادها تایپ کنید توضیحات
Promotions 1 Complex element عنصر اصلی پیام تبلیغاتی
Promotions / @partner 1 string حساب شریک برای این پیام. این مقدار رشته، مقدار «کلید شریک» است که در صفحه تنظیمات حساب در مرکز هتل فهرست شده است.

اگر پشتیبان دارید که برای چندین حساب فید ارائه می کند، این مقدار باید با مقدار مشخصه ID مشخص شده در عنصر <RequestorID> پیام های <OTA_HotelRateAmountNotifRQ> و <OTA_HotelAvailNotifRQ> برای یک حساب مطابقت داشته باشد.

Promotions / @id 1 string یک شناسه منحصر به فرد برای این پیام درخواست. این مقدار در پیام پاسخ برگردانده می شود. کاراکترهای مجاز عبارتند از: az، AZ، ​​0-9، _ (خط زیر)، و - (خط تیر).
Promotions / @timestamp 1 DateTime تاریخ و زمان ایجاد این پیام.
Promotions / HotelPromotions 0..n HotelPromotions

تبلیغات برای یک ملک هر تبلیغی برای یک ملک خاص اعمال می شود.

مگر اینکه از <Stacking> استفاده شود، وقتی تبلیغات متعدد واجد شرایط هستند، تبلیغات با بیشترین تخفیف برای رزرو اعمال می شود.

Promotions / HotelPromotions / @hotel_id 1 string شناسه منحصر به فرد ملک این مقدار باید با شناسه هتل مشخص شده با استفاده از <id> در عنصر <listing> در فید لیست هتل مطابقت داشته باشد. شناسه هتل نیز در مرکز هتل درج شده است.
Promotions / HotelPromotions / @action 0..1 enum

اگر مشخص شده است، مقدار باید "overlay" باشد. وقتی مقدار "overlay" است، همه تبلیغات ذخیره شده قبل از ذخیره تبلیغات مشخص شده در پیام فعلی حذف می شوند.

اگر مشخص نشده باشد، هر تبلیغی که در پیام فعلی مشخص شده است:

  • Added (اگر هیچ یک از تبلیغات ذخیره شده دارای id یکسانی نباشد)
  • Updated (اگر تبلیغ ذخیره شده دارای همان id باشد)
  • Deleted (اگر یک تبلیغ ذخیره شده دارای id یکسان باشد و مقدار مشخصه action برای تبلیغ مشخص شده در پیام فعلی "delete" باشد)
Promotions / HotelPromotions / Promotion 0..99 Promotion

یک تبلیغ واحد برای یک ملک. توجه داشته باشید که اگر action="overlay" و یک <Promotion> مشخص نشده باشد، همه تبلیغات برای دارایی حذف می شوند.

اگر نیاز به استفاده از بیش از 99 تبلیغات دارید، با مدیر حساب فنی خود (TAM) تماس بگیرید.

Promotions / HotelPromotions / Promotion / @id 1 string یک شناسه منحصر به فرد برای تبلیغات. حداکثر تعداد نویسه‌های مجاز 40 است. نویسه‌های مجاز عبارتند از: az، AZ، ​​0-9، _ (زیر خط)، - (خط تیره)، و . (دوره).
Promotions /HotelPromotions / Promotion / @action 0..1 enum

اگر مشخص شده باشد، مقدار باید delete شود. اگر مشخص نشده باشد و تبلیغی با همان id ذخیره نشده باشد، این تبلیغات ذخیره می‌شود. در غیر این صورت، اگر مشخص نشده باشد و تبلیغی با همان id ذخیره شود، تبلیغات موجود به روز می شود.

اگر delete مشخص شده باشد، تبلیغات ذخیره شده با همان id حذف می شود. هنگام استفاده delete ، هیچ عنصر فرزندی را در <Promotion> وارد نکنید. همچنین، delete در ارتباط با <HotelPromotions action="overlay"/> مجاز نیست.

Promotions / HotelPromotions / Promotion / BookingDates 0..1 BookingDates محفظه ای برای یک یا چند محدوده که تعیین می کند چه زمانی رزرو باید انجام شود تا تبلیغ اعمال شود.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange 1..99 DateRange محدوده ای که مشخص می کند برای اعمال تبلیغات باید چه زمانی رزرو انجام شود.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @start 0..1 Date یا DateTime

تاریخ شروع یا زمان تاریخ (بر اساس منطقه زمانی ملک)، شامل محدوده.

  • تاریخ یا تاریخ مشخص شده توسط start باید زودتر از (یا همان) تاریخ یا تاریخ مشخص شده در end باشد.
  • اگر start مشخص نشده باشد، محدوده عملاً از نظر زمان شروع نامحدود است.
  • اگر start به عنوان تاریخ "YYYY-MM-DD" پر شود، به عنوان تاریخ "YYYY-MM-DDT00:00:00" تفسیر می شود.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @end 0..1 Date یا DateTime

تاریخ پایان یا زمان تاریخ (بر اساس منطقه زمانی دارایی)، شامل محدوده.

  • تاریخ یا تاریخ مشخص شده در end باید دیرتر از (یا همان) تاریخ یا تاریخ مشخص شده توسط start باشد.
  • اگر end مشخص نشده باشد، محدوده عملاً از نظر زمان پایان نامحدود است.
  • اگر end به عنوان تاریخ "YYYY-MM-DD" ارائه شود، به عنوان تاریخ "YYYY-MM-DDT23:59:59" تفسیر می شود.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / BookingWindow 0..1 BookingWindow مدت زمانی را که رزرو باید نسبت به تاریخ ورود (بر اساس منطقه زمانی ملک) انجام شود، مشخص می‌کند. به عنوان مثال، پنجره رزرو را می توان روی حداقل 7 روز تنظیم کرد، اما نه بیش از 180 روز، قبل از ورود.
Promotions / HotelPromotions / Promotion / BookingWindow / @min 0..1 integer or duration حداقل مدت زمان قبل از ورود به هنگام رزرو باید برای اعمال تبلیغات انجام شود. اگر این مشخص نشده باشد، یا مقدار آن 0 باشد، حداقل وجود ندارد.

انواع مقادیر معتبر عبارتند از:

  • عدد صحیح: تعداد روزهای قبل از تاریخ ورود. به عنوان مثال، مقدار 30 نشان می‌دهد که تبلیغات فقط برای رزروهایی که حداقل 30 روز قبل از تاریخ ورود انجام می‌شود اعمال می‌شود.
  • مدت زمان ISO 8601 (روز، ساعت و دقیقه): تعداد روزها (و در صورت تمایل ساعت/دقیقه) قبل از تاریخ ورود. به عنوان مثال، مقدار P30D نشان می‌دهد که این تبلیغات فقط برای رزروهایی که حداقل 30 روز قبل از تاریخ اعلام حضور دارند اعمال می‌شود. مقدار P30DT6H مستلزم رزرو در یا قبل از ساعت 18:00 30 روز قبل از ورود است.
Promotions / HotelPromotions / Promotion / BookingWindow / @max 0..1 integer or duration حداکثر تعداد روزهای قبل از اعلام حضور هنگام رزرو باید برای اعمال تبلیغات انجام شود. اگر این مشخص نشده باشد، یا مقدار آن 0 باشد، حداکثر وجود ندارد.

انواع مقادیر معتبر عبارتند از:

  • عدد صحیح: تعداد روزهای قبل از تاریخ ورود. به عنوان مثال، مقدار 30 نشان می دهد که تبلیغات فقط برای رزرو حداکثر 30 روز قبل از تاریخ ورود اعمال می شود.
  • مدت زمان ISO 8601 (روز، ساعت و دقیقه): تعداد روزها (و در صورت تمایل ساعت/دقیقه) قبل از تاریخ ورود. به عنوان مثال، مقدار P30D نشان می‌دهد که تبلیغات فقط برای رزرو حداکثر 30 روز قبل از تاریخ ورود اعمال می‌شود. مقدار P30DT6H مستلزم رزرو در ساعت 18:00 یا بعد از 30 روز قبل از ورود است.
Promotions / HotelPromotions / Promotion / Ceiling 0..1 Ceiling

محدودیت‌هایی را بر روی حداکثر مقداری که پس از اعمال تبلیغات می‌توان روی آن تنظیم کرد، تعریف می‌کند.

تبلیغات همیشه باید یک <Discount> یا یک <BestDailyDiscount> را مشخص کنند، بنابراین برای ایجاد تبلیغاتی که فقط از یک <Ceiling> استفاده می کند، یک گزینه تنظیم <Discount> با percentage 0 است.

اگر انباشتگی پیکربندی شده باشد، تبلیغات متعدد با <Ceiling> می‌تواند برای یک اقامت اعمال شود. هر تبلیغی تخفیف خود را اعمال می کند و بلافاصله سقف آن را اعمال می کند. مثال زیر نشان می دهد که چگونه هر سقف در محاسبه ارتقاء بعدی در پشته کمک می کند.

مثال:

قیمت گذاری یک شب اقامت که در آن AmountBeforeTax 100 است و مجموعه ای از دو تبلیغ وجود دارد:

  1. تبلیغات با base نوع انباشته، مبلغ fixed_amount 25 و سقف amount_per_night 60
  2. تبلیغ با نوع انباشته second ، fixed_amount 25، و سقف amount_per_night 90

ترتیب محاسبه به شرح زیر است:

  1. تبلیغات base ابتدا اعمال می شود و AmountBeforeTax را به 75 تخفیف می دهد، اما سپس سقف آن را به 60 کاهش می دهد.
  2. تبلیغ second AmountBeforeTax از 60 به 35 تخفیف می دهد. این زیر سقف 90 است بنابراین سقف دوم اعمال نمی شود. نرخ نهایی 35 است.

این واقعیت که 60 یک سقف کلی سخت‌گیرانه‌تر است، بی‌ربط است، زیرا فقط برای ارتقای خودش معتبر است، و نمی‌تواند سقف واحدی وجود داشته باشد که کل پشته تبلیغات را در بر بگیرد.

Promotions / HotelPromotions / Promotion / Ceiling / @amount_per_night 1 float

حداکثر مقداری که پس از اعمال تخفیف می توان نرخ شبانه را روی آن تنظیم کرد.

اگر یک عنصر <Floor> نیز مشخص شده باشد، باید مقداری بزرگتر یا مساوی با ویژگی amount_per_night در <Floor> تنظیم شود.

amount_per_night وقتی در نرخ شبانه با استفاده از AmountAfterTax گنجانده شود، برای مالیات‌ها و کارمزدها اعمال می‌شود، اما نه مواردی که با استفاده از TaxFeeInfo مشخص شده‌اند.

Promotions / HotelPromotions / Promotion / Floor 0..1 Floor

محدودیت‌هایی را بر روی حداقل مقداری که پس از اعمال تبلیغات می‌توان روی آن تنظیم کرد، تعریف می‌کند.

تبلیغات همیشه باید یک <Discount> یا یک <BestDailyDiscount> را مشخص کنند، بنابراین برای ایجاد تبلیغاتی که فقط یک <Floor> اعمال می کند، یک گزینه تنظیم <Discount> با percentage 0 است.

منطق <Floor> همچنان در مورد تخفیف های <FreeNights> صدق می کند، حتی اگر شب رایگان 100% تخفیف برای آن اعمال شود.

اگر انباشتگی پیکربندی شده باشد، تبلیغات متعدد با <Floor> می‌تواند برای یک اقامت اعمال شود. هر تبلیغی تخفیف خود را اعمال می کند، و بلافاصله پس از آن طبقه آن. مثال زیر نشان می‌دهد که چگونه هر طبقه به محاسبه ارتقای بعدی در پشته کمک می‌کند.

مثال:

قیمت گذاری یک شب اقامت که در آن AmountBeforeTax 100 است و مجموعه ای از دو تبلیغ وجود دارد:

  1. تبلیغات با base نوع انباشته، مبلغ fixed_amount 25، و amount_per_night کف برای هر شب 90
  2. تبلیغ با نوع انباشته second ، fixed_amount 25، و amount_per_night کف برای هر شب 60

ترتیب محاسبه به شرح زیر است:

  1. تبلیغات base ابتدا اعمال می شود و AmountBeforeTax را به 75 تخفیف می دهد، اما سپس کف آن را تا 90 افزایش می دهد.
  2. تبلیغ second AmountBeforeTax از 90 به 65 تخفیف می دهد. این بالاتر از طبقه 60 است بنابراین طبقه دوم اعمال نمی شود. نرخ نهایی 65 است.

این واقعیت که 90 یک طبقه کلی سخت‌گیرانه‌تر است، بی‌ربط است، زیرا فقط برای تبلیغ خودش معتبر است، و نمی‌تواند طبقه‌ای وجود داشته باشد که کل پشته تبلیغاتی را در بر گیرد.

Promotions / HotelPromotions / Promotion / Floor / @amount_per_night 1 float

حداقل مبلغی که پس از اعمال تخفیف می توان نرخ شبانه را تعیین کرد.

اگر یک عنصر <Ceiling> نیز مشخص شده باشد، باید مقداری کمتر یا مساوی با ویژگی amount_per_night در <Ceiling> تنظیم شود.

amount_per_night وقتی در نرخ شبانه با استفاده از AmountAfterTax گنجانده شود، برای مالیات‌ها و کارمزدها اعمال می‌شود، اما نه مواردی که با استفاده از TaxFeeInfo مشخص شده‌اند.

Promotions / HotelPromotions / Promotion / CheckinDates 0..1 CheckinDates ظرفی برای یک یا چند محدوده تاریخی که تعیین می‌کند برای اعمال تبلیغات چه زمانی باید اعلام حضور شود.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange 1..20 DateRange

یک محدوده تاریخی که مشخص می‌کند چه زمانی باید ثبت نام انجام شود تا تبلیغات اعمال شود. اگر در حال حذف یک یا چند تبلیغ هستید، این عنصر ضروری نیست.

فرمت YearlessDate نیز پشتیبانی می شود.

  • اگر یکی از تاریخ های start یا end یک تاریخ بدون سال باشد، هر دو باید به عنوان تاریخ های بدون سال پر شوند.
  • محدوده تاریخ بدون سال نباید در سال جدید باشد. در عوض، محدوده را به عنوان دو محدوده تاریخ مجاور نشان دهید. برای مثال، {"12-29", "01-05"} می توان به صورت {"12-29", "12-31"} و {"01-01", "01-05"} نشان داد.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. اگر end مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ پایان نامحدود است.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / CheckoutDates 0..1 CheckoutDates ظرفی برای یک یا چند محدوده تاریخی که تعیین می‌کند برای اعمال تبلیغات چه زمانی باید تسویه حساب انجام شود.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange 1..20 DateRange

یک محدوده تاریخی که مشخص می‌کند برای اعمال تبلیغات باید چه زمانی تسویه حساب انجام شود. اگر در حال حذف یک یا چند تبلیغ هستید، این عنصر ضروری نیست.

فرمت YearlessDate نیز پشتیبانی می شود.

  • اگر یکی از تاریخ های start یا end یک تاریخ بدون سال باشد، هر دو باید به عنوان تاریخ های بدون سال پر شوند.
  • محدوده تاریخ بدون سال نباید در سال جدید باشد. در عوض، محدوده را به عنوان دو محدوده تاریخ مجاور نشان دهید. برای مثال، {"12-29", "01-05"} می توان به صورت {"12-29", "12-31"} و {"01-01", "01-05"} نشان داد.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. اگر end مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ پایان نامحدود است.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / Devices 0..1 Devices ظرفی برای فهرست کردن دستگاه‌های کاربری که واجد شرایط تبلیغ هستند. در صورت مشخص شدن، فقط به کاربران واجد شرایط در دستگاه های فهرست شده، نرخ تخفیف ارائه می شود. اگر مشخص نشده باشد، به کاربران واجد شرایط در هر دستگاهی، نرخ تخفیف ارائه می شود.
Promotions / HotelPromotions / Promotion / Devices / Device 1..3 Device یک نوع دستگاه کاربر را که واجد شرایط تبلیغ است، تعریف می کند.
Promotions / HotelPromotions / Promotion / Devices / Device / @type 1 enum یک نوع دستگاه. مقدار باید desktop ، tablet یا mobile باشد.
Promotions / HotelPromotions / Promotion / Discount 1 Discount

دقیقاً یکی از Discount یا BestDailyDiscount باید مشخص شود.

تخفیفی که برای این تبلیغات اعمال می شود را مشخص می کند.

Promotions / HotelPromotions / Promotion / Discount / @percentage 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price ، یا fixed_price_per_night مورد نیاز است.

یک مقدار اعشاری از 0-100 که درصد تخفیف را مشخص می کند. برای AmountAfterTax (یا AmountBeforeTax اگر AmountAfterTax مشخص نشده باشد) اعمال می شود.

مثال ها:

  • اگر AmountAfterTax 100 و percentage 20 باشد، پس

    نرخ تبلیغات = AmountAfterTax * (1 - درصد تخفیف)

    80.00 = 100 * (1 - 0.2)

  • اگر AmountBeforeTax 100 است، percentage 20 است و TaxFeeInfo مالیات 10 را مشخص می کند، سپس

    نرخ ارتقاء = AmountBeforeTax * (1 - درصد تخفیف) + مالیات

    90.00 = 100 * (1 - 0.2) + 10

Promotions / HotelPromotions / Promotion / Discount / @percentage_of_base 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price ، یا fixed_price_per_night مورد نیاز است.

یک مقدار اعشاری از 0-100 که درصد تخفیف پایه را مشخص می کند. مشابه percentage ، برای AmountAfterTax (یا AmountBeforeTax اگر AmountAfterTax مشخص نشده باشد) اعمال می شود.

برخلاف percentage ، این تخفیف همیشه به عنوان درصدی از نرخ های پایه بدون توجه به تبلیغات قبلی که به ترتیب اعمال شده اند محاسبه می شود.

مثال:

  • فرض کنید ما دو تبلیغ داریم که به ترتیب برای یک شب اقامت با قیمت 100 اعمال می شود. اولی 10 درصد تخفیف معمولی و دومی 10 درصد درصد تخفیف پایه است. سپس نرخ تخفیف 80 خواهد بود زیرا هر دو تبلیغات 10 تخفیف دارند. توجه داشته باشید که اگر تبلیغ دوم نیز یک درصد تخفیف معمولی بود، نرخ تخفیف 81 خواهد بود زیرا تخفیف دوم 10٪ از 90 است.
Promotions / HotelPromotions / Promotion / Discount / @fixed_amount 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price ، یا fixed_price_per_night مورد نیاز است.

مبلغ ثابتی که باید از مجموع نرخ‌های شبانه AmountAfterTax (یا مجموع نرخ‌های شبانه AmountBeforeTax در صورتی که AmountAfterTax مشخص نشده باشد) کم شود. فرض بر این است که به همان ارز نرخ شبانه است. اگر این بزرگتر از مجموع نرخ های شبانه باشد، مقدار حاصل صفر است.

مثال ها:

  • اگر برای اقامت 1 شب قیمت گذاری کنیم که در آن AmountBeforeTax 90، AmountAfterTax 100، و fixed_amount 20 است، پس

    نرخ ارتقاء = AmountAfterTax - تخفیف ثابت

    80.00 = 100 - 20

  • اگر برای اقامت 1 شب قیمت گذاری کنیم که در آن AmountBeforeTax 100، fixed_amount 20 است، و TaxFeeInfo مالیات 8٪ را مشخص می کند، پس

    نرخ ارتقاء = ( AmountBeforeTax - تخفیف ثابت) * (1 + درصد مالیات)

    86.40 = (100 - 20) * 1.08

  • اگر برای اقامت 1 شب قیمت گذاری کنیم که در آن AmountBeforeTax 50، fixed_amount 60 است، و TaxFeeInfo مالیات 10 را مشخص می کند، پس

    نرخ ارتقاء = ( AmountBeforeTax - تخفیف ثابت) * مالیات

    10.00 = 0 + 10

  • اگر برای اقامت 3 شب قیمت گذاری کنیم که مقادیر AmountAfterTax 100، 110 و 120 باشد. و fixed_amount 150 است، پس

    نرخ تبلیغات = جمع ( AmountAfterTax ) - (تخفیف ثابت)

    180.00 = (100 + 110 + 120) - 150

Promotions / HotelPromotions / Promotion / Discount / @fixed_amount_per_night 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price ، یا fixed_price_per_night مورد نیاز است.

یک تخفیف ثابت برای هر یک از نرخ‌های شبانه AmountAfterTax اعمال می‌شود (یا ارزان‌ترین N اگر applied_nights مشخص شده باشد). اگر AmountAfterTax مشخص نشده باشد، برای AmountBeforeTax اعمال می شود. فرض بر این است که به همان ارز نرخ شبانه است. اگر fixed_amount_per_night بزرگتر از نرخ شبانه باشد، آن نرخ شبانه به صفر کاهش می یابد—تخفیف نمی تواند باعث منفی شدن نرخ شبانه شود.

مثال ها:

  • اگر برای اقامت 3 شب قیمت گذاری کنیم که مقادیر AmountAfterTax 100، 110 و 120 باشد. و fixed_amount_per_night 10 است، پس

    نرخ تبلیغات = جمع ( AmountBeforeTax - تخفیف مبلغ ثابت)

    300.00 = ((100 - 10) + (110 - 10) + (120 - 10))

  • اگر برای اقامت 3 شب قیمت گذاری کنیم که مقادیر AmountAfterTax 10، 50 و 100 باشد. و fixed_amount_per_night 20 است، پس

    نرخ تبلیغات = جمع ( AmountAfterTax - تخفیف مقدار ثابت)

    110.00 = (0 + (50 - 20) + (100 - 20))

Promotions / HotelPromotions / Promotion / Discount / @fixed_price 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price ، یا fixed_price_per_night مورد نیاز است.

اگر نرخ‌های شبانه AmountAfterTax مشخص شده باشد، آنگاه قیمت اقامت، از جمله مالیات و هزینه‌ها، به مقدار مشخص شده تعیین می‌شود. اگر AmountBeforeTax مشخص شده باشد، چه AmountAfterTax مشخص شده باشد یا خیر، این قیمت قبل از مالیات را برای اقامت روی مقدار مشخص شده تنظیم می کند. فرض بر این است که به همان ارز نرخ شبانه است.

اگر قرار است AmountAfterTax منعکس کننده درصدی از مالیات باشد، تعیین قیمت ثابت برای AmountBeforeTax می تواند منجر به مالیات و هزینه های نادرست شود. به طور کلی، اکیداً توصیه می شود از TaxFeeInfo برای تعیین مالیات و هزینه های ملک استفاده کنید.

مثال ها:

  • اگر برای اقامت 1 شب قیمت گذاری کنیم که در آن AmountBeforeTax 90، AmountAfterTax 100، و fixed_price 80 است، نرخ تبلیغات 80 است.
  • اگر یک شب اقامت را قیمت گذاری کنیم که در آن AmountBeforeTax 100، fixed_amount 80 است، و TaxFeeInfo مالیات 8٪ را مشخص می کند.

    نرخ تبلیغات = قیمت ثابت * (1 + درصد مالیات)

    86.40 = 80 * 1.08

  • اگر برای اقامت 3 شب قیمت گذاری کنیم که مقادیر AmountAfterTax 100، 110 و 120 باشد. و fixed_amount 300 است، پس

    نرخ ارتقاء = 300

Promotions / HotelPromotions / Promotion / Discount / @fixed_price_per_night 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price ، یا fixed_price_per_night مورد نیاز است.

اگر نرخ‌های شبانه AmountAfterTax مشخص شده باشد، آنگاه قیمت هر شب اقامت، از جمله مالیات و هزینه‌ها، به مقدار مشخص شده تعیین می‌شود. اگر AmountBeforeTax مشخص شده باشد، آیا AmountAfterTax مشخص شده است یا خیر، این قیمت قبل از مالیات را برای هر شب اقامت روی مقدار مشخص شده تنظیم می کند. فرض بر این است که به همان ارز نرخ شبانه است.

اگر قرار است AmountAfterTax منعکس کننده درصدی از مالیات باشد، تعیین قیمت ثابت برای AmountBeforeTax می تواند منجر به مالیات و هزینه های نادرست شود. به طور کلی، اکیداً توصیه می شود از TaxFeeInfo برای تعیین مالیات و هزینه های ملک استفاده کنید.

اگر applied_nights مشخص شده باشد، قیمت جدید برای ارزان‌ترین N شب اعمال می‌شود.

مثال ها:

  • اگر برای اقامت 2 شب قیمت گذاری کنیم که مقادیر AmountBeforeTax 90، 90 باشد. مقادیر AmountAfterTax 100، 100 است. و fixed_price 80 است، سپس نرخ ارتقاء 80 + 80 = 160 است.
  • اگر ما برای اقامت 2 شب قیمت گذاری کنیم که در آن AmountBeforeTax 100، 100 است. fixed_amount 80 است، و TaxFeeInfo مالیات 8٪ را مشخص می کند، سپس نرخ ارتقاء (80 + 80) * 1.08 = 172.8 است.
  • اگر برای اقامت 3 شب قیمت گذاری کنیم که مقادیر AmountAfterTax 100، 110 و 120 باشد. و fixed_amount 110 است، سپس نرخ ارتقاء 110 * 3 = 330 است.
Promotions / HotelPromotions / Promotion / Discount / @applied_nights 0..1 integer

این فقط باید با percentage یا fixed_amount_per_night استفاده شود.

تعداد شب هایی که برای آن تخفیف اعمال می شود، با کمترین هزینه شروع می شود. باید یک عدد صحیح از 1 تا 99 باشد. اگر مشخص نشده باشد، برای تمام شب ها تخفیف اعمال می شود.

Promotions / HotelPromotions / Promotion / Discount / FreeNights 0..1 FreeNights در برخی از شب‌های اقامت که حداقل مدت اقامت رعایت شده باشد، تخفیفی را مشخص می‌کند. در صورت استفاده از این عنصر، ویژگی‌های عنصر Discount اصلی مجاز نیستند.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @stay_nights 1 integer

تعداد شب های لازم برای اعمال تخفیف. هر تخفیف برای بخش جداگانه ای از شب های اقامت اعمال می شود.

به عنوان مثال، برای اقامت 10 شب که stay_nights 4 است (و repeats درست است)، پس دو بخش شب اقامت وجود دارد: شب 1 تا 4 و شب 5 تا 8. شب های 9 و 10 بخشی از بخش شب اقامت نیستند.

Promotions / HotelPromotions / Promotion / Discount / FreeNights / @discount_nights 1 integer تعداد شب های تخفیف در هر بخش از شب های اقامت.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @discount_percentage 1 float تخفیفی که برای شب های تخفیف اعمال می شود. اگر این مقدار 50 باشد، هر شب انتخابی 50 درصد تخفیف دارد.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @night_selection 1 string باید یا cheapest باشد یا last . اگر last ، پس از آن شب در پایان بخش از شب اقامت تخفیف داده می شود. اگر cheapest ، ارزان‌ترین شب‌ها در بخش شب‌های اقامت تخفیف دارند.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @repeats 1 boolean

آیا ممکن است تخفیف برای چندین بخش اقامت شبانه اعمال شود یا خیر. اگر false ، فقط بخش شب های اقامت در ابتدای برنامه سفر تخفیف داده می شود. اگر true ، هر بخش از شب های اقامت تخفیف داده می شود.

به عنوان مثال، اگر stay_nights 4 و برنامه سفر 10 شب باشد، اگر repeats true باشد، 2 بخش تخفیف داده می شود (شب 1-4 و شب 5-8). اما، اگر repeats false باشد، فقط 1 بخش تخفیف داده می شود (شب های 1-4).

Promotions / HotelPromotions / Promotion / Discount / @rank 0..1 integer به این ارتقاء یک رتبه اختصاص می‌دهد و آن را در انتخاب رتبه‌بندی‌شده انتخاب می‌کند، جایی که فقط ارتقاء با پایین‌ترین رتبه برای اعمال انتخاب می‌شود. مقادیر باید بین 1 تا 99 باشد. اگر چند ترفیع رتبه یکسانی داشته باشند، یکی به صورت دلخواه انتخاب و اعمال می شود.
Promotions / HotelPromotions / Promotion / BestDailyDiscount 1 Discount

دقیقاً یکی از Discount یا BestDailyDiscount باید مشخص شود.

تخفیف روزانه را مشخص می کند که ممکن است برای یک شب اقامت اعمال شود. این برخلاف Discount است که برای کل اقامت‌ها تخفیف اعمال می‌کند.

هر ملک ممکن است دارای یک گروه از تبلیغات باشد که "بهترین روزانه" در نظر گرفته می شوند. این بدان معناست که برای هر شب اقامت، تبلیغات تکی "بهترین روزانه" که واجد شرایط است و عمیق ترین تخفیف را برای آن شب به همراه دارد انتخاب شده و ممکن است اعمال شود.

Stacking ممکن است با BestDailyDiscount مشخص شود. باید روی base یا none تنظیم شود. تخفیف‌های «بهترین روزانه» که عمیق‌ترین تخفیف را برای هر شب ارائه می‌کنند، با هم ترکیب می‌شوند و به عنوان یک تخفیف اقامت (یعنی Discount ) در نظر گرفته می‌شوند، در حالی که نوع انباشتگی پیکربندی شده رعایت می‌شود. این تخفیف ترکیبی با سایر تبلیغات واجد شرایط <تخفیف> مقایسه می‌شود و می‌توان آن‌ها را برای یافتن یک یا ترکیبی که عمیق‌ترین تخفیف را ارائه می‌دهد، انباشته کرد. یا ترکیبی از BestDailyDiscount یا یک Discount واحد، هر کدام که قیمت کمتری را به همراه داشته باشد، برای نوع انباشته base انتخاب و اعمال می شود.

StayDates می توان با این نوع تخفیف مشخص کرد، اما application باید روی overlap تنظیم شود

.
Promotions / HotelPromotions / Promotion / BestDailyDiscount / @percentage 0..1 float

دقیقاً یکی از percentage ، fixed_amount ، یا fixed_price مورد نیاز است.

یک مقدار اعشاری از 0-100 که درصد تخفیف را مشخص می کند. برای AmountAfterTax (یا AmountBeforeTax اگر AmountAfterTax مشخص نشده باشد) اعمال می شود.

مثال ها:

  • اگر AmountAfterTax برای یک شب اقامت 100 و percentage 20 باشد، پس

    نرخ تبلیغات = AmountAfterTax * (1 - درصد تخفیف)

    80.00 = 100 * (1 - 0.2)

  • اگر AmountBeforeTax برای یک هفته اقامت 100 است، percentage 20 است و TaxFeeInfo مالیات 10 را مشخص می کند، پس

    نرخ ارتقاء = AmountBeforeTax * (1 - درصد تخفیف) + مالیات

    90.00 = 100 * (1 - 0.2) + 10

Promotions / HotelPromotions / Promotion/ BestDailyDiscount / @fixed_amount 0..1 float

دقیقاً یکی از percentage ، fixed_amount ، یا fixed_price مورد نیاز است.

مبلغ ثابتی که باید از یک نرخ شبانه AmountAfterTax (یا نرخ شبانه AmountBeforeTax در صورتی که AmountAfterTax مشخص نشده است) کم شود. فرض بر این است که به همان ارز نرخ شبانه است. اگر این بزرگتر از مجموع نرخ های شبانه باشد، مقدار حاصل صفر است.

مثال ها:

  • اگر AmountBeforeTax برای یک شب 90، AmountAfterTax 100 و fixed_amount 20 باشد، پس

    نرخ ارتقاء = AmountAfterTax - تخفیف ثابت

    80.00 = 100 - 20

  • اگر AmountBeforeTax برای یک شب 100 باشد، fixed_amount 20 باشد و TaxFeeInfo مالیات 8٪ را مشخص کند، پس

    نرخ ارتقاء = ( AmountBeforeTax - تخفیف ثابت) * (1 + درصد مالیات)

    86.40 = (100 - 20) * 1.08

Promotions / HotelPromotions / Promotion/ BestDailyDiscount / @fixed_price 0..1 float

دقیقاً یکی از percentage ، fixed_amount ، یا fixed_price مورد نیاز است.

اگر نرخ‌های شبانه AmountAfterTax مشخص شده باشد، قیمت شب اقامت شامل مالیات و هزینه‌ها را به مقدار مشخص تعیین می‌کند. اگر AmountBeforeTax مشخص شده باشد، چه AmountAfterTax مشخص شده باشد یا خیر، این قیمت قبل از مالیات را برای اقامت روی مقدار مشخص شده تنظیم می کند. فرض بر این است که به همان ارز نرخ شبانه است.

مثال ها:

  • اگر AmountBeforeTax برای یک شب 90، AmountAfterTax 100 و fixed_price 80 باشد، نرخ تبلیغات 80 است.
  • اگر AmountBeforeTax برای یک شب 100 باشد، fixed_amount 80 باشد و TaxFeeInfo مالیات 8٪ را مشخص کند، پس

    نرخ تبلیغات = قیمت ثابت * (1 + درصد مالیات)

    86.40 = 80 * 1.08

Promotions / HotelPromotions / Promotion / InventoryCount 0..1 InventoryCount محدودیت‌هایی را برای تعداد اتاق‌هایی که برای اعمال این تبلیغ باید در دسترس باشد، تعریف می‌کند. تخفیف فقط برای شب هایی اعمال می شود که محدودیت را رعایت کنند. با تخفیف fixed_amount مجاز نیست. توجه داشته باشید که تعداد اتاق‌های موجود با OTA_HotelInvCountNotifRQ ( InvCount ) یا OTA_HotelAvailNotifRQ ( BookingLimit ) مشخص شده است.
Promotions / HotelPromotions / Promotion / InventoryCount / @min 0..1 integer حداقل تعداد اتاق هایی که باید برای تبلیغات در دسترس باشد تا در نرخ شب اعمال شود. اگر این مشخص نشده باشد، هیچ حداقلی وجود ندارد.
Promotions / HotelPromotions / Promotion / InventoryCount / @max 0..1 integer حداکثر تعداد اتاق هایی که باید برای تبلیغات در دسترس باشد تا در نرخ شب اعمال شود. اگر این مشخص نشده باشد، حداکثر وجود ندارد.
Promotions / HotelPromotions / Promotion / LengthOfStay 0..1 LengthOfStay محدودیت‌های مدت اقامت را که در آن می‌توان این تبلیغات را اعمال کرد، تعیین می‌کند. زمانی که مدت اقامت خارج از حداقل و حداکثر محدودیت باشد، تبلیغ اعمال نمی شود.
Promotions / HotelPromotions / Promotion / LengthOfStay / @min 0..1 integer حداقل شب های مجاز در اقامت برای ارتقاء اعمال می شود. اگر این مشخص نشده باشد، هیچ حداقلی وجود ندارد.
Promotions / HotelPromotions / Promotion / LengthOfStay / @max 0..1 integer حداکثر شب های مجاز در اقامت برای ارتقاء اعمال می شود. اگر این مشخص نشده باشد، حداکثر وجود ندارد.
Promotions / HotelPromotions / Promotion / MembershipRateRule 0..1 MembershipRateRule

کانتینری برای قانون نرخ عضویت که باعث ایجاد یک درمان UI خاص برای تخفیف مرتبط می شود.

این عنصر نباید مشخص شود مگر اینکه <Discount> نیز مشخص شده باشد.

Promotions / HotelPromotions / Promotion / MembershipRateRule / @id 1 string

شناسه قانون نرخ مرتبط با برنامه عضویت.

Promotions / HotelPromotions / Promotion / MinimumAmount 0..1 MinimumAmount حداقل مجموع نرخ روزانه اتاق (با استفاده از مقدار بزرگتر از AmountBeforeTax یا AmountAfterTax ) را مشخص می کند که برای اعمال تبلیغات باید از آن بیشتر شود.
Promotions / HotelPromotions / Promotion / MinimumAmount / @before_discount 1 integer مقداری که برای اعمال تبلیغات باید از آن فراتر رود.
Promotions / HotelPromotions / Promotion / Occupancy 0..1 Occupancy محدودیت‌هایی را در مورد اشغال‌هایی که این تبلیغات برای آنها اعمال می‌شود، تعریف می‌کند. وقتی اشغال خارج از حداقل و حداکثر محدودیت باشد، تبلیغ اعمال نمی شود.
Promotions / HotelPromotions / Promotion / Occupancy / @min 0..1 integer اشغال مشخص شده توسط کاربر باید حداقل این مقدار باشد تا تخفیف اعمال شود.
Promotions / HotelPromotions / Promotion / Occupancy / @max 0..1 integer اشغال مشخص شده توسط کاربر باید حداکثر این مقدار باشد تا تخفیف اعمال شود.
Promotions / HotelPromotions / Promotion / RatePlans 0..1 RatePlans کانتینری برای فهرستی از طرح‌های نرخی که تبلیغات برای آنها اعمال می‌شود. اگر <RatePlans> مشخص نشده باشد، تبلیغ برای همه طرح‌های نرخ اعمال می‌شود.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan 1..n RatePlan یک طرح نرخ را مشخص می کند. طرح نرخ با ترکیبی از بسته، نرخ‌ها و در دسترس بودن تعریف می‌شود، همانطور که در پیام‌های Transaction (Property Data)، OTA_HotelRateAmountNotifRQ، و OTA_HotelAvailNotifRQ تعریف شده است، و توسط PackageID مشخص شده است.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan / @id 1 string شناسه منحصر به فرد برای طرح نرخ. این مقدار به مقدار PackageID در <PackageData> در پیام Transaction (Property Data) و در ویژگی RatePlanCode در <StatusApplicationControl> در هر دو پیام <OTA_HotelRateAmountNotifRQ> و <OTA_HotelAvailNotifRQ> منطبق می شود. حداکثر تعداد کاراکترهای مجاز 50 کاراکتر است.
Promotions / HotelPromotions / Promotion / RoomTypes 0..1 RoomTypes کانتینری برای فهرستی از انواع اتاق‌هایی که تبلیغات برای آنها اعمال می‌شود. این تبلیغ برای هر <RoomType> مشخص شده اعمال می شود. اگر <RoomTypes> مشخص نشده باشد، تبلیغ برای همه اتاق ها اعمال می شود.
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType 1..n RoomType نوع اتاق را مشخص می کند. یک نوع اتاق در یک عنصر <RoomData> در پیام تراکنش (داده های ویژگی) تعریف می شود و با استفاده از مقدار <RoomID> آن ارجاع داده می شود. (مقدار <RoomID> آن نیز توسط ویژگی InvTypeCode در پیام های OTA_HotelRateAmountNotifRQ ارجاع داده می شود.)
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType / @id 1 string شناسه منحصر به فرد موجودی (نوع اتاق). این مقدار در پیام Transaction (Property Data) به <RoomID> نشان داده می شود. حداکثر تعداد کاراکترهای مجاز 50 کاراکتر است.
Promotions / HotelPromotions / Promotion / Stacking 0..1 Stacking نحوه ترکیب تبلیغات را مشخص می کند. اگر مشخص نشده باشد، "نوع" به عنوان base در نظر گرفته می شود.
Promotions / HotelPromotions / Promotion / Stacking / @type 1 enum

بسته به این تنظیم، تبلیغات چندگانه را می توان برای یک نرخ اعمال کرد:

  • any : را می توان با هر تبلیغ دیگری ترکیب کرد (به جز none )، اما ترتیبی که تبلیغات باید اعمال شوند تضمین نمی شود.
  • base : بهترین تبلیغ base واجد شرایط ابتدا قبل از سایر تبلیغات انتخاب و اعمال می شود. این قبلا base_only نام داشت.
  • second : بهترین تبلیغ second واجد شرایط پس از ارتقای base (در صورت وجود) و قبل از any تبلیغات انتخاب و اعمال می شود.
  • none : نمی توان آن را با تبلیغات دیگر ترکیب کرد.

از میان ترکیب‌های مجاز، مجموعه تبلیغاتی که بیشترین تخفیف را به همراه دارد، روی نرخ اعمال می‌شود.

Promotions / HotelPromotions / Promotion / StayDates 0..1 StayDates ظرفی برای یک یا چند محدوده تاریخی که نحوه اعمال تبلیغات را تعیین می‌کند، مانند تخفیف‌های فصلی.
Promotions / HotelPromotions / Promotion / StayDates / @application 1 enum

توضیح می دهد که چگونه تبلیغات باید اعمال شود.

مقادیر معتبر عبارتند از:

  • all : اگر همه تاریخ‌های برنامه سفر با تاریخ‌های اقامت همپوشانی داشته باشند، تبلیغ را برای هر شب در برنامه سفر اعمال می‌کند.
  • any : اگر تاریخی در برنامه سفر با تاریخی در محدوده تاریخ اقامت همپوشانی داشته باشد، تبلیغ را برای تمام شب‌های برنامه سفر اعمال می‌کند.
  • overlap : تبلیغات را فقط برای شب‌هایی در برنامه سفر اعمال می‌کند که با تاریخی در محدوده تاریخ اقامت همپوشانی دارند.

این ویژگی همیشه باید مشخص شود.

  • اگر <Discount> percentage مشخص کند و application روی all یا any تنظیم شود، تخفیف به عنوان درصدی از اقامت کامل اعمال می شود.
  • اگر <Discount> percentage مشخص کند و application روی overlap تنظیم شده باشد، تخفیف به عنوان درصدی از نرخ های شبانه برای شب های همپوشانی اعمال می شود.
  • <Discount> تعیین fixed_amount و تنظیم application روی overlap ترکیبی نامعتبر است.
  • <FreeNights> از تمام مقادیر application پشتیبانی می کند. توجه داشته باشید که برای overlap ، تنها شب‌های اقامت با هم تداخل دارند برای شرایط تخفیف.
Promotions / HotelPromotions / Promotion / StayDates / DateRange 1..99 DateRange

یک محدوده تاریخی که تاریخ هایی را که قرار است تبلیغات اعمال شود را مشخص می کند.

فرمت YearlessDate نیز پشتیبانی می شود.

  • اگر یکی از تاریخ های start یا end یک تاریخ بدون سال باشد، هر دو باید به عنوان تاریخ های بدون سال پر شوند.
  • محدوده تاریخ بدون سال نباید در سال جدید باشد. در عوض، محدوده را به عنوان دو محدوده تاریخ مجاور نشان دهید. برای مثال، {"12-29", "01-05"} می توان به صورت {"12-29", "12-31"} و {"01-01", "01-05"} نشان داد.

اگر می خواهید محدوده StayDates را تنظیم کنید تا تبلیغات در روزهای خاصی از هفته مجاز باشد، باید تاریخ start را به عنوان تاریخ فعلی بدون end تنظیم کنید تا تبلیغات منقضی نشود.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.

اگر مقدار end ارائه نشده باشد، باید مقدار start مشخص کنید.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. اگر end مشخص نشده باشد، محدوده تاریخ عملاً از تاریخ start به بعد نامحدود است.

اگر مقدار start ارائه نشده باشد، باید مقدار end را مشخص کنید.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / UserCountries 0..1 UserCountries ظرفی برای فهرست کردن مکان‌های کاربری (کشورها) که واجد شرایط تبلیغ هستند. در صورت مشخص شدن، فقط به کاربران واجد شرایط در کشورهای فهرست شده، نرخ تخفیف ارائه می شود. اگر مشخص نشده باشد، به کاربران واجد شرایط در هر کشوری نرخ تخفیف ارائه می شود.
Promotions / HotelPromotions / Promotion / UserCountries / @type 0..1 enum نوع مشخصات UserCountries.

مقادیر معتبر include و exclude .

اگر type UserCountries به عنوان include تنظیم شده باشد، این تبلیغ برای کاربران کشورهای فهرست شده اعمال می شود.

اگر type UserCountries exclude باشد، این تبلیغ برای کاربران خارج از کشورهای فهرست شده اعمال می شود.

اگر type UserCountries تنظیم نشده باشد، به عنوان include تلقی می شود و تبلیغات برای کاربران کشورهای فهرست شده اعمال می شود.

Promotions / HotelPromotions / Promotion / UserCountries / Country 1..300 Country کشوری را تعریف می کند که در آن کاربران واجد شرایط تبلیغ هستند.
Promotions / HotelPromotions / Promotion / UserCountries / Country / @code 1 string یک کد کشور CLDR ، مانند DE یا FR . توجه داشته باشید که برای برخی از کشورها، کد کشور CLDR با کد کشور ISO 2 حرفی یکسان نیست. همچنین، کدهای منطقه CLDR پشتیبانی نمی شوند.

نمونه ها

محدودیت 500 تبلیغات برای هر ملک وجود دارد. برای حذف تبلیغات از یک ملک به مثال "حذف یک تبلیغ" مراجعه کنید.

پیام اصلی

مثال زیر یک پیام Promotions اولیه را نشان می دهد:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-07-01" end="2020-07-31" days_of_week="MTWHF"/>
         <DateRange start="2020-09-01" end="2020-09-30"/>
      </BookingDates>
      <BookingWindow min="7" max="330"/>
      <CheckinDates>
         <DateRange start="2020-10-01" end="2020-10-31" days_of_week="FSU"/>
      </CheckinDates>
      <CheckoutDates>
         <DateRange start="2020-10-08" end="2020-11-07" days_of_week="FSU"/>
      </CheckoutDates>
      <Devices>
        <Device type="mobile"/>
        <Device type="tablet"/>
      </Devices>
      <Discount percentage="20" applied_nights="2"/>
      <LengthOfStay min="2" max="14"/>
      <RatePlans>
         <RatePlan id="234"/>
         <RatePlan id="567"/>
      </RatePlans>
      <RoomTypes>
         <RoomType id="123"/>
         <RoomType id="456"/>
      </RoomTypes>
      <Stacking type="base"/>
      <UserCountries>
        <Country code="US"/>
        <Country code="GB"/>
      </UserCountries>
    </Promotion>
  </HotelPromotions>
</Promotions>


وضعیت موجودی

مثال زیر نحوه ایجاد تخفیف در صورت وجود موجودی اضافی نزدیک به تاریخ ورود را نشان می دهد:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingWindow max="7"/>
      <Discount percentage="10"/>
      <InventoryCount min="3"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


حذف یک تبلیغ

مثال زیر نحوه حذف یک تبلیغ برای یک ملک را نشان می دهد:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1" action="delete"/>
  </HotelPromotions>
</Promotions>

تمام تبلیغات را حذف کنید

مثال زیر نحوه حذف تمام تبلیغات یک ملک را نشان می دهد:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1" action="overlay"/>
</Promotions>



همه تبلیغات را پوشش دهید

مثال زیر نحوه همپوشانی <HotelPromotions> برای یک ملک با یک یا چند تبلیغ جدید نشان می دهد. وقتی action="overlay" , همه تبلیغات ذخیره شده قبل از ذخیره تبلیغات مشخص شده در پیام فعلی حذف می شوند:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1" action="overlay">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-09-01" end="2020-09-30"/>
      </BookingDates>
      <Discount percentage="10"/>
      <RoomTypes>
         <RoomType id="123"/>
         <RoomType id="456"/>
      </RoomTypes>
      <RatePlans>
         <RatePlan id="234"/>
         <RatePlan id="567"/>
      </RatePlans>
      <Stacking type="base"/>
    </Promotion>
  </HotelPromotions>
</Promotions>

3 نوع مختلف انباشته شدن

مثال زیر موردی را نشان می دهد که در آن سه تبلیغ مختلف اعمال می شود ( base ، second ، any ). توجه داشته باشید که تبلیغات none اعمال نمی شود زیرا سایر تبلیغات تخفیف بهتری ارائه می دهند. اگر قیمت اصلی 100 دلار بود، قیمت با تخفیف 72.90 دلار خواهد بود.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="10"/>
      <Stacking type="base"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="10"/>
      <Stacking type="second"/>
    </Promotion>
    <Promotion id="3">
      <Discount percentage="10"/>
      <Stacking type="any"/>
    </Promotion>
    <Promotion id="4">
      <Discount percentage="25"/>
      <Stacking type="none"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


هیچ نوع انباشته

مثال زیر موردی را نشان می دهد که در آن از تبلیغات none استفاده می شود زیرا ترکیب سایر تبلیغات تخفیف کمتری را ارائه می دهد. اگر قیمت اصلی 100 دلار بود، قیمت با تخفیف 75 دلار بود.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="10"/>
      <Stacking type="base"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="10"/>
      <Stacking type="any"/>
    </Promotion>
    <Promotion id="3">
      <Discount percentage="25"/>
      <Stacking type="none"/>
    </Promotion>
  </HotelPromotions>
</Promotions>



محدوده مدت پنجره رزرو

مثال زیر موردی را نشان می‌دهد که در آن عنصر BookingWindow با کران‌های شروع و پایان آن به‌عنوان نوع ISO 8601 Duration استفاده می‌شود. این محدودیت پنجره رزرو مستلزم رزرو در یا قبل از ساعت 18:00 روز قبل از ورود، و در یا بعد از ساعت 12:00 در روز دوم قبل از ورود است.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingWindow min="P1DT6H" max="P2DT12H"/>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


تاریخ رزرو تاریخ زمان محدود

مثال زیر موردی را نشان می دهد که در آن عنصر BookingDates با ویژگی های start و end به عنوان انواع DateTime استفاده می شود. این محدودیت تاریخ رزرو مستلزم این است که رزرو بین ساعت 06:30 در 01-07-2020 و ساعت 18:45 در 2020-07-02 انجام شود.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-07-01T06:30:00" end="2020-07-02T18:45:00"/>
      </BookingDates>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


محدوده تاریخ بدون سال

مثال زیر موردی را نشان می‌دهد که در آن عنصر CheckInDates شامل DateRanges است که دارای فیلدهای start و end بدون سال است. در این مثال، این تبلیغات صرف‌نظر از سال، برای تاریخ‌های اعلام حضور بین ۲۹/۱۲ و ۲/۱ اعمال می‌شود. محدوده تاریخ بدون سال که از مرز سال جدید عبور می کند نامعتبر است، بنابراین محدوده تاریخ به صورت دو محدوده تاریخ مجاور بیان می شود.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <CheckInDates>
         <DateRange start="12-29" end="12-31"/>
         <DateRange start="01-01" end="01-02"/>
      </CheckInDates>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>



تخفیف شبانه رایگان

مثال زیر به ازای هر چهار شب اقامت در محدوده تعیین شده از تاریخ رزرو، دو شب را 50% تخفیف می دهد. برای یک برنامه سفر ده شبه، در مجموع چهار شب 50 درصد تخفیف داده می شود.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
        <DateRange start="2022-01-01" end="2022-05-31"/>
      </BookingDates>
      <Discount>
        <FreeNights stay_nights="4" discount_nights="2" discount_percentage="50" night_selection="cheapest" repeats="true"/>
      </Discount>
    </Promotion>
  </HotelPromotions>
</Promotions>

مثال بعدی برای هر سه شب اقامت در محدوده های مشخص شده از تاریخ اقامت، یک شب 50% تخفیف می دهد. فقط شب‌های اقامت با هم تداخل دارند برای واجد شرایط بودن برای تخفیف. برای برنامه سفر زیر با ورود در تاریخ 01/01/2022 و خروج در 2022/01/07، شب‌های اقامت واجد شرایط و تخفیف‌ها به شرح زیر اعمال می‌شود.

  • 01-01-2022 (بمانید)
  • 02-01-2022 (بمانید)
  • 03-01-2022
  • 04/01/2022 (تخفیف داده شده)
  • 05-01-2022 (بمانید)
  • 06-01-2022 (بمانید)
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <StayDates application="overlap">
        <DateRange start="2022-01-01" end="2022-01-02"/>
        <DateRange start="2022-01-04" end="2022-01-06"/>
      </StayDates>
      <Discount>
        <FreeNights stay_nights="3" discount_nights="1" discount_percentage="50" night_selection="last" repeats="true"/>
      </Discount>
    </Promotion>
  </HotelPromotions>
</Promotions>


انتخاب رتبه بندی شده

مثال زیر دو تخفیف ارائه می دهد، یکی با 20 درصد تخفیف و دیگری با 15 درصد تخفیف. در هنگام ارزیابی فقط 15 درصد تخفیف اعمال می شود زیرا رتبه پایین تری دارد.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="15" rank="25"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="20" rank="50"/>
    </Promotion>
  </HotelPromotions>
</Promotions>

بهترین تخفیف روزانه

مثال زیر با اعمال BestDailyDiscount همراه با Discount ، اقامت دو شب را تخفیف می دهد.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
 <HotelPromotions hotel_id="HotelID" action="overlay">
   <Promotion id="general">
     <BestDailyDiscount fixed_amount="20"/>
   </Promotion>
   <Promotion id="may">
     <BestDailyDiscount fixed_amount="50"/>
     <StayDates application="overlap">
        <DateRange start="2023-05-01" end="2023-05-31"/>
     </StayDates>
   </Promotion>
   <Promotion id="fiesta">
     <Discount fixed_amount_per_night="5"/>
     <Stacking type="any"/>
   </Promotion>
 </HotelPromotions>
</Promotions>

دو شب اقامت از 30 آوریل 2023 تا 2 مه 2023 را در نظر بگیرید برای محاسبه، ابتدا ترکیبی از بهترین تخفیف های روزانه که عمیق ترین تخفیف را به همراه دارد، پیدا می شود.

برای شب اول، تبلیغات "عمومی" تنها مبلغ واجد شرایط با تخفیف ثابت 20 است.

برای شب دوم، تبلیغات "می" تخفیف عمیق تری نسبت به تخفیف "عمومی" ارائه می دهد. بنابراین ، هنگامی که "مه" انتخاب شد ، مبلغ تخفیف ثابت 50 است.

سپس برای اقامت ، تخفیف های تبلیغاتی "فیستا" به 5 در هر شب یا 10 کل تخفیف می یابد. این می تواند با ترکیب بهترین تخفیف های روزانه جمع شود زیرا "فیستا" نوع انباشته شده روی any است. اگر به صورت base تنظیم شود ، فقط ترکیبی از بهترین تخفیف های روزانه یا تخفیف "Fiesta" اعمال می شود. برای اطلاعات بیشتر به توضیحات Stacking مراجعه کنید.

به طور کلی ، قیمت اقامت 20 + 50 + 10 = 80 تخفیف مبلغ ثابت دریافت می کند.

پاسخ ها

نحو

پیام PromotionsResponse از نحو زیر استفاده می کند:

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="timestamp"
                    id="message_ID"
                    partner="partner_key">
  <!-- Either Success or Issues are populated. -->
  <Success/>
  <Issues>
    <Issue code="issue_code"
           status="issue_type">
      issue_description
    </Issue>
  </Issues>
</PromotionsResponse>

عناصر و صفات

پیام PromotionsResponse عناصر و ویژگی های زیر را دارد:

عنصر / @Attribute رخدادها تایپ کنید توضیحات
PromotionsResponse 1 Complex element عنصر ریشه ای که نشان دهنده موفقیت یا مسائل مربوط به پیام درخواست تبلیغات دریافت شده است.
PromotionsResponse / @timestamp 1 DateTime تاریخ و زمان ایجاد این پیام.
PromotionsResponse / @id 1 string شناسه منحصر به فرد از پیام تبلیغات مرتبط.
PromotionsResponse / @partner 1 string حساب شریک برای این پیام.
PromotionsResponse / Success 0..1 Success نشان می دهد که پیام تبلیغات بدون هشدار ، خطا یا شکست با موفقیت پردازش شد.

یا <Success> یا <Issues> در هر پیام وجود دارد.

PromotionsResponse / Issues 0..1 Issues یک کانتینر برای یک یا چند مسئله هنگام پردازش پیام تبلیغات با آن روبرو می شود.

یا <Success> یا <Issues> در هر پیام وجود دارد.

PromotionsResponse / Issues / Issue 1..n Issue توضیحات هشدار ، خطا یا عدم موفقیت هنگام پردازش پیام تبلیغات. جزئیات مربوط به این مسائل را می‌توانید در پیام‌های خطای وضعیت فید مشاهده کنید.
PromotionsResponse / Issues / Issue / @code 1 integer شناسه مشکل
PromotionsResponse / Issues / Issue / @status 1 enum

نوع مشکل مواجه شده

مقادیر معتبر warning ، error و failure هستند.

نمونه ها

موفقیت

در زیر پاسخی به یک پیام تبلیغاتی با موفقیت پردازش شده است.

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Success/>
</PromotionsResponse>

مسائل

در زیر پاسخی به پیام تبلیغاتی است که به دلیل خطاها پردازش نشده است.

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Issues>
    <Issue code="1001" status="error">Example</Issue>
  </Issues>
</PromotionsResponse>

،

نمای کلی

این API به شما امکان می دهد تخفیف های احتمالی را مشخص کنید. از بین تبلیغات مشخص شده ، Google تبلیغات واجد شرایط یا مجموعه تبلیغاتی را که منجر به کمترین قیمت می شود ، اعمال می کند. اگر به دنبال API هستید که از تنظیمات نرخ دلخواه پشتیبانی می کند که می تواند در صورت برآورده شدن شرایط ، قیمت را افزایش یا کاهش دهد ، پس API تغییرات نرخ ما را در نظر بگیرید. توجه داشته باشید که اگر هر دو API وجود داشته باشند ، تغییرات نرخ قبل از تبلیغات اعمال می شود.

درخواست ها

نحو

پیام Promotions از نحو زیر استفاده می کند:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner= "partner_key"
            id="message_ID"
            timestamp="timestamp">
  <HotelPromotions hotel_id="HotelID" action="[overlay]">
    <Promotion id="PromotionID" action="[delete]">
      <BookingDates>
        <DateRange start="YYYY-MM-DD[THH:mm:ss]" end="YYYY-MM-DD[THH:mm:ss]"
          days_of_week="MTWHFSU_or_subset"/>
        <DateRange start="YYYY-MM-DD[THH:mm:ss]" end="YYYY-MM-DD[THH:mm:ss]"
          days_of_week="MTWHFSU_or_subset"/>
      </BookingDates>
      <BookingWindow min="integer_or_duration" max="integer_or_duration"/>
      <Ceiling amount_per_night="float"/>
      <Floor amount_per_night="float"/>
      <CheckinDates>
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </CheckinDates>
      <CheckoutDates>
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </CheckoutDates>
      <!-- Specify only one of percentage, percentage_of_base, fixed_amount,
           fixed_amount_per_night, fixed_price, or fixed_price_per_night;
           applied_nights is only used with percentage, fixed_amount_per_night,
           and fixed_price_per_night. -->
      <Discount percentage="float" percentage_of_base="float"
                fixed_amount="float" fixed_amount_per_night="float"
                fixed_price="float" fixed_price_per_night="float"
                applied_nights="integer_1_to_99" rank="integer_1_to_99">
        <!-- FreeNights may not be used in conjunction with attributes on Discount -->
        <FreeNights stay_nights="integer" discount_nights="integer"
                    discount_percentage="float" night_selection="[cheapest|last]"
                    repeats="boolean"/>
      </Discount>
      <!-- Exactly one of Discount or BestDailyDiscount must be specified.
           Specify only one of percentage, fixed_amount, or fixed_price. -->
      <BestDailyDiscount percentage="float" fixed_amount="float" fixed_price="float"/>
      <Devices>
        <Device type="[desktop|tablet|mobile]"/>
      </Devices>
      <InventoryCount min="integer" max="integer"/>
      <LengthOfStay min="integer" max="integer"/>
      <MembershipRateRule id="RateRuleID"/>
      <MinimumAmount before_discount="integer"/>
      <Occupancy min="integer" max="integer"/>
      <RatePlans>
        <RatePlan id="PackageID_1"/>
        <RatePlan id="PackageID_2"/>
      </RatePlans>
      <RoomTypes>
        <RoomType id="RoomID_1"/>
        <RoomType id="RoomID_2"/>
      </RoomTypes>
      <Stacking type="[any|base|none|second]"/>
      <StayDates application="[all|any|overlap]">
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </StayDates>
      <UserCountries type="[include|exclude]">
        <Country code="country_code"/>
      </UserCountries>
    </Promotion>
  </HotelPromotions>
</Promotions>

عناصر و صفات

پیام تبلیغات دارای عناصر و ویژگی های زیر است:

عنصر / @Attribute رخدادها تایپ کنید توضیحات
Promotions 1 Complex element عنصر اصلی پیام تبلیغات.
Promotions / @partner 1 string حساب شریک برای این پیام. این مقدار رشته، مقدار «کلید شریک» است که در صفحه تنظیمات حساب در مرکز هتل فهرست شده است.

اگر یک باطن دارید که فید برای چندین حساب <OTA_HotelRateAmountNotifRQ> ارائه می دهد ، این مقدار باید با مقدار ویژگی ID مشخص شده در عنصر <RequestorID> و <OTA_HotelAvailNotifRQ> برای همان حساب مطابقت داشته باشد.

Promotions / @id 1 string یک شناسه منحصر به فرد برای این پیام درخواست. این مقدار در پیام پاسخ برگردانده می شود. شخصیت های مجاز AZ ، AZ ، 0-9 ، _ (زیرکانه) و - (dash) هستند.
Promotions / @timestamp 1 DateTime تاریخ و زمان ایجاد این پیام.
Promotions / HotelPromotions 0..n HotelPromotions

تبلیغات برای یک ملک. هر تبلیغ برای یک ملک واحد اعمال می شود.

مگر در مواردی که از <Stacking> استفاده شود ، در صورت واجد شرایط بودن تبلیغات متعدد ، از تبلیغات با بزرگترین تخفیف برای رزرو استفاده می شود.

Promotions / HotelPromotions / @hotel_id 1 string شناسه منحصر به فرد ملک این مقدار باید با شناسه هتل مشخص شده با استفاده از <id> در عنصر <listing> در فید لیست هتل مطابقت داشته باشد. شناسه هتل نیز در مرکز هتل درج شده است.
Promotions / HotelPromotions / @action 0..1 enum

در صورت مشخص شدن ، مقدار باید "overlay" باشد. هنگامی که مقدار "overlay" است ، تمام تبلیغات ذخیره شده قبل از ذخیره تبلیغات مشخص شده در پیام فعلی حذف می شوند.

اگر مشخص نشده باشد ، پس از آن هر تبلیغی که در پیام فعلی مشخص شده است نیز است:

  • Added (اگر هیچ یک از تبلیغات ذخیره شده دارای یک id یکسان نیست)
  • Updated (اگر یک تبلیغ ذخیره شده دارای همان id باشد)
  • Deleted (اگر یک تبلیغ ذخیره شده دارای همان id باشد و مقدار ویژگی action برای تبلیغ مشخص شده در پیام فعلی "delete" است)
Promotions / HotelPromotions / Promotion 0..99 Promotion

یک تبلیغ واحد برای یک ملک. توجه داشته باشید که اگر action="overlay" و A <Promotion> مشخص نشده باشد ، تمام تبلیغات مربوط به این ملک حذف می شوند.

اگر نیاز به استفاده از بیش از 99 تبلیغ دارید ، با مدیر حساب فنی خود (TAM) تماس بگیرید.

Promotions / HotelPromotions / Promotion / @id 1 string یک شناسه منحصر به فرد برای تبلیغ. حداکثر تعداد کاراکترهای مجاز 40 است. کاراکترهای مجاز AZ ، AZ ، 0-9 ، _ (زیرکور) ، - (dash) ، و. (دوره).
Promotions /HotelPromotions / Promotion / @action 0..1 enum

در صورت مشخص شدن ، مقدار باید delete شود. اگر مشخص نشده باشد و ارتقاء با همان id ذخیره نمی شود ، این تبلیغات ذخیره می شود. در غیر این صورت ، اگر مشخص نشده باشد و ارتقاء با همان id ذخیره شود ، تبلیغات موجود به روز می شود.

در صورت مشخص شدن delete ، تبلیغات ذخیره شده با همان id حذف می شود. هنگام استفاده از delete ، هیچ عنصر کودک را در <Promotion> قرار ندهید. همچنین ، delete در رابطه با <HotelPromotions action="overlay"/> مجاز نیست.

Promotions / HotelPromotions / Promotion / BookingDates 0..1 BookingDates یک ظرف برای یک یا چند محدوده که هنگام رزرو تعریف می کنند باید اتفاق بیفتد تا ارتقاء اعمال شود.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange 1..99 DateRange دامنه مشخص شده در هنگام رزرو باید برای اعمال ارتقاء رخ دهد.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @start 0..1 Date یا DateTime

تاریخ شروع یا DateTime (بر اساس منطقه زمانی خاصیت) ، شامل محدوده.

  • تاریخ یا DateTime که توسط start مشخص شده است باید زودتر از (یا همانند) باشد که تاریخ یا DateTime تا end مشخص شده است.
  • اگر start مشخص نشده باشد ، دامنه از نظر زمان شروع به طور نامحدودی نامحدود است.
  • اگر start به عنوان تاریخ "yyyy-mm-dd" جمع شود ، به عنوان dateTime "yyyy-mm-ddt00: 00: 00" تعبیر می شود.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @end 0..1 Date یا DateTime

تاریخ پایان یا DateTime (بر اساس منطقه زمانی خاصیت) ، شامل محدوده.

  • تاریخ یا DateTime مشخص شده تا end باید حداکثر (یا همانند) باشد که تاریخ یا DateTime توسط start مشخص شده است.
  • اگر end مشخص نشده باشد ، دامنه از نظر زمان پایان به طور نامحدودی نامحدود است.
  • اگر end به عنوان تاریخ "yyyy-mm-dd" ارائه شود ، به عنوان dateTime "yyyy-mm-ddt23: 59: 59" تعبیر می شود.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / BookingWindow 0..1 BookingWindow مدت زمانی را که رزرو باید نسبت به تاریخ چک (بر اساس منطقه زمانی خاصیت) وجود داشته باشد ، مشخص می کند. به عنوان مثال ، پنجره رزرو می تواند حداقل 7 روز ، اما بیشتر از 180 روز قبل از ورود به سیستم تنظیم شود.
Promotions / HotelPromotions / Promotion / BookingWindow / @min 0..1 integer or duration حداقل مدت زمان قبل از ورود به سیستم باید برای اعمال ارتقاء اتفاق بیفتد. اگر این مشخص نشده باشد ، یا مقدار آن 0 باشد ، حداقل وجود ندارد.

انواع ارزش معتبر عبارتند از:

  • عدد صحیح: تعداد روزهای قبل از تاریخ ورود. به عنوان مثال ، یک مقدار 30 نشان می دهد که تبلیغات فقط در مورد رزرو حداقل 30 روز قبل از تاریخ ورود اعمال می شود.
  • مدت زمان ISO 8601 (روز ، ساعت و دقیقه): تعداد روزها (و ساعتهای اختیاری ساعت/دقیقه) قبل از تاریخ ورود. به عنوان مثال ، مقدار P30D نشان می دهد که تبلیغات فقط در مورد رزرو حداقل 30 روز قبل از تاریخ چک اعمال می شود. مقدار P30DT6H نیاز به رزرو در تاریخ یا قبل از ساعت 18:00 در روز 30 روز قبل از ورود دارد.
Promotions / HotelPromotions / Promotion / BookingWindow / @max 0..1 integer or duration حداکثر تعداد روزهای قبل از ورود به سیستم باید برای اعمال ارتقاء اتفاق بیفتد. اگر این مشخص نشده باشد ، یا مقدار آن 0 باشد ، حداکثر وجود ندارد.

انواع ارزش معتبر عبارتند از:

  • عدد صحیح: تعداد روزهای قبل از تاریخ ورود. به عنوان مثال ، مقدار 30 نشان می دهد که ارتقاء فقط در 30 روز قبل از تاریخ ورود به سیستم مربوط می شود.
  • مدت زمان ISO 8601 (روز ، ساعت و دقیقه): تعداد روزها (و ساعتهای اختیاری ساعت/دقیقه) قبل از تاریخ ورود. به عنوان مثال ، مقدار P30D نشان می دهد که این ارتقاء فقط در مورد رزروهای حداکثر 30 روز قبل از تاریخ ورود به کار اعمال می شود. مقدار P30DT6H نیاز به رزرو در تاریخ یا بعد از 18:00 در روز 30 روز قبل از ورود دارد.
Promotions / HotelPromotions / Promotion / Ceiling 0..1 Ceiling

محدودیت هایی را در حداکثر مقدار که می توان نرخ را پس از اعمال تبلیغات تعیین کرد ، تعریف می کند.

تبلیغات همیشه باید یک <Discount> یا یک <BestDailyDiscount> را مشخص کنند ، بنابراین برای ایجاد تبلیغی که فقط یک <Ceiling> را اعمال می کند ، یک گزینه تنظیم <Discount> با percentage 0 است.

اگر انباشت پیکربندی شده باشد ، چندین تبلیغ با <Ceiling> می توانند برای یک اقامت واحد اعمال شوند. هر تبلیغی تخفیف خود را اعمال می کند ، بلافاصله پس از سقف آن. مثال زیر نشان می دهد که چگونه هر سقف به محاسبه ارتقاء بعدی در پشته کمک می کند.

مثال:

قیمت یک شب اقامت در جایی که AmountBeforeTax 100 است و پشته ای از دو تبلیغ وجود دارد:

  1. ارتقا با base انباشته شده ، یک fixed_amount 25 و یک amount_per_night سقف_پر_ شب 60
  2. ارتقا با نوع انباشته second ، fixed_amount 25 و یک amount_per_night سقف_پر_ شب 90

در اینجا ترتیب محاسبه است:

  1. ارتقاء base ابتدا اعمال می شود و AmountBeforeTax به 75 تخفیف می دهد ، اما سپس سقف آن را به 60 کاهش می دهد.
  2. ارتقاء second از AmountBeforeTax از 60 تا 35 تخفیف می دهد. این زیر سقف 90 است بنابراین سقف دوم اعمال نمی شود. نرخ نهایی 35 است.

این واقعیت که 60 یک سقف کلی سخت تر است ، بی ربط است زیرا فقط برای ارتقاء خاص خود معتبر است و هیچ سقف منفرد وجود ندارد که کل پشته تبلیغاتی را در بر بگیرد.

Promotions / HotelPromotions / Promotion / Ceiling / @amount_per_night 1 float

حداکثر مبلغی که می توان نرخ شبانه را پس از اعمال تخفیف تعیین کرد.

اگر یک عنصر <Floor> نیز مشخص شده باشد ، این باید روی مقداری بیشتر از یا مساوی با ویژگی amount_per_night در <Floor> تنظیم شود.

amount_per_night در هنگام قرار گرفتن در نرخ شبانه با استفاده از AmountAfterTax ، به مالیات و هزینه اعمال می شود ، اما مواردی که با استفاده از TaxFeeInfo مشخص نشده اند.

Promotions / HotelPromotions / Promotion / Floor 0..1 Floor

محدودیت هایی را در حداقل مقدار که می توان نرخ را پس از اعمال تبلیغات تعیین کرد ، تعریف می کند.

تبلیغات همیشه باید یک <Discount> یا یک <BestDailyDiscount> را مشخص کنند ، بنابراین برای ایجاد تبلیغی که فقط یک <Floor> را اعمال می کند ، یک گزینه تنظیم <Discount> با percentage 0 است.

<Floor> منطق هنوز هم در مورد تخفیف های <FreeNights> اعمال می شود ، حتی اگر شب رایگان دارای 100% تخفیف برای آن باشد.

اگر انباشت پیکربندی شده باشد ، چندین تبلیغ با <Floor> می توانند برای یک اقامت واحد اعمال شوند. هر تبلیغی تخفیف خود را اعمال می کند ، بلافاصله پس از آن کف آن. مثال زیر نشان می دهد که چگونه هر طبقه به محاسبه ارتقاء بعدی در پشته کمک می کند.

مثال:

قیمت یک شب اقامت در جایی که AmountBeforeTax 100 است و پشته ای از دو تبلیغ وجود دارد:

  1. ارتقا با base انباشته شده ، یک fixed_amount 25 و یک amount_per_night کف_پر_ شب 90
  2. ارتقا با نوع انباشته second ، fixed_amount از 25 و یک amount_per_night کف_پر_ شب 60

در اینجا ترتیب محاسبه است:

  1. ارتقاء base ابتدا اعمال می شود و AmountBeforeTax به 75 تخفیف می دهد ، اما سپس کف آن را تا 90 بالا می برد.
  2. second ارتقاء AmountBeforeTax از 90 تا 65 تخفیف می دهد. این بالاتر از کف 60 است بنابراین طبقه دوم اعمال نمی شود. نرخ نهایی 65 است.

این واقعیت که 90 یک طبقه سخت تر است ، بی ربط است زیرا فقط برای ارتقاء خاص خود معتبر است ، و هیچ طبقه ای وجود ندارد که کل پشته تبلیغاتی را در بر بگیرد.

Promotions / HotelPromotions / Promotion / Floor / @amount_per_night 1 float

حداقل مبلغی که می توان نرخ شبانه را پس از اعمال تخفیف تعیین کرد.

اگر یک عنصر <Ceiling> نیز مشخص شده باشد ، این باید روی یک مقدار کمتر یا مساوی با ویژگی amount_per_night در <Ceiling> تنظیم شود.

amount_per_night در هنگام قرار گرفتن در نرخ شبانه با استفاده از AmountAfterTax ، به مالیات و هزینه اعمال می شود ، اما مواردی که با استفاده از TaxFeeInfo مشخص نشده اند.

Promotions / HotelPromotions / Promotion / CheckinDates 0..1 CheckinDates یک کانتینر برای یک یا چند محدوده تاریخ که تعریف می کنند هنگام ورود به سیستم باید برای اعمال ارتقاء رخ دهد.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange 1..20 DateRange

محدوده تاریخ مشخص می کند که چه زمانی باید ورود به سیستم انجام شود تا ارتقاء اعمال شود. در صورت حذف یک یا چند تبلیغ ، این عنصر لازم نیست.

فرمت بی سال نیز پشتیبانی می شود.

  • اگر یکی از start یا end یک تاریخ بی سال باشد ، هر دو باید به عنوان تاریخ های بی سال جمع شوند.
  • محدوده تاریخ بی سال نباید در سال جدید پیچیده شود. در عوض ، دامنه را به عنوان دو محدوده تاریخ مجاور معرفی کنید. به عنوان مثال ، {"12-29", "01-05"} می توان به عنوان {"12-29", "12-31"} و {"01-01", "01-05"} نشان داد.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. اگر end مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ پایان نامحدود است.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / CheckoutDates 0..1 CheckoutDates یک کانتینر برای یک یا چند محدوده تاریخ که تعریف می کنند هنگام ورود به سیستم باید برای اعمال ارتقاء رخ دهد.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange 1..20 DateRange

محدوده تاریخ مشخص می شود که باید در هنگام استفاده از آن ، اقدام به انجام شود. در صورت حذف یک یا چند تبلیغ ، این عنصر لازم نیست.

فرمت بی سال نیز پشتیبانی می شود.

  • اگر یکی از start یا end یک تاریخ بی سال باشد ، هر دو باید به عنوان تاریخ های بی سال جمع شوند.
  • محدوده تاریخ بی سال نباید در سال جدید پیچیده شود. در عوض ، دامنه را به عنوان دو محدوده تاریخ مجاور معرفی کنید. به عنوان مثال ، {"12-29", "01-05"} می توان به عنوان {"12-29", "12-31"} و {"01-01", "01-05"} نشان داد.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. اگر end مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ پایان نامحدود است.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / Devices 0..1 Devices کانتینر برای لیست دستگاه های کاربر که واجد شرایط تبلیغ هستند. در صورت مشخص شدن ، فقط به کاربران واجد شرایط در دستگاه های ذکر شده نرخ تخفیف ارائه می شود. در صورت مشخص نشده ، به کاربران واجد شرایط در هر دستگاه نرخ تخفیف ارائه می شود.
Promotions / HotelPromotions / Promotion / Devices / Device 1..3 Device یک نوع دستگاه کاربر را که واجد شرایط ارتقاء است تعریف می کند.
Promotions / HotelPromotions / Promotion / Devices / Device / @type 1 enum یک نوع دستگاه مقدار باید desktop ، tablet یا mobile باشد.
Promotions / HotelPromotions / Promotion / Discount 1 Discount

دقیقاً یکی از Discount یا BestDailyDiscount باید مشخص شود.

تخفیف مورد استفاده برای این تبلیغ را مشخص می کند.

Promotions / HotelPromotions / Promotion / Discount / @percentage 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price یا fixed_price_per_night لازم است.

مقدار اعشاری از 0-100 که درصد تخفیف را مشخص می کند. این مورد به AmountAfterTax اعمال می شود (یا در صورت مشخص کردن AmountAfterTax یا AmountBeforeTax ).

مثال ها:

  • اگر AmountAfterTax 100 و percentage 20 باشد ، پس

    نرخ ارتقاء = AmountAfterTax * (1 - درصد تخفیف)

    80.00 = 100 * (1 - 0.2)

  • اگر AmountBeforeTax 100 باشد ، percentage 20 است و Taxfeeinfo مالیات 10 را مشخص می کند.

    نرخ ارتقاء = AmountBeforeTax * (1 - درصد تخفیف) + مالیات

    90.00 = 100 * (1 - 0.2) + 10

Promotions / HotelPromotions / Promotion / Discount / @percentage_of_base 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price یا fixed_price_per_night لازم است.

مقدار اعشاری از 0-100 که درصد تخفیف پایه را مشخص می کند. مشابه percentage ، آن را به AmountAfterTax (یا در صورت مشخص شدن AmountAfterTax ) به AmountBeforeTax اعمال می شود.

بر خلاف percentage ، این تخفیف همیشه به عنوان درصد از نرخ پایه صرف نظر از تبلیغات قبلی که به صورت توالی اعمال شده اند محاسبه می شود.

مثال:

  • فرض کنید ما دو تبلیغ داریم که به ترتیب در یک شب اقامت یک شب اعمال می شود که قیمت آن 100 است. اولی تخفیف 10 ٪ درصد و دوم 10 ٪ از تخفیف پایه است. سپس نرخ تخفیف 80 خواهد بود زیرا هر دو تبلیغ 10 نفر را از دست می دهند. توجه داشته باشید اگر ارتقاء دوم نیز تخفیف درصدی منظم داشته باشد ، از آنجا که دومین تخفیف ارتقاء 10 ٪ از 90 تخفیف می یابد ، نرخ تخفیف 81 خواهد بود.
Promotions / HotelPromotions / Promotion / Discount / @fixed_amount 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price یا fixed_price_per_night لازم است.

مبلغ مشخصی که باید از مبلغ مبلغ AmountAfterTax (یا مبلغ مبلغ AmountBeforeTax شبانه در صورت مشخص شدن AmountAfterTax ) جمع شود. فرض بر این است که در همان ارز با نرخ شبانه قرار دارد. اگر این بزرگتر از مجموع نرخ شبانه باشد ، مقدار حاصل صفر است.

مثال ها:

  • اگر ما یک اقامت 1 شب را که در آن AmountBeforeTax 90 است ، AmountAfterTax 100 و fixed_amount 20 است ، پس از آن 20 ، پس از آن

    نرخ ارتقا = AmountAfterTax - تخفیف ثابت

    80.00 = 100 - 20

  • اگر ما یک اقامت 1 شب را که در آن AmountBeforeTax 100 موردی است ، قیمت گذاری می کنیم ، fixed_amount 20 است ، و Taxfeeinfo مالیات 8 ٪ را مشخص می کند ، پس از آن

    نرخ ارتقا = ( AmountBeforeTax - تخفیف ثابت) * (1 + درصد مالیات)

    86.40 = (100 - 20) * 1.08

  • اگر ما یک اقامت 1 شب را که در آن AmountBeforeTax 50 است ، قیمت گذاری می کنیم ، 60 fixed_amount است و Taxfeeinfo مالیات 10 را مشخص می کند ، پس از آن

    نرخ ارتقا = ( AmountBeforeTax - تخفیف ثابت) * مالیات

    10.00 = 0 + 10

  • اگر ما یک اقامت 3 شبانه را در آن قرار دهیم که مقادیر AmountAfterTax 100 ، 110 و 120 باشد. و fixed_amount 150 است ، پس

    نرخ ارتقاء = مبلغ ( AmountAfterTax ) - (تخفیف ثابت)

    180.00 = (100 + 110 + 120) - 150

Promotions / HotelPromotions / Promotion / Discount / @fixed_amount_per_night 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price یا fixed_price_per_night لازم است.

یک تخفیف ثابت برای هر یک از نرخ های شبانه AmountAfterTax اعمال می شود (یا ارزان ترین n در صورت مشخص applied_nights مشخص شده است). اگر AmountAfterTax مشخص نشده باشد ، به AmountBeforeTax اعمال می شود. فرض بر این است که در همان ارز با نرخ شبانه قرار دارد. اگر fixed_amount_per_night از نرخ شبانه بزرگتر باشد ، آن نرخ شبانه به صفر کاهش می یابد - تخفیف نمی تواند باعث شود نرخ شبانه منفی شود.

مثال ها:

  • اگر ما یک اقامت 3 شبانه را در آن قرار دهیم که مقادیر AmountAfterTax 100 ، 110 و 120 باشد. و fixed_amount_per_night 10 است ، پس

    نرخ ارتقاء = مبلغ ( AmountBeforeTax - تخفیف مبلغ ثابت)

    300.00 = ((100 - 10) + (110 - 10) + (120 - 10))

  • اگر ما یک اقامت 3 شبانه را در آن قرار دهیم که مقادیر AmountAfterTax 10 ، 50 و 100 باشد. و fixed_amount_per_night 20 است ، پس

    نرخ ارتقاء = مبلغ ( AmountAfterTax - تخفیف مبلغ ثابت)

    110.00 = (0 + (50 - 20) + (100 - 20))

Promotions / HotelPromotions / Promotion / Discount / @fixed_price 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price یا fixed_price_per_night لازم است.

اگر نرخ های شبانه AmountAfterTax مشخص شده باشد ، این قیمت برای اقامت ، از جمله مالیات و هزینه ، به ارزش مشخص شده تعیین می کند. اگر AmountBeforeTax مشخص شده باشد ، پس از آن که AmountAfterTax مشخص شده است یا خیر ، این قیمت قبل از مالیات را برای ماندن به مقدار مشخص شده تعیین می کند. فرض بر این است که در همان ارز با نرخ شبانه قرار دارد.

اگر AmountAfterTax برای منعکس کننده درصدی مالیات در نظر گرفته شود ، تعیین قیمت ثابت برای AmountBeforeTax می تواند منجر به مالیات و هزینه های نادرست شود. به طور کلی ، به شدت توصیه می شود از TaxFeeInfo برای مشخص کردن مالیات و هزینه های یک ملک استفاده کنید.

مثال ها:

  • اگر ما یک اقامت 1 شب را که در آن AmountBeforeTax 90 است ، AmountAfterTax 100 و fixed_price 80 است ، پس از آن نرخ ارتقاء 80 است.
  • اگر ما یک اقامت 1 شب را که در آن AmountBeforeTax 100 موردی است ، قیمت گذاری می کنیم ، fixed_amount 80 است ، و Taxfeeinfo مالیات 8 ٪ را مشخص می کند ، پس از آن

    نرخ تبلیغ = قیمت ثابت * (1 + درصد مالیات)

    86.40 = 80 * 1.08

  • اگر ما یک اقامت 3 شبانه را در آن قرار دهیم که مقادیر AmountAfterTax 100 ، 110 و 120 باشد. و fixed_amount 300 است ، پس

    نرخ ارتقا = 300

Promotions / HotelPromotions / Promotion / Discount / @fixed_price_per_night 0..1 float

دقیقاً یکی از percentage ، percentage_of_base ، fixed_amount ، fixed_amount_per_night ، fixed_price یا fixed_price_per_night لازم است.

اگر نرخ های شبانه AmountAfterTax مشخص شده باشد ، این قیمت برای هر شب اقامت ، از جمله مالیات و هزینه ، به ارزش مشخص شده تعیین می کند. اگر AmountBeforeTax مشخص شده باشد ، پس از آن که AmountAfterTax مشخص شده است ، این قیمت قبل از مالیات را برای هر شب اقامت به مقدار مشخص شده تعیین می کند. فرض بر این است که در همان ارز با نرخ شبانه قرار دارد.

اگر AmountAfterTax برای منعکس کننده درصدی مالیات در نظر گرفته شود ، تعیین قیمت ثابت برای AmountBeforeTax می تواند منجر به مالیات و هزینه های نادرست شود. به طور کلی ، به شدت توصیه می شود از TaxFeeInfo برای مشخص کردن مالیات و هزینه های یک ملک استفاده کنید.

اگر applied_nights مشخص شده باشد ، قیمت جدید برای ارزانترین شب N اعمال می شود.

مثال ها:

  • اگر ما یک اقامت 2 شبانه را در آن قیمت گذاری کنیم که مقادیر AmountBeforeTax 90 ، 90 باشد. مقادیر مقدار AmountAfterTax 100 ، 100 است. و fixed_price 80 است ، سپس نرخ ارتقاء 80 + 80 = 160 است.
  • اگر ما یک اقامت 2 شبانه را در آن قرار دهیم که AmountBeforeTax 100 ، 100 باشد. fixed_amount 80 است ، و Taxfeeinfo مالیات 8 ٪ را مشخص می کند ، سپس نرخ ارتقاء (80 + 80) * 1.08 = 172.8 است.
  • اگر ما یک اقامت 3 شبانه را در آن قرار دهیم که مقادیر AmountAfterTax 100 ، 110 و 120 باشد. و fixed_amount 110 است ، سپس نرخ ارتقاء 110 * 3 = 330 است.
Promotions / HotelPromotions / Promotion / Discount / @applied_nights 0..1 integer

این فقط باید با percentage یا fixed_amount_per_night استفاده شود.

تعداد شبهایی که تخفیف در آن اعمال می شود ، با کمترین هزینه شروع می شود. باید یک عدد صحیح از 1 تا 99 باشد. اگر مشخص نشده باشد ، تخفیف در تمام شبها اعمال می شود.

Promotions / HotelPromotions / Promotion / Discount / FreeNights 0..1 FreeNights هنگام برآورده شدن حداقل مدت اقامت ، تخفیف در شب های خاص اقامت را مشخص می کند. در صورت استفاده از این عنصر ، ویژگی های عنصر Discount والدین مجاز نیست.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @stay_nights 1 integer

تعداد شبهای مورد نیاز برای اعمال تخفیف. هر تخفیف در یک بخش جداگانه از شب های اقامت اعمال می شود.

به عنوان مثال ، برای یک اقامت 10 شب که در آن stay_nights 4 است (و repeats درست است) ، سپس دو بخش شب اقامت وجود دارد: شبهای 1 تا 4 و شبهای 5 تا 8. شبهای نهم و دهم بخشی از بخش اقامت شب نیست.

Promotions / HotelPromotions / Promotion / Discount / FreeNights / @discount_nights 1 integer تعداد شبهای تخفیف در هر بخش از شب اقامت.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @discount_percentage 1 float تخفیف که در شب های تخفیف اعمال می شود. اگر این مقدار 50 باشد ، هر شب انتخاب شده 50 ٪ تخفیف دارد.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @night_selection 1 string باید cheapest باشد یا last باشد. اگر last ، شبهای پایان بخش شب اقامت تخفیف می یابد. اگر cheapest ، ارزانترین شبها در بخش شب اقامت تخفیف می یابد.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @repeats 1 boolean

این که آیا تخفیف ممکن است برای چند بخش شب اقامت اعمال شود. اگر false ، پس از آن فقط بخش شب اقامت در ابتدای برنامه سفر تخفیف می یابد. اگر true ، پس هر بخش از شب اقامت تخفیف می یابد.

به عنوان مثال ، اگر stay_nights 4 باشد و برنامه سفر 10 شب باشد ، اگر repeats true باشد ، 2 بخش تخفیف می شوند (شبهای 1-4 و شب 5-8). اما ، اگر repeats false باشد ، فقط 1 بخش تخفیف می یابد (شب 1-4).

Promotions / HotelPromotions / Promotion / Discount / @rank 0..1 integer این ارتقاء را به یک رتبه اختصاص می دهد و آن را به انتخاب رتبه بندی می کند ، جایی که فقط ارتقاء با کمترین رتبه برای استفاده انتخاب می شود. مقادیر باید بین 1 تا 99 باشد ، فراگیر. اگر چندین تبلیغ با یک رتبه یکسان به اشتراک بگذارند ، یک نفر به طور خودسرانه انتخاب و اعمال می شود.
Promotions / HotelPromotions / Promotion / BestDailyDiscount 1 Discount

دقیقاً یکی از Discount یا BestDailyDiscount باید مشخص شود.

تخفیف روزانه را مشخص می کند که ممکن است برای یک شب اقامت اعمال شود. این برخلاف Discount است که تخفیف در کل اقامت را اعمال می کند.

هر ملک ممکن است یک گروه واحد از تبلیغات داشته باشد که "بهترین روزانه" در نظر گرفته می شود. این بدان معناست که برای هر شب اقامت ، تک آهنگ "بهترین روزانه" که واجد شرایط است و عمیق ترین تخفیف را برای آن شب انتخاب می کند و ممکن است اعمال شود.

Stacking ممکن است با BestDailyDiscount مشخص شود. باید روی base یا none تنظیم شود. تخفیف های "بهترین روزانه" که به اعماق تخفیف برای هر شب منجر می شود ، ضمن احترام به نوع انباشت پیکربندی شده ، به عنوان یک تخفیف اقامت واحد (یعنی Discount ) ترکیب و تحت درمان قرار می گیرند. این تخفیف ترکیبی در مقابل مقایسه می شود و می توان آن را با سایر تبلیغات واجد شرایط <frivation> برای یافتن یک یا ترکیبی که عمیق ترین تخفیف را پیدا می کند ، جمع کرد. یا ترکیبی از BestDailyDiscount یا یک Discount واحد ، هر کدام از قیمت های پایین تر باشد ، برای نوع انباشت base انتخاب و درخواست می شود.

StayDates می توان با این نوع تخفیف مشخص کرد ، اما application باید با overlap داشته باشد

.
Promotions / HotelPromotions / Promotion / BestDailyDiscount / @percentage 0..1 float

دقیقاً یکی از percentage ، fixed_amount یا fixed_price لازم است.

مقدار اعشاری از 0-100 که درصد تخفیف را مشخص می کند. این مورد به AmountAfterTax اعمال می شود (یا در صورت مشخص کردن AmountAfterTax یا AmountBeforeTax ).

مثال ها:

  • اگر AmountAfterTax برای یک شب اقامت 100 و percentage 20 باشد ، پس

    نرخ ارتقاء = AmountAfterTax * (1 - درصد تخفیف)

    80.00 = 100 * (1 - 0.2)

  • اگر AmountBeforeTax برای اقامت 100 100 باشد ، percentage 20 است و Taxfeeinfo مالیات 10 را مشخص می کند ، پس از آن

    نرخ ارتقاء = AmountBeforeTax * (1 - درصد تخفیف) + مالیات

    90.00 = 100 * (1 - 0.2) + 10

Promotions / HotelPromotions / Promotion/ BestDailyDiscount / @fixed_amount 0..1 float

دقیقاً یکی از percentage ، fixed_amount یا fixed_price لازم است.

مبلغ مشخصی که باید از نرخ شبانه یک AmountAfterTax کم شود (یا در صورت مشخص کردن AmountAfterTax ، نرخ شبانه AmountBeforeTax . فرض بر این است که در همان ارز با نرخ شبانه قرار دارد. اگر این بزرگتر از مجموع نرخ شبانه باشد ، مقدار حاصل صفر است.

مثال ها:

  • اگر AmountBeforeTax برای یک شب 90 باشد ، AmountAfterTax 100 است و fixed_amount 20 است ، پس از آن

    نرخ ارتقا = AmountAfterTax - تخفیف ثابت

    80.00 = 100 - 20

  • اگر AmountBeforeTax برای یک شب تنها 100 باشد ، fixed_amount 20 است ، و مالیات بر 8 ٪ مالیات 8 ٪ را مشخص می کند.

    نرخ ارتقا = ( AmountBeforeTax - تخفیف ثابت) * (1 + درصد مالیات)

    86.40 = (100 - 20) * 1.08

Promotions / HotelPromotions / Promotion/ BestDailyDiscount / @fixed_price 0..1 float

دقیقاً یکی از percentage ، fixed_amount یا fixed_price لازم است.

اگر نرخ های شبانه AmountAfterTax مشخص شده باشد ، این قیمت برای شب اقامت ، از جمله مالیات و هزینه ، به ارزش مشخص شده تعیین می کند. اگر AmountBeforeTax مشخص شده باشد ، پس از آن که AmountAfterTax مشخص شده است یا خیر ، این قیمت قبل از مالیات را برای ماندن به مقدار مشخص شده تعیین می کند. فرض بر این است که در همان ارز با نرخ شبانه قرار دارد.

مثال ها:

  • اگر AmountBeforeTax برای یک شب واحد 90 باشد ، AmountAfterTax 100 و fixed_price 80 است ، پس نرخ ارتقاء 80 است.
  • اگر AmountBeforeTax برای یک شب تنها 100 باشد ، fixed_amount 80 است ، و Taxfeeinfo مالیات 8 ٪ را مشخص می کند.

    نرخ تبلیغ = قیمت ثابت * (1 + درصد مالیات)

    86.40 = 80 * 1.08

Promotions / HotelPromotions / Promotion / InventoryCount 0..1 InventoryCount محدودیت های مربوط به تعداد اتاق هایی را که باید در دسترس باشد تعریف می کند تا این تبلیغات اعمال شود. تخفیف فقط در شبهایی که محدودیت را برآورده می کند اعمال می شود. با تخفیف fixed_amount مجاز نیست. توجه داشته باشید که تعداد اتاقهای موجود با OTA_HOTELINVCOUNTNOTIFRQ ( InvCount ) یا OTA_HOTELAVAILNOTIFRQ ( BookingLimit ) مشخص شده است.
Promotions / HotelPromotions / Promotion / InventoryCount / @min 0..1 integer حداقل تعداد اتاق هایی که باید برای ارتقاء در نرخ شبانه در دسترس باشد. اگر این مشخص نشده باشد ، حداقل وجود ندارد.
Promotions / HotelPromotions / Promotion / InventoryCount / @max 0..1 integer حداکثر تعداد اتاق هایی که باید برای ارتقاء در نرخ شبانه در دسترس باشد. اگر این مشخص نشده باشد ، حداکثر وجود ندارد.
Promotions / HotelPromotions / Promotion / LengthOfStay 0..1 LengthOfStay طول مدت اقامت را تعریف می کند که در آن می توان این تبلیغ را اعمال کرد. ارتقاء هنگامی اعمال نمی شود که مدت اقامت خارج از محدوده حداقل و حداکثر باشد.
Promotions / HotelPromotions / Promotion / LengthOfStay / @min 0..1 integer حداقل شبهای مجاز در اقامت برای ارتقاء. اگر این مشخص نشده باشد ، حداقل وجود ندارد.
Promotions / HotelPromotions / Promotion / LengthOfStay / @max 0..1 integer حداکثر شبهای مجاز در اقامت برای اعمال ارتقاء. اگر این مشخص نشده باشد ، حداکثر وجود ندارد.
Promotions / HotelPromotions / Promotion / MembershipRateRule 0..1 MembershipRateRule

کانتینر برای یک قانون نرخ عضویت که باعث ایجاد یک UI خاص برای تخفیف مرتبط می شود.

این عنصر نباید مشخص شود مگر اینکه <Discount> نیز مشخص شود.

Promotions / HotelPromotions / Promotion / MembershipRateRule / @id 1 string

شناسه قانون نرخ مرتبط با یک برنامه عضویت.

Promotions / HotelPromotions / Promotion / MinimumAmount 0..1 MinimumAmount حداقل مبلغ روزانه اتاق روزانه (با استفاده از تعداد بیشتری از AmountBeforeTax یا AmountAfterTax ) را که باید برای ارتقاء استفاده شود ، مشخص می کند.
Promotions / HotelPromotions / Promotion / MinimumAmount / @before_discount 1 integer مقداری که باید برای اعمال ارتقاء فراتر رود.
Promotions / HotelPromotions / Promotion / Occupancy 0..1 Occupancy محدودیت هایی را برای مشاغل مورد استفاده در این زمینه تعریف می کند. این ارتقاء هنگامی اعمال نمی شود که اشغال خارج از محدوده حداقل و حداکثر باشد.
Promotions / HotelPromotions / Promotion / Occupancy / @min 0..1 integer اشغال مشخص شده توسط کاربر باید حداقل این مقدار باشد تا تخفیف اعمال شود.
Promotions / HotelPromotions / Promotion / Occupancy / @max 0..1 integer اشغال مشخص شده توسط کاربر باید حداکثر این مقدار باشد تا تخفیف اعمال شود.
Promotions / HotelPromotions / Promotion / RatePlans 0..1 RatePlans کانتینر برای لیستی از برنامه های نرخ که تبلیغات در آن اعمال می شود. اگر <RatePlans> مشخص نشده باشد ، تبلیغ در مورد تمام برنامه های نرخ اعمال می شود.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan 1..n RatePlan یک طرح نرخ را مشخص می کند. طرح نرخ با ترکیبی از بسته، نرخ‌ها و در دسترس بودن تعریف می‌شود، همانطور که در پیام‌های Transaction (Property Data)، OTA_HotelRateAmountNotifRQ، و OTA_HotelAvailNotifRQ تعریف شده است، و توسط PackageID مشخص شده است.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan / @id 1 string شناسه منحصر به فرد برای طرح نرخ. این مقدار به مقدار PackageID در <PackageData> در پیام Transaction (Property Data) و در ویژگی RatePlanCode در <StatusApplicationControl> در هر دو پیام <OTA_HotelRateAmountNotifRQ> و <OTA_HotelAvailNotifRQ> منطبق می شود. حداکثر تعداد کاراکترهای مجاز 50 کاراکتر است.
Promotions / HotelPromotions / Promotion / RoomTypes 0..1 RoomTypes کانتینر برای لیستی از انواع اتاق که تبلیغات در آن اعمال می شود. ارتقاء برای هر <RoomType> مشخص شده اعمال می شود. اگر <RoomTypes> مشخص نشده باشد ، تبلیغ در مورد همه اتاق ها اعمال می شود.
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType 1..n RoomType نوع اتاق را مشخص می کند. یک نوع اتاق در یک عنصر <RoomData> در پیام تراکنش (داده های ویژگی) تعریف می شود و با استفاده از مقدار <RoomID> آن ارجاع داده می شود. (مقدار <RoomID> آن نیز توسط ویژگی InvTypeCode در پیام های OTA_HotelRateAmountNotifRQ ارجاع داده می شود.)
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType / @id 1 string شناسه منحصر به فرد موجودی (نوع اتاق). این مقدار در پیام Transaction (Property Data) به <RoomID> نشان داده می شود. حداکثر تعداد کاراکترهای مجاز 50 کاراکتر است.
Promotions / HotelPromotions / Promotion / Stacking 0..1 Stacking نحوه ترکیب تبلیغات را مشخص می کند. اگر مشخص نشده باشد ، "نوع" فرض می شود که base باشد.
Promotions / HotelPromotions / Promotion / Stacking / @type 1 enum

بسته به این تنظیم ، تبلیغات چندگانه را می توان با یک نرخ واحد اعمال کرد:

  • any : می تواند با هر تبلیغ دیگری (به جز none ) ترکیب شود ، اما ترتیب استفاده از تبلیغات باید تضمین شود.
  • base : بهترین ارتقاء base واجد شرایط قبل از سایر تبلیغات ، ابتدا انتخاب و اعمال می شود. این قبلاً base_only نامگذاری شده بود.
  • second : بهترین ارتقاء second واجد شرایط پس از ارتقاء base (در صورت وجود) و قبل از any تبلیغ انتخاب و اعمال می شود.
  • none : نمی توان با سایر تبلیغات ترکیب شد.

از ترکیبات مجاز ، مجموعه تبلیغاتی که بیشترین تخفیف را به دست می آورد ، به نرخ اعمال می شود.

Promotions / HotelPromotions / Promotion / StayDates 0..1 StayDates یک کانتینر برای یک یا چند محدوده تاریخ که نحوه استفاده از تبلیغات را تعیین می کند ، مانند تخفیف های فصلی.
Promotions / HotelPromotions / Promotion / StayDates / @application 1 enum

نحوه استفاده از ارتقاء را توصیف می کند.

مقادیر معتبر عبارتند از:

  • all : اگر همه تاریخ های برنامه سفر با تاریخ اقامت همپوشانی داشته باشند ، ارتقاء هر شب در برنامه سفر را اعمال می کند.
  • any : در صورت هرگونه تاریخ در برنامه سفر با تاریخ در محدوده Dates Dates ، تبلیغات را برای همه شبهای برنامه سفر اعمال می کند.
  • overlap : ارتقاء را فقط برای آن شبهای برنامه سفر که با تاریخ در محدوده Dates Dates همپوشانی دارند ، اعمال می کند.

این ویژگی همیشه باید مشخص شود.

  • اگر <Discount> percentage مشخص می کند و application به all یا any تنظیم شده است ، تخفیف به عنوان درصدی از اقامت کامل اعمال می شود.
  • اگر <Discount> percentage مشخص کند و application با overlap دارد ، تخفیف به عنوان درصد نرخ شبانه برای شبهای همپوشانی اعمال می شود.
  • <Discount> مشخص کردن fixed_amount و تنظیم application برای overlap ، ترکیبی نامعتبر است.
  • <FreeNights> از تمام مقادیر application پشتیبانی می کند. توجه داشته باشید که برای overlap ، فقط شبهای اقامت همپوشانی برای نیازهای تخفیف در نظر گرفته می شوند.
Promotions / HotelPromotions / Promotion / StayDates / DateRange 1..99 DateRange

یک محدوده تاریخی که تاریخ هایی را که قرار است تبلیغات اعمال شود را مشخص می کند.

فرمت بی سال نیز پشتیبانی می شود.

  • اگر یکی از start یا end یک تاریخ بی سال باشد ، هر دو باید به عنوان تاریخ های بی سال جمع شوند.
  • محدوده تاریخ بی سال نباید در سال جدید پیچیده شود. در عوض ، دامنه را به عنوان دو محدوده تاریخ مجاور معرفی کنید. به عنوان مثال ، {"12-29", "01-05"} می توان به عنوان {"12-29", "12-31"} و {"01-01", "01-05"} نشان داد.

اگر می خواهید محدوده StayDates را تنظیم کنید تا در روزهای خاص هفته به ارتقاء برسد ، باید تاریخ start را به عنوان تاریخ فعلی بدون end تنظیم کنید تا ارتقاء منقضی نشود.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.

اگر مقدار end ارائه نشده باشد ، باید مقدار start مشخص کنید.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. اگر end مشخص نشده باشد ، محدوده تاریخ از تاریخ start به بعد به طور نامحدودی نامحدود است.

اگر مقدار start ارائه نشده باشد ، باید مقدار end را مشخص کنید.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / UserCountries 0..1 UserCountries کانتینر برای لیست مکان های کاربر (کشورها) که واجد شرایط ارتقاء هستند. در صورت مشخص شدن ، فقط به کاربران واجد شرایط در کشورهای ذکر شده نرخ تخفیف ارائه می شود. در صورت مشخص نشده ، به کاربران واجد شرایط در هر کشور نرخ تخفیف ارائه می شود.
Promotions / HotelPromotions / Promotion / UserCountries / @type 0..1 enum نوع مشخصات UserCountries.

مقادیر معتبر include و exclude .

اگر type UserCountries به صورت include تنظیم شود ، این تبلیغ برای کاربران کشورهای ذکر شده اعمال می شود.

اگر type UserCountries exclude باشد ، این تبلیغ برای کاربران خارج از کشورهای ذکر شده اعمال می شود.

اگر type UserCountries غیرقانونی باشد ، به صورت include رفتار می شود و ارتقاء برای کاربران کشورهای ذکر شده اعمال می شود.

Promotions / HotelPromotions / Promotion / UserCountries / Country 1..300 Country کشوری را تعریف می کند که کاربران واجد شرایط ارتقاء هستند.
Promotions / HotelPromotions / Promotion / UserCountries / Country / @code 1 string کد کشور CLDR ، مانند DE یا FR توجه داشته باشید که ، برای برخی از کشورها ، کد کشور CLDR همان کد کشور ISO 2 حرفی نیست. همچنین ، کدهای منطقه CLDR پشتیبانی نمی شوند.

نمونه ها

محدودیت 500 تبلیغ در هر ملک وجود دارد. برای حذف تبلیغات از یک ویژگی ، به مثال "حذف یک تبلیغ" مراجعه کنید.

پیام اصلی

مثال زیر یک پیام Promotions اساسی را نشان می دهد:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-07-01" end="2020-07-31" days_of_week="MTWHF"/>
         <DateRange start="2020-09-01" end="2020-09-30"/>
      </BookingDates>
      <BookingWindow min="7" max="330"/>
      <CheckinDates>
         <DateRange start="2020-10-01" end="2020-10-31" days_of_week="FSU"/>
      </CheckinDates>
      <CheckoutDates>
         <DateRange start="2020-10-08" end="2020-11-07" days_of_week="FSU"/>
      </CheckoutDates>
      <Devices>
        <Device type="mobile"/>
        <Device type="tablet"/>
      </Devices>
      <Discount percentage="20" applied_nights="2"/>
      <LengthOfStay min="2" max="14"/>
      <RatePlans>
         <RatePlan id="234"/>
         <RatePlan id="567"/>
      </RatePlans>
      <RoomTypes>
         <RoomType id="123"/>
         <RoomType id="456"/>
      </RoomTypes>
      <Stacking type="base"/>
      <UserCountries>
        <Country code="US"/>
        <Country code="GB"/>
      </UserCountries>
    </Promotion>
  </HotelPromotions>
</Promotions>


وضعیت موجودی

مثال زیر نحوه ایجاد تخفیف در صورت وجود موجودی اضافی نزدیک به تاریخ ورود را نشان می دهد:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingWindow max="7"/>
      <Discount percentage="10"/>
      <InventoryCount min="3"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


یک تبلیغ را حذف کنید

مثال زیر نحوه حذف یک تبلیغ برای یک ملک را نشان می دهد:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1" action="delete"/>
  </HotelPromotions>
</Promotions>

همه تبلیغات را حذف کنید

مثال زیر نحوه حذف همه تبلیغات برای یک ملک را نشان می دهد:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1" action="overlay"/>
</Promotions>



همه تبلیغات را روکش کنید

مثال زیر نحوه پوشش <HotelPromotions> برای یک ملک با یک یا چند تبلیغ جدید را نشان می دهد. هنگامی که action="overlay" ، تمام تبلیغات ذخیره شده قبل از ذخیره تبلیغات مشخص شده در پیام فعلی حذف می شوند:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1" action="overlay">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-09-01" end="2020-09-30"/>
      </BookingDates>
      <Discount percentage="10"/>
      <RoomTypes>
         <RoomType id="123"/>
         <RoomType id="456"/>
      </RoomTypes>
      <RatePlans>
         <RatePlan id="234"/>
         <RatePlan id="567"/>
      </RatePlans>
      <Stacking type="base"/>
    </Promotion>
  </HotelPromotions>
</Promotions>

3 نوع مختلف انباشت

مثال زیر یک مورد را نشان می دهد که سه تبلیغ مختلف اعمال می شود ( base ، second ، any ). توجه داشته باشید که از آنجا که سایر تبلیغات تخفیف بهتری را ارائه می دهند ، none تبلیغی اعمال نمی شود. اگر قیمت اصلی 100 دلار باشد ، قیمت تخفیف 72.90 دلار خواهد بود.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="10"/>
      <Stacking type="base"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="10"/>
      <Stacking type="second"/>
    </Promotion>
    <Promotion id="3">
      <Discount percentage="10"/>
      <Stacking type="any"/>
    </Promotion>
    <Promotion id="4">
      <Discount percentage="25"/>
      <Stacking type="none"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


هیچ نوع انباشته

مثال زیر موردی را نشان می دهد که از تبلیغات استفاده none شود زیرا ترکیب سایر تبلیغات تخفیف کمتری را ارائه می دهد. اگر قیمت اصلی 100 دلار باشد ، قیمت تخفیف 75 دلار خواهد بود.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="10"/>
      <Stacking type="base"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="10"/>
      <Stacking type="any"/>
    </Promotion>
    <Promotion id="3">
      <Discount percentage="25"/>
      <Stacking type="none"/>
    </Promotion>
  </HotelPromotions>
</Promotions>



رزرو محدوده مدت زمان پنجره

مثال زیر موردی را نشان می دهد که از عنصر BookingWindow با مرزهای شروع و پایان آن به عنوان یک نوع مدت زمان ISO 8601 استفاده می شود. این محدودیت پنجره رزرو نیاز به رزرو در روز یا قبل از ساعت 18:00 روز قبل از ورود و بعد از ساعت 12 یا بعد از ساعت 2 روز قبل از ورود دارد.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingWindow min="P1DT6H" max="P2DT12H"/>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


تاریخ رزرو مرزهای DateTime

مثال زیر موردی را نشان می دهد که از عنصر BookingDates با ویژگی های start و end به عنوان انواع DateTime استفاده می شود. این محدودیت تاریخ رزرو نیاز به رزرو بین ساعت 06:30 در 2020-07-01 و 18:45 در 2020-07-02 دارد.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-07-01T06:30:00" end="2020-07-02T18:45:00"/>
      </BookingDates>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


محدوده تاریخ بی سال

مثال زیر موردی را نشان می دهد که عنصر CheckInDates شامل DateRanges است که بدون سالها زمینه های start و end دارند. در این مثال ، این تبلیغ در مورد تاریخ های چک بین 12/29 تا 1/2 ، صرف نظر از سال اعمال می شود. محدوده تاریخ سال که از مرز سال نو عبور می کند نامعتبر است ، بنابراین Daterange به عنوان دو محدوده تاریخ مجاور بیان می شود.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <CheckInDates>
         <DateRange start="12-29" end="12-31"/>
         <DateRange start="01-01" end="01-02"/>
      </CheckInDates>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>



تخفیف freenights

مثال زیر تخفیف دو شب 50 ٪ برای هر چهار شب برای محدوده مشخص تاریخ رزرو باقی مانده است. For a ten night itinerary, a total of four nights would be discounted 50%.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
        <DateRange start="2022-01-01" end="2022-05-31"/>
      </BookingDates>
      <Discount>
        <FreeNights stay_nights="4" discount_nights="2" discount_percentage="50" night_selection="cheapest" repeats="true"/>
      </Discount>
    </Promotion>
  </HotelPromotions>
</Promotions>

The next example discounts one night 50% for each three nights stayed for the specified ranges of stay dates. Only the overlapping nights of stay count towards qualifying for the discount. For the following itinerary with check-in on 2022-01-01 and check-out on 2022-01-07, the qualified nights of stay and discounts are applied as follows.

  • 2022-01-01 (stay)
  • 2022-01-02 (stay)
  • 03-01-2022
  • 2022-01-04 (discounted)
  • 2022-01-05 (stay)
  • 2022-01-06 (stay)
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <StayDates application="overlap">
        <DateRange start="2022-01-01" end="2022-01-02"/>
        <DateRange start="2022-01-04" end="2022-01-06"/>
      </StayDates>
      <Discount>
        <FreeNights stay_nights="3" discount_nights="1" discount_percentage="50" night_selection="last" repeats="true"/>
      </Discount>
    </Promotion>
  </HotelPromotions>
</Promotions>


Ranked Selection

The following example offers two discounts, one for 20% off and another for 15% off. During evaluation, only the 15% discount is applied because it has a lower rank.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="15" rank="25"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="20" rank="50"/>
    </Promotion>
  </HotelPromotions>
</Promotions>

BestDailyDiscount

The following example discounts a two night stay by applying BestDailyDiscount stacked with a Discount .

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
 <HotelPromotions hotel_id="HotelID" action="overlay">
   <Promotion id="general">
     <BestDailyDiscount fixed_amount="20"/>
   </Promotion>
   <Promotion id="may">
     <BestDailyDiscount fixed_amount="50"/>
     <StayDates application="overlap">
        <DateRange start="2023-05-01" end="2023-05-31"/>
     </StayDates>
   </Promotion>
   <Promotion id="fiesta">
     <Discount fixed_amount_per_night="5"/>
     <Stacking type="any"/>
   </Promotion>
 </HotelPromotions>
</Promotions>

Consider a two night stay from April 30, 2023 to May 2, 2023 For calculation, the combination of best daily discounts that yields the deepest discount is found first.

For the first night, the "general" promotion is the only eligible amount with a fixed discount of 20.

For the second night, the "may" promotion offers a deeper discount than the "general" discount. So, when "may" is selected the fixed discount amount is 50.

Then for the stay, the "fiesta" promotion discounts to 5 per night, or 10 total. It can be stacked with the combination of best daily discounts because "fiesta" has stacking type set to any . If it were set to base , then only the combination of best daily discounts or the "fiesta" discount is applied. See description of Stacking for more information.

`Overall, the price of the stay receives a 20 + 50 + 10 = 80 fixed amount discount.

پاسخ ها

نحو

The PromotionsResponse message uses the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="timestamp"
                    id="message_ID"
                    partner="partner_key">
  <!-- Either Success or Issues are populated. -->
  <Success/>
  <Issues>
    <Issue code="issue_code"
           status="issue_type">
      issue_description
    </Issue>
  </Issues>
</PromotionsResponse>

عناصر و صفات

The PromotionsResponse message has the following elements and attributes:

عنصر / @Attribute رخدادها تایپ کنید توضیحات
PromotionsResponse 1 Complex element The root element indicating the success or issues for a received Promotions request message.
PromotionsResponse / @timestamp 1 DateTime تاریخ و زمان ایجاد این پیام.
PromotionsResponse / @id 1 string The unique identifier from the associated Promotions message.
PromotionsResponse / @partner 1 string حساب شریک برای این پیام.
PromotionsResponse / Success 0..1 Success Indicates that the Promotions message was processed successfully without warnings, errors, or failures.

یا <Success> یا <Issues> در هر پیام وجود دارد.

PromotionsResponse / Issues 0..1 Issues A container for one or more issues encountered while processing the Promotions message.

یا <Success> یا <Issues> در هر پیام وجود دارد.

PromotionsResponse / Issues / Issue 1..n Issue The description of a warning, error, or failure encountered while processing the Promotions message. جزئیات مربوط به این مسائل را می‌توانید در پیام‌های خطای وضعیت فید مشاهده کنید.
PromotionsResponse / Issues / Issue / @code 1 integer شناسه مشکل
PromotionsResponse / Issues / Issue / @status 1 enum

نوع مشکل مواجه شده

مقادیر معتبر warning ، error و failure هستند.

نمونه ها

موفقیت

The following is a response to a successfully processed Promotions message.

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Success/>
</PromotionsResponse>

مسائل

The following is a response to a Promotions message not processed due to errors.

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Issues>
    <Issue code="1001" status="error">Example</Issue>
  </Issues>
</PromotionsResponse>

،

نمای کلی

This API lets you specify possible discounts. Of the promotions specified, Google applies the eligible promotion or set of promotions that leads to the lowest price. If you are looking for an API which supports arbitrary rate adjustments that can either increase or decrease the price when conditions are satisfied, then consider our Rate Modifications API . Note that if both APIs are present, rate modifications are applied before promotions.

درخواست ها

نحو

The Promotions message uses the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner= "partner_key"
            id="message_ID"
            timestamp="timestamp">
  <HotelPromotions hotel_id="HotelID" action="[overlay]">
    <Promotion id="PromotionID" action="[delete]">
      <BookingDates>
        <DateRange start="YYYY-MM-DD[THH:mm:ss]" end="YYYY-MM-DD[THH:mm:ss]"
          days_of_week="MTWHFSU_or_subset"/>
        <DateRange start="YYYY-MM-DD[THH:mm:ss]" end="YYYY-MM-DD[THH:mm:ss]"
          days_of_week="MTWHFSU_or_subset"/>
      </BookingDates>
      <BookingWindow min="integer_or_duration" max="integer_or_duration"/>
      <Ceiling amount_per_night="float"/>
      <Floor amount_per_night="float"/>
      <CheckinDates>
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </CheckinDates>
      <CheckoutDates>
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </CheckoutDates>
      <!-- Specify only one of percentage, percentage_of_base, fixed_amount,
           fixed_amount_per_night, fixed_price, or fixed_price_per_night;
           applied_nights is only used with percentage, fixed_amount_per_night,
           and fixed_price_per_night. -->
      <Discount percentage="float" percentage_of_base="float"
                fixed_amount="float" fixed_amount_per_night="float"
                fixed_price="float" fixed_price_per_night="float"
                applied_nights="integer_1_to_99" rank="integer_1_to_99">
        <!-- FreeNights may not be used in conjunction with attributes on Discount -->
        <FreeNights stay_nights="integer" discount_nights="integer"
                    discount_percentage="float" night_selection="[cheapest|last]"
                    repeats="boolean"/>
      </Discount>
      <!-- Exactly one of Discount or BestDailyDiscount must be specified.
           Specify only one of percentage, fixed_amount, or fixed_price. -->
      <BestDailyDiscount percentage="float" fixed_amount="float" fixed_price="float"/>
      <Devices>
        <Device type="[desktop|tablet|mobile]"/>
      </Devices>
      <InventoryCount min="integer" max="integer"/>
      <LengthOfStay min="integer" max="integer"/>
      <MembershipRateRule id="RateRuleID"/>
      <MinimumAmount before_discount="integer"/>
      <Occupancy min="integer" max="integer"/>
      <RatePlans>
        <RatePlan id="PackageID_1"/>
        <RatePlan id="PackageID_2"/>
      </RatePlans>
      <RoomTypes>
        <RoomType id="RoomID_1"/>
        <RoomType id="RoomID_2"/>
      </RoomTypes>
      <Stacking type="[any|base|none|second]"/>
      <StayDates application="[all|any|overlap]">
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </StayDates>
      <UserCountries type="[include|exclude]">
        <Country code="country_code"/>
      </UserCountries>
    </Promotion>
  </HotelPromotions>
</Promotions>

عناصر و صفات

The Promotions message has the following elements and attributes:

عنصر / @Attribute رخدادها تایپ کنید توضیحات
Promotions 1 Complex element The root element of a promotions message.
Promotions / @partner 1 string حساب شریک برای این پیام. این مقدار رشته، مقدار «کلید شریک» است که در صفحه تنظیمات حساب در مرکز هتل فهرست شده است.

If you have a backend that provides feeds for multiple accounts, this value needs to match the ID attribute value specified in the <RequestorID> element of your <OTA_HotelRateAmountNotifRQ> and <OTA_HotelAvailNotifRQ> messages for the same account.

Promotions / @id 1 string یک شناسه منحصر به فرد برای این پیام درخواست. این مقدار در پیام پاسخ برگردانده می شود. Allowed characters are az, AZ, 0-9, _ (underscore), and - (dash).
Promotions / @timestamp 1 DateTime تاریخ و زمان ایجاد این پیام.
Promotions / HotelPromotions 0..n HotelPromotions

Promotions for a property. Each promotion applies to a single property.

Unless <Stacking> is used, the promotion with the biggest discount is applied to the booking when multiple promotions are eligible.

Promotions / HotelPromotions / @hotel_id 1 string شناسه منحصر به فرد ملک این مقدار باید با شناسه هتل مشخص شده با استفاده از <id> در عنصر <listing> در فید لیست هتل مطابقت داشته باشد. شناسه هتل نیز در مرکز هتل درج شده است.
Promotions / HotelPromotions / @action 0..1 enum

If specified, the value must be "overlay" . When the value is "overlay" , all stored promotions are deleted prior to storing the promotions specified in the current message.

If not specified, then each promotion specified in the current message is either:

  • Added (if none of the stored promotions has the same id )
  • Updated (if a stored promotion has the same id )
  • Deleted (if a stored promotion has the same id and the value of the action attribute for the promotion specified in the current message is "delete" )
Promotions / HotelPromotions / Promotion 0..99 Promotion

A single promotion for a property. Note that if action="overlay" and a <Promotion> is not specified, all promotions for the property are deleted.

If you need to use more than 99 promotions, contact your Technical Account Manager (TAM).

Promotions / HotelPromotions / Promotion / @id 1 string A unique identifier for the promotion. The maximum number of characters allowed is 40. Allowed characters are az, AZ, 0-9, _ (underscore), - (dash), and . (دوره).
Promotions /HotelPromotions / Promotion / @action 0..1 enum

If specified, the value must be delete . If not specified and a promotion with the same id isn't stored, then this promotion is stored. Otherwise, if not specified and a promotion with the same id is stored, then the existing promotion is updated.

If delete is specified, the stored promotion with the same id is deleted. When using delete , don't include any child elements in <Promotion> . Also, delete is not allowed in conjunction with <HotelPromotions action="overlay"/> .

Promotions / HotelPromotions / Promotion / BookingDates 0..1 BookingDates A container for one or more ranges that define when booking must occur in order for the promotion to be applied.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange 1..99 DateRange A range specifying when booking must occur for the promotion to be applied.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @start 0..1 Date or DateTime

The starting date or datetime (based on the property's time zone), inclusive, of the range.

  • The date or datetime specified by start must be earlier than (or the same as) the date or datetime specified by end .
  • If start isn't specified, the range is effectively unlimited in terms of a start time.
  • If start is populated as date "YYYY-MM-DD", it is interpreted as datetime "YYYY-MM-DDT00:00:00".
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @end 0..1 Date or DateTime

The ending date or datetime (based on the property's time zone), inclusive, of the range.

  • The date or datetime specified by end must be later than (or the same as) the date or datetime specified by start .
  • If end isn't specified, the range is effectively unlimited in terms of an end time.
  • If end is provided as date "YYYY-MM-DD", it is interpreted as datetime "YYYY-MM-DDT23:59:59".
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / BookingWindow 0..1 BookingWindow Specifies the time period when booking must occur relative to the check-in date (based on the property's time zone). For example, the booking window can be set to least 7 days, but not more than 180 days, prior to check-in.
Promotions / HotelPromotions / Promotion / BookingWindow / @min 0..1 integer or duration The minimum duration prior to check-in when booking must occur for the promotion to be applied. If this isn't specified, or its value is 0 , there is no minimum.

Valid value types are:

  • Integer: The number of days before the check-in date. For example, a value of 30 indicates the promotion only applies to bookings at least 30 days before the check-in date.
  • ISO 8601 Duration (days, hours, and minutes): The number of days (and optionally hours/minutes) before the check-in date. For example, a value of P30D indicates the promotion only applies to bookings at least 30 days before the check-in date. A value of P30DT6H requires booking on or before 18:00 on the 30th day before arrival.
Promotions / HotelPromotions / Promotion / BookingWindow / @max 0..1 integer or duration The maximum number of days prior to check-in when booking must occur for the promotion to be applied. If this isn't specified, or its value is 0 , there is no maximum.

Valid value types are:

  • Integer: The number of days before the check-in date. For example, a value of 30 indicates the promotion only applies to bookings at most 30 days before the check-in date.
  • ISO 8601 Duration (days, hours, and minutes): The number of days (and optionally hours/minutes) before the check-in date. For example, a value of P30D indicates the promotion only applies to bookings at most 30 days before the check-in date. A value of P30DT6H requires booking on or after 18:00 on the 30th day before arrival.
Promotions / HotelPromotions / Promotion / Ceiling 0..1 Ceiling

Defines restrictions on the maximum value that a rate can be set to after promotions are applied.

Promotions must always specify a <Discount> or a <BestDailyDiscount> , so to create a promotion that only applies a <Ceiling> , one option is to set a <Discount> with a percentage of 0 .

If stacking is configured, then multiple promotions with <Ceiling> could apply to a single stay. Each promotion would apply its discount, immediately followed by its ceiling. The following example demonstrates how each ceiling contributes to the next promotion calculation in the stack.

مثال:

Pricing a 1-night stay where AmountBeforeTax is 100 and there is a stack of two promotions:

  1. Promotion with stacking type base , a fixed_amount of 25, and a ceiling amount_per_night of 60
  2. Promotion with stacking type second , fixed_amount of 25, and a ceiling amount_per_night of 90

Here is the order of calculation:

  1. The base promotion is applied first and discounts the AmountBeforeTax to 75, but then the ceiling lowers it to 60 .
  2. The second promotion discounts the AmountBeforeTax from 60 to 35. This is below the ceiling of 90 so the second ceiling is not applied. The final rate is 35 .

The fact that 60 is a stricter overall ceiling is irrelevant since it is valid only for its own promotion, and there can be no single ceiling that spans the entire promotion stack.

Promotions / HotelPromotions / Promotion / Ceiling / @amount_per_night 1 float

The maximum amount that a nightly rate can be set to after the discount is applied.

If a <Floor> element is also specified, this must be set to a value greater than or equal to the amount_per_night attribute in <Floor> .

amount_per_night is applied to taxes and fees when they are included in the nightly rate using AmountAfterTax , but not those specified using TaxFeeInfo.

Promotions / HotelPromotions / Promotion / Floor 0..1 Floor

Defines restrictions on the minimum value that a rate can be set to after promotions are applied.

Promotions must always specify a <Discount> or a <BestDailyDiscount> , so to create a promotion that only applies a <Floor> , one option is to set a <Discount> with a percentage of 0 .

<Floor> logic still applies to <FreeNights> discounts, even if the free night has a 100% discount applied to it.

If stacking is configured, then multiple promotions with <Floor> could apply to a single stay. Each promotion would apply its discount, immediately followed by its floor. The following example demonstrates how each floor contributes to the next promotion calculation in the stack.

مثال:

Pricing a 1-night stay where AmountBeforeTax is 100 and there is a stack of two promotions:

  1. Promotion with stacking type base , a fixed_amount of 25, and a floor amount_per_night of 90
  2. Promotion with stacking type second , fixed_amount of 25, and a floor amount_per_night of 60

Here is the order of calculation:

  1. The base promotion is applied first and discounts the AmountBeforeTax to 75, but then the floor raises it up to 90 .
  2. The second promotion discounts the AmountBeforeTax from 90 to 65. This is above the floor of 60 so the second floor is not applied. The final rate is 65 .

The fact that 90 is a stricter overall floor is irrelevant since it is valid only for its own promotion, and there can be no single floor that spans the entire promotion stack.

Promotions / HotelPromotions / Promotion / Floor / @amount_per_night 1 float

The minimum amount that a nightly rate can be set to after the discount is applied.

If a <Ceiling> element is also specified, this must be set to a value less than or equal to the amount_per_night attribute in <Ceiling> .

amount_per_night is applied to taxes and fees when they are included in the nightly rate using AmountAfterTax , but not those specified using TaxFeeInfo.

Promotions / HotelPromotions / Promotion / CheckinDates 0..1 CheckinDates A container for one or more date ranges that define when check-in must occur for the promotion to be applied.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange 1..20 DateRange

A date range specifying when check-in must occur for the promotion to be applied. This element is not required if you're deleting one or more promotions.

The YearlessDate format is also supported.

  • If one of start or end is a yearless date, both must be populated as yearless dates.
  • Yearless date ranges must not wrap around the new year. Instead, represent the range as two adjacent date ranges. For example, {"12-29", "01-05"} can be represented as {"12-29", "12-31"} and {"01-01", "01-05"} .
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. اگر end مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ پایان نامحدود است.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / CheckoutDates 0..1 CheckoutDates A container for one or more date ranges that define when check-out must occur for the promotion to be applied.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange 1..20 DateRange

A date range specifying when check-out must occur for the promotion to be applied. This element is not required if you're deleting one or more promotions.

The YearlessDate format is also supported.

  • If one of start or end is a yearless date, both must be populated as yearless dates.
  • Yearless date ranges must not wrap around the new year. Instead, represent the range as two adjacent date ranges. For example, {"12-29", "01-05"} can be represented as {"12-29", "12-31"} and {"01-01", "01-05"} .
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. اگر end مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ پایان نامحدود است.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / Devices 0..1 Devices Container for listing the user devices that are eligible for the promotion. If specified, only eligible users on the listed devices are offered the discounted rate. If not specified, eligible users on any device are offered the discounted rate.
Promotions / HotelPromotions / Promotion / Devices / Device 1..3 Device Defines one type of user device that is eligible for the promotion.
Promotions / HotelPromotions / Promotion / Devices / Device / @type 1 enum A type of device. The value must be desktop , tablet , or mobile .
Promotions / HotelPromotions / Promotion / Discount 1 Discount

Exactly one of Discount or BestDailyDiscount must be specified.

Specifies the discount to be applied for this promotion.

Promotions / HotelPromotions / Promotion / Discount / @percentage 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

A decimal value from 0-100 which specifies the percentage discount. It is applied to AmountAfterTax (or AmountBeforeTax if AmountAfterTax isn't specified).

مثال ها:

  • If AmountAfterTax is 100 and percentage is 20, then

    promotion rate = AmountAfterTax * (1 - percentage discount)

    80.00 = 100 * (1 - 0.2)

  • If AmountBeforeTax is 100, percentage is 20 and TaxFeeInfo specifies a tax of 10, then

    promotion rate = AmountBeforeTax * (1 - percentage discount) + tax

    90.00 = 100 * (1 - 0.2) + 10

Promotions / HotelPromotions / Promotion / Discount / @percentage_of_base 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

A decimal value from 0-100 which specifies the percentage of base discount. Similar to percentage , it is applied to AmountAfterTax (or AmountBeforeTax if AmountAfterTax isn't specified).

Unlike percentage , this discount is always calculated as a percentage of base rates regardless of prior promotions that have been applied in sequence.

مثال:

  • Suppose we have two promotions that are applied in sequence to a one night stay that is priced at 100. The first is a regular 10% percentage discount and the second is a 10% percentage of base discount. Then the discounted rate will be 80 since both promotions take 10 off. Note if the second promotion were also a regular percentage discount, then the discounted rate will be 81 since the second promotion discounts 10% of 90.
Promotions / HotelPromotions / Promotion / Discount / @fixed_amount 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

A fixed amount to be subtracted from the sum of the AmountAfterTax nightly rates (or sum of AmountBeforeTax nightly rates if AmountAfterTax isn't specified). It is assumed to be in the same currency as nightly rates. If this is larger than the sum of nightly rates, the resulting value is zero.

مثال ها:

  • If we're pricing a 1-night stay where AmountBeforeTax is 90, AmountAfterTax is 100, and fixed_amount is 20, then

    promotion rate = AmountAfterTax - fixed discount

    80.00 = 100 - 20

  • If we're pricing a 1-night stay where AmountBeforeTax is 100, fixed_amount is 20, and TaxFeeInfo specifies a tax of 8%, then

    promotion rate = ( AmountBeforeTax - fixed discount) * (1 + percentage tax)

    86.40 = (100 - 20) * 1.08

  • If we're pricing a 1-night stay where AmountBeforeTax is 50, fixed_amount is 60, and TaxFeeInfo specifies a tax of 10, then

    promotion rate = ( AmountBeforeTax - fixed discount) * tax

    10.00 = 0 + 10

  • If we're pricing a 3-night stay where the AmountAfterTax values are 100, 110, and 120; and fixed_amount is 150, then

    promotion rate = sum( AmountAfterTax ) - (fixed discount)

    180.00 = (100 + 110 + 120) - 150

Promotions / HotelPromotions / Promotion / Discount / @fixed_amount_per_night 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

A fixed discount applied to each of the AmountAfterTax nightly rates (or the cheapest N if applied_nights is specified). If AmountAfterTax isn't specified, it is applied to AmountBeforeTax . It is assumed to be in the same currency as nightly rates. If fixed_amount_per_night is larger than a nightly rate, that nightly rate is reduced to as zero—the discount cannot cause a nightly rate to become negative.

مثال ها:

  • If we're pricing a 3-night stay where the AmountAfterTax values are 100, 110, and 120; and the fixed_amount_per_night is 10, then

    promotion rate = sum( AmountBeforeTax - fixed amount discount)

    300.00 = ((100 - 10) + (110 - 10) + (120 - 10))

  • If we're pricing a 3-night stay where the AmountAfterTax values are 10, 50, and 100; and the fixed_amount_per_night is 20, then

    promotion rate = sum( AmountAfterTax - fixed amount discount)

    110.00 = (0 + (50 - 20) + (100 - 20))

Promotions / HotelPromotions / Promotion / Discount / @fixed_price 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

If AmountAfterTax nightly rates are specified, then this sets the price for the stay, including taxes and fees, to the specified value. If AmountBeforeTax is specified, then whether or not AmountAfterTax is specified, this sets the pre-tax price for the stay to the specified value. It is assumed to be in the same currency as nightly rates.

If AmountAfterTax is intended to reflect a percentage tax, then setting a fixed price for AmountBeforeTax can result in inaccurate taxes and fees. In general, it is strongly recommended to use TaxFeeInfo to specify a property's taxes and fees.

مثال ها:

  • If we're pricing a 1-night stay where AmountBeforeTax is 90, AmountAfterTax is 100, and fixed_price is 80, then the promotion rate is 80.
  • If we're pricing a 1-night stay where AmountBeforeTax is 100, fixed_amount is 80, and TaxFeeInfo specifies a tax of 8%, then

    promotion rate = fixed price * (1 + percentage tax)

    86.40 = 80 * 1.08

  • If we're pricing a 3-night stay where the AmountAfterTax values are 100, 110, and 120; and fixed_amount is 300, then

    promotion rate = 300

Promotions / HotelPromotions / Promotion / Discount / @fixed_price_per_night 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

If AmountAfterTax nightly rates are specified, then this sets the price for each night of stay, including taxes and fees, to the specified value. If AmountBeforeTax is specified, then whether or not AmountAfterTax is specified, this sets the pre-tax price for each night of stay to the specified value. It is assumed to be in the same currency as nightly rates.

If AmountAfterTax is intended to reflect a percentage tax, then setting a fixed price for AmountBeforeTax can result in inaccurate taxes and fees. In general, it is strongly recommended to use TaxFeeInfo to specify a property's taxes and fees.

If applied_nights is specified, then the new price is applied to the cheapest N nights.

مثال ها:

  • If we're pricing a 2-night stay where AmountBeforeTax values are 90, 90; AmountAfterTax values are 100, 100; and fixed_price is 80, then the promotion rate is 80 + 80 = 160.
  • If we're pricing a 2-night stay where AmountBeforeTax is 100, 100; fixed_amount is 80, and TaxFeeInfo specifies a tax of 8%, then the promotion rate is (80 + 80) * 1.08 = 172.8.
  • If we're pricing a 3-night stay where the AmountAfterTax values are 100, 110, and 120; and fixed_amount is 110, then the promotion rate is 110 * 3 = 330.
Promotions / HotelPromotions / Promotion / Discount / @applied_nights 0..1 integer

This should only be used with percentage or fixed_amount_per_night .

The number of nights to which the discount is applied, starting with the least expensive. Must be an integer from 1 to 99. If not specified, discount is applied to all nights.

Promotions / HotelPromotions / Promotion / Discount / FreeNights 0..1 FreeNights Specifies a discount on certain nights of a stay when a minimum stay length is met. Attributes on the parent Discount element are not allowed if this element is used.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @stay_nights 1 integer

Number of required nights for the discount to be applied. Each discount is applied to a separate segment of stay nights.

For example, for a 10-night stay where stay_nights is 4 (and repeats is true), then there are two stay night segments: the 1st through 4th nights and the 5th through 8th nights; the 9th and 10th nights are not part of a stay night segment.

Promotions / HotelPromotions / Promotion / Discount / FreeNights / @discount_nights 1 integer The number of discounted nights within each segment of stay nights.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @discount_percentage 1 float The discount that is applied to the discount nights. If this value is 50 , then each selected night is 50% off.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @night_selection 1 string Must be either cheapest or last . If last , then the nights at the end of the segment of stay nights are discounted. If cheapest , then the cheapest nights within the segment of stay nights are discounted.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @repeats 1 boolean

Whether the discount may be applied to multiple stay night segments. If false , then only the segment of stay nights at the beginning of the itinerary is discounted. If true , then any segment of stay nights is discounted.

For example, if stay_nights is 4 and the itinerary is 10 nights, then, if repeats is true , then 2 segments are discounted (nights 1-4 and nights 5-8); but, if repeats is false , then only 1 segment is discounted (nights 1-4).

Promotions / HotelPromotions / Promotion / Discount / @rank 0..1 integer Assigns this promotion a rank and opts it into ranked selection, where only the promotion with the lowest rank is selected to be applied. Values must be between 1 and 99, inclusive. If multiple promotions share the same rank, then one is arbitrarily selected and applied.
Promotions / HotelPromotions / Promotion / BestDailyDiscount 1 Discount

Exactly one of Discount or BestDailyDiscount must be specified.

Specifies a daily discount which may be applied to a night of stay. This is in contrast with Discount , which applies discounts to entire stays.

Each property may have a single group of promotions that are considered "best daily." This means that for each night of stay, the single "best daily" promotion that is eligible and yields the deepest discount for that night is selected and may be applied.

Stacking may be specified with BestDailyDiscount . It must be set to either base or none . The "best daily" discounts yielding the deepest discount for each night are combined and treated as a single stay discount (ie Discount ) while respecting the configured stacking type. This combined discount is compared against, and can be stacked with, other eligible <Discount> promotions to find the one or combination that provides the deepest discount. Either the combination of BestDailyDiscount or a single Discount , whichever yields the lower price, is selected and applied for the base stacking type.

StayDates can be specified with this type of discount, but the application must be set to overlap

.
Promotions / HotelPromotions / Promotion / BestDailyDiscount / @percentage 0..1 float

Exactly one of percentage , fixed_amount , or fixed_price is required.

A decimal value from 0-100 which specifies the percentage discount. It is applied to AmountAfterTax (or AmountBeforeTax if AmountAfterTax isn't specified).

مثال ها:

  • If AmountAfterTax for a night of stay is 100 and percentage is 20, then

    promotion rate = AmountAfterTax * (1 - percentage discount)

    80.00 = 100 * (1 - 0.2)

  • If AmountBeforeTax for an ight of stay is 100, percentage is 20 and TaxFeeInfo specifies a tax of 10, then

    promotion rate = AmountBeforeTax * (1 - percentage discount) + tax

    90.00 = 100 * (1 - 0.2) + 10

Promotions / HotelPromotions / Promotion/ BestDailyDiscount / @fixed_amount 0..1 float

Exactly one of percentage , fixed_amount , or fixed_price is required.

A fixed amount to be subtracted from a single AmountAfterTax nightly rate (or AmountBeforeTax nightly rate if AmountAfterTax isn't specified). It is assumed to be in the same currency as nightly rates. If this is larger than the sum of nightly rates, the resulting value is zero.

مثال ها:

  • If AmountBeforeTax for a single night is 90, AmountAfterTax is 100, and fixed_amount is 20, then

    promotion rate = AmountAfterTax - fixed discount

    80.00 = 100 - 20

  • If AmountBeforeTax for a single night is 100, fixed_amount is 20, and TaxFeeInfo specifies a tax of 8%, then

    promotion rate = ( AmountBeforeTax - fixed discount) * (1 + percentage tax)

    86.40 = (100 - 20) * 1.08

Promotions / HotelPromotions / Promotion/ BestDailyDiscount / @fixed_price 0..1 float

Exactly one of percentage , fixed_amount , or fixed_price is required.

If AmountAfterTax nightly rates are specified, then this sets the price for the night of stay, including taxes and fees, to the specified value. If AmountBeforeTax is specified, then whether or not AmountAfterTax is specified, this sets the pre-tax price for the stay to the specified value. It is assumed to be in the same currency as nightly rates.

مثال ها:

  • If AmountBeforeTax for a single night is 90, AmountAfterTax is 100, and fixed_price is 80, then the promotion rate is 80.
  • If AmountBeforeTax for a single night is 100, fixed_amount is 80, and TaxFeeInfo specifies a tax of 8%, then

    promotion rate = fixed price * (1 + percentage tax)

    86.40 = 80 * 1.08

Promotions / HotelPromotions / Promotion / InventoryCount 0..1 InventoryCount Defines restrictions on the number of rooms that must be available in order for this promotion to be applied. Discount is applied only to the nights which meet the constraint. Not allowed with the fixed_amount discount. Note that the number of available rooms is specified with either OTA_HotelInvCountNotifRQ ( InvCount ) or OTA_HotelAvailNotifRQ ( BookingLimit ).
Promotions / HotelPromotions / Promotion / InventoryCount / @min 0..1 integer The minimum number of rooms that must be available for the promotion to be applied to the nightly rate. If this isn't specified, there is no minimum.
Promotions / HotelPromotions / Promotion / InventoryCount / @max 0..1 integer The maximum number of rooms that must be available for the promotion to be applied to the nightly rate. If this isn't specified, there is no maximum.
Promotions / HotelPromotions / Promotion / LengthOfStay 0..1 LengthOfStay Defines length of stay limits within which this promotion can be applied. The promotion is not applied when length of stay is outside of the min and max limits.
Promotions / HotelPromotions / Promotion / LengthOfStay / @min 0..1 integer The minimum nights allowed in the stay for the promotion to be applied. If this isn't specified, there is no minimum.
Promotions / HotelPromotions / Promotion / LengthOfStay / @max 0..1 integer The maximum nights allowed in the stay for the promotion to be applied. If this isn't specified, there is no maximum.
Promotions / HotelPromotions / Promotion / MembershipRateRule 0..1 MembershipRateRule

Container for a membership rate rule that triggers a specific UI treatment for the associated discount.

This element should not be specified unless <Discount> is also specified.

Promotions / HotelPromotions / Promotion / MembershipRateRule / @id 1 string

ID of the rate rule associated with a membership program.

Promotions / HotelPromotions / Promotion / MinimumAmount 0..1 MinimumAmount Specifies the minimum sum of the daily room rates (using the larger of AmountBeforeTax or AmountAfterTax ) that must be exceeded for the promotion to be applied.
Promotions / HotelPromotions / Promotion / MinimumAmount / @before_discount 1 integer The value that must be exceeded for the promotion to be applied.
Promotions / HotelPromotions / Promotion / Occupancy 0..1 Occupancy Defines restrictions on occupancies for which this promotion is applied. The promotion is not applied when occupancy is outside of the min and max limits.
Promotions / HotelPromotions / Promotion / Occupancy / @min 0..1 integer The user-specified occupancy must be at least this value in order for the discount to be applied.
Promotions / HotelPromotions / Promotion / Occupancy / @max 0..1 integer The user-specified occupancy must be at most this value in order for the discount to be applied.
Promotions / HotelPromotions / Promotion / RatePlans 0..1 RatePlans Container for a list of rate plans to which the promotion applies. If <RatePlans> isn't specified, the promotion applies to all rate plans.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan 1..n RatePlan یک طرح نرخ را مشخص می کند. طرح نرخ با ترکیبی از بسته، نرخ‌ها و در دسترس بودن تعریف می‌شود، همانطور که در پیام‌های Transaction (Property Data)، OTA_HotelRateAmountNotifRQ، و OTA_HotelAvailNotifRQ تعریف شده است، و توسط PackageID مشخص شده است.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan / @id 1 string شناسه منحصر به فرد برای طرح نرخ. این مقدار به مقدار PackageID در <PackageData> در پیام Transaction (Property Data) و در ویژگی RatePlanCode در <StatusApplicationControl> در هر دو پیام <OTA_HotelRateAmountNotifRQ> و <OTA_HotelAvailNotifRQ> منطبق می شود. حداکثر تعداد کاراکترهای مجاز 50 کاراکتر است.
Promotions / HotelPromotions / Promotion / RoomTypes 0..1 RoomTypes Container for a list of room types to which the promotion applies. The promotion is applied to each <RoomType> specified. If <RoomTypes> isn't specified, the promotion applies to all rooms.
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType 1..n RoomType نوع اتاق را مشخص می کند. یک نوع اتاق در یک عنصر <RoomData> در پیام تراکنش (داده های ویژگی) تعریف می شود و با استفاده از مقدار <RoomID> آن ارجاع داده می شود. (مقدار <RoomID> آن نیز توسط ویژگی InvTypeCode در پیام های OTA_HotelRateAmountNotifRQ ارجاع داده می شود.)
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType / @id 1 string شناسه منحصر به فرد موجودی (نوع اتاق). این مقدار در پیام Transaction (Property Data) به <RoomID> نشان داده می شود. حداکثر تعداد کاراکترهای مجاز 50 کاراکتر است.
Promotions / HotelPromotions / Promotion / Stacking 0..1 Stacking Specifies how promotions can be combined. If not specified, the "type" is assumed to be base .
Promotions / HotelPromotions / Promotion / Stacking / @type 1 enum

Multiple promotions can be applied to a single rate depending on this setting:

  • any : Can be combined with any other promotion (except none ), but the order in which the promotions should be applied is not guaranteed.
  • base : The best eligible base promotion is selected and applied first, before other promotions. This was previously named base_only .
  • second : The best eligible second promotion is selected and applied after a base promotion (if applicable) and before any promotions.
  • none : Can not be combined with other promotions.

Of the allowed combinations, the set of promotions which yields the largest discount are applied to the rate.

Promotions / HotelPromotions / Promotion / StayDates 0..1 StayDates A container for one or more date ranges that determine how the promotion is applied, such as to accommodate seasonal discounts.
Promotions / HotelPromotions / Promotion / StayDates / @application 1 enum

Describes how the promotion should be applied.

مقادیر معتبر عبارتند از:

  • all : Applies the promotion to each night in the itinerary if all dates in the itinerary overlap with the stay dates.
  • any : Applies the promotion to all nights in the itinerary if any date in the itinerary overlaps with a date in the stay dates range.
  • overlap : Applies the promotion only to those nights in the itinerary that overlap with a date in the stay dates range.

This attribute must always be specified.

  • If <Discount> specifies percentage and application is set to all or any , the discount is applied as a percentage of the full stay.
  • If <Discount> specifies percentage and application is set to overlap , the discount is applied as a percentage of nightly rates for overlapping nights.
  • <Discount> specifying fixed_amount and application set to overlap is an invalid combination.
  • <FreeNights> supports all application values. Note that for overlap , only overlapping nights of stay are considered for the discount requirements.
Promotions / HotelPromotions / Promotion / StayDates / DateRange 1..99 DateRange

یک محدوده تاریخی که تاریخ هایی را که قرار است تبلیغات اعمال شود را مشخص می کند.

The YearlessDate format is also supported.

  • If one of start or end is a yearless date, both must be populated as yearless dates.
  • Yearless date ranges must not wrap around the new year. Instead, represent the range as two adjacent date ranges. For example, {"12-29", "01-05"} can be represented as {"12-29", "12-31"} and {"01-01", "01-05"} .

If you want to set StayDates range to allow the promotion on specific days of the week, you should set the start date as the current date with no end so that the promotion doesn't expire.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.

You should specify start value if the end value isn't provided.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. If end isn't specified, the date range is effectively unlimited from the start date onwards.

You should specify end value if the start value isn't provided.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / UserCountries 0..1 UserCountries Container for listing the user locations (countries) that are eligible for the promotion. If specified, only eligible users in the listed countries are offered the discounted rate. If not specified, eligible users in any country are offered the discounted rate.
Promotions / HotelPromotions / Promotion / UserCountries / @type 0..1 enum The type of UserCountries specification.

Valid values are include and exclude .

If the UserCountries type is set as include , the promotion applies to users from the listed countries.

If the UserCountries type is exclude , the promotion applies to users from outside the listed countries.

If the UserCountries type is unset, it is treated as include and the promotion is applied to users from the listed countries.

Promotions / HotelPromotions / Promotion / UserCountries / Country 1..300 Country Defines one country where users are eligible for the promotion.
Promotions / HotelPromotions / Promotion / UserCountries / Country / @code 1 string A CLDR country code , such as DE or FR . Note that, for some countries, the CLDR country code isn't the same as the 2-letter ISO country code. Also, CLDR region codes are not supported.

نمونه ها

محدودیت 500 تبلیغ در هر ملک وجود دارد. Refer to "Delete one promotion" example to remove promotions from a property.

پیام اصلی

The following example shows a basic Promotions message:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-07-01" end="2020-07-31" days_of_week="MTWHF"/>
         <DateRange start="2020-09-01" end="2020-09-30"/>
      </BookingDates>
      <BookingWindow min="7" max="330"/>
      <CheckinDates>
         <DateRange start="2020-10-01" end="2020-10-31" days_of_week="FSU"/>
      </CheckinDates>
      <CheckoutDates>
         <DateRange start="2020-10-08" end="2020-11-07" days_of_week="FSU"/>
      </CheckoutDates>
      <Devices>
        <Device type="mobile"/>
        <Device type="tablet"/>
      </Devices>
      <Discount percentage="20" applied_nights="2"/>
      <LengthOfStay min="2" max="14"/>
      <RatePlans>
         <RatePlan id="234"/>
         <RatePlan id="567"/>
      </RatePlans>
      <RoomTypes>
         <RoomType id="123"/>
         <RoomType id="456"/>
      </RoomTypes>
      <Stacking type="base"/>
      <UserCountries>
        <Country code="US"/>
        <Country code="GB"/>
      </UserCountries>
    </Promotion>
  </HotelPromotions>
</Promotions>


Inventory condition

The following example shows how to create a discount if there is excess inventory close to the arrival date:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingWindow max="7"/>
      <Discount percentage="10"/>
      <InventoryCount min="3"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


Delete one promotion

The following example shows how to delete one promotion for a property:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1" action="delete"/>
  </HotelPromotions>
</Promotions>

Delete all promotions

The following example shows how to delete all promotions for a property:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1" action="overlay"/>
</Promotions>



Overlay all promotions

The following example shows how to overlay <HotelPromotions> for a property with one or more new promotions. When action="overlay" , all stored promotions are deleted prior to storing the promotions specified in the current message:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1" action="overlay">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-09-01" end="2020-09-30"/>
      </BookingDates>
      <Discount percentage="10"/>
      <RoomTypes>
         <RoomType id="123"/>
         <RoomType id="456"/>
      </RoomTypes>
      <RatePlans>
         <RatePlan id="234"/>
         <RatePlan id="567"/>
      </RatePlans>
      <Stacking type="base"/>
    </Promotion>
  </HotelPromotions>
</Promotions>

3 Different Stacking Types

The following example shows a case where three different promotions would be applied ( base , second , any ). Note that the none promotion wouldn't be applied since the other promotions provide a better discount. If the original price was $100, the discounted price would be $72.90.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="10"/>
      <Stacking type="base"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="10"/>
      <Stacking type="second"/>
    </Promotion>
    <Promotion id="3">
      <Discount percentage="10"/>
      <Stacking type="any"/>
    </Promotion>
    <Promotion id="4">
      <Discount percentage="25"/>
      <Stacking type="none"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


None Stacking Type

The following example shows a case where the none promotion is used because the combination of other promotions provides a smaller discount. If the original price was $100, the discounted price would be $75.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="10"/>
      <Stacking type="base"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="10"/>
      <Stacking type="any"/>
    </Promotion>
    <Promotion id="3">
      <Discount percentage="25"/>
      <Stacking type="none"/>
    </Promotion>
  </HotelPromotions>
</Promotions>



Booking Window Duration Bounds

The following example shows a case where the BookingWindow element is used with its start and end bounds defined as an ISO 8601 Duration type. This booking window restriction requires booking on or before 18:00 the day prior to arrival, and on or after 12:00 on the 2nd day before arrival.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingWindow min="P1DT6H" max="P2DT12H"/>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


Booking Dates DateTime Bounds

The following example shows a case where the BookingDates element is used with start and end attributes as DateTime types. This booking date restriction requires booking to occur between 06:30 on 2020-07-01 and 18:45 on 2020-07-02.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-07-01T06:30:00" end="2020-07-02T18:45:00"/>
      </BookingDates>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


Yearless date ranges

The following example shows a case where the CheckInDates element contains DateRanges that have start and end fields without years. In this example, the promotion applies to check-in dates between 12/29 and 1/2, regardless of the year. Yearless date ranges that cross the new-year boundary are invalid, so the DateRange is expressed as two adjacent date ranges.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <CheckInDates>
         <DateRange start="12-29" end="12-31"/>
         <DateRange start="01-01" end="01-02"/>
      </CheckInDates>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>



FreeNights discount

The following example discounts two nights 50% for each four nights stayed for the specified range of booking dates. For a ten night itinerary, a total of four nights would be discounted 50%.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
        <DateRange start="2022-01-01" end="2022-05-31"/>
      </BookingDates>
      <Discount>
        <FreeNights stay_nights="4" discount_nights="2" discount_percentage="50" night_selection="cheapest" repeats="true"/>
      </Discount>
    </Promotion>
  </HotelPromotions>
</Promotions>

The next example discounts one night 50% for each three nights stayed for the specified ranges of stay dates. Only the overlapping nights of stay count towards qualifying for the discount. For the following itinerary with check-in on 2022-01-01 and check-out on 2022-01-07, the qualified nights of stay and discounts are applied as follows.

  • 2022-01-01 (stay)
  • 2022-01-02 (stay)
  • 03-01-2022
  • 2022-01-04 (discounted)
  • 2022-01-05 (stay)
  • 2022-01-06 (stay)
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <StayDates application="overlap">
        <DateRange start="2022-01-01" end="2022-01-02"/>
        <DateRange start="2022-01-04" end="2022-01-06"/>
      </StayDates>
      <Discount>
        <FreeNights stay_nights="3" discount_nights="1" discount_percentage="50" night_selection="last" repeats="true"/>
      </Discount>
    </Promotion>
  </HotelPromotions>
</Promotions>


Ranked Selection

The following example offers two discounts, one for 20% off and another for 15% off. During evaluation, only the 15% discount is applied because it has a lower rank.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="15" rank="25"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="20" rank="50"/>
    </Promotion>
  </HotelPromotions>
</Promotions>

BestDailyDiscount

The following example discounts a two night stay by applying BestDailyDiscount stacked with a Discount .

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
 <HotelPromotions hotel_id="HotelID" action="overlay">
   <Promotion id="general">
     <BestDailyDiscount fixed_amount="20"/>
   </Promotion>
   <Promotion id="may">
     <BestDailyDiscount fixed_amount="50"/>
     <StayDates application="overlap">
        <DateRange start="2023-05-01" end="2023-05-31"/>
     </StayDates>
   </Promotion>
   <Promotion id="fiesta">
     <Discount fixed_amount_per_night="5"/>
     <Stacking type="any"/>
   </Promotion>
 </HotelPromotions>
</Promotions>

Consider a two night stay from April 30, 2023 to May 2, 2023 For calculation, the combination of best daily discounts that yields the deepest discount is found first.

For the first night, the "general" promotion is the only eligible amount with a fixed discount of 20.

For the second night, the "may" promotion offers a deeper discount than the "general" discount. So, when "may" is selected the fixed discount amount is 50.

Then for the stay, the "fiesta" promotion discounts to 5 per night, or 10 total. It can be stacked with the combination of best daily discounts because "fiesta" has stacking type set to any . If it were set to base , then only the combination of best daily discounts or the "fiesta" discount is applied. See description of Stacking for more information.

`Overall, the price of the stay receives a 20 + 50 + 10 = 80 fixed amount discount.

پاسخ ها

نحو

The PromotionsResponse message uses the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="timestamp"
                    id="message_ID"
                    partner="partner_key">
  <!-- Either Success or Issues are populated. -->
  <Success/>
  <Issues>
    <Issue code="issue_code"
           status="issue_type">
      issue_description
    </Issue>
  </Issues>
</PromotionsResponse>

عناصر و صفات

The PromotionsResponse message has the following elements and attributes:

عنصر / @Attribute رخدادها تایپ کنید توضیحات
PromotionsResponse 1 Complex element The root element indicating the success or issues for a received Promotions request message.
PromotionsResponse / @timestamp 1 DateTime تاریخ و زمان ایجاد این پیام.
PromotionsResponse / @id 1 string The unique identifier from the associated Promotions message.
PromotionsResponse / @partner 1 string حساب شریک برای این پیام.
PromotionsResponse / Success 0..1 Success Indicates that the Promotions message was processed successfully without warnings, errors, or failures.

یا <Success> یا <Issues> در هر پیام وجود دارد.

PromotionsResponse / Issues 0..1 Issues A container for one or more issues encountered while processing the Promotions message.

یا <Success> یا <Issues> در هر پیام وجود دارد.

PromotionsResponse / Issues / Issue 1..n Issue The description of a warning, error, or failure encountered while processing the Promotions message. جزئیات مربوط به این مسائل را می‌توانید در پیام‌های خطای وضعیت فید مشاهده کنید.
PromotionsResponse / Issues / Issue / @code 1 integer شناسه مشکل
PromotionsResponse / Issues / Issue / @status 1 enum

نوع مشکل مواجه شده

مقادیر معتبر warning ، error و failure هستند.

نمونه ها

موفقیت

The following is a response to a successfully processed Promotions message.

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Success/>
</PromotionsResponse>

مسائل

The following is a response to a Promotions message not processed due to errors.

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Issues>
    <Issue code="1001" status="error">Example</Issue>
  </Issues>
</PromotionsResponse>

،

نمای کلی

This API lets you specify possible discounts. Of the promotions specified, Google applies the eligible promotion or set of promotions that leads to the lowest price. If you are looking for an API which supports arbitrary rate adjustments that can either increase or decrease the price when conditions are satisfied, then consider our Rate Modifications API . Note that if both APIs are present, rate modifications are applied before promotions.

درخواست ها

نحو

The Promotions message uses the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner= "partner_key"
            id="message_ID"
            timestamp="timestamp">
  <HotelPromotions hotel_id="HotelID" action="[overlay]">
    <Promotion id="PromotionID" action="[delete]">
      <BookingDates>
        <DateRange start="YYYY-MM-DD[THH:mm:ss]" end="YYYY-MM-DD[THH:mm:ss]"
          days_of_week="MTWHFSU_or_subset"/>
        <DateRange start="YYYY-MM-DD[THH:mm:ss]" end="YYYY-MM-DD[THH:mm:ss]"
          days_of_week="MTWHFSU_or_subset"/>
      </BookingDates>
      <BookingWindow min="integer_or_duration" max="integer_or_duration"/>
      <Ceiling amount_per_night="float"/>
      <Floor amount_per_night="float"/>
      <CheckinDates>
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </CheckinDates>
      <CheckoutDates>
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </CheckoutDates>
      <!-- Specify only one of percentage, percentage_of_base, fixed_amount,
           fixed_amount_per_night, fixed_price, or fixed_price_per_night;
           applied_nights is only used with percentage, fixed_amount_per_night,
           and fixed_price_per_night. -->
      <Discount percentage="float" percentage_of_base="float"
                fixed_amount="float" fixed_amount_per_night="float"
                fixed_price="float" fixed_price_per_night="float"
                applied_nights="integer_1_to_99" rank="integer_1_to_99">
        <!-- FreeNights may not be used in conjunction with attributes on Discount -->
        <FreeNights stay_nights="integer" discount_nights="integer"
                    discount_percentage="float" night_selection="[cheapest|last]"
                    repeats="boolean"/>
      </Discount>
      <!-- Exactly one of Discount or BestDailyDiscount must be specified.
           Specify only one of percentage, fixed_amount, or fixed_price. -->
      <BestDailyDiscount percentage="float" fixed_amount="float" fixed_price="float"/>
      <Devices>
        <Device type="[desktop|tablet|mobile]"/>
      </Devices>
      <InventoryCount min="integer" max="integer"/>
      <LengthOfStay min="integer" max="integer"/>
      <MembershipRateRule id="RateRuleID"/>
      <MinimumAmount before_discount="integer"/>
      <Occupancy min="integer" max="integer"/>
      <RatePlans>
        <RatePlan id="PackageID_1"/>
        <RatePlan id="PackageID_2"/>
      </RatePlans>
      <RoomTypes>
        <RoomType id="RoomID_1"/>
        <RoomType id="RoomID_2"/>
      </RoomTypes>
      <Stacking type="[any|base|none|second]"/>
      <StayDates application="[all|any|overlap]">
        <DateRange start="[YYYY-]MM-DD" end="[YYYY-]MM-DD" days_of_week="MTWHFSU_or_subset"/>
      </StayDates>
      <UserCountries type="[include|exclude]">
        <Country code="country_code"/>
      </UserCountries>
    </Promotion>
  </HotelPromotions>
</Promotions>

عناصر و صفات

The Promotions message has the following elements and attributes:

عنصر / @Attribute رخدادها تایپ کنید توضیحات
Promotions 1 Complex element The root element of a promotions message.
Promotions / @partner 1 string حساب شریک برای این پیام. این مقدار رشته، مقدار «کلید شریک» است که در صفحه تنظیمات حساب در مرکز هتل فهرست شده است.

If you have a backend that provides feeds for multiple accounts, this value needs to match the ID attribute value specified in the <RequestorID> element of your <OTA_HotelRateAmountNotifRQ> and <OTA_HotelAvailNotifRQ> messages for the same account.

Promotions / @id 1 string یک شناسه منحصر به فرد برای این پیام درخواست. این مقدار در پیام پاسخ برگردانده می شود. Allowed characters are az, AZ, 0-9, _ (underscore), and - (dash).
Promotions / @timestamp 1 DateTime تاریخ و زمان ایجاد این پیام.
Promotions / HotelPromotions 0..n HotelPromotions

Promotions for a property. Each promotion applies to a single property.

Unless <Stacking> is used, the promotion with the biggest discount is applied to the booking when multiple promotions are eligible.

Promotions / HotelPromotions / @hotel_id 1 string شناسه منحصر به فرد ملک این مقدار باید با شناسه هتل مشخص شده با استفاده از <id> در عنصر <listing> در فید لیست هتل مطابقت داشته باشد. شناسه هتل نیز در مرکز هتل درج شده است.
Promotions / HotelPromotions / @action 0..1 enum

If specified, the value must be "overlay" . When the value is "overlay" , all stored promotions are deleted prior to storing the promotions specified in the current message.

If not specified, then each promotion specified in the current message is either:

  • Added (if none of the stored promotions has the same id )
  • Updated (if a stored promotion has the same id )
  • Deleted (if a stored promotion has the same id and the value of the action attribute for the promotion specified in the current message is "delete" )
Promotions / HotelPromotions / Promotion 0..99 Promotion

A single promotion for a property. Note that if action="overlay" and a <Promotion> is not specified, all promotions for the property are deleted.

If you need to use more than 99 promotions, contact your Technical Account Manager (TAM).

Promotions / HotelPromotions / Promotion / @id 1 string A unique identifier for the promotion. The maximum number of characters allowed is 40. Allowed characters are az, AZ, 0-9, _ (underscore), - (dash), and . (دوره).
Promotions /HotelPromotions / Promotion / @action 0..1 enum

If specified, the value must be delete . If not specified and a promotion with the same id isn't stored, then this promotion is stored. Otherwise, if not specified and a promotion with the same id is stored, then the existing promotion is updated.

If delete is specified, the stored promotion with the same id is deleted. When using delete , don't include any child elements in <Promotion> . Also, delete is not allowed in conjunction with <HotelPromotions action="overlay"/> .

Promotions / HotelPromotions / Promotion / BookingDates 0..1 BookingDates A container for one or more ranges that define when booking must occur in order for the promotion to be applied.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange 1..99 DateRange A range specifying when booking must occur for the promotion to be applied.
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @start 0..1 Date or DateTime

The starting date or datetime (based on the property's time zone), inclusive, of the range.

  • The date or datetime specified by start must be earlier than (or the same as) the date or datetime specified by end .
  • If start isn't specified, the range is effectively unlimited in terms of a start time.
  • If start is populated as date "YYYY-MM-DD", it is interpreted as datetime "YYYY-MM-DDT00:00:00".
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @end 0..1 Date or DateTime

The ending date or datetime (based on the property's time zone), inclusive, of the range.

  • The date or datetime specified by end must be later than (or the same as) the date or datetime specified by start .
  • If end isn't specified, the range is effectively unlimited in terms of an end time.
  • If end is provided as date "YYYY-MM-DD", it is interpreted as datetime "YYYY-MM-DDT23:59:59".
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / BookingWindow 0..1 BookingWindow Specifies the time period when booking must occur relative to the check-in date (based on the property's time zone). For example, the booking window can be set to least 7 days, but not more than 180 days, prior to check-in.
Promotions / HotelPromotions / Promotion / BookingWindow / @min 0..1 integer or duration The minimum duration prior to check-in when booking must occur for the promotion to be applied. If this isn't specified, or its value is 0 , there is no minimum.

Valid value types are:

  • Integer: The number of days before the check-in date. For example, a value of 30 indicates the promotion only applies to bookings at least 30 days before the check-in date.
  • ISO 8601 Duration (days, hours, and minutes): The number of days (and optionally hours/minutes) before the check-in date. For example, a value of P30D indicates the promotion only applies to bookings at least 30 days before the check-in date. A value of P30DT6H requires booking on or before 18:00 on the 30th day before arrival.
Promotions / HotelPromotions / Promotion / BookingWindow / @max 0..1 integer or duration The maximum number of days prior to check-in when booking must occur for the promotion to be applied. If this isn't specified, or its value is 0 , there is no maximum.

Valid value types are:

  • Integer: The number of days before the check-in date. For example, a value of 30 indicates the promotion only applies to bookings at most 30 days before the check-in date.
  • ISO 8601 Duration (days, hours, and minutes): The number of days (and optionally hours/minutes) before the check-in date. For example, a value of P30D indicates the promotion only applies to bookings at most 30 days before the check-in date. A value of P30DT6H requires booking on or after 18:00 on the 30th day before arrival.
Promotions / HotelPromotions / Promotion / Ceiling 0..1 Ceiling

Defines restrictions on the maximum value that a rate can be set to after promotions are applied.

Promotions must always specify a <Discount> or a <BestDailyDiscount> , so to create a promotion that only applies a <Ceiling> , one option is to set a <Discount> with a percentage of 0 .

If stacking is configured, then multiple promotions with <Ceiling> could apply to a single stay. Each promotion would apply its discount, immediately followed by its ceiling. The following example demonstrates how each ceiling contributes to the next promotion calculation in the stack.

مثال:

Pricing a 1-night stay where AmountBeforeTax is 100 and there is a stack of two promotions:

  1. Promotion with stacking type base , a fixed_amount of 25, and a ceiling amount_per_night of 60
  2. Promotion with stacking type second , fixed_amount of 25, and a ceiling amount_per_night of 90

Here is the order of calculation:

  1. The base promotion is applied first and discounts the AmountBeforeTax to 75, but then the ceiling lowers it to 60 .
  2. The second promotion discounts the AmountBeforeTax from 60 to 35. This is below the ceiling of 90 so the second ceiling is not applied. The final rate is 35 .

The fact that 60 is a stricter overall ceiling is irrelevant since it is valid only for its own promotion, and there can be no single ceiling that spans the entire promotion stack.

Promotions / HotelPromotions / Promotion / Ceiling / @amount_per_night 1 float

The maximum amount that a nightly rate can be set to after the discount is applied.

If a <Floor> element is also specified, this must be set to a value greater than or equal to the amount_per_night attribute in <Floor> .

amount_per_night is applied to taxes and fees when they are included in the nightly rate using AmountAfterTax , but not those specified using TaxFeeInfo.

Promotions / HotelPromotions / Promotion / Floor 0..1 Floor

Defines restrictions on the minimum value that a rate can be set to after promotions are applied.

Promotions must always specify a <Discount> or a <BestDailyDiscount> , so to create a promotion that only applies a <Floor> , one option is to set a <Discount> with a percentage of 0 .

<Floor> logic still applies to <FreeNights> discounts, even if the free night has a 100% discount applied to it.

If stacking is configured, then multiple promotions with <Floor> could apply to a single stay. Each promotion would apply its discount, immediately followed by its floor. The following example demonstrates how each floor contributes to the next promotion calculation in the stack.

مثال:

Pricing a 1-night stay where AmountBeforeTax is 100 and there is a stack of two promotions:

  1. Promotion with stacking type base , a fixed_amount of 25, and a floor amount_per_night of 90
  2. Promotion with stacking type second , fixed_amount of 25, and a floor amount_per_night of 60

Here is the order of calculation:

  1. The base promotion is applied first and discounts the AmountBeforeTax to 75, but then the floor raises it up to 90 .
  2. The second promotion discounts the AmountBeforeTax from 90 to 65. This is above the floor of 60 so the second floor is not applied. The final rate is 65 .

The fact that 90 is a stricter overall floor is irrelevant since it is valid only for its own promotion, and there can be no single floor that spans the entire promotion stack.

Promotions / HotelPromotions / Promotion / Floor / @amount_per_night 1 float

The minimum amount that a nightly rate can be set to after the discount is applied.

If a <Ceiling> element is also specified, this must be set to a value less than or equal to the amount_per_night attribute in <Ceiling> .

amount_per_night is applied to taxes and fees when they are included in the nightly rate using AmountAfterTax , but not those specified using TaxFeeInfo.

Promotions / HotelPromotions / Promotion / CheckinDates 0..1 CheckinDates A container for one or more date ranges that define when check-in must occur for the promotion to be applied.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange 1..20 DateRange

A date range specifying when check-in must occur for the promotion to be applied. This element is not required if you're deleting one or more promotions.

The YearlessDate format is also supported.

  • If one of start or end is a yearless date, both must be populated as yearless dates.
  • Yearless date ranges must not wrap around the new year. Instead, represent the range as two adjacent date ranges. For example, {"12-29", "01-05"} can be represented as {"12-29", "12-31"} and {"01-01", "01-05"} .
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. اگر end مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ پایان نامحدود است.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / CheckoutDates 0..1 CheckoutDates A container for one or more date ranges that define when check-out must occur for the promotion to be applied.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange 1..20 DateRange

A date range specifying when check-out must occur for the promotion to be applied. This element is not required if you're deleting one or more promotions.

The YearlessDate format is also supported.

  • If one of start or end is a yearless date, both must be populated as yearless dates.
  • Yearless date ranges must not wrap around the new year. Instead, represent the range as two adjacent date ranges. For example, {"12-29", "01-05"} can be represented as {"12-29", "12-31"} and {"01-01", "01-05"} .
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. اگر end مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ پایان نامحدود است.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / Devices 0..1 Devices Container for listing the user devices that are eligible for the promotion. If specified, only eligible users on the listed devices are offered the discounted rate. If not specified, eligible users on any device are offered the discounted rate.
Promotions / HotelPromotions / Promotion / Devices / Device 1..3 Device Defines one type of user device that is eligible for the promotion.
Promotions / HotelPromotions / Promotion / Devices / Device / @type 1 enum A type of device. The value must be desktop , tablet , or mobile .
Promotions / HotelPromotions / Promotion / Discount 1 Discount

Exactly one of Discount or BestDailyDiscount must be specified.

Specifies the discount to be applied for this promotion.

Promotions / HotelPromotions / Promotion / Discount / @percentage 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

A decimal value from 0-100 which specifies the percentage discount. It is applied to AmountAfterTax (or AmountBeforeTax if AmountAfterTax isn't specified).

مثال ها:

  • If AmountAfterTax is 100 and percentage is 20, then

    promotion rate = AmountAfterTax * (1 - percentage discount)

    80.00 = 100 * (1 - 0.2)

  • If AmountBeforeTax is 100, percentage is 20 and TaxFeeInfo specifies a tax of 10, then

    promotion rate = AmountBeforeTax * (1 - percentage discount) + tax

    90.00 = 100 * (1 - 0.2) + 10

Promotions / HotelPromotions / Promotion / Discount / @percentage_of_base 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

A decimal value from 0-100 which specifies the percentage of base discount. Similar to percentage , it is applied to AmountAfterTax (or AmountBeforeTax if AmountAfterTax isn't specified).

Unlike percentage , this discount is always calculated as a percentage of base rates regardless of prior promotions that have been applied in sequence.

مثال:

  • Suppose we have two promotions that are applied in sequence to a one night stay that is priced at 100. The first is a regular 10% percentage discount and the second is a 10% percentage of base discount. Then the discounted rate will be 80 since both promotions take 10 off. Note if the second promotion were also a regular percentage discount, then the discounted rate will be 81 since the second promotion discounts 10% of 90.
Promotions / HotelPromotions / Promotion / Discount / @fixed_amount 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

A fixed amount to be subtracted from the sum of the AmountAfterTax nightly rates (or sum of AmountBeforeTax nightly rates if AmountAfterTax isn't specified). It is assumed to be in the same currency as nightly rates. If this is larger than the sum of nightly rates, the resulting value is zero.

مثال ها:

  • If we're pricing a 1-night stay where AmountBeforeTax is 90, AmountAfterTax is 100, and fixed_amount is 20, then

    promotion rate = AmountAfterTax - fixed discount

    80.00 = 100 - 20

  • If we're pricing a 1-night stay where AmountBeforeTax is 100, fixed_amount is 20, and TaxFeeInfo specifies a tax of 8%, then

    promotion rate = ( AmountBeforeTax - fixed discount) * (1 + percentage tax)

    86.40 = (100 - 20) * 1.08

  • If we're pricing a 1-night stay where AmountBeforeTax is 50, fixed_amount is 60, and TaxFeeInfo specifies a tax of 10, then

    promotion rate = ( AmountBeforeTax - fixed discount) * tax

    10.00 = 0 + 10

  • If we're pricing a 3-night stay where the AmountAfterTax values are 100, 110, and 120; and fixed_amount is 150, then

    promotion rate = sum( AmountAfterTax ) - (fixed discount)

    180.00 = (100 + 110 + 120) - 150

Promotions / HotelPromotions / Promotion / Discount / @fixed_amount_per_night 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

A fixed discount applied to each of the AmountAfterTax nightly rates (or the cheapest N if applied_nights is specified). If AmountAfterTax isn't specified, it is applied to AmountBeforeTax . It is assumed to be in the same currency as nightly rates. If fixed_amount_per_night is larger than a nightly rate, that nightly rate is reduced to as zero—the discount cannot cause a nightly rate to become negative.

مثال ها:

  • If we're pricing a 3-night stay where the AmountAfterTax values are 100, 110, and 120; and the fixed_amount_per_night is 10, then

    promotion rate = sum( AmountBeforeTax - fixed amount discount)

    300.00 = ((100 - 10) + (110 - 10) + (120 - 10))

  • If we're pricing a 3-night stay where the AmountAfterTax values are 10, 50, and 100; and the fixed_amount_per_night is 20, then

    promotion rate = sum( AmountAfterTax - fixed amount discount)

    110.00 = (0 + (50 - 20) + (100 - 20))

Promotions / HotelPromotions / Promotion / Discount / @fixed_price 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

If AmountAfterTax nightly rates are specified, then this sets the price for the stay, including taxes and fees, to the specified value. If AmountBeforeTax is specified, then whether or not AmountAfterTax is specified, this sets the pre-tax price for the stay to the specified value. It is assumed to be in the same currency as nightly rates.

If AmountAfterTax is intended to reflect a percentage tax, then setting a fixed price for AmountBeforeTax can result in inaccurate taxes and fees. In general, it is strongly recommended to use TaxFeeInfo to specify a property's taxes and fees.

مثال ها:

  • If we're pricing a 1-night stay where AmountBeforeTax is 90, AmountAfterTax is 100, and fixed_price is 80, then the promotion rate is 80.
  • If we're pricing a 1-night stay where AmountBeforeTax is 100, fixed_amount is 80, and TaxFeeInfo specifies a tax of 8%, then

    promotion rate = fixed price * (1 + percentage tax)

    86.40 = 80 * 1.08

  • If we're pricing a 3-night stay where the AmountAfterTax values are 100, 110, and 120; and fixed_amount is 300, then

    promotion rate = 300

Promotions / HotelPromotions / Promotion / Discount / @fixed_price_per_night 0..1 float

Exactly one of percentage , percentage_of_base , fixed_amount , fixed_amount_per_night , fixed_price , or fixed_price_per_night is required.

If AmountAfterTax nightly rates are specified, then this sets the price for each night of stay, including taxes and fees, to the specified value. If AmountBeforeTax is specified, then whether or not AmountAfterTax is specified, this sets the pre-tax price for each night of stay to the specified value. It is assumed to be in the same currency as nightly rates.

If AmountAfterTax is intended to reflect a percentage tax, then setting a fixed price for AmountBeforeTax can result in inaccurate taxes and fees. In general, it is strongly recommended to use TaxFeeInfo to specify a property's taxes and fees.

If applied_nights is specified, then the new price is applied to the cheapest N nights.

مثال ها:

  • If we're pricing a 2-night stay where AmountBeforeTax values are 90, 90; AmountAfterTax values are 100, 100; and fixed_price is 80, then the promotion rate is 80 + 80 = 160.
  • If we're pricing a 2-night stay where AmountBeforeTax is 100, 100; fixed_amount is 80, and TaxFeeInfo specifies a tax of 8%, then the promotion rate is (80 + 80) * 1.08 = 172.8.
  • If we're pricing a 3-night stay where the AmountAfterTax values are 100, 110, and 120; and fixed_amount is 110, then the promotion rate is 110 * 3 = 330.
Promotions / HotelPromotions / Promotion / Discount / @applied_nights 0..1 integer

This should only be used with percentage or fixed_amount_per_night .

The number of nights to which the discount is applied, starting with the least expensive. Must be an integer from 1 to 99. If not specified, discount is applied to all nights.

Promotions / HotelPromotions / Promotion / Discount / FreeNights 0..1 FreeNights Specifies a discount on certain nights of a stay when a minimum stay length is met. Attributes on the parent Discount element are not allowed if this element is used.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @stay_nights 1 integer

Number of required nights for the discount to be applied. Each discount is applied to a separate segment of stay nights.

For example, for a 10-night stay where stay_nights is 4 (and repeats is true), then there are two stay night segments: the 1st through 4th nights and the 5th through 8th nights; the 9th and 10th nights are not part of a stay night segment.

Promotions / HotelPromotions / Promotion / Discount / FreeNights / @discount_nights 1 integer The number of discounted nights within each segment of stay nights.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @discount_percentage 1 float The discount that is applied to the discount nights. If this value is 50 , then each selected night is 50% off.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @night_selection 1 string Must be either cheapest or last . If last , then the nights at the end of the segment of stay nights are discounted. If cheapest , then the cheapest nights within the segment of stay nights are discounted.
Promotions / HotelPromotions / Promotion / Discount / FreeNights / @repeats 1 boolean

Whether the discount may be applied to multiple stay night segments. If false , then only the segment of stay nights at the beginning of the itinerary is discounted. If true , then any segment of stay nights is discounted.

For example, if stay_nights is 4 and the itinerary is 10 nights, then, if repeats is true , then 2 segments are discounted (nights 1-4 and nights 5-8); but, if repeats is false , then only 1 segment is discounted (nights 1-4).

Promotions / HotelPromotions / Promotion / Discount / @rank 0..1 integer Assigns this promotion a rank and opts it into ranked selection, where only the promotion with the lowest rank is selected to be applied. Values must be between 1 and 99, inclusive. If multiple promotions share the same rank, then one is arbitrarily selected and applied.
Promotions / HotelPromotions / Promotion / BestDailyDiscount 1 Discount

Exactly one of Discount or BestDailyDiscount must be specified.

Specifies a daily discount which may be applied to a night of stay. This is in contrast with Discount , which applies discounts to entire stays.

Each property may have a single group of promotions that are considered "best daily." This means that for each night of stay, the single "best daily" promotion that is eligible and yields the deepest discount for that night is selected and may be applied.

Stacking may be specified with BestDailyDiscount . It must be set to either base or none . The "best daily" discounts yielding the deepest discount for each night are combined and treated as a single stay discount (ie Discount ) while respecting the configured stacking type. This combined discount is compared against, and can be stacked with, other eligible <Discount> promotions to find the one or combination that provides the deepest discount. Either the combination of BestDailyDiscount or a single Discount , whichever yields the lower price, is selected and applied for the base stacking type.

StayDates can be specified with this type of discount, but the application must be set to overlap

.
Promotions / HotelPromotions / Promotion / BestDailyDiscount / @percentage 0..1 float

Exactly one of percentage , fixed_amount , or fixed_price is required.

A decimal value from 0-100 which specifies the percentage discount. It is applied to AmountAfterTax (or AmountBeforeTax if AmountAfterTax isn't specified).

مثال ها:

  • If AmountAfterTax for a night of stay is 100 and percentage is 20, then

    promotion rate = AmountAfterTax * (1 - percentage discount)

    80.00 = 100 * (1 - 0.2)

  • If AmountBeforeTax for an ight of stay is 100, percentage is 20 and TaxFeeInfo specifies a tax of 10, then

    promotion rate = AmountBeforeTax * (1 - percentage discount) + tax

    90.00 = 100 * (1 - 0.2) + 10

Promotions / HotelPromotions / Promotion/ BestDailyDiscount / @fixed_amount 0..1 float

Exactly one of percentage , fixed_amount , or fixed_price is required.

A fixed amount to be subtracted from a single AmountAfterTax nightly rate (or AmountBeforeTax nightly rate if AmountAfterTax isn't specified). It is assumed to be in the same currency as nightly rates. If this is larger than the sum of nightly rates, the resulting value is zero.

مثال ها:

  • If AmountBeforeTax for a single night is 90, AmountAfterTax is 100, and fixed_amount is 20, then

    promotion rate = AmountAfterTax - fixed discount

    80.00 = 100 - 20

  • If AmountBeforeTax for a single night is 100, fixed_amount is 20, and TaxFeeInfo specifies a tax of 8%, then

    promotion rate = ( AmountBeforeTax - fixed discount) * (1 + percentage tax)

    86.40 = (100 - 20) * 1.08

Promotions / HotelPromotions / Promotion/ BestDailyDiscount / @fixed_price 0..1 float

Exactly one of percentage , fixed_amount , or fixed_price is required.

If AmountAfterTax nightly rates are specified, then this sets the price for the night of stay, including taxes and fees, to the specified value. If AmountBeforeTax is specified, then whether or not AmountAfterTax is specified, this sets the pre-tax price for the stay to the specified value. It is assumed to be in the same currency as nightly rates.

مثال ها:

  • If AmountBeforeTax for a single night is 90, AmountAfterTax is 100, and fixed_price is 80, then the promotion rate is 80.
  • If AmountBeforeTax for a single night is 100, fixed_amount is 80, and TaxFeeInfo specifies a tax of 8%, then

    promotion rate = fixed price * (1 + percentage tax)

    86.40 = 80 * 1.08

Promotions / HotelPromotions / Promotion / InventoryCount 0..1 InventoryCount Defines restrictions on the number of rooms that must be available in order for this promotion to be applied. Discount is applied only to the nights which meet the constraint. Not allowed with the fixed_amount discount. Note that the number of available rooms is specified with either OTA_HotelInvCountNotifRQ ( InvCount ) or OTA_HotelAvailNotifRQ ( BookingLimit ).
Promotions / HotelPromotions / Promotion / InventoryCount / @min 0..1 integer The minimum number of rooms that must be available for the promotion to be applied to the nightly rate. If this isn't specified, there is no minimum.
Promotions / HotelPromotions / Promotion / InventoryCount / @max 0..1 integer The maximum number of rooms that must be available for the promotion to be applied to the nightly rate. If this isn't specified, there is no maximum.
Promotions / HotelPromotions / Promotion / LengthOfStay 0..1 LengthOfStay Defines length of stay limits within which this promotion can be applied. The promotion is not applied when length of stay is outside of the min and max limits.
Promotions / HotelPromotions / Promotion / LengthOfStay / @min 0..1 integer The minimum nights allowed in the stay for the promotion to be applied. If this isn't specified, there is no minimum.
Promotions / HotelPromotions / Promotion / LengthOfStay / @max 0..1 integer The maximum nights allowed in the stay for the promotion to be applied. If this isn't specified, there is no maximum.
Promotions / HotelPromotions / Promotion / MembershipRateRule 0..1 MembershipRateRule

Container for a membership rate rule that triggers a specific UI treatment for the associated discount.

This element should not be specified unless <Discount> is also specified.

Promotions / HotelPromotions / Promotion / MembershipRateRule / @id 1 string

ID of the rate rule associated with a membership program.

Promotions / HotelPromotions / Promotion / MinimumAmount 0..1 MinimumAmount Specifies the minimum sum of the daily room rates (using the larger of AmountBeforeTax or AmountAfterTax ) that must be exceeded for the promotion to be applied.
Promotions / HotelPromotions / Promotion / MinimumAmount / @before_discount 1 integer The value that must be exceeded for the promotion to be applied.
Promotions / HotelPromotions / Promotion / Occupancy 0..1 Occupancy Defines restrictions on occupancies for which this promotion is applied. The promotion is not applied when occupancy is outside of the min and max limits.
Promotions / HotelPromotions / Promotion / Occupancy / @min 0..1 integer The user-specified occupancy must be at least this value in order for the discount to be applied.
Promotions / HotelPromotions / Promotion / Occupancy / @max 0..1 integer The user-specified occupancy must be at most this value in order for the discount to be applied.
Promotions / HotelPromotions / Promotion / RatePlans 0..1 RatePlans Container for a list of rate plans to which the promotion applies. If <RatePlans> isn't specified, the promotion applies to all rate plans.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan 1..n RatePlan یک طرح نرخ را مشخص می کند. طرح نرخ با ترکیبی از بسته، نرخ‌ها و در دسترس بودن تعریف می‌شود، همانطور که در پیام‌های Transaction (Property Data)، OTA_HotelRateAmountNotifRQ، و OTA_HotelAvailNotifRQ تعریف شده است، و توسط PackageID مشخص شده است.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan / @id 1 string شناسه منحصر به فرد برای طرح نرخ. این مقدار به مقدار PackageID در <PackageData> در پیام Transaction (Property Data) و در ویژگی RatePlanCode در <StatusApplicationControl> در هر دو پیام <OTA_HotelRateAmountNotifRQ> و <OTA_HotelAvailNotifRQ> منطبق می شود. حداکثر تعداد کاراکترهای مجاز 50 کاراکتر است.
Promotions / HotelPromotions / Promotion / RoomTypes 0..1 RoomTypes Container for a list of room types to which the promotion applies. The promotion is applied to each <RoomType> specified. If <RoomTypes> isn't specified, the promotion applies to all rooms.
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType 1..n RoomType نوع اتاق را مشخص می کند. یک نوع اتاق در یک عنصر <RoomData> در پیام تراکنش (داده های ویژگی) تعریف می شود و با استفاده از مقدار <RoomID> آن ارجاع داده می شود. (مقدار <RoomID> آن نیز توسط ویژگی InvTypeCode در پیام های OTA_HotelRateAmountNotifRQ ارجاع داده می شود.)
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType / @id 1 string شناسه منحصر به فرد موجودی (نوع اتاق). این مقدار در پیام Transaction (Property Data) به <RoomID> نشان داده می شود. حداکثر تعداد کاراکترهای مجاز 50 کاراکتر است.
Promotions / HotelPromotions / Promotion / Stacking 0..1 Stacking Specifies how promotions can be combined. If not specified, the "type" is assumed to be base .
Promotions / HotelPromotions / Promotion / Stacking / @type 1 enum

Multiple promotions can be applied to a single rate depending on this setting:

  • any : Can be combined with any other promotion (except none ), but the order in which the promotions should be applied is not guaranteed.
  • base : The best eligible base promotion is selected and applied first, before other promotions. This was previously named base_only .
  • second : The best eligible second promotion is selected and applied after a base promotion (if applicable) and before any promotions.
  • none : Can not be combined with other promotions.

Of the allowed combinations, the set of promotions which yields the largest discount are applied to the rate.

Promotions / HotelPromotions / Promotion / StayDates 0..1 StayDates A container for one or more date ranges that determine how the promotion is applied, such as to accommodate seasonal discounts.
Promotions / HotelPromotions / Promotion / StayDates / @application 1 enum

Describes how the promotion should be applied.

مقادیر معتبر عبارتند از:

  • all : Applies the promotion to each night in the itinerary if all dates in the itinerary overlap with the stay dates.
  • any : Applies the promotion to all nights in the itinerary if any date in the itinerary overlaps with a date in the stay dates range.
  • overlap : Applies the promotion only to those nights in the itinerary that overlap with a date in the stay dates range.

This attribute must always be specified.

  • If <Discount> specifies percentage and application is set to all or any , the discount is applied as a percentage of the full stay.
  • If <Discount> specifies percentage and application is set to overlap , the discount is applied as a percentage of nightly rates for overlapping nights.
  • <Discount> specifying fixed_amount and application set to overlap is an invalid combination.
  • <FreeNights> supports all application values. Note that for overlap , only overlapping nights of stay are considered for the discount requirements.
Promotions / HotelPromotions / Promotion / StayDates / DateRange 1..99 DateRange

یک محدوده تاریخی که تاریخ هایی را که قرار است تبلیغات اعمال شود را مشخص می کند.

The YearlessDate format is also supported.

  • If one of start or end is a yearless date, both must be populated as yearless dates.
  • Yearless date ranges must not wrap around the new year. Instead, represent the range as two adjacent date ranges. For example, {"12-29", "01-05"} can be represented as {"12-29", "12-31"} and {"01-01", "01-05"} .

If you want to set StayDates range to allow the promotion on specific days of the week, you should set the start date as the current date with no end so that the promotion doesn't expire.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @start 0..1 Date or YearlessDate تاریخ شروع (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید قبل یا همان تاریخ end باشد. اگر start مشخص نشده باشد، محدوده تاریخ عملاً از نظر تاریخ شروع نامحدود است.

You should specify start value if the end value isn't provided.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @end 0..1 Date or YearlessDate تاریخ پایان (بر اساس منطقه زمانی ملک)، شامل محدوده تاریخ. این تاریخ باید همان تاریخ start یا بعد از آن باشد. If end isn't specified, the date range is effectively unlimited from the start date onwards.

You should specify end value if the start value isn't provided.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @days_of_week 0..1 string

روزهایی از هفته که در محدوده تاریخ مجاز هستند. اگر مشخص نشده باشد، همه روزها در محدوده تاریخ مجاز هستند. هر کاراکتر در رشته یک روز را مشخص می کند. به عنوان مثال، "MTWHF" مشخص می کند که روزهای هفته در محدوده تاریخ مجاز هستند.

شخصیت های معتبر عبارتند از:

  • M برای دوشنبه
  • T برای سه شنبه
  • W برای چهارشنبه
  • H برای پنجشنبه
  • F برای جمعه
  • S برای شنبه
  • U برای یکشنبه

هر ترکیب کاراکتری معتبر است.

Promotions / HotelPromotions / Promotion / UserCountries 0..1 UserCountries Container for listing the user locations (countries) that are eligible for the promotion. If specified, only eligible users in the listed countries are offered the discounted rate. If not specified, eligible users in any country are offered the discounted rate.
Promotions / HotelPromotions / Promotion / UserCountries / @type 0..1 enum The type of UserCountries specification.

Valid values are include and exclude .

If the UserCountries type is set as include , the promotion applies to users from the listed countries.

If the UserCountries type is exclude , the promotion applies to users from outside the listed countries.

If the UserCountries type is unset, it is treated as include and the promotion is applied to users from the listed countries.

Promotions / HotelPromotions / Promotion / UserCountries / Country 1..300 Country Defines one country where users are eligible for the promotion.
Promotions / HotelPromotions / Promotion / UserCountries / Country / @code 1 string A CLDR country code , such as DE or FR . Note that, for some countries, the CLDR country code isn't the same as the 2-letter ISO country code. Also, CLDR region codes are not supported.

نمونه ها

محدودیت 500 تبلیغ در هر ملک وجود دارد. Refer to "Delete one promotion" example to remove promotions from a property.

پیام اصلی

The following example shows a basic Promotions message:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-07-01" end="2020-07-31" days_of_week="MTWHF"/>
         <DateRange start="2020-09-01" end="2020-09-30"/>
      </BookingDates>
      <BookingWindow min="7" max="330"/>
      <CheckinDates>
         <DateRange start="2020-10-01" end="2020-10-31" days_of_week="FSU"/>
      </CheckinDates>
      <CheckoutDates>
         <DateRange start="2020-10-08" end="2020-11-07" days_of_week="FSU"/>
      </CheckoutDates>
      <Devices>
        <Device type="mobile"/>
        <Device type="tablet"/>
      </Devices>
      <Discount percentage="20" applied_nights="2"/>
      <LengthOfStay min="2" max="14"/>
      <RatePlans>
         <RatePlan id="234"/>
         <RatePlan id="567"/>
      </RatePlans>
      <RoomTypes>
         <RoomType id="123"/>
         <RoomType id="456"/>
      </RoomTypes>
      <Stacking type="base"/>
      <UserCountries>
        <Country code="US"/>
        <Country code="GB"/>
      </UserCountries>
    </Promotion>
  </HotelPromotions>
</Promotions>


Inventory condition

The following example shows how to create a discount if there is excess inventory close to the arrival date:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingWindow max="7"/>
      <Discount percentage="10"/>
      <InventoryCount min="3"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


Delete one promotion

The following example shows how to delete one promotion for a property:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1" action="delete"/>
  </HotelPromotions>
</Promotions>

Delete all promotions

The following example shows how to delete all promotions for a property:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1" action="overlay"/>
</Promotions>



Overlay all promotions

The following example shows how to overlay <HotelPromotions> for a property with one or more new promotions. When action="overlay" , all stored promotions are deleted prior to storing the promotions specified in the current message:

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1" action="overlay">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-09-01" end="2020-09-30"/>
      </BookingDates>
      <Discount percentage="10"/>
      <RoomTypes>
         <RoomType id="123"/>
         <RoomType id="456"/>
      </RoomTypes>
      <RatePlans>
         <RatePlan id="234"/>
         <RatePlan id="567"/>
      </RatePlans>
      <Stacking type="base"/>
    </Promotion>
  </HotelPromotions>
</Promotions>

3 Different Stacking Types

The following example shows a case where three different promotions would be applied ( base , second , any ). Note that the none promotion wouldn't be applied since the other promotions provide a better discount. If the original price was $100, the discounted price would be $72.90.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="10"/>
      <Stacking type="base"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="10"/>
      <Stacking type="second"/>
    </Promotion>
    <Promotion id="3">
      <Discount percentage="10"/>
      <Stacking type="any"/>
    </Promotion>
    <Promotion id="4">
      <Discount percentage="25"/>
      <Stacking type="none"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


None Stacking Type

The following example shows a case where the none promotion is used because the combination of other promotions provides a smaller discount. If the original price was $100, the discounted price would be $75.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="10"/>
      <Stacking type="base"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="10"/>
      <Stacking type="any"/>
    </Promotion>
    <Promotion id="3">
      <Discount percentage="25"/>
      <Stacking type="none"/>
    </Promotion>
  </HotelPromotions>
</Promotions>



Booking Window Duration Bounds

The following example shows a case where the BookingWindow element is used with its start and end bounds defined as an ISO 8601 Duration type. This booking window restriction requires booking on or before 18:00 the day prior to arrival, and on or after 12:00 on the 2nd day before arrival.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingWindow min="P1DT6H" max="P2DT12H"/>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


Booking Dates DateTime Bounds

The following example shows a case where the BookingDates element is used with start and end attributes as DateTime types. This booking date restriction requires booking to occur between 06:30 on 2020-07-01 and 18:45 on 2020-07-02.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
         <DateRange start="2020-07-01T06:30:00" end="2020-07-02T18:45:00"/>
      </BookingDates>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>


Yearless date ranges

The following example shows a case where the CheckInDates element contains DateRanges that have start and end fields without years. In this example, the promotion applies to check-in dates between 12/29 and 1/2, regardless of the year. Yearless date ranges that cross the new-year boundary are invalid, so the DateRange is expressed as two adjacent date ranges.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <CheckInDates>
         <DateRange start="12-29" end="12-31"/>
         <DateRange start="01-01" end="01-02"/>
      </CheckInDates>
      <Discount percentage="20"/>
    </Promotion>
  </HotelPromotions>
</Promotions>



FreeNights discount

The following example discounts two nights 50% for each four nights stayed for the specified range of booking dates. For a ten night itinerary, a total of four nights would be discounted 50%.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <BookingDates>
        <DateRange start="2022-01-01" end="2022-05-31"/>
      </BookingDates>
      <Discount>
        <FreeNights stay_nights="4" discount_nights="2" discount_percentage="50" night_selection="cheapest" repeats="true"/>
      </Discount>
    </Promotion>
  </HotelPromotions>
</Promotions>

The next example discounts one night 50% for each three nights stayed for the specified ranges of stay dates. Only the overlapping nights of stay count towards qualifying for the discount. For the following itinerary with check-in on 2022-01-01 and check-out on 2022-01-07, the qualified nights of stay and discounts are applied as follows.

  • 2022-01-01 (stay)
  • 2022-01-02 (stay)
  • 03-01-2022
  • 2022-01-04 (discounted)
  • 2022-01-05 (stay)
  • 2022-01-06 (stay)
<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <StayDates application="overlap">
        <DateRange start="2022-01-01" end="2022-01-02"/>
        <DateRange start="2022-01-04" end="2022-01-06"/>
      </StayDates>
      <Discount>
        <FreeNights stay_nights="3" discount_nights="1" discount_percentage="50" night_selection="last" repeats="true"/>
      </Discount>
    </Promotion>
  </HotelPromotions>
</Promotions>


Ranked Selection

The following example offers two discounts, one for 20% off and another for 15% off. During evaluation, only the 15% discount is applied because it has a lower rank.

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
  <HotelPromotions hotel_id="Property_1">
    <Promotion id="1">
      <Discount percentage="15" rank="25"/>
    </Promotion>
    <Promotion id="2">
      <Discount percentage="20" rank="50"/>
    </Promotion>
  </HotelPromotions>
</Promotions>

BestDailyDiscount

The following example discounts a two night stay by applying BestDailyDiscount stacked with a Discount .

<?xml version="1.0" encoding="UTF-8"?>
<Promotions partner="account_xyz"
            id="123_abc"
            timestamp="2020-05-18T16:20:00-04:00">
 <HotelPromotions hotel_id="HotelID" action="overlay">
   <Promotion id="general">
     <BestDailyDiscount fixed_amount="20"/>
   </Promotion>
   <Promotion id="may">
     <BestDailyDiscount fixed_amount="50"/>
     <StayDates application="overlap">
        <DateRange start="2023-05-01" end="2023-05-31"/>
     </StayDates>
   </Promotion>
   <Promotion id="fiesta">
     <Discount fixed_amount_per_night="5"/>
     <Stacking type="any"/>
   </Promotion>
 </HotelPromotions>
</Promotions>

Consider a two night stay from April 30, 2023 to May 2, 2023 For calculation, the combination of best daily discounts that yields the deepest discount is found first.

For the first night, the "general" promotion is the only eligible amount with a fixed discount of 20.

For the second night, the "may" promotion offers a deeper discount than the "general" discount. So, when "may" is selected the fixed discount amount is 50.

Then for the stay, the "fiesta" promotion discounts to 5 per night, or 10 total. It can be stacked with the combination of best daily discounts because "fiesta" has stacking type set to any . If it were set to base , then only the combination of best daily discounts or the "fiesta" discount is applied. See description of Stacking for more information.

`Overall, the price of the stay receives a 20 + 50 + 10 = 80 fixed amount discount.

پاسخ ها

نحو

The PromotionsResponse message uses the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="timestamp"
                    id="message_ID"
                    partner="partner_key">
  <!-- Either Success or Issues are populated. -->
  <Success/>
  <Issues>
    <Issue code="issue_code"
           status="issue_type">
      issue_description
    </Issue>
  </Issues>
</PromotionsResponse>

عناصر و صفات

The PromotionsResponse message has the following elements and attributes:

عنصر / @Attribute رخدادها تایپ کنید توضیحات
PromotionsResponse 1 Complex element The root element indicating the success or issues for a received Promotions request message.
PromotionsResponse / @timestamp 1 DateTime تاریخ و زمان ایجاد این پیام.
PromotionsResponse / @id 1 string The unique identifier from the associated Promotions message.
PromotionsResponse / @partner 1 string حساب شریک برای این پیام.
PromotionsResponse / Success 0..1 Success Indicates that the Promotions message was processed successfully without warnings, errors, or failures.

یا <Success> یا <Issues> در هر پیام وجود دارد.

PromotionsResponse / Issues 0..1 Issues A container for one or more issues encountered while processing the Promotions message.

یا <Success> یا <Issues> در هر پیام وجود دارد.

PromotionsResponse / Issues / Issue 1..n Issue The description of a warning, error, or failure encountered while processing the Promotions message. جزئیات مربوط به این مسائل را می‌توانید در پیام‌های خطای وضعیت فید مشاهده کنید.
PromotionsResponse / Issues / Issue / @code 1 integer شناسه مشکل
PromotionsResponse / Issues / Issue / @status 1 enum

نوع مشکل مواجه شده

مقادیر معتبر warning ، error و failure هستند.

نمونه ها

موفقیت

The following is a response to a successfully processed Promotions message.

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Success/>
</PromotionsResponse>

مسائل

The following is a response to a Promotions message not processed due to errors.

<?xml version="1.0" encoding="UTF-8"?>
<PromotionsResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Issues>
    <Issue code="1001" status="error">Example</Issue>
  </Issues>
</PromotionsResponse>