Skip to main content

Get Many Users

Endpoint Overview​

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

Read-only

This resource is currently read-only through the API — there is no POST/PATCH endpoint to create or update users.

Endpoint Details​

  • Method: GET
  • URL: /api/v1/resources/res-users

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/resources/res-users`, {
headers: {
'accept': '*/*',
'Authorization': `TOKEN`
},
params: {
fields: 'id,login,company_id,is_pharmacist',
page: 1,
limit: 10
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response​

{
"data": [
{
"id": 2,
"login": "pharmacist@juleb.com",
"company_id": 1,
"is_pharmacist": true
}
],
"meta": {
"count": 1,
"total": 1
},
"pagination": {
"previousPage": null,
"currentPage": 1,
"nextPage": null,
"totalPages": 1
}
}