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

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
trip_startstring | nullTimestamp when the trip started
trip_start_addressstring | nullReverse-geocoded address of the origin
trip_start_latnumber | nullLatitude of the origin
trip_start_lonnumber | nullLongitude of the origin
trip_endstring | nullTimestamp when the trip ended
trip_end_addressstring | nullReverse-geocoded address of the destination
trip_end_latnumber | nullLatitude of the destination
trip_end_lonnumber | nullLongitude of the destination
kmsnumberDistance traveled (km)
duration_minnumberTrip duration in minutes
idle_minnumberIdle time during the trip in minutes
max_speednumberMaximum speed recorded (km/h)
fuelnumberEstimated fuel consumed (liters)
costnumberEstimated fuel cost
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",
"trip_start": "2026-03-05T07:15:00",
"trip_start_address": "Av. 18 de Julio 1234, Montevideo",
"trip_start_lat": -34.9011,
"trip_start_lon": -56.1645,
"trip_end": "2026-03-05T09:42:00",
"trip_end_address": "Ruta 1 km 42, San Jose",
"trip_end_lat": -34.3426,
"trip_end_lon": -56.7135,
"kms": 38.5,
"duration_min": 147,
"idle_min": 12,
"max_speed": 95,
"fuel": 4.62,
"cost": 6.93
},
{
"device_name": "Van B-205",
"trip_start": "2026-03-05T10:05:00",
"trip_start_address": "Bulevar Artigas 1550, Montevideo",
"trip_start_lat": -34.8941,
"trip_start_lon": -56.1592,
"trip_end": "2026-03-05T10:38:00",
"trip_end_address": "Av. Italia 3210, Montevideo",
"trip_end_lat": -34.8763,
"trip_end_lon": -56.1284,
"kms": 8.2,
"duration_min": 33,
"idle_min": 5,
"max_speed": 58,
"fuel": 0.98,
"cost": 1.47
}
],
"meta": {
"total": 156,
"limit": 50,
"offset": 0
}
}

Errors

CodeHTTPDescription
BAD_REQUEST400Missing required headers
VALIDATION_ERROR400Invalid params: missing dates, range > 31 days, malformed ISO date, limit > 100, > 500 devices
UNAUTHORIZED401Invalid or expired JWT / API Key
FORBIDDEN403User lacks APICLI_RPTAVL_VIAJES permission
RATE_LIMITED429Exceeded 10 req/min
INTERNAL_ERROR500Unexpected server error