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
parseFloat.
The trend endpoint is the one to build a chart on — days sets the window and
status narrows which orders count:
Reports
Reports arePOST 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:
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.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.