Акции

Обзор

Этот 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>

Элементы и атрибуты

Сообщение о рекламных акциях имеет следующие элементы и атрибуты:

Элемент/@Атрибут События Тип Описание
Promotions 1 Complex element Корневой элемент рекламного сообщения.
Promotions / @partner 1 string Партнерский аккаунт для этого сообщения. Это строковое значение представляет собой значение «Партнерского ключа», указанное на странице настроек учетной записи в Hotel Center.

Если у вас есть серверная часть, которая предоставляет каналы для нескольких учетных записей, это значение должно соответствовать значению атрибута 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> в фиде списка отелей. Идентификатор отеля также указан в Hotel Center .
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 указывается как дата «ГГГГ-ММ-ДД», оно интерпретируется как дата-время «ГГГГ-ММ-ДДТ00:00:00».
Promotions / HotelPromotions / Promotion / BookingDates / DateRange / @end 0..1 Date или DateTime

Конечная дата или дата и время (в зависимости от часового пояса свойства) диапазона включительно.

  • Дата или дата-время, указанные в end должны быть позже (или совпадать с) датой или датой-временем, указанными в параметре start .
  • Если end не указан, диапазон фактически не ограничен с точки зрения времени окончания.
  • Если end указан как дата «ГГГГ-ММ-ДД», он интерпретируется как дата-время «ГГГГ-ММ-ДДТ23: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> . Для каждой акции будет применяться своя скидка, за которой сразу же будет устанавливаться ее потолок. В следующем примере показано, как каждый потолок влияет на следующее вычисление повышения в стеке.

Пример:

Цена за 1 ночь проживания, при которой 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> . Для каждой акции будет применяться своя скидка, за которой сразу последует ее минимальная цена. В следующем примере показано, как каждый этаж участвует в расчете следующего повышения в стеке.

Пример:

Цена за 1 ночь проживания, при которой 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.
  • Если мы устанавливаем цену за 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-ю ночи; 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 ) с учетом настроенного типа суммирования. Эта объединенная скидка сравнивается с другими подходящими акциями <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

Контейнер для правила уровня членства, которое запускает специальную обработку пользовательского интерфейса для соответствующей скидки.

Этот элемент не следует указывать, если также не указан <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 (Data Property), OTA_HotelRateAmountNotifRQ и OTA_HotelAvailNotifRQ, а также как указано PackageID.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan / @id 1 string Уникальный идентификатор тарифного плана. Это значение сопоставляется со значением PackageID в <PackageData> в сообщении транзакции (данные свойства) и в атрибуте 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 Уникальный идентификатор инвентаря (типа помещения). Это значение сопоставляется с <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 не указано, диапазон дат фактически не ограничен с точки зрения даты начала.

Вам следует указать start значение, если end значение не указано.

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @end 0..1 Date or YearlessDate Конечная дата (в зависимости от часового пояса объекта), включая диапазон дат. Эта дата должна совпадать с датой start или быть позже нее. Если end не указан, диапазон дат фактически не ограничен, начиная с даты start .

Вам следует указать end значение, если start значение не указано.

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 USCROUNTRIES не является, он рассматривается как include , и продвижение применяется к пользователям из перечисленных стран.

Promotions / HotelPromotions / Promotion / UserCountries / Country 1..300 Country Определяет одну страну, где пользователи имеют право на продвижение по службе.
Promotions / HotelPromotions / Promotion / UserCountries / Country / @code 1 string Кодекс страны CLDR , такой как DE или FR . Обратите внимание, что для некоторых стран код страны CLDR не совпадает с 2-буквенным кодом страны ISO. Кроме того, коды региона 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:00 в 2:00 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 Bounds

В следующем примере показан случай, когда элемент 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, независимо от года. Бесзодранные даты, которые пересекают новую границу, являются недействительными, поэтому датчика выражена как два смежных диапазона даты.

