Update discount
update_discountUpdate a discount: rename, change amount, enable/disable, adjust validity or usage limit. Omitted or null fields keep their value; send "" to clear the message. The discount type cannot be changed, and a bulk coupon keeps its generated codes: code has no effect on it, use expire_discount_code to retire individual codes.
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": {
"discount_id": "<discount_id>"
},
"name": "update_discount"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| name | No | ||
| limit | No | Maximum number of uses. 0 = unlimited. | |
| amount | No | Percentage (0-100) or fixed amount in minor units (cents), depending on the discount amount_type. | |
| enabled | No | false deactivates the discount, true re-enables it. | |
| message | No | ||
| valid_from | No | ||
| discount_id | Yes | The discount id. | |
| valid_until | No | ||
| no_expiration | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| code | No | ||
| name | No | ||
| type | No | ||
| limit | No | ||
| amount | No | ||
| enabled | No | ||
| message | No | ||
| currency | No | ||
| code_type | No | ||
| is_active | Yes | ||
| categories | No | ||
| times_used | No | ||
| valid_from | No | ||
| amount_type | No | ||
| bulk_config | No | ||
| valid_until | No | ||
| all_products | No | ||
| dashboard_url | Yes | ||
| no_expiration | No | ||
| amount_applied | No | ||
| applies_to_all | No | ||
| products_count | Yes | ||
| codes_available | Yes | ||
| applies_to_count | Yes | ||
| show_countdown_timer | No |