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 thresholdidle_min defines the minimum stop time that marks the end of a trip
  • Micro-movement filteringduration_min excludes short trips caused by GPS jitter or parking maneuvers
  • Subtotalssubtotals=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
startdatestringYesISO 8601 start date-time (e.g. 2026-03-01T00:00:00)
enddatestringYesISO 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 (1100)
offsetintegerNo0Records to skip

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