Update variant
update_variantUpdate an existing product variant with just the fields to change (e.g., pricing or stocks) using JSON Merge Patch.
Instructions
Update an existing variant via JSON Merge Patch: send only the fields to change (e.g. pricing or stocks). No field of UpdateVariantRequest is nullable, so null values are rejected by validation before any call — to clear a price, use bulk_update_prices (its price/manual_discount_price accept null). media is an exception to merge-patch granularity: sending it REPLACES the whole list, so resend the existing images alongside anything you add. At most ONE video per variant, and a video is accepted only when the same list carries at least one image — sending a video alone wipes the images and fails. stocks replaces the whole list too. Call get_operation_schema("UpdateVariant") for the exact request shape — but ignore its prose for stocks: upstream the spec pasted the media wording there, while the field still takes VariantStock entries (per-warehouse quantities).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Variant ID (UUID). | |
| variant | Yes | Merge-patch record matching the UpdateVariantRequest schema (see get_operation_schema("UpdateVariant")). Must not be empty. |