Skip to main content

Get Many Product-Template

Endpoint Overview

This endpoint is designed to retrieve detailed information about multiple product templates within the Juleb ERP.

Endpoint Details

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

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-template`, {
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`
},
params: {
fields: 'name,default_code,j_brand,tracking',
filter: 'tracking=lot&active=true',
page: 1,
limit: 10
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response

{
"data": [
{
"name": "Femi Gel Luxury Gel For Special Care",
"default_code": "BP_1933",
"j_brand": "Femi Gel",
"tracking": "lot"
},
{
"name": "AVALON CARE SUNSCREE LOTION SPF29 110ML",
"default_code": "0000008431",
"j_brand": null,
"tracking": "lot"
},
{
"name": "contour شرائط سكر",
"default_code": "0000036203",
"j_brand": null,
"tracking": "lot"
},
{
"name": "AVALON CARE SUNSCREE LOTION SPF29 110ML ",
"default_code": "0000035673",
"j_brand": null,
"tracking": "lot"
},
{
"name": "Jardin Oleane Moroccan Black Soap 500gm with Argan Oil",
"default_code": "0000036329",
"j_brand": null,
"tracking": "lot"
},
{
"name": "Tegoder Eye Serum",
"default_code": "BP_3098",
"j_brand": "Tegoder",
"tracking": "lot"
},
{
"name": "Centrum Silver With Lutein kk",
"default_code": "5555",
"j_brand": "Centrum",
"tracking": "lot"
},
{
"name": "AVALON ACTIV COLD SPRAY 100ML",
"default_code": "0000009024",
"j_brand": null,
"tracking": "lot"
},
{
"name": "Med from croatia",
"default_code": "0000036384",
"j_brand": null,
"tracking": "lot"
},
{
"name": "AZI-ONCE 15ML Oral suspension",
"default_code": "0000036385",
"j_brand": null,
"tracking": "lot"
}
],
"meta": {
"count": 10,
"total": 5002
},
"pagination": {
"previousPage": null,
"currentPage": 1,
"nextPage": 2,
"totalPages": 501
}
}