Skip to main content
StateSet exposes two different reporting surfaces, and picking the wrong one is the usual reason a number looks wrong.
Analytics are computed from live data and are not point-in-time stable — the same call an hour later returns different numbers. Anything that has to reconcile, or be defensible to a finance team, belongs in Reports, which take an explicit from/to window.

Analytics

Response
Money is returned as a decimal string, not a float, so that cents survive JSON round-tripping. Parse it with a decimal type, not parseFloat. The trend endpoint is the one to build a chart on — days sets the window and status narrows which orders count:

Reports

Reports are POST because they take a window and the record set to run over, rather than reading whatever is current. Every report takes an inclusive from and to as YYYY-MM-DD:
from and to are inclusive on both ends. A month-by-month series built with 2026-07-012026-08-01 counts the first of August twice — once in July’s report and once in August’s. End the window on the last day of the month.

Scheduling an export

There is no server-side scheduler for reports: run them on your own schedule and put the result where it needs to go. A cron job calling the endpoint is the whole pattern.
Run the close job a day or two after month end rather than at midnight on the 1st. Late-settling payments and next-day fulfilment events land after the window closes, and a report run too early will disagree with the one anyone runs later.

Next steps

Analytics endpoints

Full request and response reference for every analytics endpoint.

Webhooks

React to events as they happen instead of polling an analytics endpoint.

Order operations

The workflows that produce the numbers these reports read.

COGS quickstart

How cost of goods is recorded, which is what transaction-cogs reports on.
Last modified on August 29, 2026