Tally one salesperson's day
Rolls ONE salesperson’s finalized sale tickets for ONE UTC calendar day up into their day figures: sales and returns counts, net gross TTC taken (chiffre d’affaires), items sold, basket average and VAT. Pass ?sellerId= (a GET /v1/team member id — the same user-* id SaleTicket.sellerId carries), optionally ?day=YYYY-MM-DD (defaults to today) and ?store= to narrow to one store. Money is integer cents.
WHICH DAY. The window is the UTC calendar day of recordedAt, the instant the BACKEND booked each sale — the same bucket the daily Z closure, the FEC and the accounting export use. It is deliberately NOT the instant the till rang the sale up: the two diverge by days for a sale captured offline and replayed later, and a figure bucketed the other way would contradict the store’s own close.
WHOSE FIGURES. This is the read about SOMEBODY ELSE, so it rides pos.finance.view — the same grant that already serves every ticket and its sellerId through GET /v1/sales, so it exposes nothing new, only conveniently. To read your OWN day, call GET /v1/me/day-summary, which needs no scope and takes no id.
READING ZEROS. A seller with no ticket that day is a successful read returning zeros. That is a real, quiet day — it is NOT what a failed read looks like, and a client must never render a transport failure as 0.
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.
Query Parameters
The salesperson whose day to tally — a GET /v1/team member id (user-*), the same id SaleTicket.sellerId carries. Required; omitting it 400s.
The UTC calendar day (YYYY-MM-DD) to tally; defaults to today. A malformed day 400s.
Narrow the tally to one store by its canonical store id; omit to span every store.
Response
The salesperson's tallies for the requested UTC calendar day.
The salesperson's tallies for the requested UTC calendar day.
The UTC calendar day tallied (YYYY-MM-DD).
The store the window was narrowed to, or null.
-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991Net gross TTC taken, integer cents (refunds negative).
-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991
