Run promotions
Create a discount and apply it at checkout — the 90% case. For richer rules (BOGO, segment targeting, stacking, campaigns) see the Offer engine.
Coupons vs offers
- A coupon is a simple code a shopper enters (e.g.
SAVE20) — flat or percentage off, with limits. Start here. - An offer is an automatic, rule-based promotion (no code needed) with richer conditions — covered in the Offer engine.
1. Create a coupon
curl -X POST https://zopping.com/api/promo-service/coupon \
-H "Authorization: Bearer $ZOPPING_TOKEN" -H "Content-Type: application/json" \
-d '{
"organizationId": "<org-id>",
"couponCode": "SAVE20",
"discountType": "PERCENT_OFF",
"discount": 20,
"minOrderAmount": 500,
"maxDiscountAmount": 150,
"validOnUser": "ALL",
"startDate": "2026-06-01",
"expiryDate": "2026-12-31",
"status": "ACTIVE"
}'
Useful limits: maxRedemption (total uses), maxSingleRedemption (per customer),
and eligibility filters validOnPayment / validOnStores / validOnUser
(NEW_USERS, OLD_USERS, ALL).
2. Validate / apply at checkout
Check a code against the cart before placing the order:
curl "https://zopping.com/api/promo-service/apply-coupon?organizationId=<org-id>&couponCode=SAVE20&customerId=7781&orderValue=1500" \
-H "Authorization: Bearer $ZOPPING_TOKEN"
The response returns the matched coupon and the computed discount.
3. Distribute codes (optional)
- Bulk generate unique codes with
bulk-coupon. - Push to specific wallets with
coupon-walletso only chosen customers see the code.
Going further
- Offer engine — automatic offers, BOGO, cart/shipping discounts, stacking, and campaigns.
- Customer segments & targeting — restrict a promotion to a segment.
Reference: Promotions.