Deletes a shipment (delivered files stay in the warehouse unless files=true)
DELETE
/packages/{id}Requires: Cookie fret_session / Bearer
Path parameters
idintegerrequired
Query parameters
filesbooleantrue also deletes what the shipment put in the warehouse: its delivered parcels and what their unpacking placed (parcels "already in the warehouse" belong to another shipment and are kept); folders left empty are removed. Refused (409) while a parcel is moving.
Responses
204Deleted
409Errorobject
errorobjectFields · 2
codestringmessagestring
Request
curl -X DELETE "http://localhost:8080/api/v1/packages/0" \ -H "Authorization: Bearer $TOKEN"const response = await fetch('http://localhost:8080/api/v1/packages/0', { method: 'DELETE', headers: { Authorization: 'Bearer <TOKEN>', },});console.log(response.status);import requests
response = requests.delete( "http://localhost:8080/api/v1/packages/0", headers={ "Authorization": "Bearer <TOKEN>", },)response.raise_for_status()print(response.status_code)Response
409
{ "error": { "code": "not_found", "message": "string" }}