List
List of products
GET https://do.workzeal.com/goods/list?page=1&records_onpage=50
Returns line items page by page, from newest to oldest. Filters by name, SKU, and catalog section are available:
GET https://do.workzeal.com/goods/list?name=box&group_id=3
Query Parameters
| Name | Type | Description |
|---|---|---|
| page | Int | Page number, starting from 1. Defaults to 1 |
| records_onpage | Int | Records per page (default 50, maximum 200) |
| name | String | Filter: name contains. Optional |
| code | String | Filter: SKU or external code contains. Optional |
| group_id | Int | Filter: catalog section. Optional |
Example
cURL
NodeJS (Request)
curl --location --request GET 'https://do.workzeal.com/goods/list?name=box' \
--header 'Authorization: Bearer XXXX-XXXXXXX-XXXXXXX'
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://do.workzeal.com/goods/list?name=' + encodeURIComponent('box'),
'headers': {
'Authorization': 'Bearer XXXX-XXXXXXX-XXXXXXX'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Response
{
"status": "success",
"error": "",
"code": null,
"rows": 0,
"pages": 0,
"page": 0,
"value": "[ { ...product... }, { ...product... } ]"
}
// value - JSON array of line items