Skip to main content

Fleet Efficiency Report

Operational KPIs per vehicle group — finished-task counts and distance totals, with placeholders for GPS-derived idle and CO2 metrics.

GET/apidev/v1/reports/gt/fleet-efficiency
PermissionAPICLI_RPTGT_EFICIENCIAFLOTA
Rate Limit10 req/min
Cache300s
Max Range92 days

Overview​

This report returns fleet operational metrics for finished tasks, aggregated per group — by provider, device, driver, service type, cause, geography, date, and more. Each row reports the task count plus distance totals (sum, average, minimum, maximum) over the selected period. Choose how rows are grouped with group_by (defaults to provider).

The idle_ratio_pct and co2_estimado_kg fields are returned as placeholders set to 0. These metrics are derived from raw GPS tracking and are computed in the application layer rather than in this aggregate endpoint, so they are present in the response shape for forward compatibility but are not populated here.


Request​

Request Headers​

Every request to a protected endpoint requires these headers:

HeaderRequiredDescription
AuthorizationYesBearer token obtained from the Login endpoint. Format: Bearer <token>
X-API-KeyYesCompany integration key provided during onboarding. Format: gtk_xxx...
tenantYesYour assigned tenant domain (default: geotareas.com) — always send your assigned tenant
Content-TypeConditionalapplication/json — required for POST and PUT requests

Query Parameters​

ParameterTypeRequiredDefaultDescription
startdatestringYes—ISO 8601 start date-time (e.g. 2026-03-01T00:00:00).
enddatestringYes—ISO 8601 end date-time. Max range 92 days from startdate.
group_bystringNoproviderHow rows are grouped. One of: provider, device, driver, cause, subcause, service_type, product, origin, shift, end_code, comm_media, route, country, department, city, zone, client, telephonist, operator, resource_type, date, month, weekday, hour.
devicesstringNo—Comma-separated device IDs. Max 500.
driversstringNo—Comma-separated driver IDs. Max 500.
providersstringNo—Comma-separated provider IDs. Max 100.
service_typesstringNo—Comma-separated service type IDs. Max 100.
causesstringNo—Comma-separated cause IDs. Max 100.
subcausesstringNo—Comma-separated subcause IDs. Max 100.
statusesstringNo—Comma-separated task status codes. Max 100.
device_groupsstringNoAllComma-separated device type IDs (the device_group catalog from Fleet / Devices). Filters tasks to devices of those types; combines with devices as an intersection. Max 100
originsstringNo—Comma-separated origin IDs. Max 100.
route_idsstringNo—Comma-separated route IDs. Max 100.
operatorsstringNo—Comma-separated operator IDs. Max 100.
client_idstringNo—Single client ID.
account_idstringNo—Single account ID.
shift_idstringNo—Single shift ID.
limitintegerNo25Number of records per page (1–100).
offsetintegerNo0Number of records to skip for pagination.
How device_groups combines with devices

device_groups is expanded to every device of those types, and if you also send devices, only the devices present in both lists are kept. If that intersection is empty the report returns no rows.


Code Examples​

curl -s -H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
"https://$TENANT/apidev/v1/reports/gt/fleet-efficiency?startdate=2026-03-01T00:00:00&enddate=2026-03-15T23:59:59&group_by=device&limit=25"

Response​

Response Fields​

FieldTypeDescription
group_labelstringDisplay name of the group (e.g. device, driver, provider).
group_idstring | nullInternal ID of the group, or null when not resolvable.
totalnumberTotal finished tasks in the group.
dist_totalnumberTotal distance across the group's tasks.
dist_promnumberAverage distance per task.
dist_maxnumberMaximum single-task distance.
dist_minnumberMinimum non-zero single-task distance.
idle_ratio_pctnumberPlaceholder for GPS-derived idle ratio. Always 0 from this endpoint.
co2_estimado_kgnumberPlaceholder for GPS-derived estimated CO2. Always 0 from this endpoint.

Example Response​

{
"success": true,
"data": [
{
"group_label": "Truck A-101",
"group_id": "55012",
"total": 138,
"dist_total": 4210,
"dist_prom": 31,
"dist_max": 92,
"dist_min": 4,
"idle_ratio_pct": 0,
"co2_estimado_kg": 0
}
],
"meta": {
"total": 1,
"limit": 25,
"offset": 0
}
}

Errors​

CodeHTTPDescription
VALIDATION_ERROR400Invalid params: missing dates, range > 92 days, invalid enum values.
UNAUTHORIZED401Missing, invalid, or expired tenant / Authorization / X-API-Key
FORBIDDEN403User lacks required permission.
RATE_LIMITED429Exceeded 10 req/min.
INTERNAL_ERROR500Unexpected server error.