YML format
YML (Yandex Market Language) is a standard developed by Yandex that is used to accept and post information in the Yandex.Market database. YML is based on the XML standard.
Requirements for YML files
The YML standard does not support nonprintable characters with ASCII codes 0 through 31 (except for characters 9, 10, and 13 — tab, new line, and carriage return).
The
"
,&
,>
, <, and'
characters need to be replaced with their equivalent codes:Symbol in text
Code for the YML file
" & > < '
" & > < '
Symbol in text
Code for the YML file
" & > < '
" & > < '
Acceptable YML file encodings: UTF-8, windows-1251.
Example of XML file
<?xml version="1.0" encoding="UTF-8"?>
<yml_catalog date="2017-02-05 17:22">
<shop>
<name>BestSeller</name>
<company>Tne Best inc.</company>
<url>http://best.seller.ru</url>
<currencies>
<currency id="RUR" rate="1"/>
<currency id="USD" rate="60"/>
</currencies>
<categories>
<category id="1">Бытовая техника</category>
<category id="10" parentId="1">Мелкая техника для кухни</category>
<category id="101" parentId="10">Сэндвичницы и приборы для выпечки</category>
<category id="102" parentId="10">Мороженицы</category>
</categories>
<offers>
<offer id="12346" available="true" bid="80" cbid="90" fee="325">
<url>http://best.seller.ru/product_page.asp?pid=12348</url>
<price>1490</price>
<oldprice>1620</oldprice>
<currencyId>RUR</currencyId>
<categoryId>101</categoryId>
<picture>http://best.seller.ru/img/large_12348.jpg</picture>
<store>false</store>
<pickup>true</pickup>
<delivery>true</delivery>
<delivery-options>
<option cost="300" days="0" order-before="12"/>
</delivery-options>
<name>Вафельница First FA-5300</name>
<vendor>First</vendor>
<vendorCode>A1234567B</vendorCode>
<description>
<![CDATA[
<p>Отличный подарок для любителей венских вафель.</p>
]]>
</description>
<sales_notes>Необходима предоплата.</sales_notes>
<manufacturer_warranty>true</manufacturer_warranty>
<country_of_origin>Россия</country_of_origin>
<barcode>0156789012</barcode>
<cpa>1</cpa>
<rec>123,456</rec>
</offer>
<offer id="9012" type="vendor.model" available="true" bid="80" cbid="90" fee="325">
<url>http://best.seller.ru/product_page.asp?pid=12345</url>
<price>8990</price>
<oldprice>9900</oldprice>
<currencyId>RUR</currencyId>
<categoryId>102</categoryId>
<picture>http://best.seller.ru/img/model_12345.jpg</picture>
<store>false</store>
<pickup>false</pickup>
<delivery>true</delivery>
<delivery-options>
<option cost="300" days="1" order-before="18"/>
</delivery-options>
<outlets>
<outlet id="1" instock="50"/>
<outlet id="2" instock="20"/>
</outlets>
<typePrefix>Мороженица</typePrefix>
<vendor>Brand</vendor>
<model>3811</model>
<description>
<![CDATA[
<h3>Мороженица Brand 3811</h3>
<p>Это прибор, который придётся по вкусу всем любителям десертов и сладостей, ведь с его помощью вы сможете делать вкусное домашнее мороженое из натуральных ингредиентов.</p>
]]>
</description>
<param name="Цвет">белый</param>
<sales_notes>Необходима предоплата.</sales_notes>
<manufacturer_warranty>true</manufacturer_warranty>
<country_of_origin>Китай</country_of_origin>
<barcode>0123456789379</barcode>
<cpa>1</cpa>
<rec>345,678</rec>
</offer>
</offers>
</shop>
</yml_catalog>
Element description
Element | Description |
---|---|
xml header | Standard |
yml_catalog | Any XML document can contain only one root element. The YML format uses the |
Elements that are included in the yml_catalog | |
shop | This element contains a description of the store and its products. Required element. |
Elements that are included in the shop | |
| The short name of the store should not exceed 20 characters. The name cannot contain words that are not related to the store's name (such as “best” or “cheap”), and cannot include a phone number or other such information. The name of the store must match the actual name of the store that is published on the site. If this requirement is not followed, Yandex.Market may change the contents of the name element without notice. Required element. |
| Full name of the company that owns the store. It is used for internal identification and not published. Required element. |
| URL of store's home page. Maximum length: 50 characters. Cyrillic links are permitted. Required element. |
| Content management system (CMS) used for the store. Optional element. |
| CMS version. Optional element. |
| Name of the agency that provides technical support to the store and is responsible for the site's functionality. Optional element. |
| Contact email for the CMS developers or agency that provides tech support. Optional element. |
| List of store's exchange rates. Required element. |
| Required element. |
delivery-options | Delivery cost and time frame for given region. This element is mandatory if delivery data is included in the price-list feed. |
cpa | This element controls whether product offers should be included in the “Yandex.Market Quick Order” program. Optional element. |
| List of store's products. Every product is described in a separate Required element. |
Element | Description |
---|---|
xml header | Standard |
yml_catalog | Any XML document can contain only one root element. The YML format uses the |
Elements that are included in the yml_catalog | |
shop | This element contains a description of the store and its products. Required element. |
Elements that are included in the shop | |
| The short name of the store should not exceed 20 characters. The name cannot contain words that are not related to the store's name (such as “best” or “cheap”), and cannot include a phone number or other such information. The name of the store must match the actual name of the store that is published on the site. If this requirement is not followed, Yandex.Market may change the contents of the name element without notice. Required element. |
| Full name of the company that owns the store. It is used for internal identification and not published. Required element. |
| URL of store's home page. Maximum length: 50 characters. Cyrillic links are permitted. Required element. |
| Content management system (CMS) used for the store. Optional element. |
| CMS version. Optional element. |
| Name of the agency that provides technical support to the store and is responsible for the site's functionality. Optional element. |
| Contact email for the CMS developers or agency that provides tech support. Optional element. |
| List of store's exchange rates. Required element. |
| Required element. |
delivery-options | Delivery cost and time frame for given region. This element is mandatory if delivery data is included in the price-list feed. |
cpa | This element controls whether product offers should be included in the “Yandex.Market Quick Order” program. Optional element. |
| List of store's products. Every product is described in a separate Required element. |