TrackMe API Docs
API ReferenceOwner: Analytics

Review-rating distribution across the caller's trucks.

GET
/api/v1/owner/analytics/reviews

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/reviews"
{  "data": {    "total": 218,    "averageRating": 4.7,    "stars": [      {        "stars": 5,        "count": 168      },      {        "stars": 4,        "count": 32      },      {        "stars": 3,        "count": 12      },      {        "stars": 2,        "count": 4      },      {        "stars": 1,        "count": 2      }    ]  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "AUTH_REQUIRED",    "message": "Authentication is required to access this resource."  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}