Add or remove discount objects
manage_discount_objectsAttach or detach product variants, categories, or collections to a discount by UUID. Pass either variant IDs or category/collection IDs per request.
Instructions
Attach objects to a discount or detach them. Supported object types: product_variant_ids (variant UUIDs), category_ids (category UUIDs), collection_ids (collection UUIDs). Per request pass EITHER product_variant_ids OR categories/collections — the API does not mix variants with categories/collections.
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>",
"objects": "<objects>"
},
"name": "manage_discount_objects"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Discount ID (UUID). | |
| action | Yes | Whether to attach or detach the objects. | |
| objects | Yes | DiscountObjects record: arrays product_variant_ids, category_ids and/or collection_ids (see get_operation_schema("AddDiscountObjects")). |