Skip to main content

Get Many Pricelists

Endpoint Overview​

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

Endpoint Details​

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

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`, {
headers: {
'accept': '*/*',
'Authorization': `Bearer ${apiKey}`
},
params: {
filter: 'discount_policy=without_discount',
page: 1,
limit: 100
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response​

{
"data": [
{
"id": 2,
"name": "Public Pricelist",
"active": true,
"currency_id": 153,
"company_id": null,
"sequence": 1,
"discount_policy": "without_discount",
"create_uid": 2,
"create_date": "2023-02-11T08:32:15.146Z",
"write_uid": 6,
"write_date": "2023-05-07T11:51:16.778Z"
},
{
"id": 69,
"name": "PRice X",
"active": true,
"currency_id": 153,
"company_id": 1,
"sequence": 3,
"discount_policy": "without_discount",
"create_uid": 6,
"create_date": "2023-05-07T11:28:50.607Z",
"write_uid": 6,
"write_date": "2023-05-07T11:51:16.778Z"
},
{
"id": 70,
"name": "Y",
"active": true,
"currency_id": 153,
"company_id": 1,
"sequence": 4,
"discount_policy": "without_discount",
"create_uid": 6,
"create_date": "2023-05-07T11:44:43.460Z",
"write_uid": 52,
"write_date": "2024-06-07T13:33:49.124Z"
}
],
"meta": {
"count": 3,
"total": 3
},
"pagination": {
"previousPage": null,
"currentPage": 1,
"nextPage": null,
"totalPages": 1
}
}```