Locations API

Read-only access to GPS points. Honors trip visibility and privacy zones (filtered points are removed before the response leaves us).

Latest position

GET https://app.whereistereza.com/o/{org-slug}/api/t/live

Returns the most recent point across all sources, only if the organization currently has an active public trip.

{
  "lat": 42.7551,
  "lon": -1.6402,
  "alt": 430,
  "tst": "2026-04-25T08:00:00Z",
  "tracker_id": "iP",
  "stale_seconds": 12
}

stale_seconds is the age of the point. Useful for showing "Synced 12s ago" without doing math client-side.

Trip GPS points

GET https://app.whereistereza.com/o/{org-slug}/api/t/trips/{trip-id}/locations

Returns the full GPS stream of a trip after privacy-zone filtering. Can be large for long trips — typical Camino is 4–8 MB compressed.

{
  "points": [
    { "lat": 42.7551, "lon": -1.6402, "alt": 430, "tst": "2026-04-01T07:32:00Z", "tracker_id": "iP", "mode": "walking" },
    "..."
  ],
  "count": 18430,
  "trip_id": "abc123"
}

Query parameters:

Param Type Default Notes
from ISO trip start Filter to points after this timestamp
to ISO trip end Filter to points before this timestamp
max_points int 50000 Cap (sampled to fit if exceeded)

Matched route (snapped to roads)

GET https://app.whereistereza.com/o/{org-slug}/api/t/trips/{trip-id}/route-matched

For trip segments classified as driving / cycling / public transport, we run the GPS stream through the Mapbox Map Matching API to snap points to the actual road network. This endpoint returns the matched output.

{
  "points": [
    { "lat": 42.7551, "lon": -1.6402, "tst": "...", "edge_distance_m": 2.4 },
    "..."
  ],
  "input_points":  18430,
  "output_points": 17812
}

If matching has not run yet (trip still active, or no road segments), returns 404.

Errors

  • 401 — private trip without password.
  • 404 — trip doesn't exist, no matched data, or no active trip (for /api/t/live).

Notes

  • Privacy zone filtering applies to all location reads. Points inside a "snap to center" zone are replaced with the zone center; "remove" zones produce a gap.
  • Coordinates are WGS84 (the standard GPS lat/lng).
  • Timestamps are ISO 8601, always with timezone (UTC unless the org's display timezone is configured otherwise).

Need help? Contact support · Where Is Tereza?