update_product
Edit a product's catalog details: fix typos, change category, shelf, or set minimum stock. Only specified fields change; stock amounts remain unaffected.
Instructions
Edit an existing product's catalog record.
For fixing a typo, recategorising something, moving its default shelf, or setting a minimum stock level. Only the arguments given are changed. This does not touch stock amounts — use add_stock, consume_product or correct_stock for those.
Args: product: Product name, description fragment, or barcode identifying the product to edit. name: New name. description: New description — brand, size, variant. category: New product group, exact name. See get_conventions. location_id: New default location, id or exact name. unit: New stock unit. Refused while any stock is on hand, since Grocy would reinterpret the existing amount in the new unit — 2 Packs silently becoming 2 Grams. Consume to zero first, or create a separate product. min_stock: Minimum to keep on hand, in the product's stock unit. Zero clears it. This is what below_min_stock and add_missing_to_shopping_list read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| unit | No | ||
| product | Yes | ||
| category | No | ||
| min_stock | No | ||
| description | No | ||
| location_id | No |