create_discount_code
Create a Shopify discount code with percentage or fixed-amount value, start/end dates, usage limits, and customer eligibility rules.
Instructions
Create a new discount code
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": {
"title": "<title>",
"code": "<code>",
"startsAt": "<startsAt>",
"discountType": "<discountType>",
"discountValue": "<discountValue>"
},
"name": "create_discount_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Discount code customers will enter | |
| title | Yes | Internal title for the discount | |
| endsAt | No | End date (ISO 8601 format, optional) | |
| startsAt | Yes | Start date (ISO 8601 format) | |
| usageLimit | No | Maximum number of times discount can be used | |
| discountType | Yes | Type of discount | |
| discountValue | Yes | Discount value (percentage as whole number, e.g., 10 for 10%) | |
| minimumRequirement | No | ||
| appliesOncePerCustomer | No | Limit to one use per customer (default: true) |