Validate Coupon
GET /api/v1/coupons/validate
Preview a coupon without redeeming it.
Always answers HTTP 200: an unknown, expired or exhausted code is a normal outcome of typing in a form, not a server error, and returning the same status for every outcome keeps the endpoint from doubling as a code oracle.
Args: code: The coupon code to preview (any case). session: Database session. _rate_limit: Per-IP rate-limit guard (injected).
Returns:
{valid, code?, plan_grant?, discount_type?, discount_value?, bonus_credits?, description?, error?}.
Authorizations
Parameters
Query Parameters
Coupon code
Coupon code
Responses
200
Successful Response
GET /api/v1/coupons/validate response body (public, read-only).
Deliberately narrow: it echoes only what the signup form needs to
render a badge. It never exposes max_redemptions,
times_redeemed, or created_by — an unauthenticated caller
should not be able to enumerate coupon economics by probing codes.
object
422
Validation Error