curl -H "X-API-Key: YOUR_API_KEY" \
"https://your-api-host/trips/active?hardware_ids=ABC123&hardware_ids=DEF456"
{
"activeTrips": [
{
"hardware_id": "ABC123",
"speed": 19.6,
"last_position_at": "2025-12-17T10:30:00.000Z",
"last_position_age_seconds": 24,
"location": { "lat": 37.7749, "long": -122.4194 },
"trip": {
"startTime": "2025-12-17T09:50:00.000Z",
"endTime": "2025-12-17T10:30:00.000Z",
"startLocation": { "lat": 37.7601, "long": -122.4312 },
"endLocation": { "lat": 37.7749, "long": -122.4194 },
"distance": 5234,
"duration": 2400,
"maxSpeed": 45.2,
"avgSpeed": 7.8,
"pointCount": 54
}
}
],
"summary": {
"activeCount": 1,
"devicesQueried": 2,
"configUsed": {
"speedThreshold": 3,
"minimalTripDuration": 300,
"minimalTripDistance": 500,
"minimalParkingDuration": 180,
"minimalNoDataDuration": 1800,
"minimalAvgSpeed": 1,
"maxAcceleration": 10
},
"maxAgeSeconds": 300,
"lookbackSeconds": 14400
}
}
Trips
Get Active Trips
Get devices currently in motion with their active trip data.
GET
/
trips
/
active
curl -H "X-API-Key: YOUR_API_KEY" \
"https://your-api-host/trips/active?hardware_ids=ABC123&hardware_ids=DEF456"
{
"activeTrips": [
{
"hardware_id": "ABC123",
"speed": 19.6,
"last_position_at": "2025-12-17T10:30:00.000Z",
"last_position_age_seconds": 24,
"location": { "lat": 37.7749, "long": -122.4194 },
"trip": {
"startTime": "2025-12-17T09:50:00.000Z",
"endTime": "2025-12-17T10:30:00.000Z",
"startLocation": { "lat": 37.7601, "long": -122.4312 },
"endLocation": { "lat": 37.7749, "long": -122.4194 },
"distance": 5234,
"duration": 2400,
"maxSpeed": 45.2,
"avgSpeed": 7.8,
"pointCount": 54
}
}
],
"summary": {
"activeCount": 1,
"devicesQueried": 2,
"configUsed": {
"speedThreshold": 3,
"minimalTripDuration": 300,
"minimalTripDistance": 500,
"minimalParkingDuration": 180,
"minimalNoDataDuration": 1800,
"minimalAvgSpeed": 1,
"maxAcceleration": 10
},
"maxAgeSeconds": 300,
"lookbackSeconds": 14400
}
}
Returns devices currently in motion based on each device’s latest GPS sample. Results are automatically scoped to devices you have access to.
Query parameters
string[]
Filter by hardware IDs. Repeated or comma-separated.
number
default:"300"
Maximum age of latest GPS sample in seconds. Devices with older data are excluded.
number
default:"14400"
How far back to load GPS history for trip detection.
number
default:"3"
km/h — below this speed is considered stopped.
number
default:"300"
Seconds — minimum moving time to count as a trip.
number
default:"500"
Meters — minimum distance to count as a trip.
number
default:"180"
Seconds — minimum stopped time to end a trip.
number
default:"1800"
Seconds — data gaps longer than this are treated as stops.
number
default:"1"
km/h — minimum average speed to count as a trip.
number
default:"10"
m/s² — filter GPS spikes exceeding this value.
Response
object[]
required
Show Active trip object
Show Active trip object
object
required
curl -H "X-API-Key: YOUR_API_KEY" \
"https://your-api-host/trips/active?hardware_ids=ABC123&hardware_ids=DEF456"
{
"activeTrips": [
{
"hardware_id": "ABC123",
"speed": 19.6,
"last_position_at": "2025-12-17T10:30:00.000Z",
"last_position_age_seconds": 24,
"location": { "lat": 37.7749, "long": -122.4194 },
"trip": {
"startTime": "2025-12-17T09:50:00.000Z",
"endTime": "2025-12-17T10:30:00.000Z",
"startLocation": { "lat": 37.7601, "long": -122.4312 },
"endLocation": { "lat": 37.7749, "long": -122.4194 },
"distance": 5234,
"duration": 2400,
"maxSpeed": 45.2,
"avgSpeed": 7.8,
"pointCount": 54
}
}
],
"summary": {
"activeCount": 1,
"devicesQueried": 2,
"configUsed": {
"speedThreshold": 3,
"minimalTripDuration": 300,
"minimalTripDistance": 500,
"minimalParkingDuration": 180,
"minimalNoDataDuration": 1800,
"minimalAvgSpeed": 1,
"maxAcceleration": 10
},
"maxAgeSeconds": 300,
"lookbackSeconds": 14400
}
}