Choice of gift

Specify in the price list which items participate in the promotion and what gifts the customer can receive.

  1. Requirements
  2.  Structure
  3. Attributes and elements
  4. Example

Requirements

A gift can be:

  • Another item that is available on Yandex.Market.
  • An item that is not available on Yandex.Market.
  • A gift certificate (such as for a service).

A gift can't be:

  • A service that is provided with the purchase (such as tire mounting).
  • A discount or cash back on a future purchase.

 Structure

<offers>
  offers available on Yandex.Market
<offers>
<gifts>
  gifts not available on Yandex.Market
</gifts>
<promos>
   <promo id="promo ID" type="gift with purchase">
      <start-date>promo start date</start-date>
      <end-date>promo end date</end-date>
      <description>summary</description>
      <url>promo on the store's site</url>
      <purchase>
        <required-quantity>number of items at full price</required-quantity>
        <product offer-id="offer ID participating in promo"/>
        ...
        <product category-id="category ID participating in promo"/>
        ...
      </purchase>
      <promo-gifts>
        gifts participating in promo
      </promo-gifts>
   </promo>
</promos>

Attributes and elements

Element/attributeDescriptionRequired
Elements in shops
giftsItems that can be gifts but are not available on Yandex.Market (they are not in the offers element).Required
promosDescription of promotions. Each promotion is described in a separate promo element.Required
Elements in gifts
gift

Description of one gift. Element structure:

<gifts>
  <gift id="item ID">
    <name>item name</name>
    <picture>image URL</picture>
  </gift>
  ...
</gifts>
Required
Elements in promo
Attribute idID of the promotion. Must be unique for the entire price list. It may contain only numbers and Latin letters. The maximum length of id is 20 characters.
Attention. Each offer can only participate in one promotion.
Required
Attribute type

Type of promo — gift with purchase.

Required
start-date

Date and time when the promo starts. Allowed formats: YYYY-MM-DD hh:mm:ss or YYYY-MM-DD.

The date and time are the same for all time zones.

Example

The store sells products in Moscow and delivers to Yekaterinburg; date and time of the promo: from 10 AM on March 8 to 10 AM on March 9.

For users in Moscow, the promo will run from 10 AM on March 8 to 10 AM on March 9 (Moscow time).

For users from Yekaterinburg, it will be from 10 AM on March 8 to 10 AM on March 9 in the Ural time zone.

Optional
end-date

Date and time the promotion ends. Allowed formats: YYYY-MM-DD hh:mm:ss or YYYY-MM-DD.

The date and time are the same for all time zones (see the example above).

Optional
description

Brief description of the promo. Maximum of 500 characters. You can use XHTML markup, but only as a CDATA block of character data.

Optional
url

Link to the promotion description on the store's website.

Optional
purchase

Information about items participating in the promotion.

Required

promo-gifts

Gifts participating in the promo. The maximum number of gifts to choose from is 12.

Required

Elements in purchase
required-quantity

The number of items that must be purchased in order to receive a gift. By default, one item must be purchased.

This element is in purchase.

Optional
product

Items and/or categories that the promotion applies to. Attributes:

  • offer-id — Offer ID.
  • category-id — Category ID.

Each product element corresponds to a single item or category. A purchase element may contain multiple product elements.

Required
Elements in promo-gifts
promo-gift

Acceptable attributes:

  • offer-id — ID of a gift that is in offers.
  • gift-id — ID of a gift that is in gifts.
Required

Example

<!--Items that are available on Yandex.Market-->
<offers>
  <offer id="1">
    <name>iPhone X 64Gb Space Grey</name>
    ...
  </offer>
  <offer id="2">
    <name>iPhone X 256Gb Silver</name>
    ...
  </offer>
  <offer id="3">
    <name>Чехол iPhone X красный</name>
    ...
  </offer>
  <offer id="4">
    <name>Чехол iPhone X синий</name>
    ...
  </offer>
</offers>
<!--Gifts that are not available on Yandex.Market-->
<gifts>
  <gift id="33">
    <name>Чехол iPhone X Хохлома</name>
    <picture>https://best.seller.ru/promos/33.jpg</picture>
  </gift>
  <gift id="44">
    <name>Чехол iPhone X Гжель</name>
    <picture>https://best.seller.ru/promos/33.jpg</picture>
  </gift>
</gifts>
<!--Promo information-->
<promos>
  <promo id="PromoGift" type="gift with purchase">
    <description>Купи iPhone и получи чехол в подарок.</description>
    <url>http://best.seller.ru/promos/gift</url>
    <!--Items participating in promo-->
    <purchase>
      <product offer-id="1"/>
      <product offer-id="2"/>
    </purchase>
    <!--Gifts to choose from-->
    <promo-gifts>
      <promo-gift offer-id="3"/>
      <promo-gift offer-id="4"/>
      <promo-gift gift-id="33"/>
      <promo-gift gift-id="44"/>
    </promo-gifts>
</promos>