<?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% за каждые четыре ночи оставалось на указанный ассортимент дат бронирования. В течение десяти ночных маршрутов в общей сложности четыре ночи будут сброшены на 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% за каждые три ночи оставались для указанных диапазонов дат пребывания. Только перекрывающиеся ночи пребывания учитываются на квалификацию на скидку. Для следующего маршрута с регистрацией в 2022-01-01 и выходе на 2022-01-07 квалифицированные ночи пребывания и скидки применяются следующим образом.

  • 2022-01-01 (пребывание)
  • 2022-01-02 (пребывание)
  • 2022-01-03
  • 2022-01-04 (дисконтировано)
  • 2022-01-05 (пребывание)
  • 2022-01-06 (пребывание)
<?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

В следующем примере скидки на двух ночи пребывания, применив 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.

Затем для пребывания скидки на продвижение «Fiesta» до 5 за ночь или 10. Он может быть сложен с комбинацией лучших ежедневных скидок, потому что «Fiesta» имеет тип укладки, установленную для 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 имеет следующие элементы и атрибуты:

Element / @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>

Элементы и атрибуты

Сообщение о рекламе имеет следующие элементы и атрибуты:

Element / @attribute Случаи Тип Описание
Promotions 1 Complex element Корневой элемент сообщения о рекламе.
Promotions / @partner 1 string Учетная запись партнера для этого сообщения. Это значение строки представляет собой значение «Ключ -партнер», указанное на странице «Настройки учетной записи» в гостиничном центре.

Если у вас есть бэкэнд, который предоставляет каналы для нескольких учетных записей, это значение должно соответствовать значению атрибута ID , указанного в элементе <RequestorID> вашего <OTA_HotelRateAmountNotifRQ> и <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: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> могут применяться к одному пребыванию. Каждое повышение будет применять свою скидку, сразу же с последующей его потолком. В следующем примере демонстрируется, как каждый потолок вносит вклад в следующий расчет продвижения в стеке.

Пример:

Цены на 1-дневное пребывание, где 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> могут применяться к одному пребыванию. Каждое продвижение по службе применяет свою скидку, сразу же следовала бы пол. В следующем примере демонстрируется, как каждый этаж вносит вклад в следующий расчет продвижения в стеке.

Пример:

Цены на 1-дневное пребывание, где AmountBeforeTax составляет 100, и есть стопка из двух акций:

  1. Продвижение с base типа укладки, fixed_amount 25 и полом amount_per_night 90
  2. Продвижение с типом укладки second , fixed_amount 25, и amount_per_night пола.

