Admin Marketing: Promotions

Bulk-generate coupons for a cart rule

Generates coupon_qty random codes of the given format and length, optionally with prefix/suffix. Inherits usage_limit/usage_per_customer/expired_at from the parent cart rule.

post/marketing/cart-rules/{cartRuleId}/coupons/generate

Request

Path parameters

cartRuleIdinteger required

Parent cart rule ID

Request body

lengthinteger required
format'alphabetic' | 'alphanumeric' | 'numeric' required
prefixstring nullable
suffixstring nullable
coupon_qtyinteger required

Example request

{
  "length": 10,
  "format": "alphanumeric",
  "prefix": "SAVE-",
  "suffix": "-2026",
  "coupon_qty": 5
}

Response

Coupons generated.

Changes

No recorded changes to this operation across all 8 revisions of this API.