update_promo_code
Update a promo code's code string, redemption URL, or enabled state. Disable a code after a campaign without losing redemption 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.
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.
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": {
"store_id": "<store_id>",
"promo_rule_id": "<promo_rule_id>",
"promo_code_id": "<promo_code_id>"
},
"name": "update_promo_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| account | No | ||
| enabled | No | ||
| store_id | Yes | ||
| promo_code_id | Yes | ||
| promo_rule_id | Yes | ||
| redemption_url | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |