Update stock
ps_update_stock
Write · preview + approveBlock 2 · Commerce (off by default)Daily connectorBlock off after install
Changes how many items you have in stock.
Ask Claude
„We got 40 more of the black lamp ref:LMP-01. Add them to stock.”
Example preview
Product 45 Garden lamp Nova, combination Black: 12 -> 52 (+40). Out of stock: deny orders (unchanged). A stock movement will be recorded.
Technical details
Sets stock quantity (a new value or a change of plus or minus N) and the out-of-stock behaviour (deny or allow orders), also for combinations, for up to 100 items per call. Saves through StockAvailable, records a stock movement and fires the stock update hook, so modules that sync stock (marketplaces, ERP) see the change.
Parameters
Parameter names are not confirmed in module 0.3.0 yet and may change.
| Name | Type | Required | Description |
|---|---|---|---|
| items | array of object | yes | One item per product or combination: product reference, optional combination, quantity (new value) or delta (+N / -N), optional out_of_stock behaviour. |
| shop_id | integer | no | Shop ID in a multistore installation. Defaults to the shop in the connector address. IDs are listed by ps_get_shop_info. |
| confirm | boolean | no | false (default) returns a preview and saves nothing. true executes, only after the user approved the preview, together with change_token. |
| change_token | string | when: confirm=true | Token from the preview. Required with confirm=true. Valid 30 minutes, single use, bound to the previewed arguments and data state. |
Limits
Max 100 items per call.
What you see before anything is saved
Claude first calls the tool without confirming it. The module returns a preview (current and new values) and a single-use token valid for 30 minutes. Claude shows you the preview and saves the change only after your yes.
Related tools
- Get product ps_get_product
- Diagnose product visibility ps_diagnose_product_visibility
- Revert change ps_revert_change
Last updated: 2026-10-03