Skip to main content
GET
Get coupon by code

📌 Endpoint

GET /stores/{storeId}/coupons/{code} Fetches a coupon by its code for use at checkout.

🔐 Authentication

  • Public route.
  • The store must have an active plan.

🧾 Route parameters


🔎 Query params


✅ Example request


📦 Success response (200)


⚠️ Possible errors

  • 400 INVALID_DATA → invalid parameters
  • 400 COUPON_EXPIRED → coupon expired
  • 400 COUPON_ALREADY_USED → usage limit reached or customer (email/cpf) already used the coupon with SINGLE_USE_PER_CUSTOMER
  • 401 UNAUTHENTICATED → unauthenticated
  • 403 NO_ACTIVE_SUBSCRIPTION → inactive/expired plan
  • 404 STORE_NOT_FOUND → store not found
  • 404 COUPON_NOT_FOUND → coupon does not exist
  • 429 RATE_LIMIT_EXCEEDED → per-minute rate limit exceeded
  • 500 INTERNAL_SERVER_ERROR → internal server error
  • 503 SERVICE_UNAVAILABLE → service unavailable

Path Parameters

storeId
string
required
Required string length: 1 - 50
code
string
required
Required string length: 1 - 32

Query Parameters

email
string<email>

Optional buyer email to validate single-use-per-customer coupons.

cpf
string

Optional buyer CPF to validate single-use-per-customer coupons.

Response

Get coupon by code.

code
string
required
Example:

"SUCCESS"

coupon
object
required

Store discount coupon.