Skip to main content

Trips Report

Individual trip records with origin, destination, distance, duration, and fuel consumption per vehicle journey.

GET/apidev/v1/reports/avl/trips
PermissionAPICLI_RPTAVL_VIAJES
Rate Limit10 req/min (sliding window)
Cache300s (5 min)
Max Range31 days

Overview​

Breaks down vehicle activity into individual trips. A trip begins when a vehicle starts moving and ends when it remains stopped for a configurable duration.

  • Custom stop threshold — idle_min defines the minimum stop time that marks the end of a trip
  • Micro-movement filtering — duration_min excludes short trips caused by GPS jitter or parking maneuvers
  • Subtotals — subtotals=true includes aggregated summary rows

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 31 days
devicesstringNoAll visibleComma-separated device IDs. Max 500
idle_minintegerNo0Minimum stop time in minutes to end a trip
duration_minintegerNo0Minimum trip duration in minutes. Shorter trips are excluded
subtotalsbooleanNofalseInclude subtotal rows
limitintegerNo25Records per page (1–100)
offsetintegerNo0Records to skip
subtotals=true changes how limit behaves

The subtotal and grand-total rows are appended after the page has been cut, and the result is then trimmed back to limit. So with subtotals=true the response still returns at most limit rows, but some of that budget is spent on summary rows — you get fewer detail rows than a plain page of the same size.

Summary rows are not flagged in the payload. You can only recognise them by device_name: a per-device subtotal reads "<device name> (subtotal)" and the grand total reads "Total general". If you are aggregating the data yourself, filter those rows out or you will double-count.

meta.total always counts detail rows only. For a clean paginated read, leave subtotals off and compute your own totals.


Code Examples​

curl -s "https://$TENANT/apidev/v1/reports/avl/trips?startdate=2026-03-01T00:00:00&enddate=2026-03-15T23:59:59&limit=50&idle_min=5" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT"

Response Fields​

FieldTypeDescription
device_namestringDisplay name of the vehicle/device
person_namestringDriver(s) assigned during the trip. Empty string if none
trip_startstring | nullTimestamp when the trip started
trip_start_addressstring | nullReverse-geocoded address of the origin
trip_endstring | nullTimestamp when the trip ended
trip_end_addressstring | nullReverse-geocoded address of the destination
kmsnumberDistance traveled (km)
duration_minnumberTrip duration in minutes
idle_minnumberIdle time during the trip in minutes
max_speednumberMaximum speed recorded during the trip (km/h)
fuelnumberEstimated fuel consumed (liters). 0 if the vehicle has no consumption rate configured
costnumberEstimated fuel cost. 0 if the vehicle has no fuel price configured
temperaturenumberTemperature sensor 1 reading (°C). 0 if the vehicle has no sensor
Fuel and cost

fuel and cost are calculated using the consumption rate and fuel price configured per vehicle. If not configured, these return 0.

Example Response​

{
"success": true,
"data": [
{
"device_name": "Truck A-101",
"person_name": "Carlos Martinez",
"trip_start": "2026-03-05T07:15:00",
"trip_start_address": "Av. 18 de Julio 1234, Montevideo",
"trip_end": "2026-03-05T09:42:00",
"trip_end_address": "Ruta 1 km 42, San Jose",
"kms": 38.5,
"duration_min": 147,
"idle_min": 12,
"max_speed": 95,
"fuel": 4.62,
"cost": 6.93,
"temperature": 0
},
{
"device_name": "Van B-205",
"person_name": "Ana Lopez",
"trip_start": "2026-03-05T10:05:00",
"trip_start_address": "Bulevar Artigas 1550, Montevideo",
"trip_end": "2026-03-05T10:38:00",
"trip_end_address": "Av. Italia 3210, Montevideo",
"kms": 8.2,
"duration_min": 33,
"idle_min": 5,
"max_speed": 58,
"fuel": 0.98,
"cost": 1.47,
"temperature": 4.1
}
],
"meta": {
"total": 156,
"limit": 50,
"offset": 0
}
}

Errors​

CodeHTTPDescription
INVALID_DATE_RANGE400Date range exceeds the 31-day maximum, end before start, or non-ISO dates
VALIDATION_ERROR400Invalid params: missing dates, limit > 100, > 500 devices
UNAUTHORIZED401Missing, invalid, or expired tenant / Authorization / X-API-Key
FORBIDDEN403User lacks APICLI_RPTAVL_VIAJES permission
RATE_LIMITED429Exceeded 10 req/min
INTERNAL_ERROR500Unexpected server error