Remove a Picking Line
Endpoint Overview
This API endpoint provides a detailed overview of the endpoint responsible for removing a
single product line from a picking within the Inventory module of the Juleb ERP. The picking
must still be in the draft state.
Endpoint Details
- Method: DELETE
- URL:
/api/v1/inventory/picking/{pickingID}/line/{id}
Parameters
- Path Parameters:
pickingID(string, required): The ID of the picking the line belongs to.id(string, required): The ID of the line to remove.
- Query Parameters: None
Response
- 204 No Content: The requested resource has been removed.
- 400 Bad Request: Bad request (e.g.
line id: {id} is not found). - 401 Unauthorized: Unauthorized.
- 404 Not Found:
picking with id {pickingID} is not set to draft(if the picking has already been validated/assigned), or the picking doesn't exist.
Response Body
No response body.
Example
Request
- NodeJS
- curl
- python
- java
const axios = require('axios');
const accountName = process.env.ACCOUNT_NAME;
const apiKey = process.env.API_KEY;
axios.delete(`https://${accountName}.juleb.com/api/v1/inventory/picking/11004/line/8812`, {
headers: {
'accept': '*/*',
'Authorization': `TOKEN`
}
})
.then(response => {
console.log(response.status);
})
.catch(error => {
console.error('Error:', error);
});
curl -X DELETE \
-H "accept: */*" \
-H "Authorization: ******" \
"https://$ACCOUNT_NAME.juleb.com/api/v1/inventory/picking/11004/line/8812"
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/11004/line/8812'
headers = {
'accept': '*/*',
'Authorization': f'******'
}
response = requests.delete(url, headers=headers)
if response.status_code == 204:
print('Line removed successfully')
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");
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(new URI("https://" + accountName + ".juleb.com/api/v1/inventory/picking/11004/line/8812"))
.header("accept", "*/*")
.header("Authorization", "Bearer " + apiKey)
.DELETE()
.build();
HttpResponse<String> response = client.send(request, BodyHandlers.ofString());
if (response.statusCode() == 204) {
System.out.println("Line removed successfully");
} else {
System.out.println("Error: " + response.statusCode() + ", " + response.body());
}
}
}
Response
204 No Content with an empty body.