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
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 |