Docs
Api reference

Dashboard

GET
/api/dashboard

Returns aggregated data for restaurant dashboard including orders, customers, revenue, and menu statistics

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

period?string
Default"today"

Value in

  • "today"
  • "week"
  • "month"
  • "year"
timezone?string

Timezone for date calculations (e.g., 'America/New_York')

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/dashboard"
{  "success": true,  "data": {    "period": "today",    "dateRange": {      "start": "string",      "end": "string"    },    "overview": {      "totalOrders": 0,      "totalRevenue": 0,      "averageOrderValue": 0,      "totalCustomers": 0,      "totalMenuItems": 0,      "totalCategories": 0,      "totalReservations": 0    },    "growth": {      "orderGrowth": 0,      "revenueGrowth": 0    },    "orderStats": {      "byStatus": [        {          "status": "string",          "count": 0        }      ],      "total": 0    },    "tableStats": [      {        "status": "string",        "count": 0      }    ],    "topMenuItems": [      {        "name": "string",        "price": 0,        "category": {          "name": "string"        },        "totalQuantitySold": 0,        "orderCount": 0      }    ],    "recentOrders": [      {        "id": 0,        "customerName": "string",        "customerPhone": "string",        "totalAmount": 0,        "status": "string",        "orderType": "string",        "tableNumber": "string",        "itemCount": 0,        "createdAt": "string"      }    ]  }}