Update Discount
discount_updateEdits a Plan Builder discount; only the fields sent change.
discount_id is its uuid, handle or code, as for discount_get.
Deactivate it with status: inactive: it stops applying to new
subscriptions, and the ones that already got it keep it. A write that
leaves an AUTOMATIC discount active REQUIRES confirm: true, unless it
only changes name or description. Takes the app_id returned by
apps_list. Returns the same shape as discount_get.
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": {
"app_id": "<app_id>",
"discount_id": "<discount_id>"
},
"name": "discount_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | The code merchants type, stored uppercase and unique per app. Required unless `auto_apply` is true; an automatic discount has no code. | |
| name | No | Internal name of the discount. | |
| type | No | `percentage` off the plan price, or a `fixed_amount` in USD. | |
| value | No | The percentage (0.01 to 100) or the USD amount (min 0.01). | |
| app_id | Yes | The app uuid returned by `apps_list`. | |
| status | No | `active` applies it from now on; `inactive` keeps it off. Deactivate a discount with `inactive`. | |
| confirm | No | Must be `true` when the write leaves an automatic discount active (anything beyond its name or description). Ignored otherwise. | |
| duration | No | `forever`, or `limited` to a number of billing cycles. | |
| plan_ids | No | Plan uuids (`plan_id` from `plans_list`) the discount is restricted to. Empty or omitted: every plan. | |
| auto_apply | No | True for an automatic discount: applied to every matching new subscription without a code. Writing an active automatic discount requires `confirm: true`. | |
| description | No | Optional description. | |
| discount_id | Yes | Discount uuid, handle or code from `discounts_list`. | |
| availability | No | `all` stores, or `specific` stores listed in `specific_shop_domains`. | |
| max_redemptions | No | How many subscriptions may use it in total (min 1). Null: no limit. | |
| organization_id | No | An organisation uuid or slug. When supplied, `app_id` is resolved within that organisation and may be a slug instead of a uuid, mirroring the Meridian web app. | |
| specific_shop_domains | No | The *.myshopify.com domains allowed when `availability` is `specific`. | |
| duration_interval_count | No | Billing cycles the discount lasts. Required when `duration` is `limited`. |