Geotab Integration with NextBillion.ai Route Optimization API

This document describes the steps for integrating Geotab GO device with NextBillion.ai’s Route Optimization API.

Geotab offers a suite of tools designed to enhance vehicle performance, safety, and efficiency. Central to their offerings is the Geotab GO device, which captures real-time data from vehicles and integrates seamlessly with the MyGeotab platform for comprehensive fleet management.

NextBillion.ai's Route Optimization API complements Geotab's capabilities by delivering precise and efficient route planning. This API enables businesses to save time, cut costs, and boost customer satisfaction through features like 50+ dynamic constraints, advanced optimization features and re-optimization capabilities.

The integration of Geotab's telematics with NextBillion.ai's Route Optimization API offers significant business benefits. This integration supports businesses in achieving superior route planning, reducing fuel consumption, minimizing vehicle wear and tear, and improving overall delivery performance.

Prerequisites

Before starting with the integration, make sure you have the following prerequisites in place.

  • Access to MyGeotab Application: Access to the MyGeotab application is essential for authenticating and interacting with Geotab’s fleet management platform. This access allows you to retrieve and manage data, such as vehicle information and delivery records.

  • NextBillion.ai’s API Key: This key will be used to authenticate the requests sent to route optimization API endpoint.

Follow the steps below to setup your Geotab application and retrieve data from Geotab.

Sign Up for MyGeotab Application

Create an Account

  • Navigate to the MyGeotab application website.
  • Follow the prompts to create a new account by providing the necessary information such as your name, email address, and company details.
  • Once the account is created, you will receive a username and password.

Database Creation

Upon setting up your account, a database will be created within MyGeotab specifically for your fleet management needs.

Make a note of the database name, as it will be required for authentication and data retrieval.

Authentication

Use the username, password, and database name to log in to the MyGeotab platform.

These credentials will be used for subsequent API interactions.

Authenticate with Geotab

Follow the Authentication Method

Detailed instructions on how to authenticate with Geotab can be found here.

Authentication typically involves sending a request with your credentials to obtain a sessionId.

CRUD Operations

Geotab supports basic Create, Read, Update, and Delete (CRUD) operations. Refer to the API Reference methods available here to understand how to perform these operations.

Test Basic Add and Get Requests

Perform Add Requests

Test adding new records to the Geotab database to ensure that your application can communicate with the API correctly.

Examples of Add requests can include adding a new vehicle or delivery record.

Perform Get Requests

Test retrieving existing records from the Geotab database. This will confirm that your application can successfully fetch data from the API.

Populate the Application Components

Use ADD and POST Methods

Populate your application with the necessary data using the ADD and POST methods of the Geotab API.

Delivery Records

Retrieve delivery records from the zone entity in Geotab.

Ensure these records are correctly integrated into your application to facilitate route optimization.

Vehicles

Retrieve vehicle data from the user entity in Geotab.

This data is crucial for tracking and managing your fleet.

For detailed instructions and examples on how to perform these operations, refer to the API documentation here.

By following these steps, you will be able to successfully setup your MyGeotab application for the integration.

Pull List of Vehicles and Dispatch Locations from Geotab

Fetch Vehicles

To fetch the list of vehicles from Geotab, you need to send a GET request to the Geotab API. Below is an example of how to perform this request using curl:

API Request

1
# Fetch vehicles
2
curl --location 'https://my.geotab.com/apiv1' --header 'Content-Type: application/json' --data-raw '{...}'

API Response

The response will contain a list of vehicles along with their details. An example response is shown below:

1
{
2
"result": [
3
{
4
"countryCode": "ca",
5
"firstName": "Arnav",
6
"id": "bC",
7
"lastName": "Malik",
8
"companyName": "Nextbillion.ai"
9
},
10
{"...":"..."}
11
],
12
"jsonrpc": "2.0"
13
}'

Fetch Dispatch Locations

To fetch the list of dispatch locations from Geotab, you need to send another GET request to the Geotab API. Below is an example of how to perform this request using curl:

API Request

1
# Fetch Dispatch Locations
2
curl --location 'https://my.geotab.com/apiv1' --header 'Content-Type: application/json' --data-raw '{
3
"method": "GET",
4
"params":{..}'

API Response

The response will contain a list of delivery locations along with their details. An example response is shown below:

1
{
2
"result": [
3
{
4
"activeFrom": "1986-01-01T00:00:00.000Z",
5
"activeTo": "2050-01-01T00:00:00.000Z",
6
"comment": "",
7
"displayed": true,
8
"externalReference": "",
9
"fillColor": {
10
"a": 191,
11
"b": 0,
12
"g": 69,
13
"r": 255,
14
},
15
"..":"..."
16
},
17
],
18
}'

Once all the required data are fetched and populated, the inputs can be pushed to Nextbillion's Route Optimization (RO) API to generate the optimized routes. This will enhance the routes being optimized for the problem at hand.

The integration dashboard will resemble the following image.

Delivery and Vehicles record in integration dashboard

The additional parameters available with Nextbillion's Route Optimization API can be added to the Retool app for further customization and optimization.

other additional route optimization API parameters in integration dashboard

© 2024 NextBillion.ai all rights reserved.