Trips and ETAs

Live ETAs for deliveries, pickups and visits.

Start a trip to a destination geofence and every location update recalculates the ETA. MapSocket moves the trip from started to approaching to arrived on its own and sends each step to your webhooks, so customers and dispatchers see the same thing.

What you get

  • Statuses that move themselves

    started → approaching → arrived, then completed or canceled. Idle trips expire after 24 hours by default.

  • ETAs from real routes

    With routing switched on, ETAs come from Valhalla for car, truck, motorbike, bike or foot. Otherwise you get a straight-line estimate, labelled as one.

  • Late before it's late

    Give a scheduled arrival and each trip reports its delay and whether it's over your threshold (10 minutes by default).

  • Wrong door alerts

    Optionally fire an event when someone arrives at another geofence with the destination's tag, like the wrong store.

  • Your ids, one trip at a time

    Use your order id as the trip's externalId. A user has one active trip; starting a new one cancels the last. Optional project and task ids allow one active trip per task.

  • Safe from the app

    Publishable keys can start and update trips, so your driver app talks to MapSocket directly.

Try it

Copy this, swap in a key from your project, and run it.

Start a trip
curl -X POST https://api.mapsocket.com/v1/trips \
  -H "Authorization: pk_live_…" -H "Content-Type: application/json" \
  -d '{
    "externalId": "order-1041",
    "userId": "driver-118",
    "mode": "car",
    "destinationGeofenceTag": "store",
    "destinationGeofenceExternalId": "flatiron",
    "scheduledArrivalAt": "2026-11-04T16:53:20Z"
  }'
On the trip
{
  "status": "approaching",
  "eta": { "duration": 4.2, "distance": 1850, "source": "routing" },
  "delay": { "scheduledArrivalTimeDelay": -3.1, "delayed": false }
}

Good to know

  • One destination per trip: multi-stop routes need a trip per stop.
  • ETAs don't include live traffic.

Read more