Skip to main content

Restart Inventory Adjustments

Endpoint Overview​

This API endpoint provides a detailed overview of the endpoint responsible for restarting an inventory adjustment within the Inventory module of the Juleb ERP — it cancels the current count back to draft and immediately starts it again, useful for re-counting without creating a brand new adjustment.

Endpoint Details​

  • Method: POST
  • URL: /api/v1/inventory/inventory-adjustments/restart-adjustments

Parameters​

  • Path Parameters: None
  • Query Parameters: None
{
"id": integer
}

Response​

  • 201 OK: The requested resource has been updated.
  • 400 Bad Request: Bad request (e.g. inventory adjustment is already validated and session has ended for id {id}).
  • 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.post(`https://${accountName}.juleb.com/api/v1/inventory/inventory-adjustments/restart-adjustments`, {
id: 44
}, {
headers: {
'accept': '*/*',
'Authorization': `TOKEN`,
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response​

{
"data": {
"id": 44,
"name": "Cycle count - Branch 1",
"state": "confirm"
}
}