Skip to main content

Get One Order Line

Endpoint Overview​

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

Endpoint Details​

  • Method: GET
  • URL: /api/v1/pos/order/{orderId}/line/{id}

Parameters​

  • Path Parameters:
    • orderId (string, required): The ID of the order record.
    • id (string, required): The ID of the line 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: The requested resource has been returned.
  • 400 Bad Request: Bad request.
  • 401 Unauthorized: Unauthorized.

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/order/7162/line/8157`, {
headers: {
'accept': '*/*',
'Authorization': `Bearer ${apiKey}`
},
params: {
fields: 'name,product_id,qty'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response​

{
"data": {
"name": "mjtest/0240",
"product_id": 152,
"qty": 1
}
}