Coupons
Update Coupon
Learn how to update coupons using the endpoint PUT /stores//coupons/.
PUT
Update coupon
📌 Endpoint
PUT /stores/{storeId}/coupons/{couponId}
Partially updates an existing coupon.
🔐 Authentication
- Private route.
- Requires header
Authorizationwith your API key and active plan.
🧾 Route parameters
🧍 Body (JSON)
Send at least one field:code(3-32)discount(1-100)position(integer greater than or equal to 1)useLimit(integer -1 to 9999; sendingnullresets to-1)rules(array of usage rules, e.g.[{"type": "SINGLE_USE_PER_CUSTOMER"}]; sendingnullor[]clears rules)expiredAt(future date inRFC3339/date-timeformat, ornull)productIds(array of IDs; sendingnullclears associations)categoryIds(array of IDs; sendingnullclears associations)
✅ Example request
Standard snippet (cURL)
Use the cURL example from the Request example section above as the official snippet.📦 Success response (200)
⚠️ Possible errors
400 INVALID_DATA→ invalid body400 INVALID_DATA_CODE→codeoutside 3 to 32 characters400 INVALID_DATA_DISCOUNT→discountoutside 1 to 100400 INVALID_DATA_POSITION→positionless than 1400 INVALID_DATA_USE_LIMIT→useLimitoutside -1 to 9999400 INVALID_DATA_RULES→ invalid or malformedrules400 INVALID_DATA_EXPIRED_AT→ invalidexpiredAtor not in the future400 RELATION_NOT_FOUND→ invalid product/category401 API_KEY_NOT_PROVIDED→Authorizationheader not provided401 INVALID_API_KEY→ invalid API key401 UNAUTHENTICATED→ unauthenticated user403 USER_DISABLED→ user disabled403 NO_ACTIVE_SUBSCRIPTION→ no active plan404 STORE_NOT_FOUND→ store not found404 COUPON_NOT_FOUND→ coupon not found409 COUPON_ALREADY_EXISTS→ duplicated code429 RATE_LIMIT_EXCEEDED→ per-minute rate limit exceeded500 INTERNAL_SERVER_ERROR→ internal error503 SERVICE_UNAVAILABLE→ service unavailable
Path Parameters
Body
application/json
Coupon fields to update.