# JSON

JSON is a data format commonly used by APIs.

<figure><img src="https://2071801931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fz6HyRe5TyFXHKQEybH7n%2Fuploads%2Fgit-blob-98548b7513198274c993c574d72fa69d9850d833%2Fjson-settings.png?alt=media" 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`.
