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.

Changes

Changed in 3 of the 15 revisions of this API.66

  • 7ee76f0ff67922See the full diff
    • removed the enum value polyline6 of the request property

      request-property-enum-value-removed

    • removed the enum value polyline of the request property

      request-property-enum-value-removed

    • added the new polyline enum value to the request property

      request-property-enum-value-added

    • added the new polyline6 enum value to the request property

      request-property-enum-value-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • a800b73f11c122See the full diff
    • removed the enum value polyline of the request property

      request-property-enum-value-removed

    • removed the enum value polyline6 of the request property

      request-property-enum-value-removed

    • added the new polyline6 enum value to the request property

      request-property-enum-value-added

    • added the new polyline enum value to the request property

      request-property-enum-value-added

  • b79d96775b1322See the full diff
    • removed the enum value polyline6 of the request property

      request-property-enum-value-removed

    • removed the enum value polyline of the request property

      request-property-enum-value-removed

    • added the new polyline enum value to the request property

      request-property-enum-value-added

    • added the new polyline6 enum value to the request property

      request-property-enum-value-added