discounts_coupon
Create a coupon code. Money is integer minor units (cents). Calling this changes nothing: it returns a preview of what would change and a confirmation link. Only the merchant, on that page, can make it happen.
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": {
"code": "<code>",
"kind": "<kind>",
"value": "<value>"
},
"name": "discounts_coupon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | What the shopper types at checkout. | |
| kind | Yes | ||
| name | No | What the order line calls it. Defaults to the code. | |
| value | Yes | Basis points for percentage (20% is 2000), minor units (cents) for fixed. | |
| endsAt | No | ISO 8601. Omit to run until turned off. | |
| startsAt | No | ISO 8601. Omit to start immediately. | |
| usageLimit | No | Total redemptions across everyone. | |
| minSubtotal | No | Minor units. Basket must reach this before the code applies. | |
| freeShipping | No | Delivery is free when the code applies. | |
| onlyCategories | No | Category names: the code takes money off these only. | |
| exceptCategories | No | Category names the code never touches (items already reduced, gift sets). | |
| perCustomerLimit | No |