Validate (use) a coupon
Atomically mark a coupon as used, creating an activity record. Prevents double-usage via select_for_update. Auto-expires coupons past valid_until.
Authorizations
Per-company partner API key (zupy_pk_…). Validated by Zupy against the company integration key hash (Story 14.x); send it on every request as the X-API-Key header. Scoped read-write to the owning company's data.
Headers
OTP session token returned by POST /auth/verify-otp/. REQUIRED when the company's integration OTP policy enables it (require_otp_for_redemption for redeem, require_otp_for_coupon_usage for validate). Omitting it returns 403 with code "otp-required".
Path Parameters
Accepts EITHER the RewardRedemption KSUID (e.g. 16a33f27fbbc1801d63d56d2027) OR the customer-facing coupon_code (e.g. CZ-914F15F3 or CP-LEGACY01). Lookup by code is case-insensitive — both CZ-914F15F3 and cz-914f15f3 resolve to the same coupon. The response always echoes the canonical upper-case form.
Unique identifier for this customer.
Response
Coupon validation result with current status, remaining usages, and a settled-state snapshot of the customer's balances. Story W.x: response now mirrors RewardRedeemResponse — partners get customer_id + new_balance + new_z_balance without a follow-up GET.
Cursor-based pagination metadata matching envelope middleware output.