Post Trip Route API
Introduction
With NextBillion.ai’s Post Trip Route API:
You can accurately map the actual route taken during a trip and return an accurate distance of the whole route. The API will return the total distance and complete route geometry based on the input locations along the route.
You can also get a list of geospatial objects like Tolls, or Traffic Lights along the route. The API uses the POST method to pass waypoints and other information.
Parameters
Request Parameters
Loading...POST Body Schema
Loading...Response Schema
Loading...Query Limits
Generic Limits
Nextbillion.ai allows a maximum rate limit of 6000 queries per minute or 100 queries/second for continuous requests.
Note: We can increase the quota if needed on request. Contact [email protected] for more details.
Examples
Sample API Request
curl -XPOST -H "Content-type: Application/json" "https://api.nextbillion.io/postTripRoute?mode=4w&key=YOUR_API_KEY" -d '{"waypoints":"13.00463577,77.53160027|12.98690572,77.54619149|12.99591162,77.53102053|12.99883846,77.53346593"}'
Sample API Response
1{
2 "status": "Ok",
3 "route": {
4 "geometry": "s|jnAq}exMzOuRZiL`@[email protected]@[email protected]@[email protected]|GiPhDsLTyGdGPrJjBbR}@zHhAfK`@[email protected]@[email protected]@[email protected]",
5 "distance": 5973.9,
6 "special_objects": null
7 }
8}
Sample Image

API Error Codes
Response Code | Description | Additional Notes |
---|---|---|
200 | Normal success case. | Normal success case. |
400 | Input validation failed. | Such as missing parameter or parameter with invalid value type (for example value cannot be parsed into number). |
401 | APIKEY not supplied or invalid. | - |
403 | APIKEY is valid but does not have access to requested resources. | You might be querying for a geographical region which is not valid for your account, or requesting a service which is not enabled for you. |
404 | Requested host/path not found. | This error occurs when there is a malformed host name used. |
422 | Could not process the request. | There is an underlying map issue which prevents the processing of the request. |
429 | Too many requests. | QPM reached or API request count quota reached. |
500 | Internal Service error. | There was an internal issue with Nextbillion.ai services. You can reach out to [email protected] for an explanation. |