Skip to content

Delete Inventory Record

DELETE /api/inventory/{id}
DELETE /api/inventory/{id}?item={item_id}

Required privilege: Inventory / Edit CSRF header required: X-XSRF-TOKEN


Path Parameters

Parameter Type Required Description
id integer Yes Internal inventory record identifier

Query Parameters

Parameter Type Required Description
item integer No If provided, deletes all inventory records for this item ID instead of just the one in the path

Warning: The item query parameter triggers a bulk delete across all warehouses for that item. Use with caution.


Response

HTTP/1.1 200 OK

Code Examples

CSRF=$(grep csrf_access_token cookies.txt | awk '{print $NF}')

# Delete a single record
curl -b cookies.txt -X DELETE https://acme.knosc.com/api/inventory/601 \
  -H "X-XSRF-TOKEN: $CSRF"

# Delete all inventory for item 55
curl -b cookies.txt -X DELETE "https://acme.knosc.com/api/inventory/601?item=55" \
  -H "X-XSRF-TOKEN: $CSRF"