TrackMe API Docs
API ReferenceOwner: Analytics

KPI snapshot for the caller's trucks.

Trucks owned, trucks open right now, orders + revenue over the last 7 days, review count + average rating, and the top-selling menu item over the last 7 days. Cached for 60s per owner.

GET
/api/v1/owner/analytics/overview

Authorization

bearerAuth
AuthorizationBearer <token>

AdonisJS access-token guard (middleware.auth({ guards: ["api"] })). Send Authorization: Bearer <oat_…> (issued by /auth/register, /auth/login, /auth/social/{google,apple}, or /auth/guest).

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/owner/analytics/overview"
{  "data": {    "trucksOwned": 2,    "trucksOpenNow": 1,    "ordersLast7Days": 142,    "revenueLast7DaysMinor": 384200,    "reviewsCount": 218,    "complaintsCount": 3,    "averageRating": 4.7,    "topItem": {      "menuItemId": "mit_01jq8z5e0f1g2h3j4k5l6m7n8p",      "name": "Smash Double",      "orders": 47    }  },  "meta": {    "requestId": "req_01jq8z9m1n2p3q4r5s6t7u8v9w"  }}
{  "error": {    "code": "AUTH_REQUIRED",    "message": "Authentication is required to access this resource."  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}