On this page6 sections
POST/api/dashboard/sales-performanceDashboardPermission: dashboard.view
Get Sales Performance Dashboard
Aggregated realtime dashboard endpoint computing total revenue, top outlets, top products by quantity and revenue, daily charts, recent invoices, and today/date/month/year comparisons based strictly on `Invoice.createdAt`.
Authentication: Requires Authorization: Bearer <ACCESS_TOKEN> (Supabase JWT, OAuth2 M2M token, or integration token).
Outlet Scope Enforcement: Results and mutations are automatically scoped to the actor's accessible outlets when the
invoicemodule restriction applies.
Request
Provide the following fields in the request payload.
No request body parameters are required for this endpoint.
Responses
Select a status code to inspect schema.
OK — Aggregated dashboard metrics retrieved.application/json
successenum('true')
Success (true).
messagestring
Message.
dataobject | null
Response payload or null.
POST/api/dashboard/sales-performance
curl -X POST "https://api.invoger.com/api/dashboard/sales-performance" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{}'Interactive playground
Response
application/json
{
"success": true,
"message": "Success",
"data": {
"totalSales": 12500000,
"bestOutlet": {
"outletName": "Outlet Senopati",
"outletSales": 8200000
},
"topOutlets": [],
"bestProductsByQty": [],
"bestProductsByRevenue": [],
"chartData": [
{
"date": "2026-11-26",
"revenue": 1450000
}
],
"recentInvoices": [],
"invoiceCount": 142,
"inputStats": {
"todayCount": 12
},
"comparisons": {
"date": {},
"month": {},
"year": {}
}
}
}