Skip to main content

Get One Pricelist

Endpoint Overview

This API endpoint is designed to fetch detailed information about a specific single pricelist from the Juleb ERP system. By providing the ID of the desired pricelist.

Endpoint Details

  • Method: GET
  • URL: /api/v1/pos/pricelist/{id}

Parameters

  • Path Parameters:
    • id (string, required): The ID of the record to retrieve.
  • Query Parameters:
    • fields (string, not required): Fields to include in the response separated by comma. If not provided, all fields are returned.

Response

  • 200 OK: Successfully retrieved the record.
  • 400 Bad Request: Invalid record fields provided.
  • 401 Unauthorized: Authentication required.
  • 404 Not Found: Record with the provided ID not found.

Response Body

{
"data": {
...record fields
}
}

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/2`, {
headers: {
'accept': '*/*',
'Authorization': `Bearer ${apiKey}`
}
})
.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"
}
}