Skip to main content

Get Many Picking Lines

Endpoint Overview​

This API endpoint is designed to retrieve the product lines/moves belonging to a single picking. While the picking is not yet validated it reads from stock_move; once the picking is validated (state=done) it reads from stock_move_line instead, which may expose slightly different fields.

Endpoint Details​

  • Method: GET
  • URL: /api/v1/inventory/picking/{pickingId}/line

Parameters​

  • Path Parameters:
    • pickingId (string, required): The ID of the picking to retrieve its lines.
  • 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: The requested resource has been returned.
  • 400 Bad Request: Bad request.
  • 401 Unauthorized: Unauthorized.

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/inventory/picking/11004/line`, {
headers: {
'accept': '*/*',
'Authorization': `TOKEN`
},
params: {
fields: 'product_id,product_uom_qty,state',
page: 1,
limit: 10
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response​

{
"data": [
{
"product_id": 34969,
"product_uom_qty": 60,
"state": "assigned"
}
],
"meta": {
"count": 1,
"total": 1
},
"pagination": {
"previousPage": null,
"currentPage": 1,
"nextPage": null,
"totalPages": 1
}
}