API Documentation

Navora provides three REST APIs for route optimization and navigation. All endpoints accept JSON via POST, require authentication, and return JSON responses.

Base URL

https://resolt-navora-api.azurewebsites.net

All endpoint paths below are relative to this base URL.

Authentication

Every request must include your accountId and apiKey in the JSON body. These are validated against your account on every call. If invalid or suspended, the API returns 401 Unauthorized.

// Include in every request body { "accountId": "your-account-guid", "apiKey": "your-api-key", ... }

Error Handling

StatusMeaning
200Success
400Bad request — invalid input, too many tasks/vehicles, or route could not be calculated
401Unauthorized — invalid accountId or apiKey, or account suspended
500Internal server error — includes detail message

Error responses return JSON: { "error": "description" }



POST /api/route

Multi-stop ordered routing. Supply a sequence of locations and receive a route that visits them in the exact order provided. Returns the same response format as /api/navigate.

Request Body
FieldTypeRequiredDescription
accountIdstringYesYour account GUID
apiKeystringYesYour API key
locationsGeoLocation[]YesOrdered list of stops (minimum 2)
profilestringNoCar (default) or Bike
preferencestringNoFastest (default) or Shortest
Example Request
POST https://resolt-navora-api.azurewebsites.net/api/route Content-Type: application/json { "accountId": "6ffdea07-8957-49ba-9e0b-5dbce4b86d87", "apiKey": "your-api-key", "profile": "Car", "preference": "Fastest", "locations": [ { "latitude": -26.2041, "longitude": 28.0473 }, { "latitude": -26.1452, "longitude": 28.0364 }, { "latitude": -26.1076, "longitude": 28.0567 }, { "latitude": -25.9891, "longitude": 28.1275 } ] }
Response

Same format as /api/navigate response — distanceKm, duration, encodedPolyline, and steps.


POST /api/optimize

Fleet Matrix Routing — assign tasks to vehicles optimally. Supports capacity constraints, time windows, multi-depot, chained stops, priority levels, vehicle specialties, and four quality tiers.

Request Body
FieldTypeRequiredDescription
accountIdstringYesYour account GUID
apiKeystringYesYour API key
tasksRouteTask[]YesTasks to assign (max 200)
vehiclesVehicle[]YesAvailable vehicles (max 20)
modestringNoBalanced (default), Shortest, or Fastest
qualitystringNoQuick (default), Standard, Refined, or Exhaustive
chainsTaskChain[]NoTask ordering constraints
departureTimeDateTimeOffsetNoDeparture time (defaults to UTC now)
includeGeometryboolNoInclude road polylines per route (default: false)
clusterBeforeRouteboolNoSpatially cluster tasks before routing — one cluster per vehicle, seeded at each depot. Improves geographic cohesion for large, spread-out fleets. Default: false
territoryFallbackstringNoFree (default) — tasks outside all territories are routed freely. NearestTerritory — out-of-polygon tasks are hard-assigned to the vehicle whose territory centroid is nearest.
Example Request
POST https://resolt-navora-api.azurewebsites.net/api/optimize Content-Type: application/json { "accountId": "6ffdea07-8957-49ba-9e0b-5dbce4b86d87", "apiKey": "your-api-key", "mode": "Balanced", "quality": "Refined", "includeGeometry": false, "vehicles": [ { "id": "v1", "name": "Small Van", "startDepot": { "id": "depot-1", "name": "JHB Central", "location": { "latitude": -26.2041, "longitude": 28.0473 } }, "endDepot": { "id": "depot-1", "name": "JHB Central", "location": { "latitude": -26.2041, "longitude": 28.0473 } }, "capacity": 50, "required": true } ], "tasks": [ { "id": "t1", "name": "Deliver to Sandton", "location": { "latitude": -26.1076, "longitude": 28.0567 }, "type": "Delivery", "serviceDuration": "00:10:00", "demand": 15 } ] }
Response
{ "accountId": "6ffdea07-8957-49ba-9e0b-5dbce4b86d87", "solution": { "quality": "Refined", "mode": "Balanced", "totalDistanceKm": 42.5, "totalDuration": "01:15:00", "computedAt": "2025-01-15T10:30:00Z", "routes": [ { "vehicleId": "v1", "vehicleName": "Small Van", "stops": [ ... ], "distanceKm": 42.5, "duration": "01:15:00" } ], "unassignedTasks": [] } }

Territory Planning

Territory planning lets you define a geographic boundary (polygon) per vehicle. Any task whose location falls inside that polygon is automatically hard-assigned to that vehicle before the solver runs — no specialty tags or manual assignedVehicleId required.

This is ideal for fleets where drivers own fixed service areas: sales regions, delivery zones, franchise territories, or field service districts. The solver still optimises the sequence of stops within each territory — you define who serves an area, Navora figures out how.

How it works
  1. Add a territory polygon (ordered list of GeoLocation points, minimum 3) to any vehicle.
  2. Set territoryFallback on the request to control what happens to tasks that fall outside all polygons.
  3. Submit a normal /api/optimize request — territory assignment happens automatically before clustering and solving.
Overlapping territories

