Skip to main content

Get Many Products

Endpoint Overview​

This endpoint is designed to retrieve information about multiple products from the Juleb ERP system. It allows you to efficiently fetch data for a group of products in a single request, rather than making individual requests for each product.

Endpoint Details​

  • Method: GET
  • URL: /api/v1/inventory/product

Parameters​

  • Path Parameters: None
  • Query Parameters:
    • fields (string, not required): Fields to include in the response separated by comma. If not provided, all fields are returned.
    • filter (string, not required): Apply conditions to filter the data returned.
    • limit (integer, not required): Limit the number of records returned. Default is 10, Max is 1000.
    • page (integer, not required): Page the records returned. Default is 1.

Response​

  • 200 OK: Successfully retrieved the record.
  • 400 Bad Request: Invalid parameters.
  • 401 Unauthorized: Authentication required.

Response Body​

{
"data": [
...records
],
"meta": {
"count": integer,
"total": integer
},
"pagination": {
"previousPage": integer | null,
"currentPage": integer,
"nextPage": integer | null,
"totalPages": integer
}
}

Example​

Request​

const axios = require('axios');
const accountName = process.env.ACCOUNT_NAME;
const apiKey = process.env.API_KEY;

axios.get(`https://${accountName}.juleb.com/api/v1/inventory/product`, {
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`
},
params: {
fields: 'id,default_code,active,product_tmpl_id,is_rsd_product',
filter: 'default_code*MED',
page: 1,
limit: 10
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response​

{
"data": [
{
"id": 3618,
"default_code": "MED_7961",
"active": true,
"product_tmpl_id": 3618,
"is_rsd_product": null
},
{
"id": 222,
"default_code": "MED_7897",
"active": true,
"product_tmpl_id": 222,
"is_rsd_product": null
},
{
"id": 785,
"default_code": "MED_5849",
"active": true,
"product_tmpl_id": 785,
"is_rsd_product": null
},
{
"id": 5963,
"default_code": "MED_8396",
"active": true,
"product_tmpl_id": 5963,
"is_rsd_product": null
},
{
"id": 1032,
"default_code": "MED_6961",
"active": true,
"product_tmpl_id": 1032,
"is_rsd_product": null
},
{
"id": 1119,
"default_code": "MED_447",
"active": true,
"product_tmpl_id": 1119,
"is_rsd_product": null
},
{
"id": 1143,
"default_code": "MED_7972",
"active": true,
"product_tmpl_id": 1143,
"is_rsd_product": null
},
{
"id": 1489,
"default_code": "MED_7675",
"active": true,
"product_tmpl_id": 1489,
"is_rsd_product": null
},
{
"id": 5941,
"default_code": "MED_8430",
"active": true,
"product_tmpl_id": 5941,
"is_rsd_product": null
},
{
"id": 5958,
"default_code": "MED_8408",
"active": true,
"product_tmpl_id": 5958,
"is_rsd_product": null
}
],
"meta": {
"count": 10,
"total": 8436
},
"pagination": {
"previousPage": null,
"currentPage": 1,
"nextPage": 2,
"totalPages": 844
}
}