Цены и усилители; Справочник XML по инвентаризации помещений (транзакции)

На этой странице представлены ссылки на сообщения транзакций на основе XML.

<Transaction>

Корневым элементом сообщения транзакции является <Transaction> . Это контейнер для описательной информации о номерах и пакетах, а также ценах и наличии номеров и пакетов.

Элемент <Transaction> появляется в следующем месте в иерархии XML сообщения транзакции:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

Для сообщений, использующих <Transaction> в качестве корневого элемента, требуется хотя бы один дочерний элемент. Сообщения транзакций могут иметь любое количество дочерних элементов, если общий размер сообщения не превышает 100 МБ.

Синтаксис

Элемент <Transaction> использует следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="timestamp" id="transaction_ID">

  <!-- Defines data about a room or package (Room Bundle) -->
  <PropertyDataSet>
    ...
  </PropertyDataSet>

  <!-- Updates/sets prices and availability for rooms and Room Bundles -->
  <!-- (Also removes itineraries from inventory) -->
  <Result>
    ...
  </Result>

</Transaction>

Атрибуты

Элемент <Transaction> имеет следующие атрибуты:

Атрибут Необходимый? Тип Описание
id Required нить Уникальный идентификатор для каждого сообщения транзакции.
partner Optional string Партнерская учетная запись, для которой предназначено сообщение о транзакции. Обычно вы используете это, если ваш бэкэнд предоставляет потоки цен для нескольких учетных записей партнеров. Это строковое значение представляет собой значение «Партнерского ключа», указанное на странице настроек учетной записи в Hotel Center.
timestamp Required DateTime

Момент времени, когда было отправлено сообщение транзакции.

Любое сообщение, отправленное с отметкой времени в течение предыдущих 24 часов, будет обработано, а те, у которых этого не было, будут удалены.

Сообщения обрабатываются в порядке timestamp , а не в порядке их получения. Например, обновление цены с отметкой времени 2019-05-03 14:09:00 , полученное после сообщения с временной отметкой 2019-05-03 14:10:00 все равно будет обрабатываться по порядку, а цена из сообщения с отметкой времени 2019-05-03 14:10:00 .

Дочерние элементы

Элемент <Transaction> имеет следующие дочерние элементы:

Дочерний элемент Необходимый? Тип Описание
<PropertyDataSet> Optional* <PropertyDataSet>

Описывает конкретный номер и комплекты номеров. Обычно вы используете этот элемент в отдельном сообщении транзакции, чтобы определить общие значения для пакетов номеров и уменьшить размер сообщений транзакции.

<Result> Optional* <Result>

Данные о ценах для маршрута номера или элемента <RoomBundle> , который определяет пакеты номеров и дополнительные типы номеров для объекта размещения. Элемент <Result> также можно использовать для удаления маршрутов из инвентаря.

* Требуется хотя бы один из <PropertyDataSet> или <Result> .

Примеры

Данные о номере

В следующем примере определяются данные о номере в сообщении транзакции:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>5440OF</RoomID>
      <Name>
        <Text text="Single King Bed Room" language="en"/>
        <Text text="Simple Lit de Roi" language="fr"/>
      </Name>
      <Description>
        <Text text="One king bed with pillowtop mattresses, 300-thread-count linens,
          and down comforters (bedspreads). City view. 300 square feet. Desk with
          rolling chair. Multi-line phone with voice mail. Cable/satellite TV with
          complimentary HBO and pay movies." language="en"/>
        <Text text="Un très grand lit avec matelas à plateau-coussin, ..." language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Bathroom View" language="en"/>
          <Text text="La salle de baines" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Capacity>4</Capacity>
    </RoomData>
  </PropertyDataSet>
</Transaction>

Данные о ценах

В следующем примере определяются данные о ценах в сообщении транзакции:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
  </Result>
  <Result>
    <Property>052213</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">299.98</Baserate>
    <Tax currency="USD">26.42</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="otto"/>
      <PointOfSale id="simon"/>
    </AllowablePointsOfSale>
  </Result>
</Transaction>

Ночные тарифы

В следующем примере определены данные о ценах на срок от 1 до 7 ночей, начиная с 7 июня 2023 г.:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-08-24T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">209.99</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">419.98</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>3</Nights>
    <Baserate currency="USD">614.97</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>4</Nights>
    <Baserate currency="USD">819.96</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>5</Nights>
    <Baserate currency="USD">999.95</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>6</Nights>
    <Baserate currency="USD">1193.94</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>7</Nights>
    <Baserate currency="USD">1259.93</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
</Transaction>


Базовые и условные ставки

В следующем примере показано сообщение транзакции, содержащее базовую ставку и условную ставку :

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>1</Nights>

    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>

    <Rates>
      <!-- The rate_rule_id is required when using conditional rates -->
      <Rate rate_rule_id="mobile">
        <!-- Override base rate and taxes for conditional rates -->
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <!-- NOTE: OtherFees is inherited from the above setting -->
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

Удалить инвентарь

В следующем примере из инвентаря удаляется несколько инвентарей (проживание на 1 ночь на несколько разных дат) для отеля:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-05-23T16:20:00-04:00" id="42">
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-23</Checkin>
    <Nights>1</Nights>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-24</Checkin>
    <Nights>1</Nights>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
  <!---Sending <Baserate> is optional with <Unavailable> -->
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-25</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">-1</Baserate>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
</Transaction>

<PropertyDataSet>

Контейнер для информации о номере и пакете (или Room Bundle ) в сообщении <Transaction> . Значения, установленные для отеля, переопределяют значения, установленные для партнера. Google хранит эту информацию, поэтому вам не нужно указывать ее каждый раз, когда вы отправляете обновления цен.

Элемент <PropertyDataSet> появляется в следующем месте в иерархии XML сообщения транзакции:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>  // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

Дополнительную информацию см. в метаданных Room Bundle .

Синтаксис

Элемент <PropertyDataSet> использует следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet>
    <!-- (Required) ID that matches the Hotel List Feed -->
    <Property>hotel_ID</Property>

    <!-- (Optional) Defines metadata about a room -->
    <RoomData>
      ...
    </RoomData>

    <!-- (Optional) Defines package metadata to be paired with rooms (Room Bundles) -->
    <PackageData>
      ...
    </PackageData>
  </PropertyDataSet>
  ...
</Transaction>

Атрибуты

Элемент <PropertyDataSet> не имеет атрибутов.

Дочерние элементы

Элемент <PropertyDataSet> имеет следующие дочерние элементы:

Дочерний элемент Необходимый? Тип Описание
<PackageData> Optional* <PackageData> Описывает комплект номеров. Эти данные связаны с партнером и отелем, но не с маршрутом. Этот элемент похож на <RoomData> , но описывает удобства и термины, которые не являются частью описания физического помещения.

Вы ссылаетесь на идентификатор пакета в своих обновлениях цен.

Дополнительную информацию см. в метаданных Room Bundle .

<Property> Required string Идентификатор отеля, к которому относятся связанные данные. Значением этого элемента должна быть строка, соответствующая значению <id> в вашем фиде списка отелей.
<RoomData> Optional* <RoomData> Описывает комнату. Эти данные связаны с партнером и отелем, но не с маршрутом.

Вы указываете идентификатор комнаты в своих обновлениях цен.

* Требуется хотя бы один из <PackageData> или <RoomData> .

Примеры

Данные о номере и пакете услуг

В следующем примере показаны данные о помещении и пакете в <PropertyDataSet> :

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Когда вы отправляете цены и наличие мест для этого номера и пакета номеров, вы ссылаетесь на идентификаторы номера и пакета в своих сообщениях о ценах. В результате вы значительно уменьшите размер своих сообщений, а также уменьшите количество ошибок, с которыми вы можете столкнуться из-за дублирования данных. Дополнительную информацию см. в метаданных Room Bundle .

<RoomData>

Определяет независимые от маршрута метаданные о номерах и, как следствие, о пакетах номеров (поскольку пакеты номеров представляют собой номера с дополнительными удобствами). Используйте <RoomData> , чтобы уменьшить повторение описательных данных в вашем фиде цен.

Элемент <RoomData> появляется в следующем месте в иерархии XML сообщения транзакции:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

Элементы <RoomData> содержат информацию, связанную с партнером и отелем, но не с маршрутом. Предполагаемая цель – для всех немаршрутных данных.

Элемент <RoomData> аналогичен <PackageData> , но описывает физическую комнату, а не удобства и условия пакета. Вы используете <RoomData> и <PackageData> в сочетании, чтобы предоставить подробную информацию о пакетах номеров. Для отдельных комнат, которые не являются частью пакета, используйте только <RoomData> .

Вы можете определить элементы <RoomData> и <PackageData> для одной и той же комнаты или пакета комнат. Когда Google отображает эту комнату или пакет в результатах поиска, он будет включать описания обоих, разделенные дефисом.

Дополнительную информацию см. в метаданных Room Bundle .

Синтаксис

Элемент <RoomData> использует следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet>
    ...
    <RoomData>
      <RoomID>room_ID</RoomID>

      <Name>
        <Text text="room_name" language="language_code"/>
        ...
      </Name>

      <Description>
        <Text text="room_description" language="language_code"/>
        ...
      </Description>

      <Capacity>max_number_of_occupants</Capacity>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults, children, or seniors --></OccupancyDetails>
      <OccupancySettings>
        <MinOccupancy>min_number_of_occupants</MinOccupancy>
        <MinAge>min_age_of_occupants</MinAge>
      </OccupancySettings>

      <PhotoURL>
        <Caption>
          <Text text="photo_description" language="language_code"/>
          ...
        </Caption>
        <URL>photo_location</URL>
      </PhotoURL>
      <RoomFeatures>
        ...
      </RoomFeatures>
    </RoomData>
    ...
  </PropertyDataSet>
</Transaction>

Атрибуты

Элемент <RoomData> не имеет атрибутов.

Дочерние элементы

Элемент <RoomData> имеет следующие дочерние элементы:

Дочерний элемент Необходимый? Тип Описание
<Capacity> Optional integer Максимальное количество гостей, которое физически может разместиться в номере. Для комнаты вместимость больше или равна вместимости.

Если это значение указано, оно должно быть равно или больше значения элемента <Occupancy> , которое представляет собой предполагаемое количество гостей для конкретной комнаты. Например, <Capacity> большого набора может быть равен 6, а <Occupancy> для него — 4.

Значение <Capacity> должно быть положительным целым числом от 1 до 20 включительно.

<Description> Optional Object Подробное описание помещения. Этот элемент должен содержать информацию, не описанную другими элементами или элементом <Name> . При описании номера не следует использовать все заглавные буквы.

Элемент <Description> принимает один дочерний элемент <Text> , который имеет следующие два обязательных атрибута:

  • text : Подробное описание помещения.
  • language : двухбуквенный код языка; например, fr .

Используйте отдельный элемент <Text> для каждого языка, на котором может отображаться ваше объявление или ссылка на бесплатное бронирование (с разными значениями language атрибутов).

В следующем примере показаны версии описания комнаты на французском и английском языках:

<Description>
  <Text text="Two queen-sized beds" language="en"/>
  <Text text="Deux lits de la reine" language="fr"/>
</Description>
<Name> Required string Название категории номера. Это значение должно совпадать с тем, что отображается на целевой странице отеля (ранее — точка продаж). Не устанавливайте значение этого элемента только заглавными буквами.

Этот элемент принимает один дочерний элемент <Text> , который имеет следующие два обязательных атрибута:

  • text : Название комнаты.
  • language : двухбуквенный код языка; например, fr .

Используйте отдельный элемент <Text> для каждого языка, на котором может отображаться ваше объявление или ссылка на бесплатное бронирование (с разными значениями language атрибутов).

В следующем примере показаны версии названия комнаты на французском и английском языках:

<Name>
  <Text text="Standard Double Room" language="en"/>
  <Text text="Le chambre double" language="fr"/>
</Name>
<Occupancy> Optional integer Максимальное количество гостей, на которое рассчитан номер. Например, в большом люксе могут физически разместиться 6 гостей (вместимость = 6), но он рассчитан только на 4 гостей.

Это значение должно быть меньше или равно элементу <Capacity> , который представляет собой количество людей, которое физически может разместиться в помещении.

Значение <Occupancy> должно быть положительным целым числом от 1 до 99 включительно.

<Occupancy> может сопровождаться <OccupancyDetails> , который указывает тип гостей (взрослые или дети). См. <OccupancyDetails> для получения синтаксиса и описания дочерних элементов.

<OccupancySettings> Optional Object Настройки, которые могут ограничить или изменить требования к занятости комнаты.

Элемент <OccupancySettings> принимает следующие дочерние элементы:

  • <MinOccupancy> : минимальное количество гостей, которые могут разместиться в номере. Например, если установлено значение 2 , этот номер нельзя забронировать для одного гостя.

    Значение <MinOccupancy> должно быть положительным целым числом от 1 до 99 включительно.

  • <MinAge> : минимальный возраст всех гостей, проживающих в номере. Например, если установлено значение 18 , этот номер можно забронировать только для групп, в которых все гости старше 18 лет.

    Значение <MinAge> должно быть положительным целым числом от 0 до 99 включительно.

<OccupancySettings>
  <MinOccupancy>2</MinOccupancy>
  <MinAge>16</MinAge>
</OccupancySettings>

Не обязательно включать все дочерние элементы.

<PhotoURL> Optional Object URL-адрес и необязательная подпись к фотографии данного номера или пакета номеров. Вы можете указать более одного <PhotoURL> для комнаты или пакета комнат. Каждый URL-адрес фотографии должен находиться в собственном <PhotoURL> .

