Report stored-value breakage across the whole network (carte cadeau)
Aggregates unredeemable and untouched stored value AS OF THE REQUEST CLOCK: expired* counts instruments past their expiresAt that still carry a balance, neverRedeemed* counts live instruments never drawn on, and total* sums both. Voided and zero-balance instruments are excluded, and an instrument that is both expired and never redeemed is counted ONCE (under expired*), so the two buckets never double-count and their sum is the total at-risk value. This IS A NETWORK TOTAL: the aggregate is a SUM/COUNT over EVERY issued instrument — no page window, no sample, no truncation — so it is the figure to reconcile against. Before #3222 it folded only the first 100 instruments and silently under-reported the liability; a caller pinned to that behaviour should be corrected, not accommodated. Every figure is integer minor units and exact: the fold is integer addition and counting, with no division and no per-row rounding. It takes no parameters and never mutates.
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.
Response
The breakage totals in integer cents, plus the instrument counts.
The breakage totals in integer cents, plus the instrument counts.
-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991
