Route with Progorod
Build a driving route with the Progorod router, and read back which point it rejected.
This is route/get with the provider pinned to the Progorod router. Use it when the route must come from Progorod regardless of the account's default provider.
What differs from the generic operation is the failure detail. The errors array identifies which point Progorod rejected and why, down to the position of a bad waypoint.
API actions
API base path: /route/progorod.
Return a route calculated by the Progorod router. Identical to route/get with provider_type pinned to progorod; a provider_type sent here is ignored.
Progorod may reorder the waypoints. It is also the only provider that reads minsize and use_traffic; the other three accept them and ignore them.
Requires the routing tariff feature on every tracker on the account. Without it the call returns error 236.
Either a user session hash or an API key, with the "NVX " prefix, for example "NVX 22eac1c27af4be7b9d04da2ce1af111b". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.
Optional. Simplify the returned route to at most this many points.
Optional. Default 5. Smoothing threshold in metres. Setting it below the distance between two neighbouring pixels at the current zoom is not recommended.
Optional. Default false. When false the router runs in optimal mode ignoring traffic; when true it runs in comfort mode using it.
The route
true if request finished successfully.
trueTotal length in metres.
Total duration in seconds.
Bad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error 236: at least one tracker on the account lacks the routing tariff feature.
Error 215: the Progorod service failed. Error 218: Progorod rejected the parameters. The errors array holds objects with type, one of not_set, malformed or isolated; point, one of start, end, waypoint or all; and index, the position in waypoints, present only when point is waypoint.
Error response object
POST /v2/route/progorod/get HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 130
{
"start": {
"lat": 1,
"lng": 1
},
"end": {
"lat": 1,
"lng": 1
},
"waypoints": [
{
"lat": 1,
"lng": 1
}
],
"point_limit": 1,
"minsize": 1,
"use_traffic": true
}{
"success": true,
"distance": 1,
"time": 1,
"list": [
{
"lat": 1,
"lng": 1
}
],
"key_points": [
{
"id": 1,
"lat": 1,
"lng": 1,
"distance": 1,
"time": 1
}
]
}Errors
These errors come in addition to the general error codes:
215 - External service error.
218 - Malformed external service parameters. Each entry in the
errorsarray carriestype, one ofnot_set,malformed, andisolated, andpoint, one ofstart,end,waypoint, andall. An entry for a waypoint also carriesindex, the position of the bad point in the waypoints array.236 - Feature unavailable due to tariff restrictions, when at least one tracker in the request has no
routingtariff feature.
An error response looks like this:
Last updated
Was this helpful?