create_variation
Create a variation for a variable product by setting attributes, price, stock, and more. The parent product must be type 'variable' with matching attributes.
Instructions
Create a variation for a variable product. Parent product must have type='variable' with matching attributes. Use batch_update_variations for multiple at once.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | SKU | |
| image | No | Variation image | |
| fields | No | Comma-separated fields to return in response | |
| status | No | Variation status | publish |
| weight | No | Weight | |
| attributes | Yes | Attribute values defining this variation | |
| product_id | Yes | Parent product ID | |
| sale_price | No | Sale price | |
| description | No | Variation description | |
| manage_stock | No | Enable stock management | |
| stock_status | No | Stock status | |
| regular_price | No | Regular price (MRP) | |
| stock_quantity | No | Stock quantity |