Get Units of Measure
Returns the sales format of each of the products (box, pallet, unit), with the unit quantity of the product, its weight in kg and measurements in cm.
Endpoint:
GET /producto/getUnidadMedida
Correct answer of obtaining units of measure
Here is an example of the correct answer obtained:
[
{
"itemCode": "ABRA0004",
"uomCode": "Unidad",
"quantity": 1,
"weight": 0.04,
"width": 12,
"height": 12,
"length": 1,
"volume": 144
},
{
"itemCode": "ABRA0004",
"uomCode": "Caja",
"quantity": 50,
"weight": 2,
"width": 14,
"height": 15,
"length": 40,
"volume": 8400
},
{
"itemCode": "ABRA0004",
"uomCode": "Palet",
"quantity": 11200,
"weight": 0,
"width": 0,
"height": 0,
"length": 0,
"volume": 0
}
]
Method to obtain the sales format of the product
Example call:
1var axios = require('axios');
2var data = '';
3
4var config = {
5 method: 'get',
6 url: 'https://api.naturalsystems.es/api/producto/getUnidadMedida',
7 headers: {
8 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjYXJkQ29kZSI6IkMwMDAxMCIsImdyb3VwQ29kZSI6MTI3LCJsaXN0TnVtIjoxMiwibm9EaXNjb3VudCI6Ik4iLCJkaXNjUmVsIjoiSCIsIm11ZXN0cmFPY3VsdGFzIjoxLCJpYXQiOjE2MTUxOTQ0MzQsImV4cCI6MTYxNTI4MDgzNH0.4SCvWNwD-nzP033a1Rt95uoWlmQkOfpj0hAqB01yMwI'
9 },
10 data : data
11};
12
13axios(config)
14.then(function (response) {
15 console.log(JSON.stringify(response.data));
16})
17.catch(function (error) {
18 console.log(error);
19});
20