TrackMe API Docs
API ReferenceAdmin: Financial reports

Admin financial reports by period.

Rolls revenue + refunds into the requested grain. `?period=day|month` (default `day`). `?from` / `?to` are inclusive UTC ISO-8601 bounds. Omit both for the trailing 30 days.

GET
/api/v1/admin/financial-reports

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

Query Parameters

period?unknown
from?unknown
to?unknown

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/admin/financial-reports"
{  "data": {    "period": "day",    "from": "2026-05-14T00:00:00.000Z",    "to": "2026-05-20T23:59:59.999Z",    "rows": [      {        "bucket": "2026-05-14",        "serviceType": "featured_truck",        "currencyCode": "SAR",        "grossMinor": 39600,        "count": 4      },      {        "bucket": "2026-05-15",        "serviceType": "featured_truck",        "currencyCode": "SAR",        "grossMinor": 19800,        "count": 2      },      {        "bucket": "2026-05-15",        "serviceType": "job_advertisement",        "currencyCode": "EGP",        "grossMinor": 29800,        "count": 2      },      {        "bucket": "2026-05-20",        "serviceType": "featured_truck",        "currencyCode": "SAR",        "grossMinor": 9900,        "count": 1      }    ]  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "AUTH_REQUIRED",    "message": "Authentication is required to access this resource."  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "FORBIDDEN",    "message": "You are not allowed to perform this action."  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}
{  "error": {    "code": "VALIDATION_ERROR",    "message": "One or more fields are invalid.",    "fields": [      {        "path": "email",        "rule": "email",        "message": "Must be a valid email address."      }    ]  },  "meta": {    "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7"  }}