stock_item_delete
DestructiveIdempotent
Soft-delete a stock item by id: sets is_active to 0 while its movements-ledger history stays intact. stock_item_adjust then refuses the id as NOT_FOUND and stops resolving it by name, so a later delivery under the same name creates a fresh item instead of reviving this one. stock_item_list and stock_item_read still return it with is_active: 0 — only the dashboard's stats header excludes it. Restore by running a normal update that sets is_active back to 1; there is no separate restore door.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The stock item id to soft-delete (stock_item_list shows them). | |
| name | No | ||
| unit | No | ||
| notes | No | ||
| category | No | ||
| quantity | No | ||
| is_active | No | ||
| expiry_date | No | ||
| sell_price_cents | No | ||
| cost_per_unit_cents | No | ||
| low_stock_threshold | No |