Skip to main content

Get Many Pricelist Items

Endpoint Overview

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

Endpoint Details

  • Method: GET
  • URL: /api/v1/pos/pricelist/item

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/pos/pricelist/item`, {
headers: {
'accept': '*/*',
'Authorization': `Bearer ${apiKey}`
},
params: {
fields: 'id,pricelist_id,product_tmpl_id,min_quantity,fixed_price',
filter: 'pricelist_id=2&fixed_price>100',
page: 1,
limit: 10
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response

{
"data": [
{
"id": 34861,
"pricelist_id": 2,
"product_tmpl_id": 13,
"min_quantity": 0,
"fixed_price": 198
},
{
"id": 34863,
"pricelist_id": 2,
"product_tmpl_id": 15,
"min_quantity": 0,
"fixed_price": 160
},
{
"id": 34865,
"pricelist_id": 2,
"product_tmpl_id": 17,
"min_quantity": 0,
"fixed_price": 140
},
{
"id": 34866,
"pricelist_id": 2,
"product_tmpl_id": 18,
"min_quantity": 0,
"fixed_price": 224.95
},
{
"id": 34869,
"pricelist_id": 2,
"product_tmpl_id": 21,
"min_quantity": 0,
"fixed_price": 220
},
{
"id": 34909,
"pricelist_id": 2,
"product_tmpl_id": 65,
"min_quantity": 0,
"fixed_price": 115.4
},
{
"id": 34910,
"pricelist_id": 2,
"product_tmpl_id": 66,
"min_quantity": 0,
"fixed_price": 134
},
{
"id": 34911,
"pricelist_id": 2,
"product_tmpl_id": 67,
"min_quantity": 0,
"fixed_price": 150
},
{
"id": 34912,
"pricelist_id": 2,
"product_tmpl_id": 68,
"min_quantity": 0,
"fixed_price": 150
},
{
"id": 34913,
"pricelist_id": 2,
"product_tmpl_id": 69,
"min_quantity": 0,
"fixed_price": 190
}
],
"meta": {
"count": 10,
"total": 7519
},
"pagination": {
"previousPage": null,
"currentPage": 1,
"nextPage": 2,
"totalPages": 752
}
}