Update variant
shop_update_variantUpdates the details of a given product variant Guidance: Updates the details of a given product variant | context: product_id, variant_id
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | Stock Keeping Unit unique ID. | |
| media | No | Unique ID of the Product Media instance displayed with the variant. | |
| price | No | Variant unit price. | |
| stock | No | Variant stock quantity. This field should contain a positive integer or the value `-1` for an infinite stock. | |
| weight | No | Variant weight (unit: kg). | |
| position | No | Position of the variant in the product variants list (0 is the first). | |
| compare_at | No | Price reference for this product variant. | |
| product_id | Yes | Unique ID of the product. | |
| variant_id | Yes | Unique ID of the product variant. | |
| option_values | No | List of option/value pairs that identify this variant. Each item must include option_id and value, for example [{"option_id": 1, "value": "Red"}, {"option_id": 2, "value": "M"}]. |