Admin Reporting: Overview
Reporting — overview
Aggregate headline stats across sales/customers/products. Use ?type= for the stat group; ?start=, ?end=, ?channel= to bound the period.
get/reporting/stats
Request
- Base URLhttp://localhost:8000/api/admin
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
typestring
Stat group: total-sales (default), total-orders, total-customers, top-selling-products-by-revenue.
startstring date
Start date (YYYY-MM-DD).
endstring date
End date (YYYY-MM-DD).
channelstring
Channel code.
Response
AdminReportingOverview collection
Example response
[
{
"statistics": {
"sales": {
"previous": 27178.38,
"current": 9697.53,
"formatted_total": "$9,697.53",
"progress": -64.32
},
"over_time": {
"previous": [
{
"label": "10 Apr",
"total": "8526.82",
"count": 12
}
],
"current": [
{
"label": "10 May",
"total": "8500.00",
"count": 12
}
]
}
}
}
]Changes
No recorded changes to this operation across all 8 revisions of this API.