Skip to content

Reporting — Products

EndpointMethod
/api/admin/reporting/productsGET
/api/admin/reporting/products/viewGET
/api/admin/reporting/products/exportGET

Query Parameters

ParamTypeNotes
typeenumtotal-sold-quantities (default), total-products-added-to-wishlist, top-selling-products-by-revenue, top-selling-products-by-quantity, products-with-most-reviews, products-with-most-visits, last-search-terms, top-search-terms.
startdateStart date.
enddateEnd date.
channelstringChannel code.

Helper-method output

statistics shape depends on the chosen type.

View Details

GET /api/admin/reporting/products/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/products/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.