Coupon
The Coupon family — 7 operations.
A coupon is a code a shopper presents at the till or checkout — stored upper-cased, one coupon per order. A trigger coupon unlocks one coupon-gated promotion; a discount coupon carries its own simple reduction — percent off or an amount off, with an optional minimum spend and product scope. The code, the flavor and the promotion are fixed at birth (a different code is a new coupon); the window and the total-uses cap stay editable. Create it here, then mint a batch of unique single-use codes from the record when a campaign needs them. Deactivating keeps the code reserved; retiring the coupon frees it for reuse.
Operations
| Operation | Kind | What it does |
|---|---|---|
| coupon | query | Look up one record — a coupon — a code a customer presents for a reduction. |
| coupons | query | The coupon list — each entry is a coupon — a code a customer presents for a reduction. |
| createCoupon | mutation | Create a new coupon — a code a customer presents for a reduction at your organization. |
| deactivateCoupon | mutation | Deactivate a coupon — a code a customer presents for a reduction — it stops being usable but keeps its history and can be reactivated. |
| doomCoupon | mutation | Permanently retire a coupon — a code a customer presents for a reduction. |
| reactivateCoupon | mutation | Reactivate a coupon — a code a customer presents for a reduction — bring a deactivated record back into use. |
| updateCoupon | mutation | Edit a coupon — a code a customer presents for a reduction — change its details. |