Documents API
Introduction
NextBillion.ai’s Documents API allows users to create form templates for collecting required information. Users can add fields and configure their names, data types and even validation rules to maintain data integrity and quality standards. Once created, these forms can be used for collecting information like - proof of completion or proof of delivery - while executing planned routes.
Users can link a document to a specific route via the Dispatch API. Once linked successfully, the Driver would be required to record the information in the document for each task step on the dispatched route. The drivers can access the documents for each task step via their Driver app, available on Android & iOS, once the associated route is dispatched successfully.
To dispatch the routes to your drivers, register them at NextBillion.ai Cloud Console.
Let’s take a look at the methods available to manage documents.
Create a Document Template
This endpoint allows users to create a document template. Users need to configure a unique name for the template. Once the request is successfully submitted, the service responds with an unique identifier for the document which can be used to reference this template when dispatching routes.
Request Parameters
Loading..Request Body
Loading..Response Schema
Loading..Sample Request
Sample Response
Retrieve a Document Template
This endpoint allows users to retrieve a document template using its unique ID.
Request Parameters
Loading..Response Schema
Loading..Sample Request
Sample Response
Update a Document Template
This endpoint allows users to update a specific document template using its unique ID. Please note that updating the content
attribute of a template overwrites all the existing items for the given template.
Request Parameters
Loading..Request Body
Loading..Response Schema
Loading..Sample Request
Sample Response
Retrieve all Document Templates
This endpoint allows users to retrieve all document templates associated with an API key.
Request Parameters
Loading..Response Schema
Loading..Sample Request
Sample Response
Delete a Document Template
This endpoint allows users to delete an existing document template using its unique ID.
Request Parameters
Loading..Response Schema
Loading..Sample Request
Sample Response
API Query 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.
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. |