Delete Inventory Record¶
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
itemquery parameter triggers a bulk delete across all warehouses for that item. Use with caution.
Response¶
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"