Skip to main content
GET
/
trips
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://your-api-host/trips?hardware_ids=ABC123&hardware_ids=DEF456&from=2025-12-01T00:00:00Z&to=2025-12-17T00:00:00Z"
{
  "trips": [
    {
      "hardware_id": "ABC123",
      "startTime": "2025-12-17T08:00:00.000Z",
      "endTime": "2025-12-17T08:45:00.000Z",
      "startLocation": { "lat": 37.7749, "long": -122.4194 },
      "endLocation": { "lat": 37.7899, "long": -122.401 },
      "distance": 5234,
      "duration": 2700,
      "maxSpeed": 45.2,
      "avgSpeed": 6.9,
      "pointCount": 54
    }
  ],
  "stops": [
    {
      "startTime": "2025-12-17T08:45:00.000Z",
      "endTime": "2025-12-17T09:30:00.000Z",
      "location": { "lat": 37.7899, "long": -122.401 },
      "duration": 2700
    }
  ],
  "summary": {
    "totalTrips": 1,
    "totalStops": 1,
    "totalDistance": 5234,
    "totalDuration": 2700,
    "totalStopDuration": 2700,
    "positionsAnalyzed": 120,
    "devicesQueried": 2,
    "configUsed": {
      "speedThreshold": 3,
      "minimalTripDuration": 300,
      "minimalTripDistance": 500,
      "minimalParkingDuration": 180,
      "minimalNoDataDuration": 1800,
      "minimalAvgSpeed": 1,
      "maxAcceleration": 10
    }
  }
}
Returns computed trips and stops from GPS telemetry for multiple devices. Trips are computed on-demand using motion detection.

Query parameters

from
string
required
ISO 8601 date string (start of time range).
to
string
required
ISO 8601 date string (end of time range). Max range: 31 days.
hardware_ids
string[]
Filter by hardware IDs. Repeated or comma-separated. Max 50 devices per request. Results are automatically scoped to devices you have access to.
speedThreshold
number
default:"3"
km/h — below this speed is considered stopped.
minimalTripDuration
number
default:"300"
Seconds — minimum moving time to count as a trip.
minimalTripDistance
number
default:"500"
Meters — minimum distance to count as a trip.
minimalParkingDuration
number
default:"180"
Seconds — minimum stopped time to end a trip.
minimalNoDataDuration
number
default:"1800"
Seconds — data gaps longer than this are treated as stops.
minimalAvgSpeed
number
default:"1"
km/h — minimum average speed to count as a trip.
maxAcceleration
number
default:"10"
m/s² — filter GPS spikes exceeding this value.

Response

trips
object[]
required
stops
object[]
required
summary
object
required
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://your-api-host/trips?hardware_ids=ABC123&hardware_ids=DEF456&from=2025-12-01T00:00:00Z&to=2025-12-17T00:00:00Z"
{
  "trips": [
    {
      "hardware_id": "ABC123",
      "startTime": "2025-12-17T08:00:00.000Z",
      "endTime": "2025-12-17T08:45:00.000Z",
      "startLocation": { "lat": 37.7749, "long": -122.4194 },
      "endLocation": { "lat": 37.7899, "long": -122.401 },
      "distance": 5234,
      "duration": 2700,
      "maxSpeed": 45.2,
      "avgSpeed": 6.9,
      "pointCount": 54
    }
  ],
  "stops": [
    {
      "startTime": "2025-12-17T08:45:00.000Z",
      "endTime": "2025-12-17T09:30:00.000Z",
      "location": { "lat": 37.7899, "long": -122.401 },
      "duration": 2700
    }
  ],
  "summary": {
    "totalTrips": 1,
    "totalStops": 1,
    "totalDistance": 5234,
    "totalDuration": 2700,
    "totalStopDuration": 2700,
    "positionsAnalyzed": 120,
    "devicesQueried": 2,
    "configUsed": {
      "speedThreshold": 3,
      "minimalTripDuration": 300,
      "minimalTripDistance": 500,
      "minimalParkingDuration": 180,
      "minimalNoDataDuration": 1800,
      "minimalAvgSpeed": 1,
      "maxAcceleration": 10
    }
  }
}