Add or remove promocode objects
manage_promocode_objectsAttach or detach product variants, categories, or collections to a promocode. Add or remove object associations to control promocode eligibility.
Instructions
Attach objects to a promocode 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 | Promocode ID (UUID). | |
| action | Yes | Whether to attach or detach the objects. | |
| objects | Yes | PromocodeObjects record: arrays product_variant_ids, category_ids and/or collection_ids (see get_operation_schema("AddPromocodeObjects")). |