Batch Routing API
Introduction
NextBillion.ai Batch Routing API is designed to support multiple requests in a single go. Users first need to submit a valid batch of multiple routing requests and retrieve the result asynchronously. Currently, this method accepts only Isochrone API requests.
Let’s take a look at the available methods to create batch requests and retrieve their results.
Create a Batch request
The Batch Routing service allows users to submit a valid batch of routing requests using the HTTP POST method. The individual queries in a batch can be formed using the attributes supported by the standard routing endpoints. The limitations and validations applicable for individual queries in a batch are consistent with those for standard routing endpoints. Know more about these limitations by visiting the individual endpoint documentation which is being added in a batch routing request.
Request Parameters
Loading..Request Body
Loading..Response Schema
Loading..Sample Request
Sample Response
Retrieve a Batch result
In order to retrieve the result of a previously submitted batch routing request, users can submit a GET request to the following endpoint while specifying the track_id
generated once the batch was successfully created.
Request Parameters
Loading..Response Schema
Loading..Sample Request
Sample Response
API Query Limits
- Only the Isochrone API requests can be added as individual
queries
in a batch, for now. - The maximum number of individual
queries
that can be added to a single batch are limited to 20. - 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.
API Error Codes
Response code | Description | Additional notes |
---|---|---|
200 | Normal success case. | Normal success case. |
400 | Input validation failed. | There is a missing or an invalid parameter or a parameter with an invalid value type is added to the request. |
401 | APIKEY not supplied or invalid | This error occurs when the wrong API key is passed in the request or the key is missing altogether. |
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 a malformed hostname is used. |
422 | Could not process the request | A feasible solution could not be generated for the given set of locations or parameter configuration. |
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. |