v15
latestOpenAPI 3.1.02026-07-1295183803.5 KBOptimization
Nextbillion.ai Optimization API computes and returns an optimized route between an origin and destination which have multiple stop points in between. With NextBillion.ai's Route Optimization API you get.
Optimized routing between way points
Highly accurate ETAs with customized routes
Roundtrip optimization with customized destinations
A list of all parameters is specified in the next section.
Query parameters
This is a pipe-separated list of coordinates.
Minimum 3 pairs of coordinates and Maximum 12 pairs of coordinates are allowed.
Specify the destination coordinate of the returned route. If the input is last, the last coordinate will be the destination.
Sets the output format of the route geometry in the response.
On providing polyline and polyline6 as input, respective encoded geometry is returned. However, when geojson is provided as the input value, polyline encoded geometry is returned in the response along with a geojson details of the route.
A key is a unique identifier that is required to authenticate a request to the API.
Set which driving mode the service should use to determine a route. For example, if you use "car", the API will return a route that a car can take. Using "truck" will return a route a truck can use, taking into account appropriate truck routing restrictions.
When "mode=truck", following are the default dimensions that are used:
- truck_height = 214 centimeters
- truck_width = 183 centimeters
- truck_length = 519 centimeters
- truck_weight = 5000 kg
Please use the Directions Flexible version if you want to use custom truck dimensions.
Note: Only the "car" profile is enabled by default. Please note that customized profiles (including "truck") might not be available for all regions. Please contact your NextBillion.ai account manager, sales representative or reach out at support@nextbillion.ai in case you need additional profiles.
Indicates whether the returned route is a roundtrip.
The coordinate at which to start the returned route. If this is not configured, the return route’s destination will be the first coordinate.
Indicates whether the return geometry should be computed or not.
A semicolon-separated list indicating the side of the road from which to approach waypoints in a requested route. If provided, the number of approaches must be the same as the number of coordinates. However, you can skip a coordinate and show its position in the list with the ; separator.