Redeem value from an instrument (carte cadeau)
Draws amountCents from the instrument identified by its BEARER CODE and returns the instrument at its reduced balance (depleted once it reaches zero). Keyed by code, not id, because that is what the till physically has. IRREVERSIBLE — there is no un-redeem verb; check the balance with the by-code lookup first. NOT IDEMPOTENT — there is no dedup key, so a retried call draws the amount a SECOND time; if a request times out, re-read the instrument by code and compare the balance before retrying. 404s on an unknown code; 422s when the instrument is not active, has expired, or the draw exceeds the remaining balance. Online-only: it cannot be queued offline.
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.
Body
Response
The instrument after the draw, carrying its new balance and status.
The instrument after the draw, carrying its new balance and status.
1gift_card, credit_note, store_credit 130 <= x <= 90071992547409910 <= x <= 9007199254740991active, depleted, void 1^(?:(?:\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))$
