Skip to main content

Get Many Configs

Endpoint Overview​

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

Endpoint Details​

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

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/config`, {
headers: {
'accept': '*/*',
'Authorization': `Bearer ${apiKey}`
},
params: {
fields: 'name,cash_control,active,pricelist_id,company_id',
filter: 'active=true&company_id=37',
page: 1,
limit: 10
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response​

{
"data": [
{
"name": "Alshami",
"cash_control": null,
"active": true,
"pricelist_id": 2,
"company_id": 37
},
{
"name": "tast100",
"cash_control": false,
"active": true,
"pricelist_id": 2,
"company_id": 37
},
{
"name": "Branch 3 - test",
"cash_control": null,
"active": true,
"pricelist_id": 2,
"company_id": 37
},
{
"name": "Branch3",
"cash_control": null,
"active": true,
"pricelist_id": 1,
"company_id": 37
},
{
"name": "يوسف شودري",
"cash_control": null,
"active": true,
"pricelist_id": 2,
"company_id": 37
}
],
"meta": {
"count": 5,
"total": 5
},
"pagination": {
"previousPage": null,
"currentPage": 1,
"nextPage": null,
"totalPages": 1
}
}