Add or remove discount objects
manage_discount_objectsAttach or detach products, categories, or collections to a discount using add/remove actions. Pass either product 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.
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")). |