YML File Example
Regionality Support (Stocks)
Please note that the YML file example contains several tabs — with and without regionality (stocks) support.
- Without Regionality
- With Regionality
- With Grouped Products
- Grouped Products and Regionality
<?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>
<?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="false">
<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>
<param name="Diagonal">6</param>
<description>Description of product 1637</description>
<vendor>Manufacturer Name</vendor>
<stock id="Moscow">
<available>true</available>
<price>230.30</price>
<oldprice>252</oldprice>
<url>http://example.com/product/id1637</url>
<picture>http://example.com/images/1637_2.jpg</picture>
</stock>
<stock id="Yekaterinburg">
<available>false</available>
<price>235</price>
<oldprice>251.60</oldprice>
<url>http://example.com/product/id1637</url>
<picture>http://example.com/images/1637_2.jpg</picture>
</stock>
</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>
<param name="Color">White</param>
<description>Description of product 1638</description>
<vendor>Manufacturer Name</vendor>
<stock id="Moscow">
<available>true</available>
<price>500</price>
<oldprice>550</oldprice>
<url>http://example.com/product/id1638</url>
<picture>http://example.com/images/1638_2.jpg</picture>
</stock>
<stock id="Yekaterinburg">
<available>true</available>
<price>540.50</price>
<oldprice>600</oldprice>
<url>http://example.com/product/id1638</url>
<picture>http://example.com/images/1638_3.jpg</picture>
</stock>
</offer>
</offers>
</shop>
</yml_catalog>
<?xml version="1.0" encoding="UTF-8"?>
<yml_catalog date="2018-09-25 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" group_id="12345">
<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>
<param name="Color">Black</param>
<description>Description of product 1637</description>
<vendor>Manufacturer Name</vendor>
<model>Product Offer Model</model>
</offer>
<offer id="1638" available="false" group_id="12345">
<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>
<param name="Color">White</param>
<description>Description of product 1638</description>
<vendor>Manufacturer Name</vendor>
<model>Product Offer Model</model>
</offer>
</offers>
</shop>
</yml_catalog>
<?xml version="1.0" encoding="UTF-8"?>
<yml_catalog date="2018-09-25 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="false" group_id="12345">
<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>
<param name="Color">Black</param>
<description>Description of product 1637</description>
<vendor>Manufacturer Name</vendor>
<model>Product Offer Model</model>
<stock id="Moscow">
<available>true</available>
<price>230.30</price>
<oldprice>252</oldprice>
<url>http://example.com/product/id1637</url>
<picture>http://example.com/images/1637_2.jpg</picture>
</stock>
<stock id="Yekaterinburg">
<available>false</available>
<price>235</price>
<oldprice>251.60</oldprice>
<url>http://example.com/product/id1637</url>
<picture>http://example.com/images/1637_2.jpg</picture>
</stock>
</offer>
<offer id="1638" available="false" group_id="12345">
<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>
<param name="Color">White</param>
<description>Description of product 1638</description>
<vendor>Manufacturer Name</vendor>
<model>Product Offer Model</model>
<stock id="Moscow">
<available>true</available>
<price>500</price>
<oldprice>550</oldprice>
<url>http://example.com/product/id1638</url>
<picture>http://example.com/images/1638_2.jpg</picture>
</stock>
<stock id="Yekaterinburg">
<available>true</available>
<price>540.50</price>
<oldprice>600</oldprice>
<url>http://example.com/product/id1638</url>
<picture>http://example.com/images/1638_3.jpg</picture>
</stock>
</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
| Element | Description |
|---|---|
| xml header | Standard XML header. Must start from the first line, with zero character. |
| yml_catalog | Single root element. date attribute in YYYY-MM-DD hh:mm format. |
| shop | Contains categories and offers. |
| categories | Declaration of all store categories. The hierarchy must match the site menu. |
| category | Attributes: id, parentId. Nesting depth no more than 15 levels. |
| offers | List of product offers. |
| offer | Attributes: id, available (true/false). For groups: group_id — an integer. |
| name | Name of the product offer. |
| url | Full link to the product card. |
| picture | Full link to the image (JPEG/PNG/WebP), up to 400×400 or up to 1 MB. |
| price | Price, decimal part separated by a dot. |
| categoryId | Category ID. Can be multiple, the first one is the main category. |
| description | Description. Use CDATA for HTML. Up to 200 characters. |
Additional Parameters
| Element | Description |
|---|---|
| oldprice | Old price, decimal part separated by a dot. |
| vendor | Manufacturer or brand. |
| model | Product offer model. |
| param name | Up to 40 additional parameters. Max 300 characters. Examples: addedDate in YYYY-MM-DD format; Size with value S. |
| typePrefix | Product type. |