Update PrestaShop Stock
ps_update_stockUpdates the available quantity and out-of-stock behavior for a product or specific variant using its stock available ID.
Instructions
Update the available quantity for a product or a specific combination/variant.
⚠️ Requires PS_READONLY=false and PUT enabled on the PrestaShop Webservice key.
Args:
id: Stock available ID (use ps_get_product_stock to find it)
quantity: New quantity (must be >= 0)
out_of_stock: Behaviour when out of stock: 0=deny orders, 1=allow orders, 2=use shop default
Returns: Updated stock entry.
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": {
"id": "<id>",
"quantity": "<quantity>"
},
"name": "ps_update_stock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Stock available ID (from ps_get_product_stock) | |
| quantity | Yes | New quantity | |
| out_of_stock | No | Out-of-stock behaviour: 0=deny, 1=allow, 2=default | |
| confirmation_token | No | Confirmation token for destructive operations |