Search Documentation
Search for a documentation page...
Analytics API
REST API endpoints for store performance metrics and sales over time.
Read store performance metrics. Both endpoints share the same range selector — a preset period (default last 30 days) or an explicit from/to window — and compare figures against the preceding equal-length period to compute growth percentages.
Range Parameters
These query parameters apply to every analytics endpoint.
| Parameter | Type | Default | Description |
|---|---|---|---|
period | "today" | "7d" | "30d" | "90d" | "12m" | 30d | Preset window. Ignored when from/to are supplied. |
from | string | — | ISO 8601 start. Overrides period; requires to. |
to | string | — | ISO 8601 end. Overrides period; requires from. |
from and to must be provided together, and from must be before to.
Overview
Headline KPIs for the window: revenue, order count, average order value, new/returning customers, the order-status breakdown, and the top 5 products by revenue. Revenue, orders, and customer figures include growth versus the preceding equal-length period.
Response
Sales
Total revenue and orders for the window, plus a daily series. Each entry in series is a UTC day bucket with date (YYYY-MM-DD), revenue, and orders.