Build with the
OGA Route API
Integrate our world-class routing algorithms directly into your ERP, internal tools, or custom mobile applications.
Authentication
The OGA Route API uses Bearer tokens to authenticate requests. You can generate a token from your developer dashboard. Include it in the `Authorization` header of all API calls.
bash
curl -X GET "https://api.ogaroute.com/v1/health" \
-H "Authorization: Bearer oga_live_xyz123abc987..."POST
/v1/routes/optimize
Takes an array of unsorted stops and a starting depot, and returns a mathematically optimized route sequence minimizing total travel time mapping to true street paths.
Request Body
depot *req
Object containing `lat` and `lng` for the starting location.
stops *req
Array of objects, maximum 200 items per request. Each must contain `id`, `lat`, and `lng`.
vehicleType
String: `car`, `truck`, `bicycle`. Defaults to `truck`. Effects routing road constraints.
Example Request Payload
{
"depot": { "lat": 37.7749, "lng": -122.4194 },
"stops": [
{ "id": "stop_1", "lat": 37.7813, "lng": -122.4069 },
{ "id": "stop_2", "lat": 37.7952, "lng": -122.4028 }
],
"vehicleType": "truck"
}Success Response (200 OK)
{
"route_id": "rt_987654321",
"status": "optimized",
"total_distance_meters": 4200,
"total_duration_seconds": 650,
"optimized_sequence": [
{ "id": "stop_2", "eta_seconds": 210 },
{ "id": "stop_1", "eta_seconds": 440 }
]
}Webhooks & Events
Instead of polling the API to check if a delivery is complete, register a webhook URL to receive real-time POST requests whenever critical events occur in your fleet.
- route.started - Emitted when a driver begins their route.
- stop.completed - Emitted upon successful ePOD signature capture.
- stop.failed - Emitted if a driver marks an address as undeliverable.
- route.completed - Emitted when the driver returns to the depot.