Этот элемент принимает следующие дочерние элементы:

  • <URL> : указывает местоположение фотографии. Местоположение должно быть общедоступным (не за брандмауэром) и должно включать протокол (например, https:// ). Используйте только один <URL> для каждого <PhotoURL> .
  • <Caption> : определяет подпись к фотографии. Этот элемент принимает один дочерний элемент <Text> , который имеет два обязательных атрибута: text и language . Атрибут text — это заголовок, а атрибут language указывает двухбуквенный код языка, например en .

Пример:

<PhotoURL>
  <URL>https://www.example.com/static/bar/image1234.jpg</URL>
  <Caption>
    <Text text="A bright and breezy way to enjoy your mornin'
      cuppa tea." language="en"/>
    <Text text="Une façon lumineuse et aérée pour profiter
      de votre journée tasse de thé." language="fr"/>
  </Caption>
</PhotoURL>
<PhotoURL>
  <URL>https://www.foo.com/static/bar/image5678.jpg</URL>
  <Caption>
    <Text text="Or, perhaps you prefer coffee." language="en"/>
    <Text text="Ou peut-être préférez-vous le café." language="fr"/>
  </Caption>
</PhotoURL>
<RoomFeatures> Optional <RoomFeatures> Содержит информацию об особенностях номера.
<RoomID> Required string Уникальный идентификатор комнаты. Используйте этот идентификатор, чтобы сопоставить данные о номере с блоками <Result> в обновлениях цен. Дополнительную информацию см. в метаданных Room Bundle . (Вы также можете использовать этот идентификатор для ссылки на общее определение помещения в одном сообщении транзакции при встроенном определении данных помещения.)

Примеры

Данные о номере

В следующем примере определяются данные помещения:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>5440OF</RoomID>
      <Name>
        <Text text="Single King Bed Room" language="en"/>
        <Text text="Simple Lit de Roi" language="fr"/>
      </Name>
      <Description>
        <Text text="One king bed with pillowtop mattresses, 300-thread-count linens,
          and down comforters (bedspreads). City view. 300 square feet. Desk with
          rolling chair. Multi-line phone with voice mail. Cable/satellite TV with
          complimentary HBO and pay movies." language="en"/>
        <Text text="Un très grand lit avec matelas à plateau-coussin, ..." language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Bathroom View" language="en"/>
          <Text text="La salle de baines" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Capacity>4</Capacity>
    </RoomData>
  </PropertyDataSet>
</Transaction>

Метаданные номера и пакета

В следующем примере определяются метаданные помещения и пакета:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Пакеты из нескольких номеров

В следующем примере определяются метаданные комнаты и пакета для нескольких пакетов комнат:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <!-- A transaction message with room types result. -->
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
      <RoomID>single</RoomID>
      <Name>
        <Text text="Single room" language="en"/>
        <Text text="Chambre simple" language="fr"/>
      </Name>
      <Description>
        <Text text="A single room" language="en"/>
        <Text text="Le chambre simple" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <PhotoURL>
        <URL>http://www.foo.com/static/bar/image1235.jpg</URL>
      </PhotoURL>
      <Capacity>2</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>double</RoomID>
      <Name>
        <Text text="Double room" language="en"/>
        <Text text="Chambre double" language="fr"/>
      </Name>
      <Occupancy>1</Occupancy>
    </RoomData>
    <PackageData>
      <PackageID>refundbreakfast</PackageID>
      <Name>
        <Text text="Refundable Room with Breakfast" language="en"/>
        <Text text="Chambre remboursable avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Continental Breakfast" language="en"/>
        <Text text="Petit déjeuner continental" language="fr"/>
      </Description>
      <ChargeCurrency>hotel</ChargeCurrency>
      <Refundable available="1" refundable_until_days="3"/>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
    <PackageData>
      <PackageID>prepaid</PackageID>
      <Name>
        <Text text="Nonrefundable" language="en"/>
        <Text text="Non remboursable" language="fr"/>
      </Name>
      <Description>
        <Text text="Blah blah blad" language="en"/>
        <Text text="Le blah blah blad" language="fr"/>
      </Description>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="0"/>
    </PackageData>
  </PropertyDataSet>
</Transaction>

<RoomFeatures>

Определяет особенности помещения.

Элемент <RoomFeatures> появляется в следующем месте в иерархии XML сообщения транзакции:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
            + <RoomFeatures>

Синтаксис

Элемент <RoomFeatures> использует следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet ... >
    ...
    <RoomData>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>[western|japanese|japanese_western]</JapaneseHotelRoomStyle>
        <Beds>
           <Bed size="[single|semi_double|double|queen|king]">
             <Width unit="cm" number="width"/>
             <Length unit="cm" number="length"/>
           </Bed>
           <!-- Include with any additional beds. -->
        </Beds>
        <Suite/>
        <Capsule/>
        <Roomsharing>[shared|private]</Roomsharing>
        <Outdoor/>
        <MobilityAccessible/>
        <Smoking>[smoking|non_smoking]</Smoking>
        <BathAndToilet relation="[together|separate]">
          <Bath bathtub="[false|true]" shower="[false|true]"/>
          <Toilet electronic_bidet="[false|true]" mobility_accessible="[false|true]"/>
        </BathAndToilet>
        <OpenAirBath/>
        <AirConditioning/>
        <Balcony/>
        <Views>
          <!-- (Optional) Defines the type of views from the room. -->
          <!-- Example: <OceanView/> -->
        </Views>

      </RoomFeatures>
      ...
    </RoomData>
    ...
  </PropertyDataSet>
</Transactions>

Атрибуты

Элемент <RoomFeatures> не имеет атрибутов.

Дочерние элементы

Элемент <RoomFeatures> имеет следующие дочерние элементы:

Дочерний элемент Необходимый? Тип Описание
<JapaneseHotelRoomStyle> Optional enum

Обозначает стиль японского гостиничного номера.

Допустимые значения:

  • western : Комната в западном стиле с кроватями.
  • japanese : Номер в японском стиле с кроватями-футонами.
  • japanese_western : Номер в японском западном стиле с кроватями в западном стиле и японскими футонами.
<Beds> Optional Object Содержит столько <Bed> сколько имеется в комнате. Обратите внимание, что японские футоны сюда не следует учитывать.

Каждый <Bed> имеет следующие атрибуты:

  • size (необязательно): допустимые значения: single , semi_double , double , queen и king .
Каждый <Bed> имеет следующие дочерние элементы:
  • <Width> (необязательно): указывает ширину кровати. Должен иметь атрибутную unit со значением cm и number атрибута с шириной кровати в целых сантиметрах.
  • <Length> (необязательно): указывает длину кровати. Должен иметь атрибутную unit со значением cm и number атрибута с длиной кровати в целых сантиметрах.
Пример:
<Beds>
  <Bed size="double">
    <Width unit="cm" number="140"/>
    <Length unit="cm" number="195"/>
  </Bed>
  <Bed/> <!-- Size unknown -->
</Beds>
<Suite> Optional empty Укажите этот элемент, если это номер люкс.
<Capsule> Optional empty Укажите этот элемент, если эта комната является капсульной.
<Roomsharing> Optional enum Проживает ли эта комната с другими жильцами, например владельцами или другими гостями. Допустимые значения являются shared и private .
<Outdoor> Optional empty Предусмотрите этот элемент, если эта комната представляет собой жилье на открытом воздухе, в котором нет фиксированных стен, водопровода и климат-контроля. Например, гостиничные номера не являются местом проживания на открытом воздухе, тогда как кемпинги, где гости останавливаются в палатках, и стоянки для автодомов, куда гости привозят свои собственные дома на колесах, представляют собой жилье на открытом воздухе.
<MobilityAccessible> Optional empty Используйте этот элемент, если помещение доступно для передвижения.
<Smoking> Optional enum Является ли этот номер номером для некурящих или номером для курящих. Допустимые значения: non_smoking и smoking .
<BathAndToilet> Optional Object Содержит информацию о ванне и туалете в номере.

Атрибут:

  • relation (необязательно): указывает, как ванна и туалет расположены друг относительно друга. Допустимые значения: together (и ванна, и туалет расположены вместе в одной комнате (например, ванная) рядом друг с другом) и separate (каждая ванна и туалет имеют отдельные места). Этот атрибут нельзя устанавливать, если в номере нет ни ванны, ни туалета.

Элемент опционально принимает следующие дочерние элементы:

  • <Bath> (необязательно): наличие этого элемента указывает на то, что в комнате есть ванна.

    Атрибуты:

    • bathtub (дополнительно): указывает на то, что в ванной комнате установлена ​​ванна. Допустимые значения: 0 (или false ) и 1 (или true ).
    • shower (дополнительно): указывает, что ванна оборудована душем. Допустимые значения: 0 (или false ) и 1 (или true ).
  • <Toilet> (необязательно): наличие этого элемента указывает на то, что в этой комнате есть туалет.

    Атрибуты:

    • electronic_bidet (необязательно): указывает, что в туалете установлено электронное биде . Допустимые значения: 0 (или false ) и 1 (или true ).
    • mobility_accessible (необязательно): указывает, что туалет доступен для мобильных устройств. Допустимые значения: 0 (или false ) и 1 (или true ).

Пример:

<BathAndToilet relation="separate">
  <Bath bathtub="1" shower="1"/>
  <Toilet
    electronic_bidet="1"
    mobility_accessible="1"/>
</BathAndToilet>
<OpenAirBath> Optional empty Предусмотрите этот элемент, если в этой комнате есть собственная ванна под открытым небом.
<AirConditioning> Optional empty Предусмотрите этот элемент, если в этой комнате есть кондиционер.
<Balcony> Optional empty Предусмотрите этот элемент, если в комнате есть балкон или веранда.
<Views> Optional Object Допустимые варианты включают в себя:

<AirportView/>
<BayView/>
<BeachView>/>
<CastleView/>
<CityView/>
<CountrysideView/>
<CourtyardView/>
<DuneView/>
<ForestView/>
<GardenView/>
<GolfCourseView/>
<HarborView/>
<LagoonView/>
<LakeView/>
<MarinaView/>
<MountainView/>
<NatureView/>
<OceanView/>
<ParkView/>
<PartialOceanView/>
<PisteView/>
<PoolView/>
<PyramidView/>
<RiverView/>
<StreetView/>

Примеры

JapaneseHotelRoomStyle не имеет значения по умолчанию. Пропуск значения не приводит к ошибке XML, но ваше объявление не отображается в результатах поиска, когда пользователь выполняет фильтрацию по стилю комнаты или кроватям.

Две односпальные кровати

В следующем примере показано, как использовать <RoomFeatures> :

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>western</JapaneseHotelRoomStyle>
        <Beds> <!-- Two single beds -->
          <Bed size="single">
            <Width unit="cm" number="97"/>
            <Length unit="cm" number="195"/>
          </Bed>
          <Bed size="single">
            <Width unit="cm" number="97"/>
            <Length unit="cm" number="195"/>
          </Bed>
        </Beds>
        <Suite/>
        <Capsule/>
        <Roomsharing>private</Roomsharing>
        <Outdoor/>
        <MobilityAccessible/>
        <Smoking>non_smoking</Smoking>
        <BathAndToilet relation="separate">
          <Bath bathtub="1" shower="1"/>
          <Toilet electronic_bidet="1" mobility_accessible="1"/>
        </BathAndToilet>
        <OpenAirBath/>
        <AirConditioning/>
        <Balcony/>
        <Views>
          <LakeView/>
          <MarinaView/>
          <BeachView/>
          <ForestView/>
          <MountainView/>
          <NatureView/>
        </Views>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

Две двуспальные кровати

Ниже приведен пример японской комнаты western стиле с двумя double кроватями.

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>western</JapaneseHotelRoomStyle>
        <Beds> <!-- Two double beds-->
          <Bed size="double"></Bed>
          <Bed size="double"></Bed>
        </Beds>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>


Японский стиль без кровати

Ниже приведен пример комнаты в японском стиле без кровати. Для номеров, оформленных japanese стиле, информация о кровати не требуется.

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese</JapaneseHotelRoomStyle>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

Японский вестерн с кроватью

Ниже приведен пример комнаты japanese_western стиле с кроватью размера king size».

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese_western</JapaneseHotelRoomStyle>
        <Beds>
          <Bed size="king"></Bed>
        </Beds>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

Если у партнера нет информации о количестве кроватей в номерах japanese_western , следуйте примеру:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese_western</JapaneseHotelRoomStyle>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

<PackageData>

Определяет независимые от маршрута метаданные о пакетах номеров для объекта недвижимости. Этот элемент содержит информацию, связанную с партнером и отелем, но не с маршрутом. Целью является один раз определить все немаршрутные данные и ссылаться на них из маршрутных данных.

Элемент <PackageData> появляется в следующем месте в иерархии XML сообщения транзакции:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

Элемент <PackageData> аналогичен <RoomData> , но описывает характеристики и термины тарифов, которые не являются частью описания физического номера. Вы используете <RoomData> и <PackageData> в сочетании, чтобы предоставить подробную информацию о пакетах номеров и функциях тарифов. Для отдельных комнат, которые не являются частью пакета, используйте только <RoomData> .

Вы можете определить элементы <RoomData> и <PackageData> для одной и той же комнаты или пакета комнат. Когда Google отображает эту комнату или пакет в результатах поиска, он будет включать описания обоих, разделенные дефисом.

Если вы обновляете один элемент <PackageData> для свойства, необходимо обновить все элементы <PackageData> и <RoomData> для этого свойства. Каждый <PropertyDataSet> считается всеми данными о свойстве и перезаписывает любые существующие данные.

Дополнительную информацию см. в метаданных Room Bundle .

Синтаксис

Элемент <PackageData> использует следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet ... >
    <PackageData>
      <PackageID>package_ID</PackageID>
      <Name>
        <Text text="package_name" language="language_code"/>
        ...
      </Name>
      <Description>
        <Text text="package_description" language="language_code"/>
        ...
      </Description>
      <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
      <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails><!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>
      <!-- For these next 3 elements, boolean_value can be 0/1 or true/false -->
      <BreakfastIncluded>boolean_value</BreakfastIncluded>
      <InternetIncluded>boolean_value</InternetIncluded>
      <ParkingIncluded>boolean_value</ParkingIncluded>
      <PhotoURL>
        <Caption>
          <Text text="photo_description" language="language_code"/>
          ...
        </Caption>
        <URL>photo_location</URL>
      </PhotoURL>
      ...
      <Meals>
        <Breakfast
          included="[true|false]" buffet="[true|false]"
          in_room="[true|false]" in_private_space="[true|false]"/>
        <Dinner
          included="[true|false]" buffet="[true|false]"
          in_room="[true|false]" in_private_space="[true|false]"/>
      </Meals>
      <CheckinTime>checkin_time</CheckinTime>
      <CheckoutTime>checkout_time</CheckoutTime>
      <MembershipBenefitsIncluded>
        <ProgramName>
          <Text language="en" text="Special Rewards">
        </ProgramName>
        <ProgramLevel>
          <Text language="en" text="Platinum">
        </ProgramLevel>
      </MembershipBenefitsIncluded>
      <OnPropertyCredit>
        <Amount currency="USD">123.45</Amount>
      </OnPropertyCredit>
    </PackageData>
    <!-- a PackageID with a MilesIncluded rate feature -->
    <PackageData>
      <PackageID>room_with_miles</PackageID>
      <Name>
       <Text text="Room with Bundled Miles" language="en">
      </Name>
      <ChargeCurrency>hotel </ChargeCurrency>
      <MilesIncluded>
        <NumberOfMiles>1000 </NumberOfMiles>
        <Provider>
          <Text language="en" text="United Airlines">
        </Provider>
      </MilesIncluded>
    </PackageData>
    ...
    ...
  </PropertyDataSet>
  ...
</Transaction>

Атрибуты

Элемент <PackageData> не имеет атрибутов.

Дочерние элементы

Элемент <PackageData> имеет следующие дочерние элементы:

Дочерний элемент Необходимый? Тип Описание
<BreakfastIncluded> Optional boolean Указывает, включает ли этот пакет завтрак в стоимость проживания. Допустимые значения: 0 (или false ) и 1 (или true ).

Предпочтительно использовать <Meals> вместо <BreakfastIncluded> .

<ChargeCurrency> Optional enum Когда и где пользователь платит за бронирование. Этот элемент использует тот же синтаксис, что и <ChargeCurrency> в <Result> .

Значение по умолчанию — web .

<CheckinTime> Optional Time Самое раннее время заезда. Время должно быть не позднее 24:00 по местному времени отеля.
<CheckoutTime> Optional Time Самое позднее возможное время выезда по местному времени отеля.
<Description> Optional Object Подробное описание пакета. Этот элемент должен содержать информацию, не описанную другими элементами или элементом <Name> . При указании описания номера не следует использовать все заглавные буквы.

Элемент <Description> принимает один дочерний элемент <Text> , который имеет два обязательных атрибута: text и language . Атрибут text представляет собой описание, а атрибут language указывает двухбуквенный код языка, как показано в следующем примере:

<Description>
  <Text text="Two breakfast buffet certificates for
    each night of stay." language="en"/>
  <Text text="Deux certificats petit-déjeuner buffet
    pour chaque nuit de séjour." language="fr"/>
</Description>
<InternetIncluded> Optional boolean Если пакет включает бесплатный доступ в Интернет, а другие пакеты не включают эту услугу. Не устанавливайте этот элемент для пакетов номеров в отеле, где во всех номерах предоставляется бесплатный доступ в Интернет. Этот элемент не распространяется на проводной доступ в Интернет в номере или беспроводной доступ в Интернет, который недоступен в номерах. Допустимые значения: 0 (или false ) и 1 (или true ).
<Meals> Optional Object Содержит информацию о блюдах в этом пакете.

Элемент <Meals> принимает два необязательных дочерних элемента: <Breakfast> и <Dinner> , которые имеют следующие атрибуты:

  • included (обязательно): установите значение 1 (или true ), если в стоимость проживания включен завтрак/ужин; в противном случае установите значение 0 или false .
  • in_room (необязательно): установите значение 1 (или true ), если у гостей есть возможность позавтракать/ужинать в номере, в котором они остановились; в противном случае установите значение 0 (или false ).
  • in_private_space (необязательно): установите значение 1 (или true ), если у гостей есть возможность позавтракать/ужинать в месте (кроме комнаты, в которой они остановились), где они могут избежать контакта с другими гостями; в противном случае установите значение 0 (или false ).
  • buffet (необязательно): установите значение 1 (или true ), если завтрак/ужин подается в виде шведского стола; в противном случае установите значение 0 (или false ).

Необязательные атрибуты используются только в том случае, если included значение true.

Чтобы фильтры еды ( no meals , breakfast only , dinner only , breakfast and dinner ) работали, и <Breakfast> , и <Dinner> необходимо предоставить included атрибут.

<Name> Required string Имя пакета. Это значение должно соответствовать тому, что отображается на целевой странице отеля. Не устанавливайте значение этого элемента только заглавными буквами.

Этот элемент принимает один дочерний элемент <Text> , который имеет два атрибута: text и language . Атрибут text представляет собой описание, а атрибут language указывает двухбуквенный код языка, как показано в следующем примере:

<Name>
  <Text text="Bed and Breakfast" language="en"/>
  <Text text="Lit et petit déjeuné" language="fr"/>
</Name>
<Occupancy> Optional integer Максимальное количество гостей, на которое рассчитан пакет номеров. Например, в большом люксе могут физически разместиться 6 гостей, но он рассчитан только на 4 гостей.

Это значение должно быть меньше или равно элементу <Capacity> , который представляет собой количество людей, которое физически может разместиться в помещении.

Значение <Occupancy> должно быть положительным целым числом от 1 до 99 включительно.

Если вы укажете этот элемент как в <RoomBundle> , так и <PackageData> , значение в <RoomBundle> имеет приоритет.

Примечание :

<Occupancy> может сопровождаться <OccupancyDetails> , который указывает тип гостей (взрослые или дети). См. <OccupancyDetails> для получения синтаксиса и описания дочерних элементов.
<PackageID> Required string

Уникальный идентификатор пакета. Используйте этот идентификатор, чтобы сопоставить данные пакета номеров с блоками <Result> в ваших обновлениях цен. Дополнительную информацию см. в метаданных Room Bundle .

(Вы также можете использовать этот идентификатор для ссылки на общее определение пакета номеров, используемое в одном сообщении транзакции при определении встроенных данных пакета номеров.)

<ParkingIncluded> Optional boolean Включает ли пакет услуг бесплатную парковку, хотя в противном случае парковка в этом отеле была бы платной услугой. Не указывайте значение этого элемента для отеля, предлагающего бесплатную парковку.

Допустимые значения: 0 (или false ) и 1 (или true ). Значение по умолчанию — false .

<PhotoURL> Optional Object (То же, что <PhotoURL> в <RoomData> , но для пакета (например, фотографий еды).)
<Refundable> Optional Object Позволяет указать тариф как полностью возмещаемый или обеспечить бесплатную отмену. Если не указано, информация о возврате средств не отображается. Политика возврата на уровне <PackageData> переопределяет политику возврата на уровне <Result> . Политика возврата на уровне <Rates> переопределяет политику возврата на уровне <PackageData> . Возвратные цены также могут быть показаны пользователям с помощью альтернативных вариантов без непосредственного изменения схемы сообщения о транзакции. Узнайте больше об этих вариантах. Политика возвратных тарифов .

В следующем примере показан элемент <Refundable> со всеми установленными атрибутами:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

Примечание. Мы рекомендуем установить все атрибуты. Предупреждающее сообщение о статусе канала генерируется, если один или несколько атрибутов не установлены.

Если вы не зададите никаких атрибутов, ставка не будет отображаться как возмещаемая. Атрибуты:

  • available : (Обязательно) Установите значение 1 или true , чтобы указать, допускает ли тариф полный возврат средств; в противном случае установите значение 0 или false .
  • refundable_until_days : (Обязательно, если available true ) Указывает количество дней до прибытия, за которое можно запросить полный возврат средств. Значение refundable_until_days должно быть целым числом от 0 до 330 включительно.
  • refundable_until_time : (настоятельно рекомендуется, если available true ) Указывает самое позднее время суток по местному времени отеля, в которое будет удовлетворен запрос на полный возврат средств. Это можно комбинировать с refundable_until_days , чтобы указать, например, что «возвраты доступны до 16:00 за два дня до заезда». refundable_until_time не установлено, значение по умолчанию равно полуночи.

    Значение этого атрибута использует формат времени .

При настройке атрибутов обратите внимание на следующее:

  • Если available или refundable_until_days не установлен, тариф не отображается как подлежащий возврату.
  • Если available значение 0 или false , остальные атрибуты игнорируются. Ставка не отображается как возвращаемая, даже если установлен один или оба других атрибута.
<MembershipBenefits Included> Optional boolean В стоимость проживания включены преимущества элитного статуса на весь срок пребывания. Включает следующие параметры:
  • ProgramName : название программы элитного статуса.
  • ProgramLevel : Уровень программы. Например: «Золото».
  • NightlyValue (optional) : стоимость льгот за ночь.
<CarRentalIncluded> Optional boolean В стоимость проживания входит бесплатный прокат автомобиля на весь период проживания.
<MilesIncluded> > > Optional boolean В стоимость включены мили для часто летающих пассажиров. Параметры включают в себя:
  • NumberofMiles : количество миль на маршруте.
  • Provider : предоставляются мили для часто летающих пассажиров.
<OnPropertyCredit> Optional boolean В стоимость входит кредит на недвижимость (питание и напитки, курорт, спа и т. д.). Параметр:
  • Amount : стоимость кредита на маршрут в местной валюте.
<AirportTransportationIncluded> Optional Object В стоимость входит бесплатный трансфер от/до ближайшего аэропорта. Необязательный атрибут direction определяет направление транспортировки. Допустимые значения включают в себя:
    from : Трансфер предоставляется из аэропорта до объекта размещения. Это значение по умолчанию, если направление не указано. to : от отеля предоставляется транспорт до аэропорта. round_trip : Транспорт предоставляется как в аэропорт, так и из него.

Примеры

Пакет одноместного номера

В следующем примере определен один пакет номеров, рассчитанный на размещение 2 человек (один взрослый и один ребенок) и включающий завтрак:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>1</NumAdults>
        <Children>
          <Child age="17"/>
        </Children>
      </OccupancyDetails>
      <PackageID>P54321</PackageID>
      <Name>
         <Text text="Breakfast Included" language="en"/>
         <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Two certificates for continental
          breakfast will be provided." language="en"/>
        <Text text="Deux certificats pour le petit déjeuner
          continental seront fournis." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Метаданные комнаты и пакета

В следующем примере определяются метаданные помещения и пакета:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Пакеты из нескольких номеров

В следующем примере определяются метаданные комнаты и пакета для нескольких пакетов комнат:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <!-- A transaction message with room types result. -->
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
      <RoomID>single</RoomID>
      <Name>
        <Text text="Single room" language="en"/>
        <Text text="Chambre simple" language="fr"/>
      </Name>
      <Description>
        <Text text="A single room" language="en"/>
        <Text text="Le chambre simple" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <PhotoURL>
        <URL>http://www.foo.com/static/bar/image1235.jpg</URL>
      </PhotoURL>
      <Capacity>2</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>double</RoomID>
      <Name>
        <Text text="Double room" language="en"/>
        <Text text="Chambre double" language="fr"/>
      </Name>
      <Occupancy>1</Occupancy>
    </RoomData>
    <PackageData>
      <PackageID>refundbreakfast</PackageID>
      <Name>
        <Text text="Refundable Room with Breakfast" language="en"/>
        <Text text="Chambre remboursable avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Continental Breakfast" language="en"/>
        <Text text="Petit déjeuner continental" language="fr"/>
      </Description>
      <ChargeCurrency>hotel</ChargeCurrency>
      <Refundable available="1" refundable_until_days="3"/>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
    <PackageData>
      <PackageID>prepaid</PackageID>
      <Name>
        <Text text="Nonrefundable" language="en"/>
        <Text text="Non remboursable" language="fr"/>
      </Name>
      <Description>
        <Text text="Blah blah blad" language="en"/>
        <Text text="Le blah blah blad" language="fr"/>
      </Description>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="0"/>
    </PackageData>
  </PropertyDataSet>
</Transaction>


Пакет номеров со стоимостью

В следующем примере определяются метаданные номера и пакета для пакета номеров с функциями тарифа:

<Transaction timestamp="2010-04-24T20:44:56-04:00" id="TXNID">
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
     ...
    </RoomData>
<!-- definitions of PackageData types including rate features -->
    <PackageData>
      <PackageID>room_with_addl_benefits</PackageID>
      <Name>
        <Text text="Acme Hotels 2017 Promotion Package" language="en"/>
      </Name>
      <ChargeCurrency>hotel</ChargeCurrency>
      <BreakfastIncluded>1</BreakfastIncluded>
      <MembershipBenefitsIncluded>
        <ProgramName>
          <Text language="en" text="Marriott Rewards"/>
        </ProgramName>
        <ProgramLevel>
          <Text language="en" text="Platinum"/>
        </ProgramLevel>
      </MembershipBenefitsIncluded>
      <OnPropertyCredit>
        <Amount currency="USD">123.45</Amount>
      </OnPropertyCredit>
    </PackageData>
    <PackageData>
      <PackageID>room_with_miles</PackageID>
      <Name>
        <Text text="Room with Bundled Miles" language="en"/>
      </Name>
      <ChargeCurrency>hotel</ChargeCurrency>
      <MilesIncluded>
        <NumberOfMiles>1000</NumberOfMiles>
        <Provider>
          <Text language="en" text="United Airlines"/>
        </Provider>
      </MilesIncluded>
      <AirportTransportationIncluded direction="from"/>
    </PackageData>
  </PropertyDataSet>

<!-- The actual list of prices -->
  <Result>
…
  </Result>
</Transaction>

Еда и фотографии

В следующем примере определяются метаданные номера и пакета для еды, фотографий, а также времени заезда и выезда:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <PackageID>PackageID_1</PackageID>
      <Name>
        <Text text="Meals Included" language="en"/>
      </Name>
      <PhotoURL>
        <Caption>
          <Text text="Breakfast" language="en"/>
          <Text text="朝食" language="ja"/>
        </Caption>
        <URL>http://example.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Meals>
        <!-- Guests can choose to have breakfast in their room or in another
        space to avoid contact with other guests. -->
        <Breakfast included="1" in_room="1" in_private_space="1"/>
        <Dinner included="1" buffet="1"/>
      </Meals>
      <CheckinTime>15:00</CheckinTime>
      <CheckoutTime>11:00</CheckoutTime>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Завтрак

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <PackageID>PackageID_1</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
      </Name>
      <PhotoURL>
        <Caption>
          <Text text="Breakfast" language="en"/>
          <Text text="朝食" language="ja"/>
        </Caption>
        <URL>http://example.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Meals>
        <Breakfast included="true"/>
        <!-- Dinner not included needs to be explicitly specified -->
        <Dinner included="false"/>
      </Meals>
      <CheckinTime>15:00</CheckinTime>
      <CheckoutTime>11:00</CheckoutTime>
    </PackageData>
  </PropertyDataSet>
</Transaction>

<Result>

Контейнер для обновлений цен и доступности в сообщении <Transaction> .

Элемент <Result> появляется в следующем месте в иерархии XML сообщения транзакции:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

Используйте <Result> , чтобы установить или обновить цены на номера и определить доступный инвентарь. Элементы, определенные в этом элементе, обычно ссылаются на независимые от маршрута метаданные о номере или пакете (например, описание или набор удобств), определенные в <PackageData> и <RoomData> .

Обычно вы очень часто отправляете сообщения о транзакциях с обновлениями цен. То, как и как часто вы это делаете, зависит от вашего способа доставки .

Вы можете использовать <Result> в сообщении транзакции для удаления маршрутов, как описано в разделе Удаление инвентаря . Дополнительные сведения об использовании сообщений о транзакциях для обновления цен и доступности см. в разделе Добавление и обновление инвентаря .

Одно сообщение транзакции может включать в себя любое количество элементов <Result> , если размер сообщения не превышает 100 МБ.

Синтаксис

Элемент <Result> использует следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    <!-- Required -->
    <Property>hotel_ID</Property>
    <!-- Required -->
    <Checkin>YYYY-MM-DD</Checkin>
    <!-- Required -->
    <Nights>number_of_nights</Nights>

    <Baserate currency="currency_code">price</Baserate>
    <!-- Only required when <Baserate> contains a real price -->
    <Tax currency="currency_code">tax_amount</Tax>
    <!-- Only required when <Baserate> contains a real price  -->
    <OtherFees currency="currency_code">fee_amount</OtherFees>
    <Refundable available="[false|true]" refundable_until_days="number_of_days"
      refundable_until_time="time"/>

    <RoomID>room_ID</RoomID>
    <PackageID>package_ID</PackageID>
    <ExpirationTime>expiration_time</ExpirationTime>
    <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>

    <Occupancy>max_number_of_intended_occupants</Occupancy>
    <!-- For Baserate, occupancy value must be greater than or equal to 2.
         If a value is not provided for occupancy, it defaults to 2. -->
    <OccupancyDetails>occupancy_info</OccupancyDetails>

    <Rates>...</Rates>

    <RoomBundle>...</RoomBundle>

    <AllowablePointsOfSale>
      <PointOfSale id="landing_page_identifier"/>
      ...
    </AllowablePointsOfSale>

    <Custom[1-5]>custom_value</Custom[1-5]>
  </Result>
  ...
  </Transaction>

Атрибуты

Элемент <Result> имеет следующие атрибуты:

Атрибут Необходимый? Тип Описание
mergeable Optional boolean По умолчанию новые цены на конкретный отель и пару маршрутов перезапишут все предыдущие (еще не истекшие) цены, присутствующие в кеше Google. Атрибут mergeable позволяет сохранять дополнительные цены в кеше Google, не удаляя предыдущую информацию о ценах. Запрос Live Pricing с ответами на контекст всегда будет иметь значение true для этого атрибута (независимо от ответа на сообщение о транзакции).

Дочерние элементы

Элемент <Result> имеет следующие дочерние элементы:

Дочерний элемент Необходимый? Тип Описание
<AllowablePointsOfSale> Optional Object Одна или несколько целевых страниц, подходящих для отеля. Целевая страница — это веб-сайт, который может обрабатывать процесс бронирования для конечного пользователя. Чтобы явно включить определенную целевую страницу (и исключить другие), добавьте один или несколько элементов <AllowablePointsOfSale> , которые соответствуют атрибуту id элемента <PointOfSale> в файле целевых страниц.

Если вы не включите этот элемент, все целевые страницы, определенные в файле целевых страниц, будут считаться подходящими для бронирования номера. Дополнительную информацию см. в разделе Синтаксис файла целевых страниц .

<Baserate> Optional float

Стоимость номера за проживание. Значение этого элемента должно отражать следующее:

  • Для отдельной комнаты установите самый дешевый тариф на двухместное размещение, который вы предлагаете. Здесь разрешена более высокая вместимость, если у вас нет двухместного тарифа и в вашей учетной записи включена недвойная вместимость. Пожалуйста, свяжитесь с нами , чтобы включить тарифы на размещение без двухместного размещения. Здесь не разрешены тарифы на одноместное размещение — их необходимо установить в разделе <Rates> .
  • Для общей комнаты оставьте пустым и используйте <RoomBundle> .
  • Это значение должно быть общей базовой ценой за все ночи, а не средней ценой за ночь.

Если комната недоступна для маршрута, <Baserate> следует либо опустить, либо установить на -1 , а <Unavailable> следует указать вместе со всеми известными причинами недоступности.

Чтобы удалить пакет номеров, следуйте инструкциям в разделе «Удаление пакета номеров» .

<Baserate> не должен содержать никаких символов группировки цифр, таких как запятая (,) или точка (.). Всегда разделяйте дроби, используя точку (.) в качестве десятичного знака. Например, представьте 1200,40 долларов США как:

<Baserate currency="USD">1200.40</Baserate>

Элемент <Baserate> принимает следующие необязательные атрибуты:

  • all_inclusive : логическое значение, указывающее, включает ли эта ставка налоги и сборы. Обычно установите для этого значения значение false для конечных пользователей в США и Канаде и укажите значения для элементов <Tax> и <OtherFees> . Если вы используете цены «все включено», вы можете не иметь права появляться в списках, если в ваших ценах не указаны налоги и сборы для канадских пользователей.

    Цены «все включено» теперь отображаются для пользователей из США.

    Для всех остальных конечных пользователей вы обычно включаете налоги и сборы в базовую ставку и устанавливаете значение атрибута all_inclusive равным true . Для получения дополнительной информации см. Политику в отношении налогов и сборов .

    Значение по умолчанию — false .

  • currency : трехбуквенный код валюты . Например, USD за доллары США.
<ChargeCurrency> Optional enum Когда и где пользователь платит за бронирование. Этот элемент можно использовать в сообщении транзакции в элементе <Result> для цены отеля или блоке <PackageData> для пакета номеров.

Допустимые значения:

  • web : оплата взимается с пользователя онлайн во время бронирования. Это значение по умолчанию. Фактическая целевая страница определяется файлом целевой страницы и может зависеть от валюты, местоположения, языка и других факторов пользователя.
  • hotel : с пользователя взимается плата при заселении в отель. Если оплата всегда должна производиться в валюте отеля, установите для параметра <ChargeCurrency> значение hotel . На фактическую целевую страницу не влияет валюта пользователя.
  • deposit : некоторая часть суммы взимается с пользователя немедленно, а оставшаяся часть взимается позже, обычно при выезде пользователя из отеля.
  • installments : с пользователя взимается первоначальная часть общей суммы задолженности, и ожидается, что он будет регулярно выплачивать установленный остаток в течение фиксированного периода времени.

Значение по умолчанию — web .

<Checkin> Required Date Дата регистрации для маршрута в формате даты . Комбинация элемента <Nights> и элемента <Checkin> составляет маршрут.
<Custom[1‑5]> Optional string Определяет настраиваемое поле, которое можно использовать для передачи дополнительных данных, связанных с отелем. Вы можете передать до пяти пользовательских значений со следующими именами элементов:
  • <Custom1>
  • <Custom2>
  • <Custom3>
  • <Custom4>
  • <Custom5>

Элементы <Custom> позволяют передавать произвольные данные. Например, вы можете указать значение в этом поле, которое затем будет использоваться файлом целевых страниц для создания пользовательского URL-адреса целевой страницы. Существует ограничение в 200 символов на каждое настраиваемое поле. Дополнительную информацию см. в файлах целевой страницы .

Элементы <Custom>, представленные в элементе <Rate> , не наследуются от элемента <RoomBundle> . Вам следует определить атрибут <Custom> отдельно в каждом <RoomBundle> .

<ExpirationTime> Optional DateTime Дата и время, когда цена считается истекшей (минимум 3 часа).

Мы рекомендуем не указывать временные метки срока действия, если это не критично для вашей структуры ценообразования.

Google не обслуживает цены с истекшим сроком действия, и любой маршрут с истекшей ценой станет доступным для запроса цен в реальном времени .

<Nights> Required integer Количество ночей по маршруту. Значение элемента <Nights> должно быть положительным целым числом. Комбинация <Nights> и <Checkin> составляют маршрут.
<OtherFees> Optional float Сборы, отличные от базовой ставки, и налоги, влияющие на окончательную стоимость номера. Элемент <OtherFees> принимает единственный обязательный атрибут currency , который определяет трехбуквенный код валюты для комиссий. Например, USD .

Элемент <OtherFees> является обязательным, если <Baserate> больше нуля.

<Occupancy> Optional integer Указывает максимально допустимое количество жильцов для этого тарифа. Если <Occupancy> отображается непосредственно под <Result> , в нем должно быть указано 2 или более. <Occupancy> может сопровождаться <OccupancyDetails> , который указывает тип гостей (взрослые или дети). Если типы гостей не указаны, предполагается, что это взрослые. Обратитесь к <OccupancyDetails> для получения синтаксиса и описания дочерних элементов. Если элемент <Occupancy> не указан, заполняемость по умолчанию равна 2 .

Примечание. Обратитесь в службу поддержки, чтобы включить функцию отправки цен на размещение без двухместного размещения.

<PackageID> Optional string Уникальный идентификатор пакета для сопоставления его с предопределенными данными пакета. Также используется для заполнения переменной целевой страницы PACKAGE-ID. Дополнительную информацию см. в метаданных Room Bundle .
<Property> Required string Идентификатор отеля, на который влияют связанные данные (цена, маршрут, пакет номеров или метаданные). Значение этого элемента должно быть строкой. Значение этого элемента должно соответствовать значению <id> объявления, которое вы определили в фиде списка отелей.
<Rates> Optional <Rates> Контейнер для одного или нескольких блоков <Rate> . Каждый <Rate> в <Rates> определяет различную цену за комбинацию номер/маршрут.

Используйте элемент <Rates> , если существует несколько тарифов для одной и той же комбинации номера/маршрута или когда тариф не может быть указан на уровне <Result> . Например, вы определяете несколько тарифов для условных тарифов , частных тарифов , условных тарифов в пакетах номеров или для разных видов размещения.

Примечание. В <Result> тарифы за одноместное размещение можно указать только в <Rates> . Пожалуйста, свяжитесь с нами , чтобы разрешить цены на размещение без двухместного размещения.

<Refundable> Optional Object Позволяет перечислить ставку как полностью возвратную или обеспечивая бесплатную отмену. Если не предоставлено, информация о возврате не отображается. Политика возмещения на уровне <PackageData> переопределяет политику возврата на уровне <Result> . Политика возмещения на уровне <Rates> переопределяет политику возврата на уровне <PackageData> . Возвращаемая цена также может быть выделена пользователям с помощью альтернативных параметров, не изменяя схему сообщений о транзакции. Узнайте больше о политике возвращаемых ставок .

В следующем примере показан элемент <Refundable> со всеми его набором атрибутов:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

Примечание. Мы рекомендуем установить все атрибуты. Сообщение о статусе подачи генерируется, когда один или несколько атрибутов не установлены.

Если вы не устанавливаете никаких атрибутов, скорость не отображается как возвращаемая. Атрибуты:

  • available : (Требуется) Установить 1 (или true ), чтобы указать, разрешает ли скорость полное возмещение; в противном случае установите на 0 (или false ).
  • refundable_until_days : (Требуется, если true available ) Указывает количество дней до заезда, что может быть запрошен полный возврат средств. Значение refundable_until_days должно быть целым числом между 0 и 330, включительно.
  • refundable_until_time : (Настоятельно рекомендуется, если available true ) Указывает последнее время суток, в местное время отеля, что будет удостоен чести полного запроса на возврат средств. Это может быть объединено с refundable_until_days , чтобы указать, например, что «возвраты доступны до 16:00 за два дня до регистрации». Если refundable_until_time не установлен, значение по умолчанию по умолчанию до полуночи.

    Значение этого атрибута использует формат времени .

При настройке атрибутов обратите внимание на следующее:

  • Если available или refundable_until_days не установлена, скорость не отображается как возвратная.
  • Если available 0 (или false ), другие атрибуты игнорируются. Ставка не отображается как возвращаемая, даже если установлен один или оба других атрибута.
<RoomBundle> Optional <RoomBundle> Контейнер для получения информации о цене физических описаний комнаты, любой упаковки удобств и некоторых данных политики покупки для данного отеля и маршрута.

В целом, используйте этот элемент, чтобы определить цены для базового комнаты и различных типов комнат в одном и том же свойстве. Несмотря на то, что можно определить встроенные описания пакетов комнаты, вы должны использовать отдельное сообщение транзакции для определения этой информации. Google будет хранить метаданные, чтобы вы могли ссылаться на них, а не повторять их, во всех будущих обновлениях ценообразования.

<RoomID> Optional string Уникальный идентификатор комнаты, чтобы составить его с предопределенными данными комнаты. Также используется для заполнения переменной целевой страницы идентификации партнеров. Для получения дополнительной информации обратитесь к метаданным пакета комнаты .
<Tax> Optional float Налоги, которые рассчитываются по окончательной цене комнаты. Элемент <Tax> принимает один необходимый атрибут, currency , который определяет трехбуквенную валютную код для налогов. Например, USD . Элемент <Tax> требуется, если <Baserate> больше нуля.

Если атрибут <Baserate> элемента" all_inclusice "явно устанавливается на TRUE, то установка этого значения является необязательным.

<Unavailable> Optional Object Указывает, что маршрут недоступен для бронирования. Служит контейнером по более подробным причинам, почему маршрут был недоступен. Одна или несколько из следующих причин недоступности могут быть вложены под тег <Unavailable> :
  • <NoVacancy/> : больше комнат не доступно для продажи за одну или несколько ночей пребывания.
  • <MinNightStay value=N/> : маршрут был ниже минимального ночного пребывания N для дат пребывания.
  • <MaxNightStay value=N/> : маршрут был выше максимального ночного пребывания N для дат пребывания.
  • <MinAdvancePurchase value=N/> : маршрут был ниже минимального окна предварительного бронирования N для дат пребывания.
  • <MaxAdvancePurchase value=N/> : маршрут был выше максимального окна предварительного бронирования N для дат пребывания.
  • <ClosedToArrival/> : собственность не разрешает регистрацию на дату прибытия маршрута.
  • <ClosedToDeparture/> : недвижимость не разрешает выезд на дату отъезда маршрута.
  • <PropertyClosed first_open="YYYY-MM-DD" first_closed="YYYY-MM-DD"/> : свойство закрыто для некоторых или всего пребывания. Рекомендуемые атрибуты first_open и first_closed указывают первые даты, превышающие или равные дате прибытия, для которой свойство открыто или закрыто соответственно. Для имущества, которое закрывается после даты прибытия, first_open должен быть равным дате прибытия, и first_closed должен быть датой, когда собственность закрывается. Для имущества, которое закрыто с даты прибытия, first_closed должен быть равен дате прибытия, и first_opened должен быть следующей датой, в которой свойство открыто.
  • <NotFetched/> : цена на маршрут не была предоставлена ​​нижестоящими источниками данных.
  • <InvalidProperty/> : Запрошенный идентификатор имущества не был признан.
  • <InvalidOccupancy/> : Запрошенная занятость не поддерживается имуществом.
  • <PriceIssue/> : проблема с ценой, вызванная ее не отправлять.
  • <InternalError reason=""/> : произошла некоторая неоплачиваемая ошибка. Необязательная причина атрибут может сообщить об ошибке как текст.
  • <OtherRestriction restriction=""/> : маршрут не был доступен из -за некоторого неоплачиваемого ограничения бронирования. Необязательный атрибут ограничения позволяет сообщать об ограничении в виде текста.

Примеры

Многопомеренный пример

Следующий пример определяет один маршрут и его цены на два свойства:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
  </Result>
  <Result>
    <Property>052213</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">299.98</Baserate>
    <Tax currency="USD">26.42</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="otto"/>
      <PointOfSale id="simon"/>
    </AllowablePointsOfSale>
  </Result>
</Transaction>

В этом примере не показаны подробности о комнате, такие как описание, изображение и подпись, название комнаты и ее емкость.

Вы можете определить эту информацию один раз в отдельном сообщении транзакции, которое хранит Google. Затем вы можете ссылаться на это во всех последующих ценах и обновлениях инвентаря. Для получения дополнительной информации обратитесь к метаданным пакета комнаты .

Многократный пример

В следующем примере определяется один маршрут и свойство с несколькими ставками для различных занятий. Элемент <Rates> может быть использован для обеспечения многократного ценообразования для конкретного свойства. Следующий пример также полезен для свойств аренды отпуска (VR):

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2020-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2021-01-13</Checkin>
    <Nights>9</Nights>
    <Baserate currency="USD">3196.1</Baserate>
    <Tax currency="USD">559.49</Tax>
    <OtherFees currency="USD">543.34</OtherFees>
    <Occupancy>2</Occupancy>
    <Rates>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>1</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>3</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>4</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>5</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>6</Occupancy>
      </Rate>
    </Rates>
  </Result>
</Transaction>

Недоступный пример

В следующем примере определяется один маршрут, доступность которого не может быть извлечена из нисходящих каналов, второй, который находится ниже минимального ночного пребывания и уже забронирована для указанных дат, и треть В ходе пребывания:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Unavailable>
      <NotFetched/>
    </Unavailable>
  </Result>
  <Result>
    <Property>073313</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Unavailable>
      <NoVacancy/>
      <MinNightStay value=3/>
    </Unavailable>
  </Result>
  <Result>
    <Property>052213</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>10</Nights>
    <Unavailable>
      <PropertyClosed first_open="2018-06-15" first_closed="2018-06-10"/>
    </Unavailable>
  </Result>
</Transaction>

<Rates>

Контейнер для одного или нескольких блоков <Rate> . Каждый <Rate> в <Rates> определяет различную цену на комбинацию комнаты или маршрута.

Используйте элемент <Rates> только тогда, когда есть несколько ставок для одной и той же комнаты или маршрута. Например, вы определяете несколько ставок для условных ставок , частных ставок или условных ставок в пакетах в помещении .

Элемент <Rates> появляется в следующем месте в сообщении транзакции XML Иерархия:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>         // Pricing and availability
        + <Rates>
        + <RoomBundle> (Can also contain <Rates>)
        + ...

Значения, установленные в <Rate> переопределяют значения, связанные с ценой, на родительском <Result> или <RoomBundle> элементе. Если они не установлены в <Rate> , они наследуют свое значение от родительского элемента. Только <AlliblePointsOfSale> унаследован в элементе <RoomBundle> .

Синтаксис

В элементе <Rates> используется следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    <Rates>
      <Rate rate_rule_id="rate_rule_id">
        <Baserate currency="currency_code">price</Baserate>
        <Tax currency="currency_code">tax_amount</Tax>
        <OtherFees currency="currency_code">fee_amount</OtherFees>
        <ExpirationTime>expiration_time</ExpirationTime>
        <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
        <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
        <AllowablePointsOfSale>
          <PointOfSale id="landing_page_identifier"/>
        </AllowablePointsOfSale>
        <Occupancy>max_number_of_intended_occupants</Occupancy>
        <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>
          ...
        <Custom[1-5]>custom_value</Custom[1-5]>
      </Rate>
      ...
    </Rates>
  </Result>
  ...
</Transaction>

Атрибуты

Элемент <Rates> имеет следующие атрибуты:

Атрибут Необходимый? Описание
rate_rule_id Optional Для условных ставок этот идентификатор соответствует ставке с определением в вашем файле определения правил. Предел символов для этого поля составляет 40 символов.

Дочерние элементы

В элементе <Rates> есть следующие детские элементы:

Детский элемент Необходимый? Тип Описание
<AllowablePointsOfSale> Optional Object Одна или несколько целевых страниц, которые имеют право на отель. Этот элемент использует тот же синтаксис, что и <AllowablePointsOfSale> на <Result> .
<Baserate> Required float Цена комнаты для проживания. Этот элемент использует тот же синтаксис, что и <Baserate> на <Result> .

ПРИМЕЧАНИЕ. Дочерний элемент <Baserate> по <Rate> не может быть определен как недоступный.

<ChargeCurrency> Optional enum Когда и где пользователь платит за бронирование. Этот элемент использует тот же синтаксис, что и <ChargeCurrency> в <Result> .
<Custom[1‑5]> Optional string Пользовательские поля, которые вы можете использовать для передачи дополнительных данных, связанных с отелем на целевую страницу. Этот элемент использует тот же синтаксис, что и <Custom[1‑5]> в <Result> . Существует предел 200 символов на пользовательское поле. Для получения дополнительной информации обратитесь к файлам целевой страницы .

Если в элементе <Result> представлены элементы <Custom>, то они не унаследованы в элементе <RoomBundle> и должны быть определены отдельно для каждого <RoomBundle> или его можно включить в <CackagedAta>, если это необходимо.

<ExpirationTime> Optional DateTime Дата и время, когда ставка считается истек. Этот элемент использует тот же синтаксис, что и <ExpirationTime> в <Result> .
<Occupancy> Optional integer

Определяет максимально разрешенные пассажиры для этой ставки. Если не указано, предполагается, что это то же самое, что и родительская ставка. <Occupancy> может сопровождаться <OccupancyDetails> , в котором указывается тип гостей (взрослые или дети). Проконсультируйтесь <OccupancyDetails> для синтаксиса и описания детских элементов.

<OtherFees> Required float Сборы, отличные от базовой ставки и налогов, которые влияют на окончательную цену комнаты. В этом элементе используется тот же синтаксис, что и <OtherFees> в <Result> .

Если атрибут <Baserate> элемента" all_inclusice "явно устанавливается на TRUE, то установка этого значения является необязательным.

<Refundable> Optional Object Позволяет перечислить ставку как полностью возвратную или обеспечивая бесплатную отмену. Если не предоставлено, информация о возврате не отображается. Политика возмещения на уровне <PackageData> переопределяет политику возврата на уровне <Result> . Политика возмещения на уровне <Rates> переопределяет политику возврата на уровне <PackageData> . Возвращаемая цена также может быть выделена пользователям с помощью альтернативных параметров, не изменяя схему сообщений о транзакции. Узнайте больше об этих вариантах, которые возвращаются в политику .

В следующем примере показан элемент <Refundable> со всеми его набором атрибутов:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

Примечание. Мы рекомендуем установить все атрибуты. Сообщение о статусе подачи генерируется, когда один или несколько атрибутов не установлены.

Если вы не устанавливаете никаких атрибутов, скорость не отображается как возвращаемая. Атрибуты:

  • available : (Требуется) Установить 1 (или true ), чтобы указать, разрешает ли скорость полное возмещение; в противном случае установите на 0 (или false ).
  • refundable_until_days : (Требуется, если true available ) Указывает количество дней до заезда, что может быть запрошен полный возврат средств. Значение refundable_until_days должно быть целым числом между 0 и 330, включительно.
  • refundable_until_time : (Настоятельно рекомендуется, если available true ) Указывает последнее время суток, в местное время отеля, что будет удостоен чести полного запроса на возврат средств. Это может быть объединено с refundable_until_days , чтобы указать, например, что «возвраты доступны до 16:00 за два дня до регистрации». Если refundable_until_time не установлен, значение по умолчанию по умолчанию до полуночи.

    Значение этого атрибута использует формат времени .

При настройке атрибутов обратите внимание на следующее:

  • Если available или refundable_until_days не установлена, скорость не отображается как возвратная.
  • Если available 0 (или false ), другие атрибуты игнорируются. Ставка не отображается как возвращаемая, даже если установлен один или оба других атрибута.
<Tax> Required float Налоги, которые рассчитываются по окончательной цене комнаты. Этот элемент использует тот же синтаксис, что и a <Tax> в <Result> .

Примеры

Базовая ставка и условная ставка

В следующем примере показано сообщение транзакции, которое содержит базовую скорость и условную скорость :

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>1</Nights>

    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>

    <Rates>
      <!-- The rate_rule_id is required when using conditional rates -->
      <Rate rate_rule_id="mobile">
        <!-- Override base rate and taxes for conditional rates -->
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <!-- NOTE: OtherFees is inherited from the above setting -->
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

Многочисленные условные ставки

В следующем примере определяется базовая ставка и многочисленные условные ставки в <RoomBundle> :

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>2</Nights>
    <!-- When Google receives new room bundle information for an itinerary, all
    previous room bundle pricing is dropped from Google's cache. Thus, if you
    want to delete a specific room bundle from Google's cache, you may do so
    by simply not providing that specific room bundle in subsequent transaction
    messages. -->
    <RoomBundle>
     ...
      <!-- RoomID is required, PackageID is recommended. -->
      <RoomID>5</RoomID>
      <PackageID>ABC</PackageID>
      <!-- Baserate is required. -->
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>

      <!-- RatePlanID is optional and represents the unique identifier for a
      room and package data combination. We strongly recommend using RatePlanID
      as a variable to build your dynamic landing page (formerly Point of Sale)
      URL. For details, see Using Variables and Conditions. -->
      <RatePlanID>5-ABC</RatePlanID>

      <!-- Occupancy is mandatory for RoomBundle elements. -->
      <!-- Elements below will get inherited to nested rate elements. -->
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
      </OccupancyDetails>
      <InternetIncluded>1</InternetIncluded>


      <!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <!-- Neither rate overrides Custom2. -->
      <Custom2>ratebasic</Custom2>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides ChargeCurrency from roombundle. -->
          <ChargeCurrency>hotel</ChargeCurrency>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode321</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode432</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

<RoomBundle>

Определяет цены и доступность для комплектов комнаты как ребенок <Result> в сообщении <Transaction> . Определите отдельный элемент для каждого пакета или комбинации маршрутов. Чтобы определить пакет и условия комплексов комнаты, используйте <RoomData> .

Элемент <RoomBundle> появляется в следующем месте в сообщении транзакции XML иерархия:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

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

Синтаксис

Элемент <RoomBundle> использует следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    ...
    <RoomBundle>
      <!-- Required unless specified inline under <RoomData> -->
      <RoomID>room_ID</RoomID>
      <!-- Required  <PackageData> -->
      <PackageID>package_ID</PackageID>

      <!-- Required -->
      <Baserate currency="currency_code">price</Baserate>
      <!-- Required -->
      <Tax currency="currency_code">taxes</Tax>
      <!-- Required -->
      <OtherFees currency="currency_code">other_fees</OtherFees>

      <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
      <!-- Required -->
      <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>

      <BreakfastIncluded>boolean_value</BreakfastIncluded>
      <InternetIncluded>boolean_value</InternetIncluded>
      <ParkingIncluded>boolean_value</ParkingIncluded>

      <RatePlanID>rate_plan_ID</RatePlanID>

      <Rates>...</Rates>

      <Custom1>custom_value_1</Custom1>
      <Custom2>custom_value_2</Custom2>
      <Custom3>custom_value_3</Custom3>
      <Custom4>custom_value_4</Custom4>
      <Custom5>custom_value_5</Custom5>
    </RoomBundle>
    ...
  </Result>
</Transaction>

Атрибуты

У элемента <RoomBundle> нет атрибутов.

Дочерние элементы

У элемента <RoomBundle> есть следующие детские элементы:

Детский элемент Необходимый? Тип Описание
<Baserate> Required float Определяет цену на пакет комнаты для пребывания. Этот элемент использует тот же синтаксис, что и <Baserate> в <Result> , за следующим исключением:
  • Когда комната недоступна для маршрута, удалите элемент <RoomBundle> , чтобы указать, что комната больше не находится в инвентаре. Для получения дополнительной информации обратитесь к удалению пакета комнаты .
<BreakfastIncluded> Optional boolean Указывает, включает ли этот комплект номера завтрак со ставкой.
<ChargeCurrency> Optional enum Когда и где пользователь платит за бронирование. Этот элемент использует тот же синтаксис, что и <ChargeCurrency> в <Result> .

Значение по умолчанию - web .

<Custom[1‑5]> Optional string Пользовательские поля для передачи дополнительных данных на целевые страницы для пакета комнаты. Эти элементы используют тот же синтаксис, что и <Custom[1-5]> в <Result> . Существует предел 200 символов на пользовательское поле. Для получения дополнительной информации обратитесь к файлам целевой страницы . Пользовательские переменные перечислены только при отправке цен в сообщении транзакции.

Если в элементе <Result> представлены элементы <Custom>, то они не унаследованы в элементе <RoomBundle> и должны быть определены отдельно для каждого <RoomBundle> или его можно включить в <CackagedAta>, если это необходимо.

<InternetIncluded> Optional boolean Если комплект комнаты включает в себя доступ к Интернету бесплатно, в то время как другие пакеты не будут включать это удобство. Не устанавливайте этот элемент для номеров в отеле, который предоставляет бесплатный интернет для всех номеров. Этот элемент не распространяется на проводной интернет или беспроводной интернет, который недоступен в номерах.
<Occupancy> Required integer Определяет максимально разрешенные пассажиры для этой ставки. Например, большой набор может быть в состоянии физически размещать 6 гостей, но «пакет медового месяца» позволяет только 2 гостям.

Это значение должно быть меньше или равным <Capacity> , которое является количеством людей, которые комната может физически приспособить.

При определении занятости в URL-адресах на целевой странице используйте переменные NUM-ADULTS и NUM-CHILDREN , как описано в использовании переменных и условий . Значение по умолчанию составляет 2 взрослых и 0 детей.

Стоимость <Occupancy> должно быть положительным целым целом между 1 и 99, включительно.

Примечания :

  • <Occupancy> для <RoomBundle> настоятельно рекомендуется, поэтому по мере необходимости, и если его опущены, принесет ошибку 1097.
  • <Occupancy> происходит от объекта данных в этом порядке: <RoomBundle> , <PackageData> , а затем = <RoomData> . Если в любом из них нет значения, значение по умолчанию по умолчанию до 2.
  • <Occupancy> может сопровождаться <OccupancyDetails> , в котором указывается тип гостей (взрослые или дети). Если типы гостей не указаны, они предполагаются взрослыми. Проконсультируйтесь <OccupancyDetails> для синтаксиса и описания детских элементов.
  • Когда вы устанавливаете <Occupancy> как в <RoomBundle> , так и <PackageData> , значение в <RoomBundle> имеет приоритет.
<OtherFees> Required float Сборы, отличные от базовой ставки и налогов, которые влияют на окончательную цену комнаты. Элемент <OtherFees> принимает один необходимый атрибут, currency , который определяет трехбуквенную валюту для сборов. Например, используйте USD доллара США.
<PackageID> Optional (recommended) string Уникальный идентификатор для данных пакета. Используйте этот идентификатор, чтобы соответствовать данным пакета комнаты с тем, что было отправлено в <PackageData> . Для получения дополнительной информации обратитесь к метаданным пакета комнаты . (Вы также можете использовать этот идентификатор для ссылки на общее определение пакета комнаты, используемое в одном сообщении транзакции при определении встроенных данных в помещении.)
<ParkingIncluded> Optional boolean Будет ли комплект комнаты включать парковку бесплатно, где парковка в противном случае была бы оплачиваемой услугой в этом отеле. Не указывайте значение для этого элемента для отеля, который предлагает бесплатную парковку.

Допустимые значения: 0 (или false ) и 1 (или true ). Значение по умолчанию — false .

<RatePlanID> Optional string Идентификатор плана тарифов представляет уникальный идентификатор для комбинации комнат и упаковки. Например, учитывая значение <RoomID> 5 и значение <PackageID> ABC, вы можете использовать значение 5-ABC для <RatePlanID> . Мы настоятельно рекомендуем использовать ProcePlanid в качестве переменной для создания URL -адреса динамической целевой страницы (ранее продажа).

Для получения дополнительной информации обратитесь к использованию переменных и условий .

<Rates> Optional <Rates> Оценки, которые переопределяют по умолчанию для этого комплекта комнаты. Этот элемент использует тот же синтаксис, что и <Rates> в <Result> .
<Refundable> Optional Object Позволяет перечислить ставку как полностью возвратную или обеспечивая бесплатную отмену. Если не предоставлено, информация о возврате не отображается. Политика возмещения на уровне <PackageData> переопределяет политику возврата на уровне <Result> . Политика возмещения на уровне <Rates> переопределяет политику возврата на уровне <PackageData> . Возвращаемая цена также может быть выделена пользователям с помощью альтернативных параметров, не изменяя схему сообщений о транзакции. Узнайте больше об этих вариантах, которые возвращаются в политику .

В следующем примере показан элемент <Refundable> со всеми его набором атрибутов:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

Примечание. Мы рекомендуем установить все атрибуты. Сообщение о статусе подачи генерируется, когда один или несколько атрибутов не установлены.

Если вы не устанавливаете никаких атрибутов, скорость не отображается как возвращаемая. Атрибуты:

  • available : (Требуется) Установить 1 (или true ), чтобы указать, разрешает ли скорость полное возмещение; в противном случае установите на 0 (или false ).
  • refundable_until_days : (Требуется, если true available ) Указывает количество дней до заезда, что может быть запрошен полный возврат средств. Значение refundable_until_days должно быть целым числом между 0 и 330, включительно.
  • refundable_until_time : (Настоятельно рекомендуется, если available true ) Указывает последнее время суток, в местное время отеля, что будет удостоен чести полного запроса на возврат средств. Это может быть объединено с refundable_until_days , чтобы указать, например, что «возвраты доступны до 16:00 за два дня до регистрации». Если refundable_until_time не установлен, значение по умолчанию по умолчанию до полуночи.

    Значение этого атрибута использует формат времени .

При настройке атрибутов обратите внимание на следующее:

  • Если available или refundable_until_days не установлена, скорость не отображается как возвратная.
  • Если available 0 (или false ), другие атрибуты игнорируются. Ставка не отображается как возвращаемая, даже если установлен один или оба других атрибута.
<RoomID> Required string Уникальный идентификатор для данных комнаты. Используйте этот идентификатор, чтобы соответствовать данным пакета комнаты с тем, что вы отправили в <RoomData> . Для получения дополнительной информации обратитесь к метаданным пакета комнаты . (Вы также можете использовать этот идентификатор для ссылки на общее определение комнаты в одном сообщении транзакции при определении встроенных данных комнаты.)
<Tax> Required float Налоги, которые рассчитываются по окончательной цене комнаты. Элемент <Tax> принимает один необходимый атрибут, currency , который определяет трехбуквенную валютную код для налогов. Например, используйте USD доллара США.

Примеры

Одиночный пакет занятости

В следующем примере определяется ответ с одним пучком занятости. Когда пользователь выбирает 1 в сборщике занятости, Google отображает самую низкую соответствующую цену независимо от занятости.

Если единственная цена занятости недоступна, то Google покажет самую низкую цену двойной оценки. Обратите внимание, что цены на одну занятость не запрашиваются в прямом эфире, если на маршруте кэшируются двойные занятия или больше цен.

Этот пример ссылается на предопределенные метаданные комнаты и упаковки с элементами <RoomID> и <PackageID> . Используйте элементы <RoomData> и <PackageData> для определения этой информации.

<!-- Efficient method of defining Room Bundles-->
<!----- Occupancy of 1 example ----->

<Transaction timestamp="2017-07-18T16:20:00-04:00" id="12345678">
  <!-- Part1: Define RoomData and PackageData in PropertyDataSet -->
  <!-- Note:  Once defined it does not have to be repeated for future
              Transaction Messages.
              PropertyDataSets can also be defined and sent in their own
              Transaction Message separately from pricing. Google can be
              configured to pull just PropertyDataSets once per day
              (or on a predefined frequency). -->
  <PropertyDataSet>
    <Property>180054</Property>
    <!-- Can be reused by multiple Room Bundles -->
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Queen Room - Non-Smoking" language="en"/>
        <Text text="Chambre de la Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <!-- Room can accommodate up to 4, but package data specifies occupancy
           between 1 to 4 -->
      <Capacity>4</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>436233</RoomID>
      <Name>
        <Text text="Premium King Room - Non-Smoking" language="en"/>
        <Text text="Chambre de le Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <Capacity>4</Capacity>
    </RoomData>
    <!-- Can be reused by multiple Room Bundles -->
    <PackageData>
      <PackageID>P11111</PackageID>
      <Occupancy>1</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P12345</PackageID>
      <Occupancy>4</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="1"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
  </PropertyDataSet>

    <!-- Efficient method of defining Room Bundles -->
    <!-- Part 2: Reference RoomData and PackageData through ID -->
  <Result>
    <!-- Single occupancy pricing will be specified in a room bundle below -->
    <Property>180054</Property>
    <Checkin>2017-10-07</Checkin>
    <Nights>2</Nights>
    <!-- Base Room Bundle -->
    <RoomBundle>
      <RoomID>060773</RoomID>
      <PackageID>P54321</PackageID>
      <Baserate currency="USD">199.99</Baserate>
      <Tax currency="USD">25.12</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RatePlanID>060773-P54321</RatePlanID>
    </RoomBundle>
    <RoomBundle>
      <RoomID>060773</RoomID>
      <PackageID>P11111</PackageID>
      <!-- Price for 1 ("occupancy") is the lowest price and will be
           displayed -->
      <Baserate currency="USD">174.99</Baserate>
      <Tax currency="USD">22.08</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RatePlanID>060773-P11111</RatePlanID>
    </RoomBundle>
    <!-- Premium Room Bundle -->
    <RoomBundle>
      <RoomID>436233</RoomID>
      <PackageID>P12345</PackageID>
      <!-- Price for 4 ("occupancy"), any eligible room bundle with 1 or more
           occupancy will be displayed-->
      <Baserate currency="USD">298.88</Baserate>
      <Tax currency="USD">42.12</Tax>
      <OtherFees currency="USD">10.00</OtherFees>
      <RatePlanID>436233-P12345</RatePlanID>
    </RoomBundle>
    <!-- ..Continue providing all available RoomBundle rates under matched
         property for 1 or more occupancies..-->
  </Result>
</Transaction>


Два или более занятости

В следующем примере определяется ответ, содержащий два или более занятости.

Этот пример ссылается на предопределенные метаданные комнаты и упаковки с элементами <RoomID> и <PackageID> . Используйте элементы <RoomData> и <PackageData> для определения этой информации.

<!-- Efficient method of defining Room Bundles-->
<!----- Occupancy of 3 example ----->

<Transaction timestamp="2017-07-18T16:20:00-04:00" id="12345678">
  <!-- Efficient method of defining Room Bundles-->
  <!-- Part1: Define RoomData and PackageData in PropertyDataSet -->
  <PropertyDataSet>
    <Property>180054</Property>
    <!-- Can be reused by multiple Room Bundles -->
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Queen Room - Non-Smoking" language="en"/>
        <Text text="Chambre de la Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <!-- Room can accommodate up to 4, but package data specifies occupancy
           between 1 to 4 -->
      <Capacity>4</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>436233</RoomID>
      <Name>
        <Text text="Premium King Room - Non-Smoking" language="en"/>
        <Text text="Chambre de le Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <Capacity>4</Capacity>
    </RoomData>
    <!-- Can be reused by multiple Room Bundles -->
    <PackageData>
      <PackageID>P33333</PackageID>
      <Occupancy>3</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P12345</PackageID>
      <Occupancy>4</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="1"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
  </PropertyDataSet>

  <Result>
    <Property>180054</Property>
    <Checkin>2017-10-07</Checkin>
    <Nights>2</Nights>
    <!-- Efficient method of defining Room Bundles -->
    <!-- Part 2: Reference RoomData and PackageData through ID -->
    <!-- Base Room Bundle -->
    <RoomBundle>
      <!-- Baserate above and attributes must match atleast one room bundle
           below -->
      <RoomID>060773</RoomID>
      <PackageID>P33333</PackageID>
      <Baserate currency="USD">499.99</Baserate>
      <Tax currency="USD">55.12</Tax>
      <OtherFees currency="USD">22.00</OtherFees>
    </RoomBundle>
    <!-- Premium Room Bundle -->
    <RoomBundle>
      <RoomID>436233</RoomID>
      <PackageID>P12345</PackageID>
      <!-- Lowest price for 3 ("occupancy"), shown below, will be displayed -->
      <Baserate currency="USD">598.88</Baserate>
      <Tax currency="USD">62.12</Tax>
      <OtherFees currency="USD">30.00</OtherFees>
    </RoomBundle>
    <!-- ..Continue providing all available RoomBundle rates under matched
         property for 2 or more occupancies..-->
  </Result>
</Transaction>


Несколько комнат

В следующем примере заполняется занятость в нескольких комплектах комнаты, чтобы продемонстрировать возможные цены в комнате в общежитии.

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    ...
    <!-- Suite Room Bundle -->
    <RoomBundle>
      <RoomID>suite1</RoomID>
      <PackageID>standard</PackageID>
      <Occupancy>2</Occupancy>
      <!-- Price for room -->
      <Baserate currency="USD">80.00</Baserate>
      <Tax currency="USD">5.12</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="Suite for 2" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>

    <!-- Small Dorm Room Bundle -->
    <RoomBundle>
      <RoomID>small_dorm</RoomID>
      <PackageID>economy</PackageID>
      <Occupancy>1</Occupancy>
      <!-- Price per bed -->
      <Baserate currency="USD">35.00</Baserate>
      <Tax currency="USD">3.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="1 bed in small dorm" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>

    <!-- Large Dorm Room Bundle -->
    <RoomBundle>
      <RoomID>large_dorm</RoomID>
      <PackageID>economy</PackageID>
      <Occupancy>1</Occupancy>
      <!-- Price per bed -->
      <Baserate currency="USD">20.00</Baserate>
      <Tax currency="USD">2.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="1 bed in large dorm" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>
    ...
  </Result>
</Transaction>

Многочисленные условные ставки

В следующем примере определяется базовая ставка и многочисленные условные ставки в <RoomBundle> :

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>2</Nights>
    <!-- When Google receives new room bundle information for an itinerary, all
    previous room bundle pricing is dropped from Google's cache. Thus, if you
    want to delete a specific room bundle from Google's cache, you may do so
    by simply not providing that specific room bundle in subsequent transaction
    messages. -->
    <RoomBundle>
     ...
      <!-- RoomID is required, PackageID is recommended. -->
      <RoomID>5</RoomID>
      <PackageID>ABC</PackageID>
      <!-- Baserate is required. -->
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>

      <!-- RatePlanID is optional and represents the unique identifier for a
      room and package data combination. We strongly recommend using RatePlanID
      as a variable to build your dynamic landing page (formerly Point of Sale)
      URL. For details, see Using Variables and Conditions. -->
      <RatePlanID>5-ABC</RatePlanID>

      <!-- Occupancy is mandatory for RoomBundle elements. -->
      <!-- Elements below will get inherited to nested rate elements. -->
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
      </OccupancyDetails>
      <InternetIncluded>1</InternetIncluded>


      <!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <!-- Neither rate overrides Custom2. -->
      <Custom2>ratebasic</Custom2>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides ChargeCurrency from roombundle. -->
          <ChargeCurrency>hotel</ChargeCurrency>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode321</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode432</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

<OccupancyDetails>

<Occupancy> В сообщении транзакции указывает максимальное количество гостей для комнаты или упаковки. <OccupancyDetails> может содержать дополнительную информацию, такую ​​как число и тип гостей (взрослые или дети).

Когда <Occupancy> и <OccupancyDetails> появляются в элементе <Rates> <Result> или <RoomBundle> , это означает, что скорость ограничена деталями занятости.

Синтаксис

Когда появляются <OccupancyDetails> , ему всегда предшествует <Occupancy> . Обратите внимание на следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
  ...
    <Occupancy>max_number_of_intended_occupants</Occupancy>
    <OccupancyDetails>
      <NumAdults>number_of_adults</NumAdults>
      <Children>
        <Child age=age_of_one_child_guest/>
        <Child age=age_of_one_child_guest/>
      </Children>
    </OccupancyDetails>
  </Result>
</Transaction>

Дочерние элементы

В элементе <OccupancyDetails> есть следующие детские элементы:

Детский элемент Необходимый? Тип Описание
<NumAdults> Required integer Количество взрослых гостей. Мин: 1, макс: 20.
<Children> Optional Object Контейнер для одного или нескольких элементов <Child> .
<Child age> Optional integer Максимальный возраст для этого ребенка - например, <Child age="17"> .

Примеры

Следующие примеры показывают, как <OccupancyDetails> могут появиться в рамках <Results> , <RoomBundle> или дочернего элемента <Rates> .

Ответ результата

В следующем примере определяется один маршрут и его цены на одно свойство в ответ на запрос на живые цены, где пользователь указал номер и типы гостей. Здесь <OccupancyDetails> - 2 взрослых и один ребенок - возвращаются в <Result> .

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
    <Occupancy>3</Occupancy>
    <OccupancyDetails>
      <NumAdults>2</NumAdults>
      <Children>
        <Child age="17"/>
      </Children>
    </OccupancyDetails>
  </Result>
</Transaction>

Оценка ответа

В следующем примере определяется один маршрут и его цены для 1 взрослого и 1 ребенка. Здесь <OccupancyDetails> возвращаются в элементе <Rates> <Result> .

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Transaction id="Wtdj8QoQIWcAAbaTGlIAAAC4" timestamp="2018-04-18T11:27:45-04:00">
  <Result>
    <Property>8251</Property>
    <Checkin>2018-06-20</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">62.18</Baserate>
    <Tax currency="USD">2.45</Tax>
    <OtherFees currency="USD">0.00</OtherFees>
    <Rates>
      <Rate rate_rule_id="rule-951">
        <Occupancy>2</Occupancy>
        <OccupancyDetails>
          <NumAdults>1</NumAdults>
          <Children>
            <Child age="17"/>
          </Children>
        </OccupancyDetails>
        <Baserate currency="USD">42.61</Baserate>
        <Tax currency="USD">5.70</Tax>
        <OtherFees currency="USD">0.00</OtherFees>
        <Custom1>abc4</Custom1>
        <AllowablePointsOfSale>
          <PointOfSale id="yourhotelpartnersite.com"/>
        </AllowablePointsOfSale>
      </Rate>
    </Rates>
  </Result>
</Transaction>

Комната

В следующем примере определяется занятость 2 взрослых и 1 ребенка в течение двух ночей, с возвратной скоростью. Здесь <OccupancyDetails> появляются внутри <RoomBundle>

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>6781291</Property>
    <Checkin>2017-08-05</Checkin>
    <Nights>2</Nights>
    ...
    <RoomBundle>
      <RoomID>10291</RoomID>
      <RatePlanID>564739</RatePlanID>
      <PackageID>564739</PackageID>
      <Occupancy>3</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
        <Children>
          <Child age="17"/>
        </Children>
      </OccupancyDetails>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="true" refundable_until_days="1" refundable_until_time="23:59:00" />
      <Baserate currency="USD">185.34</Baserate>
      <Tax currency="USD">37.06</Tax>
      <OtherFees currency="USD">2.22</OtherFees>
    </RoomBundle>
  </Result>
</Transaction>

Несколько комнат

В следующем примере определяется несколько ставок <RoomBundle> , которые ограничены занятостью 2 взрослых и 2 детей. Здесь <OccupancyDetails> появляются в элементе <Rates> <RoomBundle> .

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">275.00</Baserate>
    <Tax currency="USD">27.50</Tax>
    <OtherFees currency="USD">0</OtherFees>
    <RoomBundle>
      <RoomID>5</RoomID>
      <PackageID>STD</PackageID>
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">0</OtherFees>
      <InternetIncluded>1</InternetIncluded>
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <Custom2>ratebasic</Custom2>
      <Occupancy>4</Occupancy>
      <OccupancyDetails>
          <NumAdults>2</NumAdults>
          <Children>
              <Child age="17"/>
              <Child age="17"/>
          </Children>
      </OccupancyDetails>
      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <ChargeCurrency>hotel</ChargeCurrency>
          <Custom1>ratecode321</Custom1>
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <Custom1>ratecode432</Custom1>
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

,

Эта страница содержит ссылку для сообщений транзакций на основе XML.

<Transaction>

Корневой элемент сообщения транзакции <Transaction> . Это контейнер для описательной информации о комнатах и ​​пакетах, ценах и доступности для комнат и пакетов.

Элемент <Transaction> появляется в следующем месте в сообщении транзакции XML Иерархия:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

Сообщения, которые используют <Transaction> в качестве корневого элемента, требуется хотя бы один дочерний элемент. Сообщения транзакции могут иметь любое количество дочерних элементов, если общий размер сообщения не превышает 100 МБ.

Синтаксис

Элемент <Transaction> использует следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="timestamp" id="transaction_ID">

  <!-- Defines data about a room or package (Room Bundle) -->
  <PropertyDataSet>
    ...
  </PropertyDataSet>

  <!-- Updates/sets prices and availability for rooms and Room Bundles -->
  <!-- (Also removes itineraries from inventory) -->
  <Result>
    ...
  </Result>

</Transaction>

Атрибуты

Элемент <Transaction> имеет следующие атрибуты:

Атрибут Необходимый? Тип Описание
id Required нить Уникальный идентификатор для каждого сообщения транзакции.
partner Optional string Учетная запись партнера, для которой предназначено сообщение о транзакции. Обычно вы используете это, если ваш бэкэнд обеспечивает цены на несколько партнерских учетных записей. Это значение строки представляет собой значение «Ключ -партнер», указанное на странице «Настройки учетной записи» в гостиничном центре.
timestamp Required DateTime

В тот момент, когда сообщение о транзакции было отправлено.

Любое сообщение, отправленное с меткой времени в течение предыдущих 24 часов, будет обработано, и те, которые не будут отброшены.

Сообщения обрабатываются по порядку timestamp , а не в порядке получения. Например, обновление цен с временной меткой 2019-05-03 14:09:00 , которое получено после сообщения с временной меткой 2019-05-03 14:10:00 все еще будет обработана по порядку, и цена Из сообщения с временной меткой 2019-05-03 14:10:00 будет использоваться.

Дочерние элементы

У элемента <Transaction> есть следующие детские элементы:

Детский элемент Необходимый? Тип Описание
<PropertyDataSet> Optional* <PropertyDataSet>

Описывает определенную комнату и комплексы комнаты. Обычно вы используете этот элемент в отдельном сообщении транзакции, чтобы определить общие значения для помещений и уменьшить размер сообщений о транзакциях.

<Result> Optional* <Result>

Данные о ценах на маршрут комнаты или элемент <RoomBundle> , который определяет комплекты и дополнительные типы комнат для объекта. Элемент <Result> также может использоваться для удаления маршрутов из инвентаря.

* По крайней мере, один из <PropertyDataSet> или <Result> требуется.

Примеры

Данные комнаты

В следующем примере определяются данные комнаты в сообщении транзакции:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>5440OF</RoomID>
      <Name>
        <Text text="Single King Bed Room" language="en"/>
        <Text text="Simple Lit de Roi" language="fr"/>
      </Name>
      <Description>
        <Text text="One king bed with pillowtop mattresses, 300-thread-count linens,
          and down comforters (bedspreads). City view. 300 square feet. Desk with
          rolling chair. Multi-line phone with voice mail. Cable/satellite TV with
          complimentary HBO and pay movies." language="en"/>
        <Text text="Un très grand lit avec matelas à plateau-coussin, ..." language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Bathroom View" language="en"/>
          <Text text="La salle de baines" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Capacity>4</Capacity>
    </RoomData>
  </PropertyDataSet>
</Transaction>

Ценовые данные

В следующем примере определяется данные о ценах в сообщении транзакции:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
  </Result>
  <Result>
    <Property>052213</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">299.98</Baserate>
    <Tax currency="USD">26.42</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="otto"/>
      <PointOfSale id="simon"/>
    </AllowablePointsOfSale>
  </Result>
</Transaction>

Ночные ставки

В следующем примере определяются данные о ценах в течение 1-7 ночей, начиная с 7 июня 2023 года:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-08-24T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">209.99</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">419.98</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>3</Nights>
    <Baserate currency="USD">614.97</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>4</Nights>
    <Baserate currency="USD">819.96</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>5</Nights>
    <Baserate currency="USD">999.95</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>6</Nights>
    <Baserate currency="USD">1193.94</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-07</Checkin>
    <Nights>7</Nights>
    <Baserate currency="USD">1259.93</Baserate>
    <Tax currency="USD">21.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
  </Result>
</Transaction>


Базовые и условные ставки

В следующем примере показано сообщение транзакции, которое содержит базовую скорость и условную скорость :

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>1</Nights>

    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>

    <Rates>
      <!-- The rate_rule_id is required when using conditional rates -->
      <Rate rate_rule_id="mobile">
        <!-- Override base rate and taxes for conditional rates -->
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <!-- NOTE: OtherFees is inherited from the above setting -->
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

Удалить инвентарь

Следующий пример удаляет несколько запасов (1-дневное пребывание на несколько разных дат) для отеля из инвентаря:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-05-23T16:20:00-04:00" id="42">
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-23</Checkin>
    <Nights>1</Nights>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-24</Checkin>
    <Nights>1</Nights>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
  <!---Sending <Baserate> is optional with <Unavailable> -->
  <Result>
    <Property>1123581321</Property>
    <Checkin>2023-05-25</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">-1</Baserate>
    <Unavailable>
      <NoVacancy/>
    </Unavailable>
    <Tax currency="USD">0</Tax>
    <OtherFees currency="USD">0</OtherFees>
  </Result>
</Transaction>

<PropertyDataSet>

Контейнер для комнаты и информации о пакете (или комплекте комнаты ) в сообщении <Transaction> . Значения, установленные на значениях переопределения отеля, установленные для партнера. Google хранит эту информацию, так что вам не нужно определять ее каждый раз, когда вы отправляете обновления ценообразования.

Элемент <PropertyDataSet> появляется в следующем месте в сообщении транзакции XML иерархия:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>  // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

Для получения дополнительной информации обратитесь к метаданным пакета комнаты .

Синтаксис

В элементе <PropertyDataSet> используется следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet>
    <!-- (Required) ID that matches the Hotel List Feed -->
    <Property>hotel_ID</Property>

    <!-- (Optional) Defines metadata about a room -->
    <RoomData>
      ...
    </RoomData>

    <!-- (Optional) Defines package metadata to be paired with rooms (Room Bundles) -->
    <PackageData>
      ...
    </PackageData>
  </PropertyDataSet>
  ...
</Transaction>

Атрибуты

У элемента <PropertyDataSet> нет атрибутов.

Дочерние элементы

У элемента <PropertyDataSet> есть следующие детские элементы:

Детский элемент Необходимый? Тип Описание
<PackageData> Optional* <PackageData> Описывает пакет комнаты. Эти данные связаны с партнером и отелем, но не с маршрутом. Этот элемент похож на <RoomData> , но он описывает удобства и термины, которые не являются частью физического описания комнаты.

Вы ссылаетесь на идентификатор пакета в ваших обновлениях ценообразования.

Для получения дополнительной информации обратитесь к метаданным пакета комнаты .

<Property> Required string Идентификатор отеля, к которому применяется связанные данные. Значение этого элемента должно быть строкой, которая соответствует листинге <id> в вашем подаче списка отелей.
<RoomData> Optional* <RoomData> Описывает комнату. Эти данные связаны с партнером и отелем, но не с маршрутом.

Вы ссылаетесь на идентификатор комнаты в ваших обновлениях ценообразования.

* По крайней мере, один из <PackageData> или <RoomData> требуется.

Примеры

Данные комнаты и упаковки

В следующем примере показаны данные о комнатах и ​​пакетах в <PropertyDataSet> :

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Когда вы отправляете цены и доступность для этого номера и пакета номеров, вы ссылаетесь на идентификаторы комнаты и упаковки в ваших ценовых сообщениях. В результате вы значительно уменьшаете размер ваших сообщений, а также уменьшаете количество ошибок, с которыми вы можете столкнуться из -за дубликатов данных. Для получения дополнительной информации обратитесь к метаданным пакета комнаты .

<RoomData>

Определяет маршрутные метаданные метаданные о комнатах и, соответственно, в комнатных пучках (поскольку комнатные пакеты-это комнаты плюс дополнительные удобства). Используйте <RoomData> , чтобы уменьшить повторение описательных данных в вашем канале цен.

Элемент <RoomData> появляется в следующем месте в сообщении транзакции XML иерархия:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

<RoomData> элементы содержат информацию, связанную с партнером и отель, но не с маршрутом. Предполагаемая цель-для всех неэнергетических данных.

Элемент <RoomData> похож на <PackageData> , но он описывает физическую комнату, а не удобства и условия упаковки. Вы используете <RoomData> и <PackageData> в сочетании, чтобы предоставить подробную информацию о пакетах номера. Для отдельных комнат, которые не являются частью упаковки, используйте только <RoomData> .

Вы можете определить как элементы <RoomData> , так и <PackageData> для одной комнаты или пакета комнаты. Когда Google отображает эту комнату или упаковку в результатах поиска, он будет включать описания от обоих, отделенных дефисом.

Для получения дополнительной информации обратитесь к метаданным пакета комнаты .

Синтаксис

Элемент <RoomData> использует следующий синтаксис:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet>
    ...
    <RoomData>
      <RoomID>room_ID</RoomID>

      <Name>
        <Text text="room_name" language="language_code"/>
        ...
      </Name>

      <Description>
        <Text text="room_description" language="language_code"/>
        ...
      </Description>

      <Capacity>max_number_of_occupants</Capacity>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults, children, or seniors --></OccupancyDetails>
      <OccupancySettings>
        <MinOccupancy>min_number_of_occupants</MinOccupancy>
        <MinAge>min_age_of_occupants</MinAge>
      </OccupancySettings>

      <PhotoURL>
        <Caption>
          <Text text="photo_description" language="language_code"/>
          ...
        </Caption>
        <URL>photo_location</URL>
      </PhotoURL>
      <RoomFeatures>
        ...
      </RoomFeatures>
    </RoomData>
    ...
  </PropertyDataSet>
</Transaction>

Атрибуты

У элемента <RoomData> нет атрибутов.

Дочерние элементы

У элемента <RoomData> есть следующие детские элементы:

Детский элемент Необходимый? Тип Описание
<Capacity> Optional integer Максимальное количество гостей, которые комната может физически разместить . Для комнаты емкость больше или равна занятости.

При указании это значение должно быть равным или превышать значение элемента <Occupancy> , которое является предполагаемым числом гостей для определенной комнаты. Например, большой набор <Capacity> может быть 6, но <Occupancy> занятие> для 4.

Значение <Capacity> должно быть положительным целым целом между 1 и 20, включительно.

<Description> Optional Object Подробное описание комнаты. Этот элемент должен содержать информацию, не описанную другими элементами или элементом <Name> . Вы не должны использовать все заглавные буквы при указании описания комнаты.

Элемент <Description> принимает один дочерний элемент, <Text> , который имеет два следующих необходимых атрибута:

  • text : подробное описание комнаты.
  • language : двухбуктный языковой код; Например, fr .

Используйте отдельный элемент <Text> для каждого языка, на котором может появиться ваше объявление или ссылка на бесплатное бронирование (с различными значениями для атрибутов language ).

В следующем примере показаны французские и английские версии описания комнаты:

<Description>
  <Text text="Two queen-sized beds" language="en"/>
  <Text text="Deux lits de la reine" language="fr"/>
</Description>
<Name> Required string Название категории комнаты. Это значение должно соответствовать тому, что появляется на целевой странице отеля (ранее точка продажи). Не устанавливайте ценность этого элемента на все буквы заглавных букв.

Этот элемент принимает один дочерний элемент, <Text> , который имеет следующие два требуемых атрибута:

  • text : название комнаты.
  • language : двухбуктный языковой код; Например, fr .

Используйте отдельный элемент <Text> для каждого языка, на котором может появиться ваше объявление или ссылка на бесплатное бронирование (с различными значениями для атрибутов language ).

В следующем примере показаны французские и английские версии названия комнаты:

<Name>
  <Text text="Standard Double Room" language="en"/>
  <Text text="Le chambre double" language="fr"/>
</Name>
<Occupancy> Optional integer Максимальное количество гостей, для которых предназначен комната. Например, большой набор может быть в состоянии физически приспособиться к 6 гостям (емкость = 6), но предназначен только для 4 гостей.

Это значение должно быть меньше или равно элементу <Capacity> , которое является числом людей, которые комната может физически приспособиться.

Стоимость <Occupancy> должно быть положительным целым целом между 1 и 99, включительно.

<Occupancy> может сопровождаться <OccupancyDetails> , в котором указывается тип гостей (взрослые или дети). <OccupancyDetails> .

<OccupancySettings> Optional Object Настройки, которые могут ограничить или изменить требования к занятости комнаты.

Элемент <OccupancySettings> принимает следующие детские элементы:

  • <MinOccupancy> : минимальное количество гостей, которые могут остаться в комнате. Например, если это установлено в 2 , эта комната не может быть забронирована для одного гостя.

    Значение <MinOccupancy> должно быть положительным целым целом между 1 и 99, включительно.

  • <MinAge> : минимальный возраст для всех гостей, оставшихся в комнате. Например, если это установлено в 18 , эта комната может быть забронирована только для групп, где все гости возрастают 18 лет и старше.

    Значение <MinAge> должно быть положительным целым целом между 0 и 99, включительно.

<OccupancySettings>
  <MinOccupancy>2</MinOccupancy>
  <MinAge>16</MinAge>
</OccupancySettings>

Не все детские элементы должны быть включены.

<PhotoURL> Optional Object URL и дополнительная подпись для фотографии данной комнаты или пакета комнаты. Вы можете указать более одного <PhotoURL> для комнаты или комнаты. Каждое URL -URL должен быть в своем <PhotoURL> .

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

  • <URL> : указывает местоположение фотографии. Место должно быть общедоступным (не за брандмауэром) и должно включать протокол (например, https:// ). Используйте только один <URL> за <PhotoURL> .
  • <Caption> : Определяет подпись для фотографии. Этот элемент принимает один дочерний элемент, <Text> , который имеет два требуемых атрибута: text и language . text атрибутом является заголовок, а language атрибут указывает двухбуктный язык языкового кода, такого как en .

Пример:

<PhotoURL>
  <URL>https://www.example.com/static/bar/image1234.jpg</URL>
  <Caption>
    <Text text="A bright and breezy way to enjoy your mornin'
      cuppa tea." language="en"/>
    <Text text="Une façon lumineuse et aérée pour profiter
      de votre journée tasse de thé." language="fr"/>
  </Caption>
</PhotoURL>
<PhotoURL>
  <URL>https://www.foo.com/static/bar/image5678.jpg</URL>
  <Caption>
    <Text text="Or, perhaps you prefer coffee." language="en"/>
    <Text text="Ou peut-être préférez-vous le café." language="fr"/>
  </Caption>
</PhotoURL>
<RoomFeatures> Optional <RoomFeatures> Содержит информацию об функциях комнаты.
<RoomID> Required string Уникальный идентификатор комнаты. Используйте этот идентификатор, чтобы соответствовать данным комнаты с блоками <Result> в ваших обновлениях ценообразования. Для получения дополнительной информации обратитесь к метаданным пакета комнаты . (You can also use this ID to reference a common room definition in a single Transaction message when defining room data inline.)

Примеры

Room data

The following example defines room data:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>5440OF</RoomID>
      <Name>
        <Text text="Single King Bed Room" language="en"/>
        <Text text="Simple Lit de Roi" language="fr"/>
      </Name>
      <Description>
        <Text text="One king bed with pillowtop mattresses, 300-thread-count linens,
          and down comforters (bedspreads). City view. 300 square feet. Desk with
          rolling chair. Multi-line phone with voice mail. Cable/satellite TV with
          complimentary HBO and pay movies." language="en"/>
        <Text text="Un très grand lit avec matelas à plateau-coussin, ..." language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Bathroom View" language="en"/>
          <Text text="La salle de baines" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Capacity>4</Capacity>
    </RoomData>
  </PropertyDataSet>
</Transaction>

Room & package metadata

The following example defines room and package metadata:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Multiple room bundles

The following example defines room and package metadata for multiple Room Bundles:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <!-- A transaction message with room types result. -->
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
      <RoomID>single</RoomID>
      <Name>
        <Text text="Single room" language="en"/>
        <Text text="Chambre simple" language="fr"/>
      </Name>
      <Description>
        <Text text="A single room" language="en"/>
        <Text text="Le chambre simple" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <PhotoURL>
        <URL>http://www.foo.com/static/bar/image1235.jpg</URL>
      </PhotoURL>
      <Capacity>2</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>double</RoomID>
      <Name>
        <Text text="Double room" language="en"/>
        <Text text="Chambre double" language="fr"/>
      </Name>
      <Occupancy>1</Occupancy>
    </RoomData>
    <PackageData>
      <PackageID>refundbreakfast</PackageID>
      <Name>
        <Text text="Refundable Room with Breakfast" language="en"/>
        <Text text="Chambre remboursable avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Continental Breakfast" language="en"/>
        <Text text="Petit déjeuner continental" language="fr"/>
      </Description>
      <ChargeCurrency>hotel</ChargeCurrency>
      <Refundable available="1" refundable_until_days="3"/>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
    <PackageData>
      <PackageID>prepaid</PackageID>
      <Name>
        <Text text="Nonrefundable" language="en"/>
        <Text text="Non remboursable" language="fr"/>
      </Name>
      <Description>
        <Text text="Blah blah blad" language="en"/>
        <Text text="Le blah blah blad" language="fr"/>
      </Description>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="0"/>
    </PackageData>
  </PropertyDataSet>
</Transaction>

<RoomFeatures>

Defines features found in the room.

The <RoomFeatures> element appears in the following place in the Transaction message XML hierarchy:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
            + <RoomFeatures>

Синтаксис

The <RoomFeatures> element uses the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet ... >
    ...
    <RoomData>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>[western|japanese|japanese_western]</JapaneseHotelRoomStyle>
        <Beds>
           <Bed size="[single|semi_double|double|queen|king]">
             <Width unit="cm" number="width"/>
             <Length unit="cm" number="length"/>
           </Bed>
           <!-- Include with any additional beds. -->
        </Beds>
        <Suite/>
        <Capsule/>
        <Roomsharing>[shared|private]</Roomsharing>
        <Outdoor/>
        <MobilityAccessible/>
        <Smoking>[smoking|non_smoking]</Smoking>
        <BathAndToilet relation="[together|separate]">
          <Bath bathtub="[false|true]" shower="[false|true]"/>
          <Toilet electronic_bidet="[false|true]" mobility_accessible="[false|true]"/>
        </BathAndToilet>
        <OpenAirBath/>
        <AirConditioning/>
        <Balcony/>
        <Views>
          <!-- (Optional) Defines the type of views from the room. -->
          <!-- Example: <OceanView/> -->
        </Views>

      </RoomFeatures>
      ...
    </RoomData>
    ...
  </PropertyDataSet>
</Transactions>

Атрибуты

The <RoomFeatures> element has no attributes.

Дочерние элементы

The <RoomFeatures> element has the following child elements:

Child Element Необходимый? Тип Описание
<JapaneseHotelRoomStyle> Optional enum

Indicates the style of a Japanese hotel room.

Допустимые значения:

  • western : A western style room with beds.
  • japanese : A Japanese style room with futon beds.
  • japanese_western : A Japanese western style room with both western style beds and Japanese style futons.
<Beds> Optional Object Contains as many <Bed> as the room has. Note that the Japanese futons shouldn't be counted here.

Each <Bed> has the following attributes:

  • size (optional): Valid values are single , semi_double , double , queen , and king .
Each <Bed> has the following child elements:
  • <Width> (optional): Specifies the bed width. Must have the attribute unit with the value cm and the attribute number with the width of the bed in integer centimeters.
  • <Length> (optional): Specifies the bed length. Must have the attribute unit with the value cm and the attribute number with the length of the bed in integer centimeters.
Пример:
<Beds>
  <Bed size="double">
    <Width unit="cm" number="140"/>
    <Length unit="cm" number="195"/>
  </Bed>
  <Bed/> <!-- Size unknown -->
</Beds>
<Suite> Optional empty Provide this element when this room is a suite.
<Capsule> Optional empty Provide this element when this room is a capsule room.
<Roomsharing> Optional enum Whether this room is shared with other occupants such as owners or other guests. Valid values are shared and private .
<Outdoor> Optional empty Provide this element when this room is outdoor lodging that doesn't have fixed walls, plumbing, and climate control. For example, hotel rooms are not outdoor lodging whereas campsites where guests stay in tents and RV parks where guests bring their own RV are outdoor lodging.
<MobilityAccessible> Optional empty Provide this element when this room is mobility-accessible.
<Smoking> Optional enum Whether this room is a non-smoking room or a smoking room. Valid values are non_smoking and smoking .
<BathAndToilet> Optional Object Contains information about a bath and toilet in the room.

The attribute is:

  • relation (optional): Indicates how the bath and toilet are placed against each other. Valid values are together (both bath and toilet are located together in the same room (eg bathroom) right next to each other) and separate (bath and toilet each have dedicated spaces). This attribute must not be set when the room doesn't have both a bath and toilet.

The element optionally takes the following child elements:

  • <Bath> (optional): The existence of this element indicates that the room has a bath.

    The attributes are:

    • bathtub (optional): Indicates that the bath has a bathtub in the bathroom. Valid values are 0 (or false ) and 1 (or true ).
    • shower (optional): Indicates that the bath has a shower. Valid values are 0 (or false ) and 1 (or true ).
  • <Toilet> (optional): The existence of this element indicates that this room has a toilet.

    The attributes are:

    • electronic_bidet (optional): Indicates that the toilet has an electronic bidet . Valid values are 0 (or false ) and 1 (or true ).
    • mobility_accessible (optional): Indicates that the toilet is mobility-accessible. Valid values are 0 (or false ) and 1 (or true ).

Пример:

<BathAndToilet relation="separate">
  <Bath bathtub="1" shower="1"/>
  <Toilet
    electronic_bidet="1"
    mobility_accessible="1"/>
</BathAndToilet>
<OpenAirBath> Optional empty Provide this element when this room has a private open-air bath.
<AirConditioning> Optional empty Provide this element when this room has air conditioning.
<Balcony> Optional empty Provide this element when this room has a balcony or lanai.
<Views> Optional Object Valid options include:

<AirportView/>
<BayView/>
<BeachView>/>
<CastleView/>
<CityView/>
<CountrysideView/>
<CourtyardView/>
<DuneView/>
<ForestView/>
<GardenView/>
<GolfCourseView/>
<HarborView/>
<LagoonView/>
<LakeView/>
<MarinaView/>
<MountainView/>
<NatureView/>
<OceanView/>
<ParkView/>
<PartialOceanView/>
<PisteView/>
<PoolView/>
<PyramidView/>
<RiverView/>
<StreetView/>

Примеры

JapaneseHotelRoomStyle doesn't have a default value. Omitting a value does not result in an XML error, but your listing is not shown in the search results, when the user filters by room style or beds.

Две односпальные кровати

The following example shows how to use <RoomFeatures> :

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>western</JapaneseHotelRoomStyle>
        <Beds> <!-- Two single beds -->
          <Bed size="single">
            <Width unit="cm" number="97"/>
            <Length unit="cm" number="195"/>
          </Bed>
          <Bed size="single">
            <Width unit="cm" number="97"/>
            <Length unit="cm" number="195"/>
          </Bed>
        </Beds>
        <Suite/>
        <Capsule/>
        <Roomsharing>private</Roomsharing>
        <Outdoor/>
        <MobilityAccessible/>
        <Smoking>non_smoking</Smoking>
        <BathAndToilet relation="separate">
          <Bath bathtub="1" shower="1"/>
          <Toilet electronic_bidet="1" mobility_accessible="1"/>
        </BathAndToilet>
        <OpenAirBath/>
        <AirConditioning/>
        <Balcony/>
        <Views>
          <LakeView/>
          <MarinaView/>
          <BeachView/>
          <ForestView/>
          <MountainView/>
          <NatureView/>
        </Views>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

Две двуспальные кровати

The following is an example of western style Japanese room with two double beds.

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>western</JapaneseHotelRoomStyle>
        <Beds> <!-- Two double beds-->
          <Bed size="double"></Bed>
          <Bed size="double"></Bed>
        </Beds>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>


Japanese style without bed

The following is an example of a Japanese style room without bed. Bed information is not required for japanese style room.

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese</JapaneseHotelRoomStyle>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

Japanese western with bed

The following is an example of a japanese_western style room with king size bed.

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese_western</JapaneseHotelRoomStyle>
        <Beds>
          <Bed size="king"></Bed>
        </Beds>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

If partner doesn't have the number of beds information in japanese_western rooms, then follow the example:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2023-07-23T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <RoomData>
      <RoomID>RoomID_1</RoomID>
      <RoomFeatures>
        <JapaneseHotelRoomStyle>japanese_western</JapaneseHotelRoomStyle>
      </RoomFeatures>
    </RoomData>
  </PropertyDataSet>
</Transaction>

<PackageData>

Defines itinerary-independent metadata about Room Bundles for a property. This element contains information that is associated with a partner and hotel, but not with an itinerary. The intended purpose is to define all non-itinerary data once and reference it from itinerary data.

The <PackageData> element appears in the following place in the Transaction message XML hierarchy:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

The <PackageData> element is similar to <RoomData> , but it describes rate features and terms that aren't part of the physical room description. You use <RoomData> and <PackageData> in combination to provide details about Room Bundles and rate features. For individual rooms that aren't part of a package, use just <RoomData> .

You can define both the <RoomData> and <PackageData> elements for the same room or Room Bundle. When Google displays that room or package in the search results, it will include the descriptions from both, separated by a hyphen.

If you update a single <PackageData> element for a property, you must update all <PackageData> and <RoomData> elements for the property. Each <PropertyDataSet> is considered all data about the property, and overwrites any existing data.

For more information, refer to Room Bundle metadata .

Синтаксис

The <PackageData> element uses the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <PropertyDataSet ... >
    <PackageData>
      <PackageID>package_ID</PackageID>
      <Name>
        <Text text="package_name" language="language_code"/>
        ...
      </Name>
      <Description>
        <Text text="package_description" language="language_code"/>
        ...
      </Description>
      <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
      <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails><!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>
      <!-- For these next 3 elements, boolean_value can be 0/1 or true/false -->
      <BreakfastIncluded>boolean_value</BreakfastIncluded>
      <InternetIncluded>boolean_value</InternetIncluded>
      <ParkingIncluded>boolean_value</ParkingIncluded>
      <PhotoURL>
        <Caption>
          <Text text="photo_description" language="language_code"/>
          ...
        </Caption>
        <URL>photo_location</URL>
      </PhotoURL>
      ...
      <Meals>
        <Breakfast
          included="[true|false]" buffet="[true|false]"
          in_room="[true|false]" in_private_space="[true|false]"/>
        <Dinner
          included="[true|false]" buffet="[true|false]"
          in_room="[true|false]" in_private_space="[true|false]"/>
      </Meals>
      <CheckinTime>checkin_time</CheckinTime>
      <CheckoutTime>checkout_time</CheckoutTime>
      <MembershipBenefitsIncluded>
        <ProgramName>
          <Text language="en" text="Special Rewards">
        </ProgramName>
        <ProgramLevel>
          <Text language="en" text="Platinum">
        </ProgramLevel>
      </MembershipBenefitsIncluded>
      <OnPropertyCredit>
        <Amount currency="USD">123.45</Amount>
      </OnPropertyCredit>
    </PackageData>
    <!-- a PackageID with a MilesIncluded rate feature -->
    <PackageData>
      <PackageID>room_with_miles</PackageID>
      <Name>
       <Text text="Room with Bundled Miles" language="en">
      </Name>
      <ChargeCurrency>hotel </ChargeCurrency>
      <MilesIncluded>
        <NumberOfMiles>1000 </NumberOfMiles>
        <Provider>
          <Text language="en" text="United Airlines">
        </Provider>
      </MilesIncluded>
    </PackageData>
    ...
    ...
  </PropertyDataSet>
  ...
</Transaction>

Атрибуты

The <PackageData> element has no attributes.

Дочерние элементы

The <PackageData> element has the following child elements:

Child Element Необходимый? Тип Описание
<BreakfastIncluded> Optional boolean Specifies whether this package includes breakfast with the rate. Valid values are 0 (or false ) and 1 (or true ).

It is preferred that you use <Meals> instead of <BreakfastIncluded> .

<ChargeCurrency> Optional enum When and where the user pays for a booking. This element uses the same syntax as <ChargeCurrency> in a <Result> .

The default value is web .

<CheckinTime> Optional Time Earliest possible check-in time. Time must be less than 24:00 in the local time of the hotel.
<CheckoutTime> Optional Time Latest possible check-out time in the local time of the hotel.
<Description> Optional Object A detailed description of the package. This element should contain information not described by other elements or the <Name> element. You shouldn't use all capital letters when specifying the description of the room.

The <Description> element takes a single child element, <Text> , which has two required attributes, text and language . The text attribute is the description, and the language attribute specifies a two-letter language code, as the following example shows:

<Description>
  <Text text="Two breakfast buffet certificates for
    each night of stay." language="en"/>
  <Text text="Deux certificats petit-déjeuner buffet
    pour chaque nuit de séjour." language="fr"/>
</Description>
<InternetIncluded> Optional boolean If a package includes internet access at no charge, while other packages wouldn't include that amenity. Don't set this element for Room Bundles in a hotel that provides free internet to all rooms. This element does not apply to in-room wired internet or wireless internet that is not available in guest rooms. Valid values are 0 (or false ) and 1 (or true ).
<Meals> Optional Object Contains information about meals in this package.

The <Meals> element takes two optional child elements, <Breakfast> and <Dinner> , which have the following attributes:

  • included (required): Set to 1 (or true ) if the rate includes breakfast/dinner; otherwise set to 0 or false .
  • in_room (optional): Set to 1 (or true ) if guests have the option to have breakfast/dinner in the room they stay in; otherwise set to 0 (or false ).
  • in_private_space (optional): Set to 1 (or true ) if guests have the option to have breakfast/dinner in a space (except the room they stay in) where they can avoid contact with other guests; otherwise set to 0 (or false ).
  • buffet (optional): Set to 1 (or true ) if breakfast/dinner is served as a buffet; otherwise set to 0 (or false ).

The optional attributes are used only when included is true.

For meal filters ( no meals , breakfast only , dinner only , and breakfast and dinner ) to work, both <Breakfast> and <Dinner> need to be provided with the included attribute.

<Name> Required string The name of the package. This value should match what appears on the hotel's landing page. Don't set the value of this element to all capital letters.

This element takes a single child element, <Text> , which has two attributes, text and language . The text attribute is the description, and the language attribute specifies a two-letter language code, as the following example shows:

<Name>
  <Text text="Bed and Breakfast" language="en"/>
  <Text text="Lit et petit déjeuné" language="fr"/>
</Name>
<Occupancy> Optional integer The maximum number of guests that a Room Bundle is intended for . For example, a large suite might be able to physically accommodate 6 guests, but is intended for up to 4 guests only.

This value must be less than or equal to the <Capacity> element, which is the number of people that the room can physically accommodate.

The value of <Occupancy> must be a positive integer between 1 and 99, inclusive.

If you specify this element in both <RoomBundle> and <PackageData> , the value in <RoomBundle> takes precedence.

Примечание :

<Occupancy> may be accompanied by <OccupancyDetails> ,which specifies the type of guests (adults or children). Refer to <OccupancyDetails> for syntax and description of child elements.
<PackageID> Required string

The unique ID for the package. Use this ID to match the Room Bundle data with the <Result> blocks in your pricing updates. For more information, refer to Room Bundle metadata .

(You can also use this ID to reference a common Room Bundle definition used in a single Transaction message when defining Room Bundle data inline.)

<ParkingIncluded> Optional boolean Whether a Room Bundle includes parking at no charge, where parking would otherwise be a paid service at this hotel. Don't specify a value for this element for a hotel that offers free parking.

Valid values are 0 (or false ) and 1 (or true ). Значение по умолчанию — false .

<PhotoURL> Optional Object (Same as <PhotoURL> in <RoomData> , but for the package (eg meal photos).)
<Refundable> Optional Object Enables listing a rate as being fully refundable or providing a free cancellation. If not provided, no information about a refund is displayed. A refund policy at the <PackageData> level overrides the refund policy at the <Result> level. A refund policy at the <Rates> level overrides the refund policy at the <PackageData> level. Refundable pricing can also be highlighted to users through alternative options without directly modifying your transaction message schema. Learn more about these options Refundable rates policy .

The following example shows the <Refundable> element with all of its attributes set:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

Note: We recommend setting all of the attributes. A feed status warning message is generated when one or more attributes are not set.

If you don't set any attributes, the rate does not display as refundable. The attributes are:

  • available : (Required) Set to 1 or true to indicate if the rate allows a full refund; otherwise set to 0 or false .
  • refundable_until_days : (Required if available is true ) Specifies the number of days in advance of check-in that a full refund can be requested. The value of refundable_until_days must be an integer between 0 and 330, inclusive.
  • refundable_until_time : (Highly recommended if available is true ) Specifies the latest time of day, in the local time of the hotel, that a full refund request will be honored. This can be combined with refundable_until_days to specify, for example, that "refunds are available until 4:00PM two days before check-in". If refundable_until_time isn't set, the value defaults to midnight.

    The value of this attribute uses the Time format.

When setting the attributes, note the following:

  • If available or refundable_until_days isn't set, the rate does not display as refundable.
  • If available is 0 or false , the other attributes are ignored. The rate does not display as refundable even if one or both of the other attributes is set.
<MembershipBenefits Included> Optional boolean Rate includes elite status benefits for duration of stay. Includes the following parameters:
  • ProgramName : Name of the elite status program
  • ProgramLevel : Level of the program. For example: "Gold."
  • NightlyValue (optional) : Nightly value of the benefits.
<CarRentalIncluded> Optional boolean Rate includes free car rental for duration of stay.
<MilesIncluded> > Optional boolean Rate includes frequent flyer miles. Parameters include:
  • NumberofMiles : Number of miles per itinerary.
  • Provider : Frequent flyer miles provide.
<OnPropertyCredit> Optional boolean Rate includes on-property credit (F&B, resort, spa, etc). Параметр:
  • Amount : The value of the credit per itinerary, in local currency.
<AirportTransportationIncluded> Optional Object Rate includes free transportation to/from a nearby airport. The optional direction attribute specifies the directionality of the transportation. Допустимые значения включают в себя:
    from : Transportation is provided from the airport to the property. This is the default value if no direction is specified. to : Transportation is provided to the airport from the property. round_trip : Transportation is provided both to and from the airport.

Примеры

Single room bundle

The following example defines a single Room Bundle, with an occupancy of 2 (one adult and one child) and includes breakfast:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>1</NumAdults>
        <Children>
          <Child age="17"/>
        </Children>
      </OccupancyDetails>
      <PackageID>P54321</PackageID>
      <Name>
         <Text text="Breakfast Included" language="en"/>
         <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Two certificates for continental
          breakfast will be provided." language="en"/>
        <Text text="Deux certificats pour le petit déjeuner
          continental seront fournis." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Room and package metadata

The following example defines room and package metadata:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>180054</Property>
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Bed Room" language="en"/>
        <Text text="Chambre single" language="fr"/>
      </Name>
      <Description>
        <Text text="Non-smoking" language="en"/>
        <Text text="Pas de fumiers" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
    </RoomData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
        <Text text="Avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Includes a delightful array of jams and jellies." language="en"/>
        <Text text="Comprend une délicieuse gamme de confitures et gelées." language="fr"/>
      </Description>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Multiple room bundles

The following example defines room and package metadata for multiple Room Bundles:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <!-- A transaction message with room types result. -->
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
      <RoomID>single</RoomID>
      <Name>
        <Text text="Single room" language="en"/>
        <Text text="Chambre simple" language="fr"/>
      </Name>
      <Description>
        <Text text="A single room" language="en"/>
        <Text text="Le chambre simple" language="fr"/>
      </Description>
      <PhotoURL>
        <Caption>
          <Text text="Living area" language="en"/>
          <Text text="Le chambre" language="fr"/>
        </Caption>
        <URL>http://www.foo.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <PhotoURL>
        <URL>http://www.foo.com/static/bar/image1235.jpg</URL>
      </PhotoURL>
      <Capacity>2</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>double</RoomID>
      <Name>
        <Text text="Double room" language="en"/>
        <Text text="Chambre double" language="fr"/>
      </Name>
      <Occupancy>1</Occupancy>
    </RoomData>
    <PackageData>
      <PackageID>refundbreakfast</PackageID>
      <Name>
        <Text text="Refundable Room with Breakfast" language="en"/>
        <Text text="Chambre remboursable avec le petit déjeuner" language="fr"/>
      </Name>
      <Description>
        <Text text="Continental Breakfast" language="en"/>
        <Text text="Petit déjeuner continental" language="fr"/>
      </Description>
      <ChargeCurrency>hotel</ChargeCurrency>
      <Refundable available="1" refundable_until_days="3"/>
      <BreakfastIncluded>1</BreakfastIncluded>
    </PackageData>
    <PackageData>
      <PackageID>prepaid</PackageID>
      <Name>
        <Text text="Nonrefundable" language="en"/>
        <Text text="Non remboursable" language="fr"/>
      </Name>
      <Description>
        <Text text="Blah blah blad" language="en"/>
        <Text text="Le blah blah blad" language="fr"/>
      </Description>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="0"/>
    </PackageData>
  </PropertyDataSet>
</Transaction>


Room bundle with rates

The following example defines room and package metadata for a Room bundle with rate features:

<Transaction timestamp="2010-04-24T20:44:56-04:00" id="TXNID">
  <PropertyDataSet>
    <Property>12345</Property>
    <RoomData>
     ...
    </RoomData>
<!-- definitions of PackageData types including rate features -->
    <PackageData>
      <PackageID>room_with_addl_benefits</PackageID>
      <Name>
        <Text text="Acme Hotels 2017 Promotion Package" language="en"/>
      </Name>
      <ChargeCurrency>hotel</ChargeCurrency>
      <BreakfastIncluded>1</BreakfastIncluded>
      <MembershipBenefitsIncluded>
        <ProgramName>
          <Text language="en" text="Marriott Rewards"/>
        </ProgramName>
        <ProgramLevel>
          <Text language="en" text="Platinum"/>
        </ProgramLevel>
      </MembershipBenefitsIncluded>
      <OnPropertyCredit>
        <Amount currency="USD">123.45</Amount>
      </OnPropertyCredit>
    </PackageData>
    <PackageData>
      <PackageID>room_with_miles</PackageID>
      <Name>
        <Text text="Room with Bundled Miles" language="en"/>
      </Name>
      <ChargeCurrency>hotel</ChargeCurrency>
      <MilesIncluded>
        <NumberOfMiles>1000</NumberOfMiles>
        <Provider>
          <Text language="en" text="United Airlines"/>
        </Provider>
      </MilesIncluded>
      <AirportTransportationIncluded direction="from"/>
    </PackageData>
  </PropertyDataSet>

<!-- The actual list of prices -->
  <Result>
…
  </Result>
</Transaction>

Meals & photos

The following example defines room and package metadata for meals, photos, and check-in and check-out times:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <PackageID>PackageID_1</PackageID>
      <Name>
        <Text text="Meals Included" language="en"/>
      </Name>
      <PhotoURL>
        <Caption>
          <Text text="Breakfast" language="en"/>
          <Text text="朝食" language="ja"/>
        </Caption>
        <URL>http://example.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Meals>
        <!-- Guests can choose to have breakfast in their room or in another
        space to avoid contact with other guests. -->
        <Breakfast included="1" in_room="1" in_private_space="1"/>
        <Dinner included="1" buffet="1"/>
      </Meals>
      <CheckinTime>15:00</CheckinTime>
      <CheckoutTime>11:00</CheckoutTime>
    </PackageData>
  </PropertyDataSet>
</Transaction>

Завтрак

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <PropertyDataSet>
    <Property>1234</Property>
    <PackageData>
      <PackageID>PackageID_1</PackageID>
      <Name>
        <Text text="Breakfast Included" language="en"/>
      </Name>
      <PhotoURL>
        <Caption>
          <Text text="Breakfast" language="en"/>
          <Text text="朝食" language="ja"/>
        </Caption>
        <URL>http://example.com/static/bar/image1234.jpg</URL>
      </PhotoURL>
      <Meals>
        <Breakfast included="true"/>
        <!-- Dinner not included needs to be explicitly specified -->
        <Dinner included="false"/>
      </Meals>
      <CheckinTime>15:00</CheckinTime>
      <CheckoutTime>11:00</CheckoutTime>
    </PackageData>
  </PropertyDataSet>
</Transaction>

<Result>

A container for pricing and availability updates in a <Transaction> message.

The <Result> element appears in the following place in the Transaction message XML hierarchy:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

Use <Result> to set or update room prices and define available inventory. Items defined in this element typically reference itinerary-independent metadata about a room or package (such as a description or set of amenities) defined in <PackageData> and <RoomData> .

You typically send Transaction messages with pricing updates very frequently. Exactly how and how often you do this depends on your delivery mode .

You can use <Result> in a Transaction message to remove itineraries, as described in Removing Inventory . For more information about using Transaction messages to update prices and availability, Adding and Updating Inventory .

A single Transaction message can include any number of <Result> elements in it, as long as the size of the message does not exceed 100MB.

Синтаксис

The <Result> element uses the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    <!-- Required -->
    <Property>hotel_ID</Property>
    <!-- Required -->
    <Checkin>YYYY-MM-DD</Checkin>
    <!-- Required -->
    <Nights>number_of_nights</Nights>

    <Baserate currency="currency_code">price</Baserate>
    <!-- Only required when <Baserate> contains a real price -->
    <Tax currency="currency_code">tax_amount</Tax>
    <!-- Only required when <Baserate> contains a real price  -->
    <OtherFees currency="currency_code">fee_amount</OtherFees>
    <Refundable available="[false|true]" refundable_until_days="number_of_days"
      refundable_until_time="time"/>

    <RoomID>room_ID</RoomID>
    <PackageID>package_ID</PackageID>
    <ExpirationTime>expiration_time</ExpirationTime>
    <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>

    <Occupancy>max_number_of_intended_occupants</Occupancy>
    <!-- For Baserate, occupancy value must be greater than or equal to 2.
         If a value is not provided for occupancy, it defaults to 2. -->
    <OccupancyDetails>occupancy_info</OccupancyDetails>

    <Rates>...</Rates>

    <RoomBundle>...</RoomBundle>

    <AllowablePointsOfSale>
      <PointOfSale id="landing_page_identifier"/>
      ...
    </AllowablePointsOfSale>

    <Custom[1-5]>custom_value</Custom[1-5]>
  </Result>
  ...
  </Transaction>

Атрибуты

The <Result> element has the following attributes:

Атрибут Необходимый? Тип Описание
mergeable Optional boolean By default, new prices for a specific hotel and itinerary pair will overwrite any previous (non-expired) prices present in Google's cache. The mergeable attribute lets you store additional prices to Google's cache without deleting previous pricing information. Live Pricing Query with Context responses will always have this attribute set to true (regardless of your transaction message response).

Дочерние элементы

The <Result> element has the following child elements:

Child Element Необходимый? Тип Описание
<AllowablePointsOfSale> Optional Object One or more landing pages that are eligible for the hotel. A landing page is a website that can handle the booking process for the end-user. To explicitly include certain landing page (and exclude others), add one or more <AllowablePointsOfSale> elements that match the <PointOfSale> element's id attribute in the landing pages file.

If you don't include this element, all landing pages defined in the landing pages file are considered eligible to be used for booking the room. For more information, refer to Landing Pages File Syntax .

<Baserate> Optional float

The price of the room for the stay. The value of this element should reflect the following:

  • For a private room, set the least expensive double-occupancy rate that you offer. Higher occupancies are allowed here if you don't have a double-occupancy rate and your account has non-double occupancy rates enabled. Please contact us to enable non-double occupancy rates. Single occupancy rates are not allowed here—they must be set under <Rates> .
  • For a shared room, leave empty and use <RoomBundle> .
  • This value should be the total base price for all nights, not the average nightly rate.

When the room is unavailable for the itinerary, <Baserate> should either be omitted or set to -1 , and <Unavailable> should be specified, along with any known reasons for the unavailability.

To remove a Room Bundle, use the instructions in Removing a Room Bundle .

The <Baserate> must not contain any digit grouping symbols, such as a comma (,) or period (.). Always separate fractions using a period (.) as the decimal mark. For example, represent $1,200.40 as:

<Baserate currency="USD">1200.40</Baserate>

The <Baserate> element takes the following optional attributes:

  • all_inclusive : A Boolean that indicates if this rate includes taxes and fees. In general, set this value to false for US and Canadian end-users and supply values for the <Tax> and <OtherFees> elements. If you use all-inclusive prices, you may not be eligible to appear in the listings if your prices don't separate out taxes and fees for Canadian users.

    All-inclusive prices are now shown to US users.

    For all other end-users, you typically include the taxes and fees in the base rate and set the value of the all_inclusive attribute to true . For more information, refer to Taxes and Fees Policy .

    Значение по умолчанию — false .

  • currency : The three-letter currency code . For example, USD for US dollars.
<ChargeCurrency> Optional enum When and where the user pays for a booking. This element can be used in a Transaction message in the <Result> element for the Hotel Price or <PackageData> block for a Room Bundle.

Допустимые значения:

  • web : The user is charged online at the time of booking. Это значение по умолчанию. The actual landing page is defined by the landing page file , and can be affected by the user's currency, location, language, or other factors.
  • hotel : The user is charged when checking in at the hotel. If payment must always be made in the hotel's currency, set the value of <ChargeCurrency> to hotel . The actual landing page is not affected by the user's currency.
  • deposit : The user is charged some portion immediately and the remainder is charged at a later point in time, typically when the user checks out of the hotel.
  • installments : The user is charged an initial fraction of the total sum due and is expected to routinely pay a set balance over a fixed period of time.

The default value is web .

<Checkin> Required Date The check-in date for an itinerary using the Date format. The combination of the <Nights> element and the <Checkin> element make up an itinerary.
<Custom[1‑5]> Optional string Defines a custom field that you can use to pass additional data associated with a hotel. You can pass up to five custom values with the following element names:
  • <Custom1>
  • <Custom2>
  • <Custom3>
  • <Custom4>
  • <Custom5>

The <Custom> elements let you pass arbitrary data. For example, you can specify a value in this field that will then be used by the landing pages file to construct a custom URL for a landing page. There is a limit of 200 characters per custom field. For more information, refer to landing page files .

<Custom> elements provided in the <Rate> element are not inherited to the <RoomBundle> element. You should define <Custom> attribute separately in each <RoomBundle> .

<ExpirationTime> Optional DateTime The date and time at which the price is considered expired (3 hours minimum).

We recommend that you don't provide expiration timestamps if it isn't critical to your pricing structure.

Google doesn't serve any prices that are expired, and any itinerary that has an expired price will become eligible for Live Pricing Querying .

<Nights> Required integer The number of nights for an itinerary. The value of the <Nights> element must be a positive integer. The combination of <Nights> and <Checkin> make up an itinerary.
<OtherFees> Optional float Fees other than the base rate and taxes that influence the final price of a room. The <OtherFees> element takes a single required attribute, currency , that defines the three-letter currency code for the fees. For example, USD .

The <OtherFees> element is required if <Baserate> is greater than zero.

<Occupancy> Optional integer Specifies the maximum allowed occupants for this rate. When <Occupancy> appears directly under <Result> , it must specify 2 or more. <Occupancy> may be accompanied by <OccupancyDetails> , which specifies the type of guests (adults or children). If guest types are not specified, they are assumed to be adults. Consult <OccupancyDetails> for syntax and description of child elements. If the <Occupancy> element is not provided, occupancy is defaulted as 2 .

Note: Contact your support team to enable the feature to send non-double occupancy prices.

<PackageID> Optional string The unique ID of the package to map it to predefined package data. Also used to populate the PACKAGE-ID landing page variable. For more information, refer to Room Bundle metadata .
<Property> Required string The ID of a hotel affected by the associated data (price, itinerary, Room Bundle, or metadata). The value of this element must be a string. The value of this element must match the listing <id> that you defined in your Hotel List Feed.
<Rates> Optional <Rates> A container for one or more <Rate> blocks. Each <Rate> in <Rates> defines a different price for the room/itinerary combination.

Use the <Rates> element when there are multiple rates for the same room/itinerary combination or when a rate is not allowed to be specified at the <Result> level. For example, you define multiple rates for conditional rates , private rates , conditional rates in Room Bundles , or different occupancies.

Note: Within <Result> , single-occupancy rates can only be specified in <Rates> . Please contact us to allow non-double occupancy prices.

<Refundable> Optional Object Enables listing a rate as being fully refundable or providing a free cancellation. If not provided, no information about a refund is displayed. A refund policy at the <PackageData> level overrides the refund policy at the <Result> level. A refund policy at the <Rates> level overrides the refund policy at the <PackageData> level. Refundable pricing can also be highlighted to users through alternative options without directly modifying your transaction message schema. Learn more about Refundable rates policy .

The following example shows the <Refundable> element with all of its attributes set:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

Note: We recommend setting all of the attributes. A feed status warning message is generated when one or more attributes are not set.

If you don't set any attributes, the rate does not display as refundable. The attributes are:

  • available : (Required) Set to 1 (or true ) to indicate if the rate allows a full refund; otherwise set to 0 (or false ).
  • refundable_until_days : (Required if available is true ) Specifies the number of days in advance of check-in that a full refund can be requested. The value of refundable_until_days must be an integer between 0 and 330, inclusive.
  • refundable_until_time : (Highly recommended if available is true ) Specifies the latest time of day, in the local time of the hotel, that a full refund request will be honored. This can be combined with refundable_until_days to specify, for example, that "refunds are available until 4:00PM two days before check-in". If refundable_until_time isn't set, the value defaults to midnight.

    The value of this attribute uses the Time format.

When setting the attributes, note the following:

  • If available or refundable_until_days isn't set, the rate does not display as refundable.
  • If available is 0 (or false ), the other attributes are ignored. The rate does not display as refundable even if one or both of the other attributes is set.
<RoomBundle> Optional <RoomBundle> A container for information on priced physical descriptions of a room, any packaging of amenities, and some purchase policy details for the given hotel and itinerary.

In general, use this element to define pricing for the base room and different types of rooms within the same property. While it is possible to define Room Bundle descriptions inline, you should use a separate Transaction message to define that information. Google will store metadata so that you can reference it, rather than repeat it, in all future pricing updates.

<RoomID> Optional string The unique ID of the room to map it to predefined room data. Also used to populate the PARTNER-ROOM-ID landing page variable. For more information, refer to Room Bundle metadata .
<Tax> Optional float The taxes that are calculated for the final price of a room. The <Tax> element takes a single required attribute, currency , that defines the three-letter currency code for the taxes. For example, USD . The <Tax> element is required if <Baserate> is greater than zero.

If <Baserate> element's "all_inclusive" attribute is explicitly set to true, then setting this value is optional.

<Unavailable> Optional Object Indicates that the itinerary is unavailable for booking. Serves as a container for more detailed reasons why the itinerary was unavailable. One or more of the following unavailability reasons may be nested underneath the <Unavailable> tag:
  • <NoVacancy/> : No more rooms are available for sale for one or more nights of the stay.
  • <MinNightStay value=N/> : The itinerary was below the minimum night stay of N for the stay dates.
  • <MaxNightStay value=N/> : The itinerary was above the maximum night stay of N for the stay dates.
  • <MinAdvancePurchase value=N/> : The itinerary was below the minimum advance booking window of N for the stay dates.
  • <MaxAdvancePurchase value=N/> : The itinerary was above the maximum advance booking window of N for the stay dates.
  • <ClosedToArrival/> : The property does not allow check-in on the itinerary's arrival date.
  • <ClosedToDeparture/> : The property does not allow check-out on the itinerary's departure date.
  • <PropertyClosed first_open="YYYY-MM-DD" first_closed="YYYY-MM-DD"/> : The property is closed for some or all of the stay. Recommended attributes first_open and first_closed specify the first dates greater than or equal to the arrival date for which the property is open or closed, respectively. For a property that closes after the arrival date, first_open should be equal to the arrival date, and first_closed should be the date on which the property closes. For a property that is closed on the arrival date, first_closed should be equal to the arrival date, and first_opened should be the next date on which the property is open.
  • <NotFetched/> : A price for the itinerary was not provided by downstream data sources.
  • <InvalidProperty/> : The requested property identifier was not recognized.
  • <InvalidOccupancy/> : The requested occupancy is not supported by the property.
  • <PriceIssue/> : An issue with the price caused it to not be sent.
  • <InternalError reason=""/> : Some unenumerated error occurred. Optional reason attribute can report the error as text.
  • <OtherRestriction restriction=""/> : The itinerary was not available due to some unenumerated booking restriction. Optional restriction attribute allows reporting the restriction as text.

Примеры

Multi-property example

The following example defines one itinerary and its pricing for two properties:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
  </Result>
  <Result>
    <Property>052213</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">299.98</Baserate>
    <Tax currency="USD">26.42</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="otto"/>
      <PointOfSale id="simon"/>
    </AllowablePointsOfSale>
  </Result>
</Transaction>

Not shown in this example are details about the room, such as a description, a picture and caption, the room's name, and its capacity.

You can define that information once in a separate Transaction message that Google stores. You can then reference it in all subsequent pricing and inventory updates. For more information, refer to Room Bundle metadata .

Multi-rate example

The following example defines a single itinerary and property with multiple rates for various occupancies. The <Rates> element can be utilized to provide multi-rate pricing for a specific property. The following example is also useful for Vacation Rental (VR) properties:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2020-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2021-01-13</Checkin>
    <Nights>9</Nights>
    <Baserate currency="USD">3196.1</Baserate>
    <Tax currency="USD">559.49</Tax>
    <OtherFees currency="USD">543.34</OtherFees>
    <Occupancy>2</Occupancy>
    <Rates>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>1</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>3</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>4</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>5</Occupancy>
      </Rate>
      <Rate>
        <Baserate currency="USD">3196.1</Baserate>
        <Tax currency="USD">559.49</Tax>
        <OtherFees currency="USD">543.34</OtherFees>
        <Occupancy>6</Occupancy>
      </Rate>
    </Rates>
  </Result>
</Transaction>

Unavailable example

The following example defines one itinerary whose availability couldn't be retrieved from downstream channels, a second that is both below the minimum night stay and already booked for the specified dates, and a third whose property is closed on the arrival date, but that opens during the course of the stay:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Unavailable>
      <NotFetched/>
    </Unavailable>
  </Result>
  <Result>
    <Property>073313</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Unavailable>
      <NoVacancy/>
      <MinNightStay value=3/>
    </Unavailable>
  </Result>
  <Result>
    <Property>052213</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>10</Nights>
    <Unavailable>
      <PropertyClosed first_open="2018-06-15" first_closed="2018-06-10"/>
    </Unavailable>
  </Result>
</Transaction>

<Rates>

A container for one or more <Rate> blocks. Each <Rate> in <Rates> defines a different price for the room or itinerary combination.

Use the <Rates> element only when there are multiple rates for the same room or itinerary combination. For example, you define multiple rates for conditional rates , private rates , or conditional rates in Room Bundles .

The <Rates> element appears in the following place in the Transaction message XML hierarchy:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>         // Pricing and availability
        + <Rates>
        + <RoomBundle> (Can also contain <Rates>)
        + ...

Values set in a <Rate> override pricing-related values on the parent <Result> or <RoomBundle> element. If they are not set in <Rate> , they inherit their value from the parent element. Only <AllowablePointsofSale> is inherited to the <RoomBundle> element.

Синтаксис

The <Rates> element uses the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    <Rates>
      <Rate rate_rule_id="rate_rule_id">
        <Baserate currency="currency_code">price</Baserate>
        <Tax currency="currency_code">tax_amount</Tax>
        <OtherFees currency="currency_code">fee_amount</OtherFees>
        <ExpirationTime>expiration_time</ExpirationTime>
        <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
        <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
        <AllowablePointsOfSale>
          <PointOfSale id="landing_page_identifier"/>
        </AllowablePointsOfSale>
        <Occupancy>max_number_of_intended_occupants</Occupancy>
        <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>
          ...
        <Custom[1-5]>custom_value</Custom[1-5]>
      </Rate>
      ...
    </Rates>
  </Result>
  ...
</Transaction>

Атрибуты

The <Rates> element has the following attributes:

Атрибут Необходимый? Описание
rate_rule_id Optional For conditional rates , this ID matches a rate to a definition in your Rate Rule Definition file. The character limit for this field is 40 characters.

Дочерние элементы

The <Rates> element has the following child elements:

Child Element Необходимый? Тип Описание
<AllowablePointsOfSale> Optional Object One or more landing pages that are eligible for the hotel. This element uses the same syntax as the <AllowablePointsOfSale> on <Result> .
<Baserate> Required float The price of the room for the stay. This element uses the same syntax as the <Baserate> on <Result> .

Note: The <Baserate> child element under <Rate> cannot be defined as being unavailable.

<ChargeCurrency> Optional enum When and where the user pays for a booking. This element uses the same syntax as a <ChargeCurrency> in a <Result> .
<Custom[1‑5]> Optional string Custom fields that you can use to pass additional data associated with a hotel to a landing page. This element uses the same syntax as a <Custom[1‑5]> in a <Result> . There is a limit of 200 characters per custom field. For more information, refer to landing page files .

If <Custom> elements are provided in the <Result> element, then they are not inherited in the <RoomBundle> element and should be defined separately for each <RoomBundle> or it can be included in <PackageData> if needed.

<ExpirationTime> Optional DateTime The date and time at which the rate is considered expired. This element uses the same syntax as an <ExpirationTime> in a <Result> .
<Occupancy> Optional integer

Specifies the maximum allowed occupants for this rate. If not specified, it is assumed to be the same as parent rate. <Occupancy> may be accompanied by <OccupancyDetails> , which specifies the type of guests (adults or children). Consult <OccupancyDetails> for syntax and description of child elements.

<OtherFees> Required float Fees other than the base rate and taxes that influence the final price of a room. This element uses the same syntax as <OtherFees> in a <Result> .

If <Baserate> element's "all_inclusive" attribute is explicitly set to true, then setting this value is optional.

<Refundable> Optional Object Enables listing a rate as being fully refundable or providing a free cancellation. If not provided, no information about a refund is displayed. A refund policy at the <PackageData> level overrides the refund policy at the <Result> level. A refund policy at the <Rates> level overrides the refund policy at the <PackageData> level. Refundable pricing can also be highlighted to users through alternative options without directly modifying your transaction message schema. Learn more about these options Refundable rates policy .

The following example shows the <Refundable> element with all of its attributes set:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

Note: We recommend setting all of the attributes. A feed status warning message is generated when one or more attributes are not set.

If you don't set any attributes, the rate does not display as refundable. The attributes are:

  • available : (Required) Set to 1 (or true ) to indicate if the rate allows a full refund; otherwise set to 0 (or false ).
  • refundable_until_days : (Required if available is true ) Specifies the number of days in advance of check-in that a full refund can be requested. The value of refundable_until_days must be an integer between 0 and 330, inclusive.
  • refundable_until_time : (Highly recommended if available is true ) Specifies the latest time of day, in the local time of the hotel, that a full refund request will be honored. This can be combined with refundable_until_days to specify, for example, that "refunds are available until 4:00PM two days before check-in". If refundable_until_time isn't set, the value defaults to midnight.

    The value of this attribute uses the Time format.

When setting the attributes, note the following:

  • If available or refundable_until_days isn't set, the rate does not display as refundable.
  • If available is 0 (or false ), the other attributes are ignored. The rate does not display as refundable even if one or both of the other attributes is set.
<Tax> Required float The taxes that are calculated for the final price of a room. This element uses the same syntax as the a <Tax> in a <Result> .

Примеры

Base rate and conditional rate

The following example shows a Transaction message that contains a base rate and a conditional rate :

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>1</Nights>

    <Baserate currency="USD">200.00</Baserate>
    <Tax currency="USD">20.00</Tax>
    <OtherFees currency="USD">1.00</OtherFees>

    <Rates>
      <!-- The rate_rule_id is required when using conditional rates -->
      <Rate rate_rule_id="mobile">
        <!-- Override base rate and taxes for conditional rates -->
        <Baserate currency="USD">180.00</Baserate>
        <Tax currency="USD">18.00</Tax>
        <!-- NOTE: OtherFees is inherited from the above setting -->
        <Custom1>ratecode123</Custom1>
      </Rate>
    </Rates>

  </Result>
</Transaction>

Multiple conditional rates

The following example defines a base rate and multiple conditional rates within a <RoomBundle> :

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>2</Nights>
    <!-- When Google receives new room bundle information for an itinerary, all
    previous room bundle pricing is dropped from Google's cache. Thus, if you
    want to delete a specific room bundle from Google's cache, you may do so
    by simply not providing that specific room bundle in subsequent transaction
    messages. -->
    <RoomBundle>
     ...
      <!-- RoomID is required, PackageID is recommended. -->
      <RoomID>5</RoomID>
      <PackageID>ABC</PackageID>
      <!-- Baserate is required. -->
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>

      <!-- RatePlanID is optional and represents the unique identifier for a
      room and package data combination. We strongly recommend using RatePlanID
      as a variable to build your dynamic landing page (formerly Point of Sale)
      URL. For details, see Using Variables and Conditions. -->
      <RatePlanID>5-ABC</RatePlanID>

      <!-- Occupancy is mandatory for RoomBundle elements. -->
      <!-- Elements below will get inherited to nested rate elements. -->
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
      </OccupancyDetails>
      <InternetIncluded>1</InternetIncluded>


      <!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <!-- Neither rate overrides Custom2. -->
      <Custom2>ratebasic</Custom2>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides ChargeCurrency from roombundle. -->
          <ChargeCurrency>hotel</ChargeCurrency>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode321</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode432</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

<RoomBundle>

Defines pricing and availability for Room Bundles as a child of <Result> in a <Transaction> message. Define a separate element for each package or itinerary combination. To define the package and terms of the Room Bundles, use <RoomData> .

The <RoomBundle> element appears in the following place in the Transaction message XML hierarchy:

+ <Transaction>
    + <PropertyDataSet>  // Room and package metadata
        + <Property>
        + <RoomData>
        + <PackageData>
    + <Result>           // Pricing and availability
        + <Rates>
        + <RoomBundle>
        + ...

For more information, refer to Using Room Bundles .

Синтаксис

The <RoomBundle> element uses the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    ...
    <RoomBundle>
      <!-- Required unless specified inline under <RoomData> -->
      <RoomID>room_ID</RoomID>
      <!-- Required  <PackageData> -->
      <PackageID>package_ID</PackageID>

      <!-- Required -->
      <Baserate currency="currency_code">price</Baserate>
      <!-- Required -->
      <Tax currency="currency_code">taxes</Tax>
      <!-- Required -->
      <OtherFees currency="currency_code">other_fees</OtherFees>

      <Refundable available="[false|true]" refundable_until_days="number_of_days"
        refundable_until_time="time"/>
      <!-- Required -->
      <ChargeCurrency>[deposit|hotel|installments|web]</ChargeCurrency>
      <Occupancy>max_number_of_intended_occupants</Occupancy>
      <OccupancyDetails> <!-- optional info about the types of guests,
      whether adults or children --></OccupancyDetails>

      <BreakfastIncluded>boolean_value</BreakfastIncluded>
      <InternetIncluded>boolean_value</InternetIncluded>
      <ParkingIncluded>boolean_value</ParkingIncluded>

      <RatePlanID>rate_plan_ID</RatePlanID>

      <Rates>...</Rates>

      <Custom1>custom_value_1</Custom1>
      <Custom2>custom_value_2</Custom2>
      <Custom3>custom_value_3</Custom3>
      <Custom4>custom_value_4</Custom4>
      <Custom5>custom_value_5</Custom5>
    </RoomBundle>
    ...
  </Result>
</Transaction>

Атрибуты

The <RoomBundle> element has no attributes.

Дочерние элементы

The <RoomBundle> element has the following child elements:

Child Element Необходимый? Тип Описание
<Baserate> Required float Defines the price of the Room Bundle for the stay. This element uses the same syntax as <Baserate> in <Result> , with the following exception:
  • When the room is unavailable for the itinerary, remove the <RoomBundle> element to indicate that a room is no longer in inventory. For more information, refer to Removing a Room Bundle .
<BreakfastIncluded> Optional boolean Specifies whether this Room Bundle includes breakfast with the rate.
<ChargeCurrency> Optional enum When and where the user pays for a booking. This element uses the same syntax as <ChargeCurrency> in a <Result> .

The default value is web .

<Custom[1‑5]> Optional string Custom fields for passing additional data to the landing pages for the Room Bundle. These elements use the same syntax as <Custom[1-5]> in <Result> . There is a limit of 200 characters per custom field. For more information, refer to landing page files . Custom variables are listed only when you send the prices in the Transaction message.

If <Custom> elements are provided in the <Result> element, then they are not inherited in the <RoomBundle> element and should be defined separately for each <RoomBundle> or it can be included in <PackageData> if needed.

<InternetIncluded> Optional boolean If a Room Bundle includes internet access at no charge, while other bundles wouldn't include that amenity. Don't set this element for Room Bundles in a hotel that provides free internet to all rooms. This element does not apply to in-room wired internet or wireless internet that is not available in guest rooms.
<Occupancy> Required integer Specifies the maximum allowed occupants for this rate. For example, a large suite might be able to physically accommodate 6 guests, but the "Honeymoon Package" allows 2 guests only.

This value must be less than or equal to the <Capacity> , which is the number of people that the room can physically accommodate.

When defining occupancy in your landing page URL, use the NUM-ADULTS and NUM-CHILDREN variables, as described in Using Variables and Conditions . The default value is 2 adults and 0 children.

The value of <Occupancy> must be a positive integer between 1 and 99, inclusive.

Примечания :

  • <Occupancy> for <RoomBundle> is strongly recommended so flagged as required and if omitted will throw a 1097 error.
  • <Occupancy> comes from the data object in this order: <RoomBundle> , <PackageData> , and then = <RoomData> . If there is no value present in any of these, the value defaults to 2.
  • <Occupancy> may be accompanied by <OccupancyDetails> , which specifies the type of guests (adults or children). If guest types are not specified, they are assumed to be adults. Consult <OccupancyDetails> for syntax and description of child elements.
  • When you set <Occupancy> in both <RoomBundle> and <PackageData> , the value in <RoomBundle> takes precedence.
<OtherFees> Required float Fees other than the base rate and taxes that influence the final price of a room. The <OtherFees> element takes a single required attribute, currency , that defines the three-letter currency code for the fees. For example, use USD for US dollars.
<PackageID> Optional (recommended) string The unique ID for the package data. Use this ID to match the Room Bundle data with what was sent in <PackageData> . For more information, refer to Room Bundle metadata . (You can also use this ID to reference a common Room Bundle definition used in a single Transaction message when defining Room Bundle data inline.)
<ParkingIncluded> Optional boolean Whether a Room Bundle includes parking at no charge, where parking would otherwise be a paid service at this hotel. Don't specify a value for this element for a hotel that offers free parking.

Valid values are 0 (or false ) and 1 (or true ). Значение по умолчанию — false .

<RatePlanID> Optional string The Rate Plan ID represents the unique identifier for a room and package combination. For example, given a <RoomID> value of 5 and a <PackageID> value of ABC, you could use a value of 5-ABC for <RatePlanID> . We strongly recommend using RatePlanID as a variable to build your dynamic landing page (formerly Point of Sale) URL.

For more information, refer to Using Variables and Conditions .

<Rates> Optional <Rates> Rates that override the defaults for this Room Bundle. This element uses the same syntax as <Rates> in <Result> .
<Refundable> Optional Object Enables listing a rate as being fully refundable or providing a free cancellation. If not provided, no information about a refund is displayed. A refund policy at the <PackageData> level overrides the refund policy at the <Result> level. A refund policy at the <Rates> level overrides the refund policy at the <PackageData> level. Refundable pricing can also be highlighted to users through alternative options without directly modifying your transaction message schema. Learn more about these options Refundable rates policy .

The following example shows the <Refundable> element with all of its attributes set:

<Refundable available="1" refundable_until_days="7"
refundable_until_time="18:00:00"/>

Note: We recommend setting all of the attributes. A feed status warning message is generated when one or more attributes are not set.

If you don't set any attributes, the rate does not display as refundable. The attributes are:

  • available : (Required) Set to 1 (or true ) to indicate if the rate allows a full refund; otherwise set to 0 (or false ).
  • refundable_until_days : (Required if available is true ) Specifies the number of days in advance of check-in that a full refund can be requested. The value of refundable_until_days must be an integer between 0 and 330, inclusive.
  • refundable_until_time : (Highly recommended if available is true ) Specifies the latest time of day, in the local time of the hotel, that a full refund request will be honored. This can be combined with refundable_until_days to specify, for example, that "refunds are available until 4:00PM two days before check-in". If refundable_until_time isn't set, the value defaults to midnight.

    The value of this attribute uses the Time format.

When setting the attributes, note the following:

  • If available or refundable_until_days isn't set, the rate does not display as refundable.
  • If available is 0 (or false ), the other attributes are ignored. The rate does not display as refundable even if one or both of the other attributes is set.
<RoomID> Required string The unique ID for the room data. Use this ID to match the Room Bundle data with what you sent in <RoomData> . For more information, refer to Room Bundle metadata . (You can also use this ID to reference a common room definition in a single Transaction message when defining room data inline.)
<Tax> Required float The taxes that are calculated for the final price of a room. The <Tax> element takes a single required attribute, currency , that defines the three-letter currency code for the taxes. For example, use USD for US dollars.

Примеры

Single occupancy bundle

The following example defines a response with a single occupancy bundle. When a user selects 1 in the Occupancy picker, Google displays the lowest eligible price regardless of occupancy.

If a single occupancy price is not available, then Google will show the lowest double-occupancy price. Note that single occupancy prices are not live queried if double-occupancy or more prices are cached for an itinerary.

This example references predefined room and package metadata with the <RoomID> and <PackageID> elements. Use the <RoomData> and <PackageData> elements to define that information.

<!-- Efficient method of defining Room Bundles-->
<!----- Occupancy of 1 example ----->

<Transaction timestamp="2017-07-18T16:20:00-04:00" id="12345678">
  <!-- Part1: Define RoomData and PackageData in PropertyDataSet -->
  <!-- Note:  Once defined it does not have to be repeated for future
              Transaction Messages.
              PropertyDataSets can also be defined and sent in their own
              Transaction Message separately from pricing. Google can be
              configured to pull just PropertyDataSets once per day
              (or on a predefined frequency). -->
  <PropertyDataSet>
    <Property>180054</Property>
    <!-- Can be reused by multiple Room Bundles -->
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Queen Room - Non-Smoking" language="en"/>
        <Text text="Chambre de la Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <!-- Room can accommodate up to 4, but package data specifies occupancy
           between 1 to 4 -->
      <Capacity>4</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>436233</RoomID>
      <Name>
        <Text text="Premium King Room - Non-Smoking" language="en"/>
        <Text text="Chambre de le Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <Capacity>4</Capacity>
    </RoomData>
    <!-- Can be reused by multiple Room Bundles -->
    <PackageData>
      <PackageID>P11111</PackageID>
      <Occupancy>1</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P54321</PackageID>
      <Occupancy>2</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P12345</PackageID>
      <Occupancy>4</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="1"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
  </PropertyDataSet>

    <!-- Efficient method of defining Room Bundles -->
    <!-- Part 2: Reference RoomData and PackageData through ID -->
  <Result>
    <!-- Single occupancy pricing will be specified in a room bundle below -->
    <Property>180054</Property>
    <Checkin>2017-10-07</Checkin>
    <Nights>2</Nights>
    <!-- Base Room Bundle -->
    <RoomBundle>
      <RoomID>060773</RoomID>
      <PackageID>P54321</PackageID>
      <Baserate currency="USD">199.99</Baserate>
      <Tax currency="USD">25.12</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RatePlanID>060773-P54321</RatePlanID>
    </RoomBundle>
    <RoomBundle>
      <RoomID>060773</RoomID>
      <PackageID>P11111</PackageID>
      <!-- Price for 1 ("occupancy") is the lowest price and will be
           displayed -->
      <Baserate currency="USD">174.99</Baserate>
      <Tax currency="USD">22.08</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RatePlanID>060773-P11111</RatePlanID>
    </RoomBundle>
    <!-- Premium Room Bundle -->
    <RoomBundle>
      <RoomID>436233</RoomID>
      <PackageID>P12345</PackageID>
      <!-- Price for 4 ("occupancy"), any eligible room bundle with 1 or more
           occupancy will be displayed-->
      <Baserate currency="USD">298.88</Baserate>
      <Tax currency="USD">42.12</Tax>
      <OtherFees currency="USD">10.00</OtherFees>
      <RatePlanID>436233-P12345</RatePlanID>
    </RoomBundle>
    <!-- ..Continue providing all available RoomBundle rates under matched
         property for 1 or more occupancies..-->
  </Result>
</Transaction>


Two or more occupancies

The following example defines a response containing two or more occupancies.

This example references predefined room and package metadata with the <RoomID> and <PackageID> elements. Use the <RoomData> and <PackageData> elements to define that information.

<!-- Efficient method of defining Room Bundles-->
<!----- Occupancy of 3 example ----->

<Transaction timestamp="2017-07-18T16:20:00-04:00" id="12345678">
  <!-- Efficient method of defining Room Bundles-->
  <!-- Part1: Define RoomData and PackageData in PropertyDataSet -->
  <PropertyDataSet>
    <Property>180054</Property>
    <!-- Can be reused by multiple Room Bundles -->
    <RoomData>
      <RoomID>060773</RoomID>
      <Name>
        <Text text="Single Queen Room - Non-Smoking" language="en"/>
        <Text text="Chambre de la Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <!-- Room can accommodate up to 4, but package data specifies occupancy
           between 1 to 4 -->
      <Capacity>4</Capacity>
    </RoomData>
    <RoomData>
      <RoomID>436233</RoomID>
      <Name>
        <Text text="Premium King Room - Non-Smoking" language="en"/>
        <Text text="Chambre de le Roi Premium - Pas de Fumeurs" language="fr"/>
      </Name>
      <Capacity>4</Capacity>
    </RoomData>
    <!-- Can be reused by multiple Room Bundles -->
    <PackageData>
      <PackageID>P33333</PackageID>
      <Occupancy>3</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="7"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
    <PackageData>
      <PackageID>P12345</PackageID>
      <Occupancy>4</Occupancy>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="1" refundable_until_days="1"
           refundable_until_time="18:00:00"/>
      <ParkingIncluded>1</ParkingIncluded>
      <InternetIncluded>1</InternetIncluded>
    </PackageData>
  </PropertyDataSet>

  <Result>
    <Property>180054</Property>
    <Checkin>2017-10-07</Checkin>
    <Nights>2</Nights>
    <!-- Efficient method of defining Room Bundles -->
    <!-- Part 2: Reference RoomData and PackageData through ID -->
    <!-- Base Room Bundle -->
    <RoomBundle>
      <!-- Baserate above and attributes must match atleast one room bundle
           below -->
      <RoomID>060773</RoomID>
      <PackageID>P33333</PackageID>
      <Baserate currency="USD">499.99</Baserate>
      <Tax currency="USD">55.12</Tax>
      <OtherFees currency="USD">22.00</OtherFees>
    </RoomBundle>
    <!-- Premium Room Bundle -->
    <RoomBundle>
      <RoomID>436233</RoomID>
      <PackageID>P12345</PackageID>
      <!-- Lowest price for 3 ("occupancy"), shown below, will be displayed -->
      <Baserate currency="USD">598.88</Baserate>
      <Tax currency="USD">62.12</Tax>
      <OtherFees currency="USD">30.00</OtherFees>
    </RoomBundle>
    <!-- ..Continue providing all available RoomBundle rates under matched
         property for 2 or more occupancies..-->
  </Result>
</Transaction>


Multiple room bundles

The following example sets Occupancy in multiple Room bundles to demonstrate possible hostel room pricing.

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
    ...
    <!-- Suite Room Bundle -->
    <RoomBundle>
      <RoomID>suite1</RoomID>
      <PackageID>standard</PackageID>
      <Occupancy>2</Occupancy>
      <!-- Price for room -->
      <Baserate currency="USD">80.00</Baserate>
      <Tax currency="USD">5.12</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="Suite for 2" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>

    <!-- Small Dorm Room Bundle -->
    <RoomBundle>
      <RoomID>small_dorm</RoomID>
      <PackageID>economy</PackageID>
      <Occupancy>1</Occupancy>
      <!-- Price per bed -->
      <Baserate currency="USD">35.00</Baserate>
      <Tax currency="USD">3.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="1 bed in small dorm" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>

    <!-- Large Dorm Room Bundle -->
    <RoomBundle>
      <RoomID>large_dorm</RoomID>
      <PackageID>economy</PackageID>
      <Occupancy>1</Occupancy>
      <!-- Price per bed -->
      <Baserate currency="USD">20.00</Baserate>
      <Tax currency="USD">2.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>
      <RoomData>
        <Name>
          <Text text="1 bed in large dorm" language="en"/>
        </Name>
      </RoomData>
    </RoomBundle>
    ...
  </Result>
</Transaction>

Multiple Conditional rates

The following example defines a base rate and multiple conditional rates within a <RoomBundle> :

<?xml version="1.0" encoding="UTF-8" ?>
<Transaction timestamp="2023-05-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2023-04-10</Checkin>
    <Nights>2</Nights>
    <!-- When Google receives new room bundle information for an itinerary, all
    previous room bundle pricing is dropped from Google's cache. Thus, if you
    want to delete a specific room bundle from Google's cache, you may do so
    by simply not providing that specific room bundle in subsequent transaction
    messages. -->
    <RoomBundle>
     ...
      <!-- RoomID is required, PackageID is recommended. -->
      <RoomID>5</RoomID>
      <PackageID>ABC</PackageID>
      <!-- Baserate is required. -->
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">2.00</OtherFees>

      <!-- RatePlanID is optional and represents the unique identifier for a
      room and package data combination. We strongly recommend using RatePlanID
      as a variable to build your dynamic landing page (formerly Point of Sale)
      URL. For details, see Using Variables and Conditions. -->
      <RatePlanID>5-ABC</RatePlanID>

      <!-- Occupancy is mandatory for RoomBundle elements. -->
      <!-- Elements below will get inherited to nested rate elements. -->
      <Occupancy>2</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
      </OccupancyDetails>
      <InternetIncluded>1</InternetIncluded>


      <!-- Rate rule "mobile" overrides chargeCurrency, "us_or_gb" doesn't. -->
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <!-- Neither rate overrides Custom2. -->
      <Custom2>ratebasic</Custom2>

      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides ChargeCurrency from roombundle. -->
          <ChargeCurrency>hotel</ChargeCurrency>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode321</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <!-- The value below overrides Custom1 from roombundle. -->
          <Custom1>ratecode432</Custom1>
          <!-- Custom2 is inherited from roombundle. -->
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>

<OccupancyDetails>

<Occupancy> in a transaction message specifies the maximum number of guests for a room or package. <OccupancyDetails> can contain additional information such as the number and type of guests (adults or children).

When <Occupancy> and <OccupancyDetails> appear within the <Rates> element of <Result> or <RoomBundle> , it means that the rate is constrained by the occupancy details.

Синтаксис

When <OccupancyDetails> appears, it is always preceded by <Occupancy> . Note the following syntax:

<?xml version="1.0" encoding="UTF-8"?>
<Transaction ... >
  <Result>
  ...
    <Occupancy>max_number_of_intended_occupants</Occupancy>
    <OccupancyDetails>
      <NumAdults>number_of_adults</NumAdults>
      <Children>
        <Child age=age_of_one_child_guest/>
        <Child age=age_of_one_child_guest/>
      </Children>
    </OccupancyDetails>
  </Result>
</Transaction>

Дочерние элементы

The <OccupancyDetails> element has the following child elements:

Child Element Необходимый? Тип Описание
<NumAdults> Required integer The number of adult guests. Min:1, Max:20.
<Children> Optional Object A container for one or more <Child> elements.
<Child age> Optional integer The maximum age for this Child—for example, <Child age="17"> .

Примеры

The following examples show how <OccupancyDetails> may appear within <Results> , <RoomBundle> , or the <Rates> child element.

Result response

The following example defines one itinerary and its pricing for one property in response to a Live Pricing Query where the user specified the number and types of guests. Here, the <OccupancyDetails> -- 2 adults and one child -- are returned in <Result> .

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>060773</Property>
    <RoomID>RoomType101</RoomID>
    <PackageID>Package101</PackageID>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">278.33</Baserate>
    <Tax currency="USD">25.12</Tax>
    <OtherFees currency="USD">2.00</OtherFees>
    <AllowablePointsOfSale>
      <PointOfSale id="site1"/>
    </AllowablePointsOfSale>
    <Occupancy>3</Occupancy>
    <OccupancyDetails>
      <NumAdults>2</NumAdults>
      <Children>
        <Child age="17"/>
      </Children>
    </OccupancyDetails>
  </Result>
</Transaction>

Rates response

The following example defines one itinerary and its pricing for 1 adult and 1 child. Here, the <OccupancyDetails> are returned in the <Rates> element of <Result> .

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Transaction id="Wtdj8QoQIWcAAbaTGlIAAAC4" timestamp="2018-04-18T11:27:45-04:00">
  <Result>
    <Property>8251</Property>
    <Checkin>2018-06-20</Checkin>
    <Nights>1</Nights>
    <Baserate currency="USD">62.18</Baserate>
    <Tax currency="USD">2.45</Tax>
    <OtherFees currency="USD">0.00</OtherFees>
    <Rates>
      <Rate rate_rule_id="rule-951">
        <Occupancy>2</Occupancy>
        <OccupancyDetails>
          <NumAdults>1</NumAdults>
          <Children>
            <Child age="17"/>
          </Children>
        </OccupancyDetails>
        <Baserate currency="USD">42.61</Baserate>
        <Tax currency="USD">5.70</Tax>
        <OtherFees currency="USD">0.00</OtherFees>
        <Custom1>abc4</Custom1>
        <AllowablePointsOfSale>
          <PointOfSale id="yourhotelpartnersite.com"/>
        </AllowablePointsOfSale>
      </Rate>
    </Rates>
  </Result>
</Transaction>

Room bundle

The following example defines an occupancy of 2 adults and 1 child for two nights, with a refundable rate. Here, the <OccupancyDetails> appear inside <RoomBundle>

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-23T16:20:00-04:00" id="42">
  <Result>
    <Property>6781291</Property>
    <Checkin>2017-08-05</Checkin>
    <Nights>2</Nights>
    ...
    <RoomBundle>
      <RoomID>10291</RoomID>
      <RatePlanID>564739</RatePlanID>
      <PackageID>564739</PackageID>
      <Occupancy>3</Occupancy>
      <OccupancyDetails>
        <NumAdults>2</NumAdults>
        <Children>
          <Child age="17"/>
        </Children>
      </OccupancyDetails>
      <ChargeCurrency>web</ChargeCurrency>
      <Refundable available="true" refundable_until_days="1" refundable_until_time="23:59:00" />
      <Baserate currency="USD">185.34</Baserate>
      <Tax currency="USD">37.06</Tax>
      <OtherFees currency="USD">2.22</OtherFees>
    </RoomBundle>
  </Result>
</Transaction>

Multiple room bundles

The following example defines multiple <RoomBundle> rates that are restricted to an occupancy of 2 adults and 2 children. Here, the <OccupancyDetails> appear in the <Rates> element of <RoomBundle> .

<?xml version="1.0" encoding="UTF-8"?>
<Transaction timestamp="2017-07-18T16:20:00-04:00" id="42">
  <Result>
    <Property>1234</Property>
    <Checkin>2018-06-10</Checkin>
    <Nights>2</Nights>
    <Baserate currency="USD">275.00</Baserate>
    <Tax currency="USD">27.50</Tax>
    <OtherFees currency="USD">0</OtherFees>
    <RoomBundle>
      <RoomID>5</RoomID>
      <PackageID>STD</PackageID>
      <Baserate currency="USD">275.00</Baserate>
      <Tax currency="USD">27.50</Tax>
      <OtherFees currency="USD">0</OtherFees>
      <InternetIncluded>1</InternetIncluded>
      <ChargeCurrency>web</ChargeCurrency>
      <Custom1>ratebasic</Custom1>
      <Custom2>ratebasic</Custom2>
      <Occupancy>4</Occupancy>
      <OccupancyDetails>
          <NumAdults>2</NumAdults>
          <Children>
              <Child age="17"/>
              <Child age="17"/>
          </Children>
      </OccupancyDetails>
      <Rates>
        <Rate rate_rule_id="mobile">
          <Baserate currency="USD">258.33</Baserate>
          <Tax currency="USD">25.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <ChargeCurrency>hotel</ChargeCurrency>
          <Custom1>ratecode321</Custom1>
        </Rate>
        <Rate rate_rule_id="us_or_gb">
          <Baserate currency="USD">268.33</Baserate>
          <Tax currency="USD">26.83</Tax>
          <OtherFees currency="USD">1.00</OtherFees>
          <Custom1>ratecode432</Custom1>
        </Rate>
      </Rates>
    </RoomBundle>
  </Result>
</Transaction>