Variants Update Stock
tiendanube_variants_update_stockSet exact stock or adjust by delta for product variants; omit variant ID to update all variants at once.
Instructions
Set or adjust stock. action 'replace' sets an exact value (value null = infinite stock); 'variation' adds/subtracts a delta. Omit id to apply to all variants of the product. HTTP: POST /products/{product_id}/variants/stock Required scope: write_products API version: 2025-03
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": {
"product_id": "<product_id>",
"action": "<action>",
"value": "<value>"
},
"name": "tiendanube_variants_update_stock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Variant ID; omit to apply to every variant | |
| value | Yes | Integer quantity (or delta for 'variation'); null with 'replace' = infinite stock | |
| action | Yes | Stock operation (replace | variation) | |
| product_id | Yes | Product ID | |
| location_id | No | Location ID for multi-location stores | |
| additional_fields | No | Extra raw API body fields not covered above; merged into the request body |