Tracking

The Tracking section enables continuous monitoring of location data for vehicles. It keeps the user's eye on the movement and status of your vehicles, facilitating efficient resource allocation, improved customer service, and enhanced operational visibility.

Tracking Object

The tracking object represents the real-time location and status of a vehicle. It provides comprehensive data points that enable you to monitor and analyze the movement of vehicles.

{
  "vehiclesLocations": [
    {
      "vehicleID": "string",
      "currentLocation": {
        "longitude": 0,
        "latitude": 0
      },
      "timeStamp": "2022-08-03T09:30:49.644Z",
      "previousNode": {
        "id": "string",
        "name": "string",
        "address": "string",
        "nodeType": 0,
        "timeWindows": [
          {
            "date": "2022-08-03T09:30:49.645Z",
            "timeSlots": [
              {
                "startTime": 0,
                "endTime": 0
              }
            ]
          }
        ],
        "location": {
          "longitude": 0,
          "latitude": 0
        },
        "zone": "string",
        "nodeDetails": [
          {
            "key": "string",
            "value": "string"
          }
        ]
      },
      "destinationNode": {
        "id": "string",
        "name": "string",
        "address": "string",
        "nodeType": 0,
        "timeWindows": [
          {
            "date": "2022-08-03T09:30:49.645Z",
            "timeSlots": [
              {
                "startTime": 0,
                "endTime": 0
              }
            ]
          }
        ],
        "location": {
          "longitude": 0,
          "latitude": 0
        },
        "zone": "string",
        "nodeDetails": [
          {
            "key": "string",
            "value": "string"
          }
        ]
      },
      "estimatedTimeToDestinationNode": 0,
      "estimatedDistanceToDestinationNode": 0,
      "distanceUnit": 0
    }
  ]
}

Attributes Description

Vehicles Locations

It has the vehicle's current location and the next stop destination with an estimated arrival time.

Attribute Data TypeRequiredDescription

VehicleID

String

Required

The unique identifier for the vehicle.

CurrentLocation

Object of location

Required

Contains the current location longitude and latitude of the vehicle.

TimeStamp

Date time

Required

The timestamp indicating when the location was recorded.

PreviousNode

Object of node

-

Details of the previous node where the vehicle was located.

DestinationNode

Object of node

-

Details of the destination node for the vehicle.

EstimatedTimeToDestinationNode

Time

-

The estimated time to reach the destination node.

EstimatedDistanceToDestinationNode

Double

-

The estimated distance to the destination node.

DistanceUnit

String

-

The unit of measurement for the distance.

Location

It represents the current location of the vehicle by checking it's longitude and the latitude.

AttributeData TypeRequiredDescription

longitude

Float

-

The current longitude of the vehicle.

latitude

Float

-

The current latitude of the vehicle.

Descriptive Response Object

This object typically includes key-value pairs, with fields such as "status" indicating the overall success or failure.

AttributeData TypeRequiredDescription

Value

String

Yes

The response message.

IsErrorState

Boolean

Yes

Indicates if an error occurred.

ErrorMessage

String

No

The error message (if IsErrorState is true).

ErrorCode

String

No

The error code (if IsErrorState is true).

Available Endpoints

Send Vehicle Location

POST https://api.normalive.ai/SendVehicleLocation

This endpoint is for sending the current vehicle location.

Headers

NameTypeDescription

authentication *

String

Bearer token acquired after authentication

Request Body

NameTypeDescription

VehicleId*

string

Vehicle ID

Current Location*

object

Current Location of Vehicle

TimesStamp*

datetime

Current date time

{
  "vehiclesLocations": [
    {
      "vehicleID": "V12345",
      "currentLocation": {
        "longitude": -73.98513,
        "latitude": 40.748817
      },
      "timeStamp": "2022-08-03T09:30:49.644Z",
      "previousNode": {
        "id": "N98765",
        "name": "Distribution Center A",
        "address": "123 Main Street, Anytown, USA",
        "nodeType": 1,
        "timeWindows": [
          {
            "date": "2022-08-03T09:30:49.645Z",
            "timeSlots": [
              {
                "startTime": 36000,  /* 10:00 AM in seconds */
                "endTime": 43200    /* 12:00 PM in seconds */
              }
            ]
          }
        ],
        "location": {
          "longitude": -73.9875,
          "latitude": 40.7498
        },
        "zone": "Zone A",
        "nodeDetails": [
          {
            "key": "Capacity",
            "value": "Medium"
          },
          {
            "key": "Contact",
            "value": "John Doe (555) 123-4567"
          }
        ]
      },
      "destinationNode": {
        "id": "N87654",
        "name": "Customer Site B",
        "address": "456 Oak Street, Suburbia, USA",
        "nodeType": 2,
        "timeWindows": [
          {
            "date": "2022-08-03T09:30:49.645Z",
            "timeSlots": [
              {
                "startTime": 43200,  /* 12:00 PM in seconds */
                "endTime": 50400    /* 02:00 PM in seconds */
              }
            ]
          }
        ],
        "location": {
          "longitude": -74.0092,
          "latitude": 40.7128
        },
        "zone": "Zone B",
        "nodeDetails": [
          {
            "key": "Delivery Type",
            "value": "Fragile Items"
          },
          {
            "key": "Contact",
            "value": "Jane Smith (555) 987-6543"
          }
        ]
      },
      "estimatedTimeToDestinationNode": 3600, /* 1 hour in seconds */
      "estimatedDistanceToDestinationNode": 15, /* 15 kilometers */
      "distanceUnit": 1 /* 1 for kilometers, 2 for miles */
    }
  ]
}

Last updated