Skip to content

Reporting

The Reporting menu returns the deep, dedicated reports behind the admin Reporting screens — Sales, Customers and Products — plus an API-only Overview convenience aggregation. Each report rolls up a chosen metric over a date window, compared against the previous equal-length window.

How a report is selected — the type argument

Each report page exposes several metrics, and you pick one with the ?type= query parameter (e.g. ?type=total-sales). Omitting type falls back to that page's default (the first metric). The statistics payload is the raw aggregate for the chosen type, so its shape varies per metric — branch on type when consuming it.

The four reports

ReportWhat it coverstype values
OverviewAPI-only top-line summary across the storetotal-sales (default), total-orders, total-customers, top-selling-products-by-revenue
SalesRevenue, orders, funnel, refunds, tax, shipping, payment methodstotal-sales (default) + 8 more
CustomersNew customers, traffic, top customers/groupstotal-customers (default) + 5 more
ProductsSold quantities, wishlists, top sellers, reviews, search termstotal-sold-quantities (default) + 7 more

Overview has no matching admin screen

The admin Reporting menu goes straight to Sales / Customers / Products — there is no "Overview" screen in the panel. Overview is an API convenience that fetches one top-line number without calling the per-section endpoints.

Three shapes per report — Stats, View Details, Export

Sales / Customers / Products each expose the same metric in three forms:

FormEndpoint suffixShapeMirrors
Stats(none) — e.g. /reporting/salesRolled-up headline figures (charts/progress)the panel summary
View Details/view{ columns, records } — the full row-by-row tablethe panel's View Details link
Export (CSV)/export?format=csvtext/csv attachmentthe Export button

Overview is summary-only — it has no View Details and no Export.

Date window

start / end (YYYY-MM-DD) bound the report and the previous baseline behind each progress percentage — the previous period is the same-length window immediately before start. channel (a channel code) scopes the figures to a single storefront channel. dateRange in the response reports the two comparison windows: current is the window you asked for, previous is the equal-length window immediately before it.

Endpoints in this menu

ActionEndpoint
OverviewGET /api/admin/reporting/stats
SalesGET /api/admin/reporting/sales (+ /view, /export)
CustomersGET /api/admin/reporting/customers (+ /view, /export)
ProductsGET /api/admin/reporting/products (+ /view, /export)

Reporting is read-only and requires only an admin Bearer token (no permission gate) — see Authentication.

Released under the MIT License.