delete_variants
Permanently delete one or more variants from a given product. Ensure at least one variant remains; Shopify automatically preserves variants in completed orders.
Instructions
Permanently delete one or more variants from a product. Irreversible. Each product must keep at least one variant — Shopify rejects requests that would empty the product (delete the whole product via update_product status:ARCHIVED, or use the admin UI for full deletion). Variants in completed orders are kept-but-hidden by Shopify automatically; the historical record on the order is preserved.
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": {
"productId": "<productId>",
"variantIds": "<variantIds>"
},
"name": "delete_variants"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| productId | Yes | Product GID. | |
| variantIds | Yes |