Skip to content

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

EndpointMethod
/api/admin/marketing/cart-rules/{cartRuleId}/couponsPOST

Details

  • Requires an admin Bearer token and the marketing.promotions.cart_rules.create permission.
  • The created coupon is a secondary code (type 1, isPrimary false). The rule's own primary code is managed on the cart rule itself.
  • Omitted usage_limit / usage_per_customer / expired_at inherit the parent rule's settings.
  • Returns the full coupon payload.

Request body

FieldTypeRequiredNotes
codestringyesCoupon code; must be unique
usage_limitintnoTotal redemptions allowed (0 = unlimited); inherits the rule when omitted
usage_per_customerintnoRedemptions per customer (0 = unlimited); inherits the rule when omitted
expired_atstringnoExpiry date (YYYY-MM-DD); inherits the rule when omitted

Released under the MIT License.