Вот порядок расчета:

  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 (или 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, тогда

    Скорость продвижения = sum ( 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 Nights.

Примеры:

  • Если мы ценим пребывание на 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 -й ночи не являются частью сегмента Night Night.

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 ) при соблюдении настроенного типа укладки. Эта комбинированная скидка сравнивается с и может быть сложена с другими подходящими для <Scint> рекламными акциями, чтобы найти одну или комбинацию, которая обеспечивает самую глубокую скидку. Либо комбинация 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 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 Specifies a rate plan. A rate plan is defined by a combination of package, rates, and availability, as defined in Transaction (Property Data), OTA_HotelRateAmountNotifRQ, and OTA_HotelAvailNotifRQ messages, and as identified by the PackageID.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan / @id 1 string The unique identifier for the rate plan. This value maps to the PackageID value in <PackageData> in a Transaction (Property Data) message, and in the RatePlanCode attribute in <StatusApplicationControl> in both <OTA_HotelRateAmountNotifRQ> and <OTA_HotelAvailNotifRQ> messages. The maximum number of characters allowed is 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 Specifies a room type. A room type is defined in a <RoomData> element in a Transaction (Property Data) message and is referenced using its <RoomID> value. (Its <RoomID> value is also referenced by the InvTypeCode attribute in OTA_HotelRateAmountNotifRQ messages.)
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType / @id 1 string The unique identifier for the inventory (room type). This value maps to <RoomID> in a Transaction (Property Data) message. The maximum number of characters allowed is 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.

Valid values are:

  • 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

A date range specifying dates when the promotion is to be applied.

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 The starting date (based on the property's time zone), inclusive, of the date range. This date must be before, or the same as, the end date. If start isn't specified, the date range is effectively unlimited in terms of a start date.

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

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @end 0..1 Date or YearlessDate The ending date (based on the property's time zone), inclusive, of the date range. This date must be the same as, or after, the start date. 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

The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range.

Valid characters are:

  • M for Monday
  • T for Tuesday
  • W for Wednesday
  • H for Thursday
  • F for Friday
  • S for Saturday
  • U for Sunday

Any character combination is valid.

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.

Примеры

There is a limit of 500 promotions per property. Refer to "Delete one promotion" example to remove promotions from a property.

Basic message

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)
  • 2022-01-03
  • 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.

Responses

Синтаксис

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>

Elements and Attributes

The PromotionsResponse message has the following elements and attributes:

Element / @Attribute Случаи Тип Описание
PromotionsResponse 1 Complex element The root element indicating the success or issues for a received Promotions request message.
PromotionsResponse / @timestamp 1 DateTime The creation date and time of this message.
PromotionsResponse / @id 1 string The unique identifier from the associated Promotions message.
PromotionsResponse / @partner 1 string The partner account for this message.
PromotionsResponse / Success 0..1 Success Indicates that the Promotions message was processed successfully without warnings, errors, or failures.

Either <Success> or <Issues> is present in each message.

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

Either <Success> or <Issues> is present in each message.

PromotionsResponse / Issues / Issue 1..n Issue The description of a warning, error, or failure encountered while processing the Promotions message. Details on these issues can be found in Feed Status Error Messages .
PromotionsResponse / Issues / Issue / @code 1 integer The identifier for the issue.
PromotionsResponse / Issues / Issue / @status 1 enum

The type of issue encountered.

Valid values are warning , error , and 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>

Elements and Attributes

The Promotions message has the following elements and attributes:

Element / @Attribute Случаи Тип Описание
Promotions 1 Complex element The root element of a promotions message.
Promotions / @partner 1 string The partner account for this message. This string value is the "Partner key" value listed on the Account settings page in Hotel Center.

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 A unique identifier for this request message. This value is returned in the response message. Allowed characters are az, AZ, 0-9, _ (underscore), and - (dash).
Promotions / @timestamp 1 DateTime The creation date and time of this message.
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 The unique identifier for the property. This value must match the Hotel ID specified using <id> in the <listing> element in the Hotel List Feed. The Hotel ID is also listed in Hotel Center .
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

The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range.

Valid characters are:

  • M for Monday
  • T for Tuesday
  • W for Wednesday
  • H for Thursday
  • F for Friday
  • S for Saturday
  • U for Sunday

Any character combination is valid.

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 The starting date (based on the property's time zone), inclusive, of the date range. This date must be before, or the same as, the end date. If start isn't specified, the date range is effectively unlimited in terms of a start date.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @end 0..1 Date or YearlessDate The ending date (based on the property's time zone), inclusive, of the date range. This date must be the same as, or after, the start date. If end isn't specified, the date range is effectively unlimited in terms of an end date.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @days_of_week 0..1 string

The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range.

Valid characters are:

  • M for Monday
  • T for Tuesday
  • W for Wednesday
  • H for Thursday
  • F for Friday
  • S for Saturday
  • U for Sunday

Any character combination is valid.

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 The starting date (based on the property's time zone), inclusive, of the date range. This date must be before, or the same as, the end date. If start isn't specified, the date range is effectively unlimited in terms of a start date.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @end 0..1 Date or YearlessDate The ending date (based on the property's time zone), inclusive, of the date range. This date must be the same as, or after, the start date. If end isn't specified, the date range is effectively unlimited in terms of an end date.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @days_of_week 0..1 string

The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range.

Valid characters are:

  • M for Monday
  • T for Tuesday
  • W for Wednesday
  • H for Thursday
  • F for Friday
  • S for Saturday
  • U for Sunday

Any character combination is valid.

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 Specifies a rate plan. A rate plan is defined by a combination of package, rates, and availability, as defined in Transaction (Property Data), OTA_HotelRateAmountNotifRQ, and OTA_HotelAvailNotifRQ messages, and as identified by the PackageID.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan / @id 1 string The unique identifier for the rate plan. This value maps to the PackageID value in <PackageData> in a Transaction (Property Data) message, and in the RatePlanCode attribute in <StatusApplicationControl> in both <OTA_HotelRateAmountNotifRQ> and <OTA_HotelAvailNotifRQ> messages. The maximum number of characters allowed is 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 Specifies a room type. A room type is defined in a <RoomData> element in a Transaction (Property Data) message and is referenced using its <RoomID> value. (Its <RoomID> value is also referenced by the InvTypeCode attribute in OTA_HotelRateAmountNotifRQ messages.)
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType / @id 1 string The unique identifier for the inventory (room type). This value maps to <RoomID> in a Transaction (Property Data) message. The maximum number of characters allowed is 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.

Valid values are:

  • 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

A date range specifying dates when the promotion is to be applied.

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 The starting date (based on the property's time zone), inclusive, of the date range. This date must be before, or the same as, the end date. If start isn't specified, the date range is effectively unlimited in terms of a start date.

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

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @end 0..1 Date or YearlessDate The ending date (based on the property's time zone), inclusive, of the date range. This date must be the same as, or after, the start date. 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

The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range.

Valid characters are:

  • M for Monday
  • T for Tuesday
  • W for Wednesday
  • H for Thursday
  • F for Friday
  • S for Saturday
  • U for Sunday

Any character combination is valid.

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.

Примеры

There is a limit of 500 promotions per property. Refer to "Delete one promotion" example to remove promotions from a property.

Basic message

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)
  • 2022-01-03
  • 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.

Responses

Синтаксис

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>

Elements and Attributes

The PromotionsResponse message has the following elements and attributes:

Element / @Attribute Случаи Тип Описание
PromotionsResponse 1 Complex element The root element indicating the success or issues for a received Promotions request message.
PromotionsResponse / @timestamp 1 DateTime The creation date and time of this message.
PromotionsResponse / @id 1 string The unique identifier from the associated Promotions message.
PromotionsResponse / @partner 1 string The partner account for this message.
PromotionsResponse / Success 0..1 Success Indicates that the Promotions message was processed successfully without warnings, errors, or failures.

Either <Success> or <Issues> is present in each message.

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

Either <Success> or <Issues> is present in each message.

PromotionsResponse / Issues / Issue 1..n Issue The description of a warning, error, or failure encountered while processing the Promotions message. Details on these issues can be found in Feed Status Error Messages .
PromotionsResponse / Issues / Issue / @code 1 integer The identifier for the issue.
PromotionsResponse / Issues / Issue / @status 1 enum

The type of issue encountered.

Valid values are warning , error , and 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>

Elements and Attributes

The Promotions message has the following elements and attributes:

Element / @Attribute Случаи Тип Описание
Promotions 1 Complex element The root element of a promotions message.
Promotions / @partner 1 string The partner account for this message. This string value is the "Partner key" value listed on the Account settings page in Hotel Center.

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 A unique identifier for this request message. This value is returned in the response message. Allowed characters are az, AZ, 0-9, _ (underscore), and - (dash).
Promotions / @timestamp 1 DateTime The creation date and time of this message.
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 The unique identifier for the property. This value must match the Hotel ID specified using <id> in the <listing> element in the Hotel List Feed. The Hotel ID is also listed in Hotel Center .
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

The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range.

Valid characters are:

  • M for Monday
  • T for Tuesday
  • W for Wednesday
  • H for Thursday
  • F for Friday
  • S for Saturday
  • U for Sunday

Any character combination is valid.

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 The starting date (based on the property's time zone), inclusive, of the date range. This date must be before, or the same as, the end date. If start isn't specified, the date range is effectively unlimited in terms of a start date.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @end 0..1 Date or YearlessDate The ending date (based on the property's time zone), inclusive, of the date range. This date must be the same as, or after, the start date. If end isn't specified, the date range is effectively unlimited in terms of an end date.
Promotions / HotelPromotions / Promotion / CheckinDates / DateRange / @days_of_week 0..1 string

The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range.

Valid characters are:

  • M for Monday
  • T for Tuesday
  • W for Wednesday
  • H for Thursday
  • F for Friday
  • S for Saturday
  • U for Sunday

Any character combination is valid.

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 The starting date (based on the property's time zone), inclusive, of the date range. This date must be before, or the same as, the end date. If start isn't specified, the date range is effectively unlimited in terms of a start date.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @end 0..1 Date or YearlessDate The ending date (based on the property's time zone), inclusive, of the date range. This date must be the same as, or after, the start date. If end isn't specified, the date range is effectively unlimited in terms of an end date.
Promotions / HotelPromotions / Promotion / CheckoutDates / DateRange / @days_of_week 0..1 string

The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range.

Valid characters are:

  • M for Monday
  • T for Tuesday
  • W for Wednesday
  • H for Thursday
  • F for Friday
  • S for Saturday
  • U for Sunday

Any character combination is valid.

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 Specifies a rate plan. A rate plan is defined by a combination of package, rates, and availability, as defined in Transaction (Property Data), OTA_HotelRateAmountNotifRQ, and OTA_HotelAvailNotifRQ messages, and as identified by the PackageID.
Promotions / HotelPromotions / Promotion / RatePlans / RatePlan / @id 1 string The unique identifier for the rate plan. This value maps to the PackageID value in <PackageData> in a Transaction (Property Data) message, and in the RatePlanCode attribute in <StatusApplicationControl> in both <OTA_HotelRateAmountNotifRQ> and <OTA_HotelAvailNotifRQ> messages. The maximum number of characters allowed is 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 Specifies a room type. A room type is defined in a <RoomData> element in a Transaction (Property Data) message and is referenced using its <RoomID> value. (Its <RoomID> value is also referenced by the InvTypeCode attribute in OTA_HotelRateAmountNotifRQ messages.)
Promotions / HotelPromotions / Promotion / RoomTypes / RoomType / @id 1 string The unique identifier for the inventory (room type). This value maps to <RoomID> in a Transaction (Property Data) message. The maximum number of characters allowed is 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.

Valid values are:

  • 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

A date range specifying dates when the promotion is to be applied.

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 The starting date (based on the property's time zone), inclusive, of the date range. This date must be before, or the same as, the end date. If start isn't specified, the date range is effectively unlimited in terms of a start date.

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

Promotions / HotelPromotions / Promotion / StayDates / DateRange / @end 0..1 Date or YearlessDate The ending date (based on the property's time zone), inclusive, of the date range. This date must be the same as, or after, the start date. 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

The days of the week that are allowed in the date range. If not specified, all days are allowed in the date range. Each character in the string specifies a day. For example, "MTWHF" specifies that weekdays are allowed in the date range.

Valid characters are:

  • M for Monday
  • T for Tuesday
  • W for Wednesday
  • H for Thursday
  • F for Friday
  • S for Saturday
  • U for Sunday

Any character combination is valid.

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.

Примеры

There is a limit of 500 promotions per property. Refer to "Delete one promotion" example to remove promotions from a property.

Basic message

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)
  • 2022-01-03
  • 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.

Responses

Синтаксис

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>

Elements and Attributes

The PromotionsResponse message has the following elements and attributes:

Element / @Attribute Случаи Тип Описание
PromotionsResponse 1 Complex element The root element indicating the success or issues for a received Promotions request message.
PromotionsResponse / @timestamp 1 DateTime The creation date and time of this message.
PromotionsResponse / @id 1 string The unique identifier from the associated Promotions message.
PromotionsResponse / @partner 1 string The partner account for this message.
PromotionsResponse / Success 0..1 Success Indicates that the Promotions message was processed successfully without warnings, errors, or failures.

Either <Success> or <Issues> is present in each message.

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

Either <Success> or <Issues> is present in each message.

PromotionsResponse / Issues / Issue 1..n Issue The description of a warning, error, or failure encountered while processing the Promotions message. Details on these issues can be found in Feed Status Error Messages .
PromotionsResponse / Issues / Issue / @code 1 integer The identifier for the issue.
PromotionsResponse / Issues / Issue / @status 1 enum

The type of issue encountered.

Valid values are warning , error , and 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>