Skip to content

Reporting — Customers

EndpointMethod
/api/admin/reporting/customersGET
/api/admin/reporting/customers/viewGET
/api/admin/reporting/customers/exportGET

Query Parameters

ParamTypeNotes
typeenumtotal-customers (default), customers-traffic, customers-with-most-sales, customers-with-most-orders, customers-with-most-reviews, top-customer-groups.
startdateStart date.
enddateEnd date.
channelstringChannel code.

Helper-method output

statistics shape depends on the chosen type.

View Details

GET /api/admin/reporting/customers/view returns the same statistics as the summary stats endpoint, but in a detailed table form — the full list that sits behind a panel's View Details link. The statistics object carries:

  • columns — an ordered list of { key, label } describing each table column.
  • records — the row data, each keyed by the column key values.

This is the expanded, row-by-row view; the summary stats endpoint returns the rolled-up headline figures instead.

Export (CSV)

GET /api/admin/reporting/customers/export streams the same detailed table as a text/csv attachment (the Export button). The header row is built from the column labels, followed by one line per record. Send Accept: text/csv and save the response to a file.

Only ?format=csv is accepted — any other format value returns HTTP 422.

Both View Details and Export require only authentication; reporting has no permission gate.

Released under the MIT License.