[ Whereis® API Home ] [ JSON API Home ] [ Services ] [ Route Services ]

Use this service to calculate up to three alternate routes for an existing specified route. The alternate routes will have the same options as the existing route (e.g. vehicle, fastest, no tolls), but will deviate from it based on an allowable percentage difference. This service will return complete routes with geometry.

URL

HTTP Post to <ENDPOINT>/service/route/altroutes

Request format

{
	"id":<string>,
	"count":<int>,
	"startPercent": <int>,
	"endPercent":<int>,
    "deviation": <int>
}

Rules

Parameter

Mandatory?

Description

id

Y

ID of the existing route

count

N

Maxiumum number of routes to calculate.

Default =  3

startPercentN

Percentage difference from start of route

Default = 10

endPercentN

Percentage difference from end of route

Default = 10

deviation

N

Percentage difference for entire route. Practical minimum is 100, because 100 or less means the route will be identical.

Default=150

Sample request

{
    "id":"TrcXPyOLvV5TIAJI",
    "count":2
}

Sample response

For a full explanation of the returned route object, see <route>.

{
    "altRoutes":[<route>]
 }

Convenience request

You can also request alternate routes by passing in a route ID an the request path, e.g.:

HTTP Post to <ENDPOINT>/service/route/altroutes/<route_id>

 

NOTES
Alternate routes may take some time to calculate, particularly when there are multiple waypoints
Icon

This response uses the following object: