create-coupon
Create a new coupon with configurable discount type, amount or percentage, usage limits, expiry, and targeting by cart, package, category, or username.
Instructions
Create a new coupon with discount settings, usage limits, and targeting
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>",
"effective_on": "<effective_on>",
"discount_type": "<discount_type>"
},
"name": "create-coupon"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Coupon code (e.g. 'SUMMER20') | |
| note | No | Internal note about the coupon | |
| minimum | No | Minimum basket value for coupon to apply | |
| packages | No | Package IDs the coupon applies to (when effective_on is 'package') | |
| username | No | Restrict coupon to a specific username | |
| categories | No | Category IDs the coupon applies to (when effective_on is 'category') | |
| start_date | No | Start date (YYYY-MM-DD format) | |
| basket_type | No | Type of basket the coupon applies to | both |
| expire_date | No | Expiry date (YYYY-MM-DD format) | |
| effective_on | Yes | What the coupon applies to | |
| expire_limit | No | Maximum number of redemptions | |
| expire_never | No | Whether the coupon never expires | |
| discount_type | Yes | Type of discount | |
| discount_amount | No | Fixed discount amount (when discount_type is 'value') | |
| redeem_unlimited | No | Whether the coupon can be used unlimited times | |
| discount_percentage | No | Percentage discount (when discount_type is 'percentage') |