update_product_inventory
Updates stock quantity for a ShopNex variant, with optional price or SKU changes; previews by default and commits only when confirm=true.
Instructions
Update stock quantity (and optional integer priceCents or SKU) on a ShopNex variant via PATCH /api/v1/admin/variants/{variantId}. Provide variantId, or productId for a single-variant product. Defaults to confirm=false (dry-run preview); pass confirm=true to apply the change. Requires write_products scope.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"inventoryQuantity": "<inventoryQuantity>"
},
"name": "update_product_inventory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | Optional updated SKU code. | |
| confirm | No | Safety gate: false (default) previews the change without modifying the store; true commits the update. | |
| productId | No | UUID of a single-variant product when variantId is not yet known; resolves the sole variant automatically. | |
| variantId | No | UUID of the product variant to update. | |
| priceCents | No | Optional updated variant price in integer cents (for example 2500 for 25.00). | |
| inventoryQuantity | Yes | New non-negative stock quantity for the target variant. |