> For the complete documentation index, see [llms.txt](https://help.stockeo.solvenium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.stockeo.solvenium.com/data-mapping/format/json.md).

# JSON

JSON is a data format commonly used by APIs.

<figure><img src="/files/YFPy22jSSdZiIUvGH3lC" alt=""><figcaption><p>JSON settings</p></figcaption></figure>

### Products List Path

The key information that Stockeo needs to know is where the list of products is located in a JSON structure.

#### Top level array - empty path

Very often the list of products is at the top level. You can recognize it by the fact that the JSON starts and ends with square brackets `[ ]`.

```json
[{
    "sku": "E0001",
    "qty": 12,
},{
   "sku": "E0002",
   "qty": 23,
}, ... ]
```

In such a case you can leave the Products List Path empty.

#### Object property

Sometime the list is placed under an object property. Then you need to specify the property name in the Products List Path.

```
{
    "total_count": 7532,
    "items": [{
            "sku": "E0001",
            "qty": 12,
        },{
           "sku": "E0002",
           "qty": 23,
        }, 
        ... 
     ]
}
```

For the example above, the Products List Path should be `items`.

#### Nested path

Rarely, the list of products may be nested within an inner object that involves traversing multiple levels of objects to reach the desired data. In such a case you need to specify the full path, that is, a list of properties separated by dots, without any spaces between them.

```
{
    "status": "success",
    "data": {
        "count": 7532
        "items": [{
                "sku": "E0001",
                "qty": 12,
            },{
               "sku": "E0002",
               "qty": 23,
            }, 
            ... 
        ]
    }
}
```

For the example above, the Products List Path should be `data.items`.

### Variants Path

Use this field only when product variants are nested within the main product object.

{% hint style="info" %}
If variants are defined as separate product objects and share a common value (such as product name, parent SKU, or parent ID), this field should remain empty.

For additional details, refer to the [Variants](https://help.stockeo.solvenium.com/data-mapping/variants) section.
{% endhint %}

```json
{
  "products": [
    {
      "id": 8237461928374,
      "title": "Basic T-Shirt",
      "variants": [
        {
          "id": 4839201746501,
          "title": "Black / M",
          "option1": "Black",
          "option2": "M",
          "option3": null,
          "sku": "TSHIRT-BLK-M",
          "price": "79.99"
        },
        {
          "id": 4839201746502,
          "title": "White / L",
          "option1": "White",
          "option2": "L",
          "option3": null,
          "sku": "TSHIRT-WHT-L",
          "price": "79.99"
        }
      ]
    }
  ]
}
```

For the JSON above, enter `variants` in the Variants Path field.

<figure><img src="/files/2rPmuuvpuHtQywivloe0" alt="Variants path settings for JSON feeds in Stockeo automation"><figcaption><p>Variants Path settings for JSON feeds in Stockeo</p></figcaption></figure>
