Example
- Headers
X-API-KEY:{{API-key}}
Accept-Language:en
- Query
https://api2.saleslayer.com/rest/Catalog/Products?$top=2&$select=prod_id, prod_ref, prod_title&$expand=Variants
- Response
{
"value": [
{
"prod_id": 3,
"prod_ref": "42PH021300412",
"prod_title": {
"es": "WOOL COAT1"
},
"Variants@count": 2
},
{
"prod_id": 4,
"prod_ref": "42PH021505331",
"prod_title": {
"es": "Classic coat"
},
"Variants@count": 0
}
],
"@count": 225,
"@readLink": "https://api2.saleslayer.com/rest/Catalog/Products?$top=2&$select=prod_id, prod_ref, prod_title&$expand=Variants",
"@nextLink": "https://api2.saleslayer.com/rest/Catalog/Products?$top=2&$select=prod_id, prod_ref, prod_title&$expand=Variants&$skip=3"
}
Value
- These are the items returned by the endpoint with the language included.
"value": [
{
"prod_id": 3,
"prod_ref": "42PH021300412",
"prod_title": {
"es": "WOOL COAT1"
},
"Variants@count": 2
},
{
"prod_id": 4,
"prod_ref": "42PH021505331",
"prod_title": {
"es": "Classic coat"
},
"Variants@count": 0
}
]
Count
- The count indicates the total number of elements. In the response we can see that we only have two as we have made a request with top = 2.
"@count": 225,
ReadLink
- Readlink is a link to the answer itself
"@readLink": "https://api2.saleslayer.com/rest/Catalog/Products?$top=2&$select=prod_id, prod_ref, prod_title&$expand=Variants",
NextLink
- Link to the next page containing the next expected item. The
$skip=N
parameter indicates the next item value to add to the$Skip
parameter to go to the next page. Remember that a maximum of 100 items are listed.
"@nextLink": "https://api2.saleslayer.com/rest/Catalog/Products?$top=2&$select=prod_id, prod_ref, prod_title&$expand=Variants&$skip=3"
// If you don't consider the $top parameter, then the response skip parameter would be something like this:
"@nextLink": "https://api2.saleslayer.com/rest/Catalog/Products?$select=prod_id, prod_ref, prod_title&$expand=Variants&$skip=104"