Create Cart Rule Coupon
Adds a single coupon code to a cart rule — the Add Coupon action on the Coupons tab of the admin Marketing → Promotions → Cart Rules screen.
TIP
New here? Read the Cart Rule Coupons overview for what these coupons do and how they relate to a cart rule.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/marketing/cart-rules/{cartRuleId}/coupons | POST |
Details
- Requires an admin Bearer token and the
marketing.promotions.cart_rules.createpermission. - The created coupon is a secondary code (
type1,isPrimaryfalse). The rule's own primary code is managed on the cart rule itself. - Omitted
usage_limit/usage_per_customer/expired_atinherit the parent rule's settings. - Returns the full coupon payload.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
code | string | yes | Coupon code; must be unique |
usage_limit | int | no | Total redemptions allowed (0 = unlimited); inherits the rule when omitted |
usage_per_customer | int | no | Redemptions per customer (0 = unlimited); inherits the rule when omitted |
expired_at | string | no | Expiry date (YYYY-MM-DD); inherits the rule when omitted |

