> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.stock-sync.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# JSON file format

The JSON file format is quite simple. All you need is to identify the Data Key. The data key is the first object in your file.

1. For example, the **JSON Data Key** in this file is **Products**.

```json
{
    "Products": [
        {
            "Features": [],
            "Id": 297,
            "Name": "Jeans",
            "Type": 1,
            "Variants": [
                {
                    "Barcode": "123456789",
                    "Color": "Classic Black",
                    "Discontinued": false,
                    "Id": "2123207144",
                    "Images": [
                        {
                            "Path": "https://images.adidasshoe.jpg",
                            "SkuId": "25347"
                        }
                    ],
                    "Price": 250.00,
                    "ShowInShop": true,
                    "Size": "S",
                    "Usage": ""
                }
            ]
        }
    ]
}
```

2. If the JSON file is in this structure, where there is a **child** object in your file.

```json
{
  "objects": {
    "product": [
      {
        "Features": [],
        "Id": 297,
        "Name": "Jeans",
        "Type": 1,
        "Variants": [
          {
            "Barcode": "123456789",
            "Color": "Classic Black",
            "Discontinued": false,
            "Id": "2123207144",
            "Images": [
              {
                "Path": "https://images.adidasshoe.jpg",
                "SkuId": "25347"
              }
            ],
            "Price": 250.00,
            "ShowInShop": true,
            "Size": "S",
            "Usage": ""
          }
        ]
      }
    ]
  }
}
```

3. Another example, the **Variant node** for this JSON file will be **Variants**.

```json
{
  "Products": [
    {
      "Features": [],
      "Id": 297,
      "Name": "Jeans",
      "Type": 1,
      "Variants": [
        {
          "Barcode": "123456789",
          "Color": "Classic Black",
          "Discontinued": false,
          "Id": "2123207144",
          "Images": [
            {
              "Path": "https://images.adidasshoe.jpg",
              "SkuId": "25347"
            }
          ],
          "Price": 250.00,
          "ShowInShop": true,
          "Size": "S",
          "Usage": ""
        }
      ]
    }
  ]
}
```

4. For instance, JSON allows using wildcard data names. You can use these **products/*** to include as a wildcard.

```json
{
  "products": [
    {
      "prod1": Lipstick
    },
    {
      "prod2": "Jeans"
    },
    {
      "prod3": "Shirt"
    },
    {
      "prod4": "Pants"
    },
  ]
}
```

5. Another example, JSON can select a specific price from this format. To get the Australia price, can put the mapping as this **meta_data/@key=_australia_price/value**
  
```json
"meta_data": [        
{            
    "id": 601768,            
    "key": "yith_wcgpf_product_feed_configuration",            
        "value": {                
                    "brand": "",               
                    "gtin": "",                
                    "mpn": "",               
                    "condition": "default",                                                                      
                    "google_product_category": "99999",               
                    "adult": "default",               
                 },       
                {
     "id": 601770,            
     "key": "_usa-1_price",            
     "value": "124.4751"        
},
{    
    "id": 601773,            
    "key": "_australia_price",        
    "value": "149.97"        
},        
{            
    "id": 601774,            
    "key": "_australia_regular_price",            
    "value": "249.95"        
},        
{            
    "id": 601775,            
    "key": "_australia_sale_price",            
    "value": "149.97"        
}

}
]
```

6. JSON can select all the image url from the images section. To get all the Image URL, can put the mapping as this **images/*/url**

```json
{
            "variants": [{
                    "id": "00093109_1_1",
                    "x": 1,
                    "y": 1,
                    "nameX": "S",
                    "nameY": "",
                    "priceResaleInclVat": 7529.9,
                    "priceResaleMinimalInclVat": 0.0,
                    "salePercent": 0.0,
            },
            "images": [{
                    "id": 77877,
                    "url": "https://cyklo.aspire.cz/Image/ImageById?id=77877&size=Large",
                    "extension": "jpg",
                    "checksum": "8b2192295146e060e3c6935514301ab1",
                    "isProductDefault": true,
                    "y": null,
                    "isYDefault": false
                }, {
                    "id": 77878,
                    "url": "https://cyklo.aspire.cz/Image/ImageById?id=77878&size=Large",
                    "extension": "jpg",
                    "checksum": "aff407fbc195a3b3221b3788199cea7b",
                    "isProductDefault": false,
                    "y": null,
                    "isYDefault": false
                }, {
                    "id": 77879,
                    "url": "https://cyklo.aspire.cz/Image/ImageById?id=77879&size=Large",
                    "extension": "jpg",
                    "checksum": "b162b2bc17c991856c24a82d85165cba",
                    "isProductDefault": false,
                    "y": null,
                    "isYDefault": false
                }, {
                    "id": 77880,
                    "url": "https://cyklo.aspire.cz/Image/ImageById?id=77880&size=Large",
                    "extension": "jpg",
                    "checksum": "feff9f5d7af25b594d61d15574bf8cab",
                    "isProductDefault": false,
                    "y": null,
                    "isYDefault": false
                }, {
                    "id": 77881,
                    "url": "https://cyklo.aspire.cz/Image/ImageById?id=77881&size=Large",
                    "extension": "jpg",
                    "checksum": "be78a59230ddc345dc7dae3c6bf996e7",
                    "isProductDefault": false,
                    "y": null,
                    "isYDefault": false
                }, {
                    "id": 77882,
                    "url": "https://cyklo.aspire.cz/Image/ImageById?id=77882&size=Large",
                    "extension": "jpg",
                    "checksum": "0b65003ca3837c51fb3d88bfcc32752c",
                    "isProductDefault": false,
                    "y": null,
                    "isYDefault": false
                }, {
                    "id": 77883,
                    "url": "https://cyklo.aspire.cz/Image/ImageById?id=77883&size=Large",
                    "extension": "jpg",
                    "checksum": "e61f475ced9dc329f6d501079d56b323",
                    "isProductDefault": false,
                    "y": null,
                    "isYDefault": false
                }
            ]
        }
```
