Quickstart
1. Get your API key
Section titled “1. Get your API key”Sign in to the RoadGIS developer portal to get your API key.
2. Make your first route request
Section titled “2. Make your first route request”Request
POST https://dev-api.roadgis.dev/directions/v1Authorization: Bearer YOUR_API_KEYContent-Type: application/json
{ "profile": "auto", "locations": [ { "latLng": { "lat": 54.6872, "lng": 25.2797 } }, { "latLng": { "lat": 54.9097, "lng": 23.9136 } } ]}Response
{ "code": "Ok", "waypoints": [ { "id": null, "originalIndex": 0, "location": { "lat": 54.6872, "lng": 25.2797 } }, { "id": null, "originalIndex": 1, "location": { "lat": 54.9097, "lng": 23.9136 } } ], "routes": [ { "duration": 3560.542, "distance": 102.392, "legs": [ { "duration": 3560.542, "distance": 102.392, "geometry": "e~yhgBee..." } ] } ]}duration is in seconds, distance is in kilometres, geometry is a Google-encoded polyline.
Next steps
Section titled “Next steps”- Location types — route using addresses, not just coordinates
- Routing reference — all request parameters
- Optimized routing — automatic stop reordering