Netradyne Integration with NextBillion.ai’s Route Optimization API
Introduction
The integration of Netradyne's technology with NextBillion.ai's Route Optimization API is a significant step forward in the field of fleet management and road safety. Netradyne, known for its emphasis on driver safety, fleet efficiency, and data-driven insights, analyzes driver behavior and road conditions using advanced AI algorithms and real-time monitoring.
The Route Optimization API from NextBillion.ai provides businesses with a practical way to plan routes accurately, saving time and money while ensuring customer satisfaction. It includes real-time tracking and detailed analytics to monitor and improve fleet operations.
This integration combines the strengths of Netradyne and NextBillion.ai and provides businesses with a competitive advantage in the field. It simplifies and improves their daily operations by combining safety, efficiency, and innovation.
Prerequisites
To successfully integrate Netradyne with NextBillion.ai, ensure you have the following prerequisites in place:
-
Netradyne's Authorization and Tenant Unique Name
-
NextBillion.ai's API key: Obtain an API key from NextBillion.ai, which serves as the authentication mechanism for accessing their services and data. This key is essential for secure and authorized communication between your systems and NextBillion.ai's APIs.
Integration Steps
Generate Access Token
-
Generate Access token of Netradyne using the POST request. More details on the REST API requests can be found here
-
Verify Basic CRUD Operations: Finally, verify that basic CRUD (Create, Read, Update, Delete) operations are functioning as expected using the generated access token.
Pull List of Vehicles from Netradyne
Retrieve the list of vehicles from the Netradyne platform using the following API request.
Sample API Request
Sample API Response
This API response includes essential information about each vehicle, such as VIN (Vehicle Identification Number), vehicle number, license plate number, registration date, status, and additional details about the vehicle's class, gross vehicle weight (gVM), and battery status.
Delivery Records Integration
The delivery records will be linked to the jobs
parameter within NextBillion.ai's Route Optimization API. To facilitate testing and integration, we have generated a set of random jobs that can be employed for route optimization evaluation. However, for real-world scenarios, users have the flexibility to substitute these random jobs with their specific delivery addresses or job data.
Here are the key steps involved in this process:
-
Download Sample CSV File: We provide a sample CSV file containing randomly generated job data. You can download this file to understand the format and structure required for the job data.
-
Upload Job Data in CSV Format: After customizing your job data in CSV format, you can upload it into the system. This step ensures that your specific delivery addresses or job details are seamlessly integrated and optimized using NextBillion's Route Optimization API.
Configuration of Additional Parameters
In our technical integration process, apart from the core parameters, there are additional settings that play a crucial role in fine-tuning the route optimization. These settings allow for a more comprehensive and customized optimization process. Here's how to configure these parameters:
-
Driver's Shift Start and End Time: Define the start and end times of the driver's shift within the application. This sets the timeframe during which the route optimization should take place, ensuring alignment with the driver's working hours.
-
Start and End Vehicle Locations: Specify the initial and final locations for the vehicle. Typically, this corresponds to the vehicle's departure point (e.g., the warehouse) and its return location after completing deliveries. These locations serve as critical reference points for route calculation.
-
Service Time: The service time represents the duration required by the delivery executive to fulfill each order. Accurate service time input is essential for realistic route optimization.
Once all these parameters are correctly configured to match your specific operational requirements, you're ready to proceed.
Integration with Route Optimization API
After successfully pulling the necessary data from Netradyne, integrate the fetched data with Route Optimization using the following API endpoint.
Map the fetched Netradyne data to the respective API parameters. Configure optimization settings such as shift start and end time, service time, and start and end location coordinates.
Follow these steps to achieve a successful integration:
Step 1: Define Data Structures
Begin by setting up the necessary data structures to facilitate the integration. These include arrays and variables for vehicles, shifts, start and end locations, vehicle attributes, and stop attributes.
Step 2: Configure Optimization Settings
Specify optimization settings to tailor the routing process to your specific needs. These settings typically include shift start and end times, service times, and the coordinates of start and end locations.
Step 3: Prepare Data for Route Optimization
Assemble the data required for route optimization. This involves creating arrays for locations, jobs, and shipments. Additionally, you'll populate the vehicle and job attributes as needed.
Step 4: Store Data and Trigger Optimization
Store the prepared data structures in local storage for future reference and initiate the route optimization process.
By following these steps, you can effectively connect and integrate Netradyne data with the Route Optimization API, ensuring efficient routing and resource allocation for your tasks or deliveries.
Create Jobs with Route Optimization API
The following API request sends data to NextBillion.ai’s Route Optimization API to create optimization jobs based on certain parameters. The response confirms the creation of jobs.
POST API Request
POST API Response
Retrieving Optimized Route Result
To obtain the optimized route results after initiating a route optimization job, you can utilize the provided GET query. This query enables you to fetch the optimized route details from the Route Optimization API.
GET Query
In the above URL, two query parameters are used:
id
: This parameter specifies the unique identifier associated with the optimization job. It is obtained from the nbaiOptimizationRun.data.id
variable.
key
: The localStorage.values.apiKey
variable provides the API key necessary for authentication.
Example JSON Response
Upon making the GET request, the API will respond with a JSON object containing the optimized route details. Here's an example of what the JSON response may look like.
Accessing Optimized Routes in NextBillion.ai’s Optimizer
To visualize and analyze the optimized routes generated by NextBillion's Optimizer, you can use the following URL.
The above URL will take you to NextBillion's Optimizer interface where you can explore and interact with the optimized route results associated with your specific request ID and API key. This provides a convenient way to gain insights into your optimized routes for enhanced decision-making and resource management.