When polygons overlap, the first matching vehicle in the vehicles array wins. Tasks with an explicit assignedVehicleId are never overridden by territory assignment.

Example
POST https://resolt-navora-api.azurewebsites.net/api/optimize Content-Type: application/json { "accountId": "6ffdea07-8957-49ba-9e0b-5dbce4b86d87", "apiKey": "your-api-key", "mode": "Balanced", "quality": "Refined", "territoryFallback": "NearestTerritory", "vehicles": [ { "id": "v-north", "name": "North Region", "startDepot": { "id": "d1", "name": "JHB", "location": { "latitude": -26.115, "longitude": 28.073 } }, "endDepot": { "id": "d1", "name": "JHB", "location": { "latitude": -26.115, "longitude": 28.073 } }, "territory": [ { "latitude": -25.70, "longitude": 27.80 }, { "latitude": -25.70, "longitude": 28.40 }, { "latitude": -26.10, "longitude": 28.40 }, { "latitude": -26.10, "longitude": 27.80 } ] }, { "id": "v-south", "name": "South Region", "startDepot": { "id": "d1", "name": "JHB", "location": { "latitude": -26.115, "longitude": 28.073 } }, "endDepot": { "id": "d1", "name": "JHB", "location": { "latitude": -26.115, "longitude": 28.073 } }, "territory": [ { "latitude": -26.10, "longitude": 27.80 }, { "latitude": -26.10, "longitude": 28.40 }, { "latitude": -26.50, "longitude": 28.40 }, { "latitude": -26.50, "longitude": 27.80 } ] } ], "tasks": [ { "id": "t1", "name": "Pretoria delivery", "location": { "latitude": -25.7461, "longitude": 28.1881 }, "type": "Delivery", "demand": 1 }, { "id": "t2", "name": "Soweto delivery", "location": { "latitude": -26.2677, "longitude": 27.8587 }, "type": "Delivery", "demand": 1 } ] }

In this example, t1 (Pretoria) falls inside the north polygon → assigned to v-north. t2 (Soweto) falls inside the south polygon → assigned to v-south. With NearestTerritory, any task outside both polygons would be assigned to whichever territory centroid is closest.


Enums

All enums can be passed as string names or integer values.

NavigationProfile
Car0Standard driving profile
Bike1Bicycle routing
RoutePreference
Fastest0Minimise travel time
Shortest1Minimise distance
OptimizationMode
Balanced0Balance distance and time
Shortest1Minimise total distance
Fastest2Minimise total time
SolutionQuality
Quick0~5 seconds
Standard1~15 seconds
Refined2~30 seconds
Exhaustive3~120 seconds
RouteTaskType
Delivery0Drop-off task
Collection1Pick-up task
Service2On-site service
TerritoryFallback
Free0Out-of-polygon tasks routed freely by solver
NearestTerritory1Assigned to vehicle with nearest territory centroid

Models

GeoLocation
FieldTypeDescription
latitudedoubleLatitude in decimal degrees
longitudedoubleLongitude in decimal degrees
Vehicle
FieldTypeRequiredDescription
idstringYesUnique vehicle identifier
namestringYesDisplay name
startDepotDepotYesWhere the vehicle starts
endDepotDepotYesWhere the vehicle returns
capacitydouble?NoLoad capacity
maxTasksint?NoMaximum tasks this vehicle can handle
maxDistanceKmdouble?NoMaximum route distance
maxDurationTimeSpan?NoMaximum route duration
requiredboolNoIf true, vehicle must be used
specialtiesstring?NoComma-delimited specialties (e.g. "refrigerated,hazmat")
territoryGeoLocation[]?NoOptional territory polygon (minimum 3 points). Tasks inside this polygon are automatically hard-assigned to this vehicle. See Territory Planning.
Depot
FieldTypeRequiredDescription
idstringYesUnique depot identifier
namestringYesDisplay name
locationGeoLocationYesDepot coordinates
RouteTask
FieldTypeRequiredDescription
idstringYesUnique task identifier
namestringYesDisplay name
locationGeoLocationYesTask coordinates
typestringNoDelivery (default), Collection, or Service
serviceDurationTimeSpan?NoTime spent at location
timeWindowTimeWindow?NoEarliest/latest arrival constraint
priorityintNo1 (default) = normal, higher = more important
demanddoubleNoLoad demand (counted against vehicle capacity)
chainIdstring?NoChain group identifier
chainOrderintNoOrder within the chain
specialtiesstring?NoComma-delimited specialties the assigned vehicle must have (e.g. "refrigerated")
assignedVehicleIdstring?NoHard assignment — the task must be served by this vehicle. The solver will not assign it to any other vehicle.
preferredVehicleIdstring?NoSoft preference — the solver will prefer this vehicle but may reassign if constraints cannot be met. A penalty is applied for using a different vehicle.
TaskChain
FieldTypeRequiredDescription
chainIdstringYesMatches the chainId on tasks
taskIdsstring[]YesOrdered list of task IDs in this chain
allowInterleavedStopsboolNoIf true, other stops may appear between chained tasks
TimeWindow
FieldTypeDescription
earliestDateTimeOffsetEarliest allowed arrival
latestDateTimeOffsetLatest allowed arrival