update_promo_code
Update a promo code's string, redemption URL, or enabled state. Use to temporarily disable a code without deleting its history.
Instructions
Update a promo code's string, redemption URL, or enabled state. Cannot move a code to a different rule — delete and re-create instead.
Common use: toggle enabled=false to temporarily disable a code after a campaign ends, without deleting the redemption history.
Authenticated via API key. Max 10 concurrent requests. Respects read-only and dry-run modes. Returns 404 if any of store_id, promo_rule_id, or promo_code_id is invalid.
Args: store_id: E-commerce store ID. promo_rule_id: Rule ID the code is attached to. promo_code_id: Code ID to update. code: New code string (case-insensitive). redemption_url: New redemption URL. enabled: Toggle the code on/off.
Returns: JSON with id, code, redemption_url, enabled, updated_at.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store_id | Yes | ||
| promo_rule_id | Yes | ||
| promo_code_id | Yes | ||
| code | No | ||
| redemption_url | No | ||
| enabled | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |