Save product
save_productCreate or update a product. Pass an id to update that product; omit id to create a new one. Returns the new product id on create. To create/update many at once, send an items array — one all-or-nothing transaction with a single ledger recompute; each item with an id updates, each without creates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Product id. Present → update that product; omit → create a new one. | |
| sku | No | Stock-keeping unit / product stock code. Canonical product-level SKU (mirrors a variant's sku). | |
| cost | No | Cost price per unit. | |
| name | No | Display name / description of the product. | |
| unit | No | Legacy unit-of-measure label; prefer `units`. | |
| image | No | Product image URL; pass "$delete" to remove the existing image. | |
| items | No | Vector of product objects to create/update in one all-or-nothing batch. Preferred over repeated calls. Each item with an id updates; each without creates. | |
| notes | No | Free-text notes. | |
| price | No | Selling price per unit, in the record's currency. | |
| units | No | Unit of measure label (e.g. "each", "hour", "kg"). | |
| amount | No | Unit amount before quantity/tax, in the record's currency. | |
| starred | No | Whether the product is starred/favourited. | |
| currency | No | ISO 4217 currency code (e.g. "ZAR", "USD"). Defaults to the business currency. | |
| quantity | No | Number of units. | |
| trackstock | No | Whether stock levels are tracked for this product. | |
| description | No | Product description. | |
| paymentlink | No | Whether an online payment link is enabled for this product. | |
| salestaxids | No | Sales tax ids to link to this product. | |
| unlinktaxes | No | Sales tax ids to unlink from this product. | |
| costcurrency | No | ISO 4217 currency code for the cost price. | |
| allowoversell | No | Whether the product can be sold beyond available stock. | |
| enablequantity | No | Whether the buyer can choose a quantity for this product. | |
| requireaddress | No | Whether a delivery/billing address is required when this product is purchased. | |
| salestaxexclusive | No | Whether the price excludes sales tax. |