Add or remove promocode objects
manage_promocode_objectsAttach or remove product variants, categories, or collections from a promocode. Choose either variant IDs or category/collection IDs per request to update 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")). |