Update a coupon
Admin or branch manager only. Patches the active flag, expiry, use cap, or description. An empty patch answers 400 and an unknown coupon 404; deactivating a coupon is a soft delete.
PUT
/api/v1/coupons/{couponId}Authorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Path parameters
couponIdstringrequiredThe coupon id.
Request body
requiredapplication/jsonis_activeboolean | nullvalid_untilstring | nullmax_usesinteger | nullShow propertiesHide properties
Any of:
integer
integernull
nulldescriptionstring | nullResponses
200
Coupon updated
idstringrequiredupdatedbooleanrequired400
Nothing to update
detailstringrequired401
Not authenticated
detailstringrequired403
Caller is not an admin or branch manager
detailstringrequired404
Coupon not found
detailstringrequired