v15

latestOpenAPI 3.1.02026-07-1295183803.5 KB
Routing

Route Report

post/route_report

Query parameters

keystring 32 character alphanumeric string required
Example:key=API_KEY

A key is a unique identifier that is required to authenticate a request to the API.

Request body

original_shapestring required

Takes a route geometry as input and returns the route details. Accepts polyline and polyline6 encoded geometry as input.

Note: Route geometries generated from sources other than NextBillion.ai services, are not supported in this version.

original_shape_type'polyline' | 'polyline6' required

Specify the encoding type of route geometry provided in original_shape input. Please note that an error is returned when this parameter is not specified while an input is added to original_shape parameter.

Example request

{
  "original_shape": "original_shape=sbp}_AlmgpFnLuToKmKviB{eDlcGhpFvj@qbAwoA_mA",
  "original_shape_type": "\"original_shape_type\": \"polyline\""
}

Response

statusstring

A string indicating the state of the response. On normal responses, the value will be Ok. Indicative HTTP error codes are returned for different errors. See the API Errors Codes section below for more information.

geometrystring[]

An array of objects returning encoded geometry of the routes. Each object represents an individual route in the input.

msgstring

Displays the error message in case of a failed request or operation. Please note that this parameter is not returned in the response in case of a successful request.