Deactivate a coupon
SOFT-ARCHIVES one coupon by its server-minted id (not its code — resolve the id through GET /v1/coupons first). This is the only way to stop a code: there is no delete, and the coupon stays in the catalogue with active:false so its past redemptions remain auditable. Once deactivated it reads as unknown to the till, so POST /v1/coupons/validate starts answering 404 for that code and checkout can no longer consume it. There is no reactivate — re-create the code if you archived it by mistake. 404s when no coupon carries the id.
Authorizations
Authorization: Bearer <token>. Accepts EITHER a Keycloak access token (scopes-in-token) OR an opaque POS session token; both resolve to the same pos.* scope vocabulary the route guards enforce.
Path Parameters
1Response
The archived coupon, now active:false, with its final redemption count.
The archived coupon, now active:false, with its final redemption count.
11- Option 1
- Option 2
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$0 < x <= 90071992547409910 <= x <= 90071992547409910 <= x <= 9007199254740991
