Validate a Picking
Endpoint Overview
This API endpoint provides a detailed overview of the endpoint responsible for validating a
picking within the Inventory module of the Juleb ERP. Validating applies the stock move and
sets the picking to done.
Skip this call with autoValidate
If you created the picking with autoValidate: true (see Create a delivery
and the other create-picking endpoints), it is validated automatically a few seconds after
creation and you do not need to call this endpoint yourself.
Endpoint Details
- Method: POST
- URL:
/api/v1/inventory/picking/validate
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.
Picking with id number: {id} is already validated). - 401 Unauthorized: Unauthorized.
Response Body
"Picking with id number: {id} is validated"
Example
Request
- NodeJS
- curl
- python
- java
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/picking/validate`, {
id: 11003
}, {
headers: {
'accept': '*/*',
'Authorization': `TOKEN`,
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});
curl -X POST \
-H "accept: */*" \
-H "Authorization: ******" \
-H "Content-Type: application/json" \
-d '{
"id": 11003
}' \
"https://$ACCOUNT_NAME.juleb.com/api/v1/inventory/picking/validate"
import os
import requests
account_name = os.getenv('ACCOUNT_NAME')
api_key = os.getenv('API_KEY')
url = f'https://{account_name}.juleb.com/api/v1/inventory/picking/validate'
headers = {
'accept': '*/*',
'Authorization': f'******',
'Content-Type': 'application/json'
}
data = {
'id': 11003
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 201:
print(response.json())
else:
print(f'Error: {response.status_code}', response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
public class Main {
public static void main(String[] args) throws Exception {
String accountName = System.getenv("ACCOUNT_NAME");
String apiKey = System.getenv("API_KEY");
String json = "{ \"id\": 11003 }";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(new URI("https://" + accountName + ".juleb.com/api/v1/inventory/picking/validate"))
.header("accept", "*/*")
.header("Authorization", "Bearer " + apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, BodyHandlers.ofString());
if (response.statusCode() == 201) {
System.out.println(response.body());
} else {
System.out.println("Error: " + response.statusCode() + ", " + response.body());
}
}
}
Response
"Picking with id number: 11003 is validated"