osrmroute
DocsQuickstart
Docs

Operational planning APIs

These APIs support dispatch decisions and customer-owned operational records. They are bounded models: they do not provide live traffic, legal clearance, real-time tracking, or a guarantee that a route, facility or delivery will succeed.

Trip Analytics: visit proof

Submit timestamped GPS samples with optional geofences, checkpoints and planned geometry. The API map-matches the trace and returns observed visits, checkpoint status, dwell time and deviation from the submitted plan.

POST /api/v1/trip-analytics/visit-proof · scope: trip-analytics · 2 credits · 2–500 samples

Visit evidence request
curl --fail-with-body -X POST https://osrmroute.com/api/v1/trip-analytics/visit-proof \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "trace": [
    {
      "coordinate": [
        49.8516,
        40.3755
      ],
      "timestamp": "2026-11-16T08:00:00Z"
    },
    {
      "coordinate": [
        49.86,
        40.38
      ],
      "timestamp": "2026-11-16T08:05:00Z"
    }
  ],
  "checkpoints": [
    {
      "id": "delivery-42",
      "location": [
        49.86,
        40.38
      ],
      "radius_m": 100
    }
  ]
}'

The operation is stateless: submitted coordinates, timestamps and customer-defined fences are not retained. Results are inferred from submitted samples, never legal or real-time proof of presence.

Truck fleet optimization

For a mixed fleet, each exact vehicle dimension and weight tuple receives a separate static truck matrix before VROOM assigns work. The solution is checked against those same vehicle-specific legs.

POST /api/v1/truck/optimize · scope: route · up to 8 vehicles and 40 task endpoints

Heterogeneous truck request
curl --fail-with-body -X POST https://osrmroute.com/api/v1/truck/optimize \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "vehicles": [
    {
      "id": "truck-1",
      "start": [
        49.8516,
        40.3755
      ],
      "vehicle": {
        "height_m": 3.8,
        "weight_t": 12
      }
    }
  ],
  "services": [
    {
      "id": 1,
      "location": [
        49.86,
        40.38
      ]
    }
  ]
}'

Unreachable or poorly snapped matrix cells are refunded. The solver does not claim global optimality; conditional restrictions, hazardous-goods rules, legally verified clearance and live traffic are outside its evidence.

Routing policies: immutable request admission

A routing policy is a workspace-owned, versioned contract that fixes a travel profile, permitted operations and allowed GeoJSON areas.

Create or replace it in the dashboard, then optionally bind its ID to an API key. Requests use an immutable id@version reference; a bound key rejects other policies.

Request admission
curl --fail-with-body 'https://osrmroute.com/api/1/matrix' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"points":[[40.3755,49.8516],[40.38,49.86]],"routing_policy":"POLICY_UUID@1"}'

Policies are checked before the route, matrix, VRP or isochrone engine. They do not modify the OSRM graph, add legal restrictions, create a custom cost model or guarantee geographic completeness.

Before using these APIs

Use a workspace-owned Bearer key with the documented scope, retain your own business records where needed, and handle unknown coverage, unavailable matrices and unassigned work in your application. Review the interactive API Reference for the complete schema and error contract.

OSRMRoute Support

Talk directly to our team

HERE TO HELP

How can we help?

Send a message. Ticket replies are also sent to your verified email.

Your chats

Your chats will appear here.