Skip to main content

YML File Example

Regionality Support (Stocks)

Please note that the YML file example contains several tabs — with and without regionality (stocks) support.

<?xml version="1.0" encoding="UTF-8"?>
<yml_catalog date="2022-01-01 17:22">
<shop>
<categories>
<category id="1278">Electronics</category>
<category id="1293" parentId="1278">Smartphones</category>
<category id="1345" parentId="1278">Phones</category>
<category id="3761" parentId="1278">Televisions</category>
<category id="1553" parentId="3761">Media Players</category>
<category id="3798">Home Appliances</category>
</categories>
<offers>
<offer id="1637" available="true">
<url>http://example.com/product/id1637</url>
<price>226.50</price>
<oldprice>250</oldprice>
<categoryId>1293</categoryId>
<categoryId>1345</categoryId>
<picture>http://example.com/images/1637_1.jpg</picture>
<name>Product 1</name>
<typePrefix>Product Type</typePrefix>
<param name="Diagonal">6</param>
<description>Description of product 1637</description>
<vendor>Manufacturer Name</vendor>
</offer>
<offer id="1638" available="false">
<url>http://example.com/product/id1638</url>
<price>545.30</price>
<categoryId>1293</categoryId>
<categoryId>1345</categoryId>
<picture>http://example.com/images/1638_1.jpg</picture>
<name>Product 2</name>
<typePrefix>Product Type</typePrefix>
<param name="Color">White</param>
<description>Description of product 1638</description>
<vendor>Manufacturer Name</vendor>
</offer>
</offers>
</shop>
</yml_catalog>
note

When using regionality (stocks), the available attribute for each <offer> must be false. The actual availability is set within each <stock>.

Fragment with regionality
<offer id="1638" available="false">
<!-- other parameters -->
<stock id="Moscow">
<available>true</available>
<!-- other parameters -->
</stock>
</offer>

Required YML Elements

ElementDescription
xml headerStandard XML header. Must start from the first line, with zero character.
yml_catalogSingle root element. date attribute in YYYY-MM-DD hh:mm format.
shopContains categories and offers.
categoriesDeclaration of all store categories. The hierarchy must match the site menu.
categoryAttributes: id, parentId. Nesting depth no more than 15 levels.
offersList of product offers.
offerAttributes: id, available (true/false). For groups: group_id — an integer.
nameName of the product offer.
urlFull link to the product card.
pictureFull link to the image (JPEG/PNG/WebP), up to 400×400 or up to 1 MB.
pricePrice, decimal part separated by a dot.
categoryIdCategory ID. Can be multiple, the first one is the main category.
descriptionDescription. Use CDATA for HTML. Up to 200 characters.

Additional Parameters

ElementDescription
oldpriceOld price, decimal part separated by a dot.
vendorManufacturer or brand.
modelProduct offer model.
param nameUp to 40 additional parameters. Max 300 characters. Examples: addedDate in YYYY-MM-DD format; Size with value S.
typePrefixProduct type.