Archive or unarchive variant
variant_actionArchives a product variant to hide it from the storefront while keeping it restorable, or unarchives it to set status to hidden for later publishing.
Instructions
Archive a variant (soft delete: status becomes ARCHIVED, item is hidden from the storefront but restorable) or unarchive it (status becomes HIDDEN; publish it afterwards via update_variant). Success ({"ok":true}) only means the request was processed: for an unknown id or a transition that does not apply the API also answers 204 and changes nothing — confirm the new status with get_variant.
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": {
"id": "<id>",
"action": "<action>"
},
"name": "variant_action"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Variant ID (UUID). | |
| action | Yes | Action to perform. |