Introduction
Welcome to our API. Insight Mobile Data (Insight) exposes its data via an Application Programming Interface (API). This document is the official reference for that functionality.
Basic Concepts
Assumptions
Throughout this document it is assumed that the reader is familar with the features and terminology of StreetEagle Professional.
HTTP-based
Methods to retrieve data from the API require a POST request. Methods that change data require a PUT request and methods that destroy data require a DELETE request.
restFUL Resource
The API attempts to conform to the design principles of Representational State Transfer (REST). More details on REST can be found here.
Data exchanged using JSON
The API supports the JSON (JavaScript Object Notation) format.
SSL / TSL Supported
HTTPS is highly recommended to avoid passing both the authentication KEY and potentially confidential data (e.g.: clients’ names and addresses) in clear text over the web.
Authentication
Authentication is performed using an API key provided by Insight. The API key must be included in the HTTP(S) request via the X-Insight-Key HTTP header.
Queueing and Throttling
All asynchronous API requests are queued and processed one by one in the order they have been queued (FIFO).
The queue has a maximum size of 10 items. Attempting to queue more than this number of requests will return a 429 “Too Many Requests” error.
Throttling and rate-limiting schemes are applied to prevent overloading the system with too many / too fast requests.
HTTP Body Request
Each call to the API must include a request body.
| Parameter | Description |
|---|---|
| transaction_id | A numeric value that is unique for each transaction or call to the API. |
| filters | Leave empty. This will be available in a future update. |
| fields | Leave empty. This will be available in a future update. |
| params | Some methods will require various input parameters. |
Sample input:
{
"transaction_id": "1",
"filters": {
"<filter1>":[1,2,3],
"<filter2>":""
},
"fields": {},
"params": {
"<parameter1>":"<value1>",
"<parameter2>":"<value2>"
}
}
Vehicles
Get All Vehicles
POST /api/v1/vehicles/ HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"vehicleID": "82002",
"vehicleName": "Gumbo1",
"driverName": "",
"type": "type",
"reportDateTime": "0001-01-01T00:00:00",
"reportGMTDateTime": "2018-04-11T16:25:20",
"latitude": 35.44606,
"longitude": -82.53406,
"speed": 0,
"heading": 226,
"direction": -1,
"DirectionTxt": "0",
"vehStatus": "Parked",
"AssignedJobID": "-1",
"ETA": "0001-01-01T00:00:00",
"isGarmin": false,
"actualMileage": 115197.74,
"AlertContactEmail": "",
"Address": "400 Airport Rd, Arden, NC 28704",
"fuelusage": -1,
"fuelLevelPercentage": -1,
"fuelEconomy": -1,
"engCoolantTemp": -1,
"engOilTemp": -1,
"RPM": -1,
"lastEventDT": "2018-02-15T22:18:27",
"VIN": "",
"hasCamera": true
},
{
"vehicleID": "71328",
"vehicleName": "Verigo 1",
"driverName": "",
"type": "type",
"reportDateTime": "0001-01-01T00:00:00",
"reportGMTDateTime": "2018-01-19T21:53:37",
"latitude": 53.31433,
"longitude": -113.54158,
"speed": 0,
"heading": 180,
"direction": -1,
"DirectionTxt": "0",
"vehStatus": "Parked",
"AssignedJobID": "7151-7123-S",
"ETA": "0001-01-01T00:00:00",
"isGarmin": true,
"actualMileage": 127301.52,
"AlertContactEmail": "",
"Address": "1302 Sparrow Dr, Nisku, AB T9E 8H9, Canada|AB",
"fuelusage": 449.02847037600003,
"fuelLevelPercentage": -1,
"fuelEconomy": -1,
"engCoolantTemp": 112,
"engOilTemp": -1,
"RPM": 1161,
"lastEventDT": "2018-01-20T03:26:24",
"VIN": "",
"hasCamera": true
}
]
This endpoint retrieves the latest fleet information.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles
Request Body Parameters
Only the transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
URL Filters
| Filter | Description |
|---|---|
| last_date_reported | The last GMT datetime that a vehicle reported |
| date_comparator | The comparator to use in the filter. Options are "EQUALS", "GREATER THAN", "LESS THAN" |
| vehicle_status | The status of the vehicle when it last reported. Options are "parked", "in transit", "stopped" and "started" |
Get a Specific Vehicle
POST /api/v1/vehicles/vehicle_id HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/vehicle_id"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/vehicle_id',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"vehicleID": "82002",
"vehicleName": "Gumbo1",
"driverName": "",
"type": "type",
"reportDateTime": "0001-01-01T00:00:00",
"reportGMTDateTime": "2018-04-11T16:25:20",
"latitude": 35.44606,
"longitude": -82.53406,
"speed": 0,
"heading": 226,
"direction": -1,
"DirectionTxt": "0",
"vehStatus": "Parked",
"AssignedJobID": "-1",
"ETA": "0001-01-01T00:00:00",
"isGarmin": false,
"actualMileage": 115197.74,
"AlertContactEmail": "",
"Address": "400 Airport Rd, Arden, NC 28704",
"fuelusage": -1,
"fuelLevelPercentage": -1,
"fuelEconomy": -1,
"engCoolantTemp": -1,
"engOilTemp": -1,
"RPM": -1,
"lastEventDT": "2018-02-15T22:18:27",
"VIN": "",
"hasCamera": true
}
]
This endpoint retrieves the latest information for a single vehicle.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to retrieve vehicle data |
Request Body Parameters
Only the transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
Get All Vehicles Exceptions
POST /api/v1/vehicles/exceptions HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/exceptions"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/exceptions',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
Sample output:
{
"status": 200,
"response": [
{
"exception_index": 357350,
"vehicle_id": 84286,
"worker_id": 305,
"utc_date": "2020-03-02T12:26:49",
"latitude": 38.309865599999995,
"longitude": -76.5054203,
"exception_type": "Hard Braking",
"history_index": 110008,
"speed": 0,
"direction": 107,
"cardinal_direction": "East",
"address": "23421 Kingston Creek Rd, California, MD 20619"
},
{
"exception_index": 357354,
"vehicle_id": 84286,
"worker_id": 305,
"utc_date": "2020-03-02T12:46:12",
"latitude": 38.3126615,
"longitude": -76.535050099999992,
"exception_type": "Hard Cornering",
"history_index": 110048,
"speed": 31,
"direction": 236,
"cardinal_direction": "Southwest",
"address": ""
},
{
"exception_index": 357474,
"vehicle_id": 84286,
"worker_id": 305,
"utc_date": "2020-03-03T01:36:30",
"latitude": 38.299319,
"longitude": -76.5213656,
"exception_type": "Hard Cornering",
"history_index": 110279,
"speed": 18,
"direction": 121,
"cardinal_direction": "Southeast",
"address": ""
}
]
}
This endpoint retrieves historical vehicle exceptions.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/exceptions
HTTP body parameters
The transaction_id is required. A valid last_pulled_utc date is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| last_pulled_utc | A valid date for retrieving exceptions that occurred after the designated time. |
HTTP request body filters
| Filter | Description |
|---|---|
| vehicle_ids | JSON array of numeric vehicleID values |
| driver_ids | JSON array of numeric driverID values |
Get Vehicle Alerts History
POST /api/v1/vehicles/vehicle_id/alerts HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/alerts"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/alerts',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"alertID": 76202,
"alertDate": "2018-03-05T12:48:20",
"alertType": "GF",
"alertMsg": "Truck 1 (Driver: C. Smith) has entered geofence: Sunshine at 3/5/2018 7:48 AM",
"driverID": 335,
"driverName": "C. Smith",
"VehicleName": "Truck 1",
"InsightID": 999999
},
{
"alertID": 76221,
"alertDate": "2018-03-06T12:50:47",
"alertType": "ACC",
"alertMsg": "Truck 1 (Driver: C. Smith) Harsh Acceleration for 3.8 sec. on 3/6/2018 7:50:33 AM EST",
"driverID": 335,
"driverName": "C. Smith",
"VehicleName": "Truck 1",
"InsightID": 999999
}
]
This endpoint retrieves alert history data for a single vehicle.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/alerts
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to retrieve alert history data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
| alerts_string | The alert type string is a list of abbreviation(s) that can be included to limit the data retrieved to be just those alert types (e.g. "ACC,SP"). |
Alert Types
Available alert types are defined in the table shown below:
| Alert Type | Description |
|---|---|
| ACC | Driver performance alert |
| BAT | Battery alert |
| EV | Sensor/PTO alert |
| FP | Fuel Purchase alert |
| GF | Geofence alert |
| ID | Idling alert |
| JBUS | JBUS diagnostics alert |
| LG | Long stop alert |
| MM | Maintenance alert |
| MO | Motion alert |
| SP | Speeding Threshold alert |
| SPG | Posted speed Garmin alert |
| SPR | Posted speed Road-Segment alert |
| TP | Temperature alert |
| TW | Tow alert |
Get Vehicle Custom Forms
POST /api/v1/vehicles/vehicle_id/custom_forms HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/custom_forms"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/custom_forms',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"ID": 299,
"formName": "End of Route Vehicle Inspection",
"formFields": [
"Tires:Checked",
"Fluids:Checked",
"Pump Operating Correctly:Checked",
"Heater/Defroster:NULL",
"Stability Items:NULL"
],
"driverID": 41,
"vehicleID": "70414",
"jobID": "7589-7565-S",
"gmtTime": "2016-08-23T16:40:45",
"formType": "Default",
"latitude": 38.30961,
"longitude": -76.54444
}
]
}
This endpoint retrieves custom forms data for a single vehicle.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/custom_forms
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to retrieve custom forms data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
| form_type | The form type is a list of types that can be included to limit the data retrieved to be just those alert types (e.g. "Default,Job"). |
Form Types
Available form types are defined in the table shown below:
| Form Type | Description |
|---|---|
| Default | Default form |
| Inspection | Inspection form |
| Inventory | Inventory form |
| Job | Job form |
| Maintenance | Maintenance form |
| Service | Service form |
| Weight | Weight form |
Get Vehicle Driver Performance
POST /api/v1/vehicles/vehicle_id/driver_performance HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/driver_performance"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/driver_performance',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"reportDate": "2018-04-06T00:00:00",
"driverID": 0,
"driverName": null,
"employeeID": null,
"VehicleName": "Van 100",
"InsightID": 999999,
"SpeedingEventCount": 12,
"PostedSpeedingEventCount": 14,
"IdlingEventCount": 0,
"TotalBrakingEventCount": 6,
"HardBrakingEventCount": 4,
"HardBrakingEventGforceAverage": 1.03,
"HardBrakingEventDuration": 8,
"HarshBrakingEventCount": 2,
"HarshBrakingEventGforceAverage": 0.62,
"HarshBrakingEventDuration": 5,
"SevereBrakingEventCount": 0,
"SevereBrakingEventGforceAverage": 0,
"SevereBrakingEventDuration": 0,
"CorneringEventCount": 5,
"CorneringEventGforceAverage": 1.52,
"CorneringEventDuration": 16,
"TotalAccelerationEventCount": 7,
"HardAccelerationEventCount": 6,
"HardAccelerationEventGforceAverage": 1.4,
"HardAccelerationEventDuration": 14,
"HarshAccelerationEventCount": 1,
"HarshAccelerationEventGforceAverage": 0.26,
"HarshAccelerationEventDuration": 3,
"SevereAccelerationEventCount": 0,
"SevereAccelerationEventGforceAverage": 0,
"SevereAccelerationEventDuration": 0,
"TotalSpeedingDuration": 1528,
"TotalPostedSpeedingDuration": 1514,
"TotalPostedSpeedingMileage": 0,
"TotalSpeedingMileage": 22.46,
"TotalIdlingDuration": 0,
"TotalEventCount": 44,
"TotalVehicleMileage": 138.9,
"TotalScore": 85.21,
"SpeedingScore": 20.42,
"IdlingScore": 25,
"PostedScore": 20.46,
"DriverExceptionScore": 19.33,
"PercentSpeeding": 9.17,
"PercentSpeedingPosted": 9.08,
"TotalPercentSpeeding": 18.25,
"PercentIdling": 0,
"DriverBehaviorEventRate": 4.54,
"TotalSpeedingEventCount": 26,
"TotalSevereEventCount": 0,
"TotalHarshEventCount": 3,
"TotalHardEventCount": 15,
"VTU": "V072",
"vid": null,
"TotalInTransitTime": 16665
}
]
This endpoint retrieves driver performance data for a single vehicle or group of vehicles.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/driver_performance
If you are retrieving data for a single vehicle then the url parameter vehicle_id is required.
If you are retrieving data for a group then the url parameter vehicle_id should be set to "-1" and a request body param named group_name is required.
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to retrieve driver performance data |
HTTP body parameters
The transaction_id is required. In addition, valid utc_start and utc_end dates are required for a group or a single vehicle request. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| group_name | A valid StreetEagle Pro group name. Required if retrieving for a group. |
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| weights | An object of type "weights" (see object defintion for details) is required. |
| thresholds | An object of type "thresholds" (see object defintion for details) is required. |
Get Vehicles DTC History
POST /api/v1/vehicles/vehicle_id/dtc_history HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/dtc_history"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/dtc_history',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"vehicleID": "999999",
"vehicleName": "Escape",
"dtcOriginatedDT": "2017-05-27T13:08:16",
"dtcCode": "SPN:277,FMI:2",
"dtcCodeDescription": " [Erratic, Intermittent, or Incorrect]",
"dtcCategory": "",
"dtcClearedDT": "1970-01-01T00:00:00",
"recID": 19
},
{
"vehicleID": "999999",
"vehicleName": "Escape",
"dtcOriginatedDT": "2017-05-27T13:33:53",
"dtcCode": "SPN:84,FMI:2",
"dtcCodeDescription": "Wheel-Based Vehicle Speed [Erratic, Intermittent, or Incorrect]",
"dtcCategory": "",
"dtcClearedDT": "1970-01-01T00:00:00",
"recID": 20
}
]
}
This endpoint retrieves dtc (diagnostics trouble code) historical data for a single vehicle.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/dtc_history
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to retrieve dtc historical data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
Get Vehicles ELD
POST /api/v1/vehicles/vehicle_id/eld HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/eld"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/dtc_eld',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"driverID": 355,
"firstName": "Charles",
"lastName": "Smith",
"lastUpdateDT": "2018-04-12T12:34:36",
"currentVehicleName": "Truck 1",
"currentInsightID": 84275,
"dutyStatus": "Off Duty",
"drivingHours": 11,
"workingHours": 14,
"weekHours": 70,
"hoursUntilBreak": 0,
"hoursUntilShiftRestart": 0,
"hoursUntilWeekRestart": 0
}
]
}
This endpoint retrieves eld data for a single vehicle.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/eld
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to retrieve eld data |
Request Body Parameters
The transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
Get Vehicles ELD History
POST /api/v1/vehicles/vehicle_id/eld_history HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/eld_history"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/eld_history',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"record_index": 343986,
"driverID": 355,
"driver_name": "Charles Smith",
"status_change_local_dt": "2018-04-12T08:34:36",
"status_change_utc_dt": "2018-04-12T12:34:36",
"time_zone": "EDT",
"duty_status_number": 4,
"duty_status_name": "On Duty (Not Driving)",
"vehicle_id": "V319",
"vehicle_name": "Truck 1",
"vehicle_vin": "5TFHY5F1XFX472683",
"eld_trip_type": null,
"eld_rule_set": null
},
{
"record_index": 343979,
"driverID": 355,
"driver_name": "Charles Smith",
"status_change_local_dt": "2018-04-12T08:28:49",
"status_change_utc_dt": "2018-04-12T12:28:49",
"time_zone": "EDT",
"duty_status_number": 3,
"duty_status_name": "Driving",
"vehicle_id": "V319",
"vehicle_name": "Truck 1",
"vehicle_vin": "5TFHY5F1XFX472683",
"eld_trip_type": null,
"eld_rule_set": null
}
]
}
This endpoint retrieves eld duty status historical data for a single vehicle.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/eld_history
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to retrieve eld duty status historical data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
Get Vehicles History
POST /api/v1/vehicles/vehicle_id/history HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/history"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/history',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"driverID":-1,
"vehicleID": "84286",
"latitude": 38.24149,
"longitude": -76.4391,
"speed": 0,
"heading": 327,
"direction": -1,
"DirectionTxt": "0",
"discrete1": 8,
"discrete2": 0,
"discreteLabel1": "",
"discreteLabel2": "",
"discreteLabel3": "",
"distance": 0,
"batteryLevel": 0,
"gpsValue": 0,
"analog1": 0,
"analog2": 0,
"gmtDateTime": "0001-01-01T00:00:00",
"dateTOA": "2018-03-21T00:42:30.153",
"jbusValues": null,
"postedSpeedLimit": 0,
"isOffRoad": false,
"opTime": 0,
"Seatbelt": false,
"BaseFuelUsage": 0,
"mileage": 175263.68,
"State": "MD",
"Address": "47298-47302 Barberry Ln, Lexington Park, MD 20653",
"reportDateTime": "2018-03-20T20:42:27",
"reportGMTDateTime": "2018-03-21T00:42:27",
"recID": 33546,
"fuelusage": 322.28497592400004,
"fuelLevelPercentage": -1,
"fuelEconomy": -1,
"engCoolantTemp": -1,
"engOilTemp": -1,
"RPM": -1,
"vehStatus":"Parked"
},
{
"driverID":-1,
"vehicleID": "84286",
"latitude": 38.23955,
"longitude": -76.43564,
"speed": 21,
"heading": 123,
"direction": 90,
"DirectionTxt": "Southeast",
"discrete1": 0,
"discrete2": 0,
"discreteLabel1": "",
"discreteLabel2": "",
"discreteLabel3": "",
"distance": 0.45,
"batteryLevel": 0,
"gpsValue": 0,
"analog1": 0,
"analog2": 0,
"gmtDateTime": "0001-01-01T00:00:00",
"dateTOA": "2018-03-21T00:42:30.197",
"jbusValues": null,
"postedSpeedLimit": 0,
"isOffRoad": false,
"opTime": 0,
"Seatbelt": false,
"BaseFuelUsage": 0,
"mileage": 175263.96,
"State": "MD",
"Address": "47266-47292 Green Leaf Rd, Lexington Park, MD 20653",
"reportDateTime": "2018-03-20T20:42:27",
"reportGMTDateTime": "2018-03-21T00:42:27",
"recID": 33547,
"fuelusage": 322.28497592400004,
"fuelLevelPercentage": -1,
"fuelEconomy": -1,
"engCoolantTemp": 216,
"engOilTemp": -1,
"RPM": 753,
"vehStatus":"Parked"
}
]
}
This endpoint retrieves vehicle history data for a single vehicle.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/history
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to retrieve history data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
Get Vehicles Job Status
POST /api/v1/vehicles/vehicle_id/job_status_info HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/job_status_info"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/job_status_info',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"jobID": "124-25-S",
"messageID": 35847,
"driverID": 325,
"vehicleName": null,
"driverUserName": "Dave",
"vehicleID": 84686,
"deliveryStatus": "Unread",
"latitude": 38.98314,
"longitude": -76.53634,
"gmtDateTime": "2018-04-02T13:39:48"
},
{
"jobID": "124-25-S",
"messageID": 35848,
"driverID": 325,
"vehicleName": null,
"driverUserName": "Dave",
"vehicleID": 84686,
"deliveryStatus": "Read",
"latitude": 38.98314,
"longitude": -76.53634,
"gmtDateTime": "2018-04-02T13:39:48"
},
{
"jobID": "124-25-S",
"messageID": 35849,
"driverID": 325,
"vehicleName": null,
"driverUserName": "Dave",
"vehicleID": 84686,
"deliveryStatus": "In Transit",
"latitude": 38.98314,
"longitude": -76.53634,
"gmtDateTime": "2018-04-02T13:39:52"
}
]
}
This endpoint retrieves job status data for a single vehicle.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/job_status_info
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to retrieve job status data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
Get Vehicles Messages
POST /api/v1/vehicles/vehicle_id/messages HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/messages"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1, "utc_start":"3/1/2020", "utc_end":"3/2/2020", "previous_id":-1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/messages',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"MessageID": "28662651",
"MessageType": "Incoming Text",
"MessageDateTime": "2017-05-18T14:42:31",
"VehicleID": "84288",
"VehicleName": "Vehicle 013",
"MessageText": "Resend location",
"MessageStatus": "Read"
},
{
"MessageID": "28781875",
"MessageType": "Incoming Text",
"MessageDateTime": "2017-05-30T19:26:01",
"VehicleID": "84288",
"VehicleName": "Vehicle 013",
"MessageText": "Be there in 60 mins",
"MessageStatus": "Read"
},
{
"MessageID": "28991389",
"MessageType": "Incoming Text",
"MessageDateTime": "2017-06-22T19:18:30",
"VehicleID": "84288",
"VehicleName": "Vehicle 013",
"MessageText": "Out for accident",
"MessageStatus": "Read"
}
]
}
This endpoint retrieves messages for a single vehicle.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/messages
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle |
HTTP Body Parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A message id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
Put Vehicles Messages
PUT /api/v1/vehicles/vehicle_id/new_messages HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/new_messages"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/new_messages',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
[
{
"transaction_id": "55",
"filters": {},
"fields": {},
"params": {
"sender": "StreetEagle",
"message_text": "this is a text message second one",
"message_type": "NONE"
}
]
}
This endpoint sends messages to a single vehicle.
HTTP Request
PUT https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/new_messages
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to send messages |
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| sender | The name or organization sending the message. |
| message_text | The body of the message. |
| message_type | Message type defines how the recipient responds to the text message. The default value is “NONE” and the recipient does not have any automatic responses available. The value of “OK” will provide the recipient with the ability to respond “OK” to any text message sent. The value of “Y/N” will provide the recipient to repond Yes or No to the text message. |
Put Vehicles Route
PUT /api/v1/vehicles/vehicle_id/route HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/vehicles/-1/route"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/vehicles/-1/route',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
``` vehicles = api.vehicles.post();
The above command requires JSON structured like this:
[
{
"transaction_id": "1",
"filters": {},
"fields": {},
"params": {
"route_name": "TestRouteRest180313-45",
"route_dt": "2018-03-13T20:27:28.040Z",
"route_delivery_dt": "2018-03-13T02:27:28.040Z",
"jobs": [
{
"route_job_id": "J3151",
"job_stop_number": "1",
"job_name": "Jo Short",
"job_technician": "",
"job_street": "10809 Tip Hill Ct.",
"job_city": "LaPlata",
"job_state": "MD",
"job_zip": "20646",
"job_notes": "Here are the notes job 1",
"job_lat": "38.4977",
"job_lon": "-76.9378",
"job_email": "",
"job_phone": "",
"job_type": "",
"job_link_expiration": "",
"job_service_date": "2018-03-12T16:27:28.040Z",
"job_start_time": "2018-03-12T18:27:28.040Z",
"job_finish_time": "2018-03-12T19:27:28.040Z",
"job_commit_time": "",
"estimated_job_time": "60",
"job_status": "New",
"send_to_device": true,
"send_email": false,
"icon_id": {},
"vehicle_icon_id": {},
"service_order_url": {},
"email_subject": {},
"email_body": {},
"address_string": "",
"do_forms_fields": "",
"do_forms_values": "",
"do_forms_wsid": "",
"do_forms_form_name": "",
"service_label_ids":""
}
]
}
This endpoint send a route to a single vehicle.
HTTP Request
PUT https://api.insightmobiledata.com/api/v1/vehicles/{vehicle_id}/route
HTTP path parameter
| Parameter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle to retrieve messeages |
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| route_name | Name specific to the route. If it already exists in our system, it will be overwritten with the new list of stops |
| route_dt | Date corresponding to when the route becomes active |
| route_delivery_dt | Date corresponding to when the route will be delivered to a vehicle |
| jobs | JSON array of jobs of type jobInfo. |
Workers
Add Worker
PUT /api/v1/workers/ HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/workers',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
[
{
"transaction_id": "197",
"filters": {},
"fields": {},
"params": {
"user_name": "csnow",
"user_password": "password",
"first_name": "Chris",
"last_name": "Snow",
"button_id": {},
"license_number": "1234",
"license_state": "MD",
"license_type": {},
"is_utility_worker": true,
"utility_worker_user_name": "csnowworker",
"utility_worker_password": "password",
"group_string": "Driver behavior",
"employee_id": "4321",
"email_address": "csnow@email.com",
"phone_number": "222-333-4444",
"phone_carrier": "Verizon"
}
]
}
This endpoint adds a single worker.
HTTP Request
PUT https://api.insightmobiledata.com/api/v1/workers
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| user_name | The user name for the worker. |
| user_password | The password for the worker. |
| first_name | The first name of the worker. |
| last_name | The last name of the worker. |
| button_id | The button ID of the iButton assigned to the worker. |
| license_number | The license number of the worker. |
| license_state | The license state of the worker. |
| license_type | The license type of the worker. |
| is_utility_worker | Boolean value to represent if the worker is a utility worker. |
| utility_worker_user_name | The user name for the utility worker. |
| utility_worker_password | The password for the utility worker. |
| group_string | The name of an existing StreetEagle Pro "group" assigned to the worker. |
| employee_id | The employeeID for the worker. This value is intended to be the employee id assigned in a third party system. |
| email_address | Email address for the worker. |
| phone_number | Phone number for the worker. |
| phone_carrier | Phone carrier name for the worker's phone number. |
Get All Workers
POST /api/v1/workers/ HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/workers',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"driverID": 2,
"userName": "Jack",
"password": "Oberhausen",
"firstName": "Jack",
"lastName": "O",
"buttonID": "",
"email": null,
"phoneNumber": null,
"phoneCarrier": null,
"lastLoginDT": "2018-02-22T20:41:21",
"currentVehicleName": null,
"currentInsightID": 0,
"loginMethod": "SEUtility",
"licenseNumber": "08",
"licenseState": "MD",
"licenseType": "",
"currentJobID": "-1",
"isUtilityWorker": true,
"UtilityWorkerUserName": "Jack",
"UtilityWorkerPassword": "Oberhausen",
"UtilityWorkerLastLoginDT": "2018-03-22T16:32:20",
"UtilityWorkerDeviceType": "3.1.14",
"UtilityWorkerPermission": "Asset,Form,Dispatch,Hos,Fuel,Maintenance,Driver_Portal",
"UtilityWorkerRegistrationID": "APA91bGO2LV7bOKE6iL25AM-vRgTdDOmOiN8g6e9B2QpsaXhi-KdTI2bTo107Wf9T_u2WDjXtbFN1KEZhb_rmGkPksDp1IA7fFMpVI1e0G9_QV9EkaUd0hSx2WbZFibyj54__aVsBc3t",
"UtilityWorkerRegistrationType": "Android",
"groupString": null,
"employeeID": "",
"elogsUpdated": "2018-03-23T15:46:12",
"elogsAvailableHours": 8,
"elogsDaysMissing": 97,
"elogsLogsheetDate": "2017-11-28T00:00:00",
"elogsInspectionDate": "2017-11-15T00:00:00",
"elogsLastStatus": "Off Duty",
"elogsHoursBreakdown": "Driving: 11/11<br/>On Duty: 11/14<br/>Rest: 8/8<br/>US 70/8: 70/70",
"elogsHoursUntilRest": 8,
"lastUpdateDT": "0001-01-01T00:00:00",
"dutyStatus": null,
"drivingHours": 0,
"workingHours": 0,
"weekHours": 0,
"hoursUntilBreak": 0,
"hoursUntilShiftRestart": 0,
"hoursUntilWeekRestart": 0
},
{
"driverID": 5,
"userName": "jacsdemo",
"password": "jacsdemo",
"firstName": "JACS",
"lastName": "DEMO",
"buttonID": "",
"email": null,
"phoneNumber": null,
"phoneCarrier": null,
"lastLoginDT": "2016-11-22T20:00:13",
"currentVehicleName": null,
"currentInsightID": 71330,
"loginMethod": "SEUtility",
"licenseNumber": "",
"licenseState": "",
"licenseType": "",
"currentJobID": "",
"isUtilityWorker": true,
"UtilityWorkerUserName": "jacsdemo",
"UtilityWorkerPassword": "jacsdemo",
"UtilityWorkerLastLoginDT": "2017-04-17T18:16:28",
"UtilityWorkerDeviceType": "TT800V 5.1 3.0.77",
"UtilityWorkerPermission": "",
"UtilityWorkerRegistrationID": "APA91bEgrnD69nfeKNRG8wWh3qQh7X3ufogHXExNDx6GT2vT2FM9gxnAgGrlFuEQ7ZztKiHbEytFtiBgeWK0v2IYgU4A12Frs4T0gVJdEOE29bF9IMIxHwIzqvS2zJ5yCJeGkXI_AHQp",
"UtilityWorkerRegistrationType": "Android",
"groupString": null,
"employeeID": "",
"elogsUpdated": "2017-04-17T19:15:00",
"elogsAvailableHours": -7742.25,
"elogsDaysMissing": -1,
"elogsLogsheetDate": "1900-01-01T00:00:00",
"elogsInspectionDate": "2016-10-11T00:00:00",
"elogsLastStatus": "On Duty",
"elogsHoursBreakdown": "Driving: 11/11<br/>On Duty: 0/14<br/>Rest: 0/8<br/>US 70/8: 0/70",
"elogsHoursUntilRest": -7742.25,
"lastUpdateDT": "0001-01-01T00:00:00",
"dutyStatus": null,
"drivingHours": 0,
"workingHours": 0,
"weekHours": 0,
"hoursUntilBreak": 0,
"hoursUntilShiftRestart": 0,
"hoursUntilWeekRestart": 0
}
]
This endpoint retrieves worker data for all workers.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/workers
Request Body Parameters
Only the transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
Get a Specific Worker
POST /api/v1/workers/worker_id HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/worker_id"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/workers/worker_id',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"driverID": 2,
"userName": "Jack",
"password": "Oberhausen",
"firstName": "Jack",
"lastName": "O",
"buttonID": "",
"email": null,
"phoneNumber": null,
"phoneCarrier": null,
"lastLoginDT": "2018-02-22T20:41:21",
"currentVehicleName": null,
"currentInsightID": 0,
"loginMethod": "SEUtility",
"licenseNumber": "08",
"licenseState": "MD",
"licenseType": "",
"currentJobID": "-1",
"isUtilityWorker": true,
"UtilityWorkerUserName": "Jack",
"UtilityWorkerPassword": "Oberhausen",
"UtilityWorkerLastLoginDT": "2018-03-22T16:32:20",
"UtilityWorkerDeviceType": "3.1.14",
"UtilityWorkerPermission": "Asset,Form,Dispatch,Hos,Fuel,Maintenance,Driver_Portal",
"UtilityWorkerRegistrationID": "APA91bGO2LV7bOKE6iL25AM-vRgTdDOmOiN8g6e9B2QpsaXhi-KdTI2bTo107Wf9T_u2WDjXtbFN1KEZhb_rmGkPksDp1IA7fFMpVI1e0G9_QV9EkaUd0hSx2WbZFibyj54__aVsBc3t",
"UtilityWorkerRegistrationType": "Android",
"groupString": null,
"employeeID": "",
"elogsUpdated": "2018-03-23T15:46:12",
"elogsAvailableHours": 8,
"elogsDaysMissing": 97,
"elogsLogsheetDate": "2017-11-28T00:00:00",
"elogsInspectionDate": "2017-11-15T00:00:00",
"elogsLastStatus": "Off Duty",
"elogsHoursBreakdown": "Driving: 11/11<br/>On Duty: 11/14<br/>Rest: 8/8<br/>US 70/8: 70/70",
"elogsHoursUntilRest": 8,
"lastUpdateDT": "0001-01-01T00:00:00",
"dutyStatus": null,
"drivingHours": 0,
"workingHours": 0,
"weekHours": 0,
"hoursUntilBreak": 0,
"hoursUntilShiftRestart": 0,
"hoursUntilWeekRestart": 0
}
]
This endpoint retrieves a single worker.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/workers/{worker_id}
HTTP path parameter
| Parameter | Description |
|---|---|
| worker_id | The unique identifier of the worker to retrieve worker data |
Request Body Parameters
Only the transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
Get Worker Alerts History
POST /api/v1/workers/worker_id/alerts HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/-1/alerts"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/workers/-1/alerts',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"alertID": 76691,
"alertDate": "2018-03-20T11:53:44",
"alertType": "GF",
"alertMsg": "Tundra VZ ELD (Driver: Chris Eller) has entered geofence: Sunshine at 3/20/2018 7:54 AM\r\n\r\nStreetEagle Support\r\n(866)495-9240",
"driverID": 35,
"driverName": "Chris Eller",
"VehicleName": "Tundra VZ ELD",
"InsightID": 84275
},
{
"alertID": 76693,
"alertDate": "2018-03-20T11:58:56",
"alertType": "GF",
"alertMsg": "Tundra VZ ELD (Driver: Chris Eller) has exited geofence: Sunshine at 3/20/2018 7:59 AM\r\n\r\nStreetEagle Support\r\n(866)495-9240",
"driverID": 35,
"driverName": "Chris Eller",
"VehicleName": "Tundra VZ ELD",
"InsightID": 84275
}
]
This endpoint retrieves alert history data for a single worker.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/workers/{worker_id}/alerts
HTTP path parameter
| Parameter | Description |
|---|---|
| worker_id | The unique identifier of the worker to retrieve alert history data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
| alerts_string | The alert type string is a list of abbreviation(s) that can be included to limit the data retrieved to be just those alert types (e.g. "ACC,SP"). |
Alert Types
Available alert types are defined in the table shown below:
| Alert Type | Description |
|---|---|
| ACC | Driver performance alert |
| BAT | Battery alert |
| EV | Sensor/PTO alert |
| FP | Fuel Purchase alert |
| GF | Geofence alert |
| ID | Idling alert |
| JBUS | JBUS diagnostics alert |
| LG | Long stop alert |
| MM | Maintenance alert |
| MO | Motion alert |
| SP | Speeding Threshold alert |
| SPG | Posted speed Garmin alert |
| SPR | Posted speed Road-Segment alert |
| TP | Temperature alert |
| TW | Tow alert |
Get Worker Custom Forms
POST /api/v1/workers/worker_id/custom_forms HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/-1/custom_forms"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/workers/-1/custom_forms',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"ID": 299,
"formName": "End of Route Vehicle Inspection",
"formFields": [
"Tires:Checked",
"Fluids:Checked",
"Pump Operating Correctly:Checked",
"Heater/Defroster:NULL",
"Stability Items:NULL"
],
"driverID": 41,
"vehicleID": "70414",
"jobID": "7589-7565-S",
"gmtTime": "2016-08-23T16:40:45",
"formType": "Default",
"latitude": 38.30961,
"longitude": -76.54444
}
]
}
This endpoint retrieves custom forms data for a single worker.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/workers/{worker_id}/custom_forms
HTTP path parameter
| Parameter | Description |
|---|---|
| worker_id | The unique identifier of the worker to retrieve custom forms data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
| form_type | The form type is a list of types that can be included to limit the data retrieved to be just those alert types (e.g. "Default,Job"). |
Form Types
Available form types are defined in the table shown below:
| Form Type | Description |
|---|---|
| Default | Default form |
| Inspection | Inspection form |
| Inventory | Inventory form |
| Job | Job form |
| Maintenance | Maintenance form |
| Service | Service form |
| Weight | Weight form |
Get Worker Driver Performance
POST /api/v1/workers/worker_id/driver_performance HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/-1/driver_performance"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/workers/-1/driver_performance',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"reportDate": "2018-04-15T00:00:00",
"driverID": 35,
"driverName": "Chris Eller",
"employeeID": null,
"VehicleName": "Tundra VZ ELD",
"InsightID": 84275,
"SpeedingEventCount": 4,
"PostedSpeedingEventCount": 0,
"IdlingEventCount": 0,
"TotalBrakingEventCount": 0,
"HardBrakingEventCount": 0,
"HardBrakingEventGforceAverage": 0,
"HardBrakingEventDuration": 0,
"HarshBrakingEventCount": 0,
"HarshBrakingEventGforceAverage": 0,
"HarshBrakingEventDuration": 0,
"SevereBrakingEventCount": 0,
"SevereBrakingEventGforceAverage": 0,
"SevereBrakingEventDuration": 0,
"CorneringEventCount": 0,
"CorneringEventGforceAverage": 0,
"CorneringEventDuration": 0,
"TotalAccelerationEventCount": 1,
"HardAccelerationEventCount": 1,
"HardAccelerationEventGforceAverage": 0.22,
"HardAccelerationEventDuration": 2,
"HarshAccelerationEventCount": 0,
"HarshAccelerationEventGforceAverage": 0,
"HarshAccelerationEventDuration": 0,
"SevereAccelerationEventCount": 0,
"SevereAccelerationEventGforceAverage": 0,
"SevereAccelerationEventDuration": 0,
"TotalSpeedingDuration": 64,
"TotalPostedSpeedingDuration": 0,
"TotalPostedSpeedingMileage": 0,
"TotalSpeedingMileage": 1.01,
"TotalIdlingDuration": 0,
"TotalEventCount": 5,
"TotalVehicleMileage": 42.26,
"TotalScore": 98.88,
"SpeedingScore": 24.53,
"IdlingScore": 25,
"PostedScore": 25,
"DriverExceptionScore": 24.35,
"PercentSpeeding": 0.93,
"PercentSpeedingPosted": 0,
"TotalPercentSpeeding": 0.93,
"PercentIdling": 0,
"DriverBehaviorEventRate": 0.52,
"TotalSpeedingEventCount": 4,
"TotalSevereEventCount": 0,
"TotalHarshEventCount": 0,
"TotalHardEventCount": 1,
"VTU": "V119",
"vid": null,
"TotalInTransitTime": 6876
}
]
This endpoint retrieves driver performance data for a single worker or group of workers.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/workers/{worker_id}/driver_performance
If you are retrieving data for a single worker then the url parameter worker_id is required.
If you are retrieving data for a group then the url parameter worker_id should be set to "-1" and a request body param named group_name is required.
HTTP path parameter
| Parameter | Description |
|---|---|
| worker_id | The unique identifier of the worker to retrieve driver performance data |
HTTP body parameters
The transaction_id is required. In addition, valid utc_start and utc_end dates are required for a group or a single vehicle request. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| group_name | A valid StreetEagle Pro group name. Required if retrieving for a group. |
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| weights | An object of type "weights" (see object defintion for details) is required. |
| thresholds | An object of type "thresholds" (see object defintion for details) is required. |
Get Workers ELD
POST /api/v1/workers/worker_id/eld HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/-1/eld"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/workers/-1/eld',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"driverID": 355,
"firstName": "Charles",
"lastName": "Smith",
"lastUpdateDT": "2018-04-12T12:34:36",
"currentVehicleName": "Truck 1",
"currentInsightID": 84275,
"dutyStatus": "Off Duty",
"drivingHours": 11,
"workingHours": 14,
"weekHours": 70,
"hoursUntilBreak": 0,
"hoursUntilShiftRestart": 0,
"hoursUntilWeekRestart": 0
}
]
This endpoint retrieves eld data for a single worker.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/workers/{worker_id}/eld
HTTP path parameter
| Parameter | Description |
|---|---|
| worker_id | The unique identifier of the worker to retrieve eld data |
Request Body Parameters
The transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
Get Workers ELD History
POST /api/v1/workers/worker_id/eld_history HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/-1/eld_history"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/workers/-1/eld_history',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"record_index": 343986,
"driverID": 355,
"driver_name": "Charles Smith",
"status_change_local_dt": "2018-04-12T08:34:36",
"status_change_utc_dt": "2018-04-12T12:34:36",
"time_zone": "EDT",
"duty_status_number": 4,
"duty_status_name": "On Duty (Not Driving)",
"vehicle_id": 999999,
"vehicle_name": "Truck 1",
"vehicle_vin": "5TFHY5F1XFX472683",
"eld_trip_type": null,
"eld_rule_set": null
},
{
"record_index": 343979,
"driverID": 355,
"driver_name": "Charles Smith",
"status_change_local_dt": "2018-04-12T08:28:49",
"status_change_utc_dt": "2018-04-12T12:28:49",
"time_zone": "EDT",
"duty_status_number": 3,
"duty_status_name": "Driving",
"vehicle_id": 999999,
"vehicle_name": "Truck 1",
"vehicle_vin": "5TFHY5F1XFX472683",
"eld_trip_type": null,
"eld_rule_set": null
}
]
}
This endpoint retrieves eld duty status historical data for a single worker.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/workers/{worker_id}/eld_history
HTTP path parameter
| Parameter | Description |
|---|---|
| worker_id | The unique identifier of the vehicle to retrieve eld duty status historical data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
Get Workers Job Status
POST /api/v1/workers/worker_id/job_status_info HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/-1/job_status_info"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/workers/-1/job_status_info',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"jobID": "124-25-S",
"messageID": 35847,
"driverID": 325,
"vehicleName": null,
"driverUserName": "Dave",
"vehicleID": 84686,
"deliveryStatus": "Unread",
"latitude": 38.98314,
"longitude": -76.53634,
"gmtDateTime": "2018-04-02T13:39:48"
},
{
"jobID": "124-25-S",
"messageID": 35848,
"driverID": 325,
"vehicleName": null,
"driverUserName": "Dave",
"vehicleID": 84686,
"deliveryStatus": "Read",
"latitude": 38.98314,
"longitude": -76.53634,
"gmtDateTime": "2018-04-02T13:39:48"
},
{
"jobID": "124-25-S",
"messageID": 35849,
"driverID": 325,
"vehicleName": null,
"driverUserName": "Dave",
"vehicleID": 84686,
"deliveryStatus": "In Transit",
"latitude": 38.98314,
"longitude": -76.53634,
"gmtDateTime": "2018-04-02T13:39:52"
}
]
}
This endpoint retrieves job status data for a single worker.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/workers/{worker_id}/job_status_info
HTTP path parameter
| Parameter | Description |
|---|---|
| worker_id | The unique identifier of the worker to retrieve job status data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
Get Workers Status History
POST /api/v1/workers/status_history HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/status_history"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/workers/status_history',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"indx": 3680,
"driverID": 35,
"driverName": "Chris Eller",
"driverStatus": "Clock In",
"utcTime": "2020-01-22T17:48:54",
"latitude": 38.3095983,
"longitude": -76.5447501,
"device": "Pixel",
"vehicleName": "Celler WL-360",
"vehicleID": 98550
},
{
"indx": 3681,
"driverID": 588,
"driverName": "Yusata2 Test",
"driverStatus": "At Destination",
"utcTime": "2020-02-05T05:00:04",
"latitude": 26.8034351,
"longitude": 75.8178367,
"device": "iPhone",
"vehicleName": "Vehicle 175",
"vehicleID": -1
},
{
"indx": 3682,
"driverID": 588,
"driverName": "Yusata2 Test",
"driverStatus": "En Route",
"utcTime": "2020-02-05T11:23:54",
"latitude": -1.0,
"longitude": -1.0,
"device": "iPhone",
"vehicleName": "Vehicle 175",
"vehicleID": -1
},
{
"indx": 3683,
"driverID": 76,
"driverName": "Yusata Test",
"driverStatus": "Damage see notes",
"utcTime": "2020-02-07T05:53:40",
"latitude": 26.803466,
"longitude": 75.8178357,
"device": "iPhone",
"vehicleName": "Jim Healy",
"vehicleID": 71320
},
{
"indx": 3684,
"driverID": 41,
"driverName": "Chris Demarco",
"driverStatus": "At Scene",
"utcTime": "2020-02-19T19:14:42",
"latitude": 38.3095655,
"longitude": -76.5447253,
"device": "SM-T337V",
"vehicleName": "Forester WL360 New",
"vehicleID": 102454
},
{
"indx": 3685,
"driverID": 41,
"driverName": "Chris Demarco",
"driverStatus": "Clock In",
"utcTime": "2020-02-19T19:14:49",
"latitude": 38.3095577,
"longitude": -76.5447208,
"device": "SM-T337V",
"vehicleName": "Forester WL360 New",
"vehicleID": 102454
},
{
"indx": 3686,
"driverID": 588,
"driverName": "Yusata2 Test",
"driverStatus": "Available",
"utcTime": "2020-02-20T05:56:18",
"latitude": 26.8034373552009,
"longitude": 75.817815597261,
"device": "iPad",
"vehicleName": "Barry 360 Cam",
"vehicleID": 101978
},
{
"indx": 3687,
"driverID": 76,
"driverName": "Yusata Test",
"driverStatus": "At Destination",
"utcTime": "2020-02-20T06:24:07",
"latitude": 26.8034483344574,
"longitude": 75.8179095322104,
"device": "iPad",
"vehicleName": "Jim Healy",
"vehicleID": 71320
},
{
"indx": 3688,
"driverID": 588,
"driverName": "Yusata2 Test",
"driverStatus": "Portable Unit Picked Up",
"utcTime": "2020-02-20T13:53:37",
"latitude": 26.8035011831921,
"longitude": 75.8176898305079,
"device": "iPhone",
"vehicleName": "Barry 360 Cam",
"vehicleID": 101978
}
]
}
This endpoint retrieves worker status history.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/workers/status_history
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
HTTP request body filters
| Filter | Description |
|---|---|
| driver_ids | JSON array of numeric driverID values |
| statuses | JSON array of String statuses |
Get Workers Messages
POST /api/v1/workers/worker_id/messages HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/-1/messages"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/workers/-1/messages',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"MessageID": "28662651",
"MessageType": "Incoming Text",
"MessageDateTime": "2017-05-18T14:42:31",
"WorkerID": "88",
"WorkerName": "David Todd",
"MessageText": "Resend location",
"MessageStatus": "Read"
},
{
"MessageID": "28781875",
"MessageType": "Incoming Text",
"MessageDateTime": "2017-05-30T19:26:01",
"WorkerID": "88",
"WorkerName": "David Todd",
"MessageText": "Be there in 60 mins",
"MessageStatus": "Read"
},
{
"MessageID": "28991389",
"MessageType": "Incoming Text",
"MessageDateTime": "2017-06-22T19:18:30",
"WorkerID": "88",
"WorkerName": "David Todd",
"MessageText": "Out for accident",
"MessageStatus": "Read"
}
]
}
This endpoint retrieves messages for a single worker.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/workers/{worker_id}/messages
HTTP path parameter
| Parameter | Description |
|---|---|
| worker_id | The unique identifier of the worker |
HTTP Body Parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A message id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
Put Workers Messages
PUT /api/v1/workers/worker_id/new_messages HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/-1/new_messages"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/workers/-1/new_message',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
[
{
"transaction_id": "55",
"filters": {},
"fields": {},
"params": {
"sender": "StreetEagle",
"message_text": "this is a text message second one",
"message_type": "NONE"
}
]
}
This endpoint sends messages to a single worker.
HTTP Request
PUT https://api.insightmobiledata.com/api/v1/workers/{worker_id}/new_messages
HTTP path parameter
| Parameter | Description |
|---|---|
| worker_id | The unique identifier of the worker to send messages |
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| sender | The name or organization sending the message. |
| message_text | The body of the message. |
| message_type | Message type defines how the recipient responds to the text message. The default value is “NONE” and the recipient does not have any automatic responses available. The value of “OK” will provide the recipient with the ability to respond “OK” to any text message sent. The value of “Y/N” will provide the recipient to repond Yes or No to the text message. |
Put Workers Route
PUT /api/v1/workers/worker_id/route HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/workers/-1/route"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/workers/-1/route',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
[
{
"transaction_id": "1",
"filters": {},
"fields": {},
"params": {
"route_name": "TestRouteRest180313-45",
"route_dt": "2018-03-13T20:27:28.040Z",
"route_delivery_dt": "2018-03-13T02:27:28.040Z",
"jobs": [
{
"route_job_id": "J3151",
"job_stop_number": "1",
"job_name": "Jo Short",
"job_technician": "",
"job_street": "10809 Tip Hill Ct.",
"job_city": "LaPlata",
"job_state": "MD",
"job_zip": "20646",
"job_notes": "Here are the notes job 1",
"job_lat": "38.4977",
"job_lon": "-76.9378",
"job_email": "",
"job_phone": "",
"job_type": "",
"job_link_expiration": {},
"job_service_date": "2018-03-12T16:27:28.040Z",
"job_start_time": "2018-03-12T18:27:28.040Z",
"job_finish_time": "2018-03-12T19:27:28.040Z",
"job_commit_time": "",
"estimated_job_time": "60",
"job_status": "New",
"send_to_device": true,
"send_email": false,
"icon_id": "",
"vehicle_icon_id": "",
"service_order_url": "",
"email_subject": "",
"email_body": "",
"address_string": "",
"do_forms_fields": "",
"do_forms_values": "",
"do_forms_wsid": "",
"do_forms_form_name": "",
"service_label_ids":""
}
]
}
This endpoint send a route to a single worker.
HTTP Request
PUT https://api.insightmobiledata.com/api/v1/workers/{worker_id}/route
HTTP path parameter
| Parameter | Description |
|---|---|
| worker_id | The unique identifier of the worker to retrieve messeages |
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| route_name | Name specific to the route. If it already exists in our system, it will be overwritten with the new list of stops |
| route_dt | Date corresponding to when the route becomes active |
| route_delivery_dt | Date corresponding to when the route will be delivered to a vehicle |
| jobs | JSON array of jobs of type jobInfo. |
Routes
Put Saved Route
PUT /api/v1/route HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/routes"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/routes',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
[
{
"transaction_id": "1",
"filters": {},
"fields": {},
"params": {
"route_name": "TestRouteRest180313-45",
"route_dt": "2018-03-13T20:27:28.040Z",
"jobs": [
{
"route_job_id": "J3151",
"job_stop_number": "1",
"job_name": "Jo Short",
"job_technician": "",
"job_street": "10809 Tip Hill Ct.",
"job_city": "LaPlata",
"job_state": "MD",
"job_zip": "20646",
"job_notes": "Here are the notes job 1",
"job_lat": "38.4977",
"job_lon": "-76.9378",
"job_email": "",
"job_phone": "",
"job_type": "",
"job_link_expiration": "",
"job_service_date": "2018-03-12T16:27:28.040Z",
"job_start_time": "2018-03-12T18:27:28.040Z",
"job_finish_time": "2018-03-12T19:27:28.040Z",
"job_commit_time": "",
"estimated_job_time": "60",
"job_status": "New",
"send_to_device": true,
"send_email": false,
"icon_id": "",
"vehicle_icon_id": "",
"service_order_url": "",
"email_subject": "",
"email_body": "",
"address_string": "",
"do_forms_fields": "",
"do_forms_values": "",
"do_forms_wsid": "",
"do_forms_form_name": "",
"service_label_ids":""
}
]
}
This endpoint creates a saved route and returns the saved route ID.
HTTP Request
PUT https://api.insightmobiledata.com/api/v1/routes
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| route_name | Name specific to the route. If it already exists in our system, it will be overwritten with the new list of stops |
| jobs | JSON array of jobs of type jobInfo. |
Get Scheduled Routes
POST /api/v1/routes/scheduled HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/routes/scheduled"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/routes/scheduled',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
{
"status": 200,
"response": [
{
"scheduledRouteID": 32543,
"savedRouteID": 2431,
"worker": "Michael O",
"vehicle": "",
"route_dt": "2020-03-09T19:21:00",
"total_stops": 5,
"completed_stops": 1,
"skipped_stops": 0,
"other_stops": 0,
"stop_list": [
{
"index": 221342,
"jobID": "001-151 SENIOR CIR-0000404",
"stopOrder": 1,
"stopName": "151 SENIOR CIR",
"status": "Completed",
"dispatch_status": "completed",
"status_dt": "3/9/2020 7:47:51 PM",
"address": "151 SENIOR CIR,GAINESVILLE, GA 0",
"latitude": 34.3302882,
"longitude": -83.810365,
"camera_event_ids": "",
"image_ids": "129079"
},
{
"index": 221343,
"jobID": "002-152 SENIOR CIR-0000420",
"stopOrder": 2,
"stopName": "152 SENIOR CIR",
"status": "",
"dispatch_status": "",
"status_dt": "",
"address": "152 SENIOR CIR,GAINESVILLE, GA 0",
"latitude": 34.3302212,
"longitude": -83.8107927,
"camera_event_ids": "",
"image_ids": ""
},
{
"index": 221344,
"jobID": "003-1223 LAKESTONE CT-0000427",
"stopOrder": 3,
"stopName": "1223 LAKESTONE CT",
"status": "",
"dispatch_status": "",
"status_dt": "",
"address": "1223 LAKESTONE CT,GAINESVILLE, GA 0",
"latitude": 34.3348012,
"longitude": -83.8000178,
"camera_event_ids": "",
"image_ids": ""
},
{
"index": 221345,
"jobID": "004-18 High St LLC-0000434",
"stopOrder": 4,
"stopName": "18 High St LLC",
"status": "",
"dispatch_status": "",
"status_dt": "",
"address": "18 HIGH ST,GREENWICH, CT 6830",
"latitude": 41.007667,
"longitude": -73.652771,
"camera_event_ids": "",
"image_ids": ""
},
{
"index": 221346,
"jobID": "005-20 Nate Nutting Rd-0000441",
"stopOrder": 5,
"stopName": "20 Nate Nutting Rd",
"status": "",
"dispatch_status": "",
"status_dt": "",
"address": "20 Nate Nutting Rd,Groton, MA 1450",
"latitude": 42.5878,
"longitude": -71.5362,
"camera_event_ids": "",
"image_ids": ""
}
]
}
]
}
This endpoint retrieves scheduled routes for a specified date, including route stop statuses.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/routes/scheduled
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| specific_date | Route date in MM/dd/yyyy format. |
| summary_only | Set to false to show route stop details. |
HTTP request body filters
| Filter | Description |
|---|---|
| vehicle_id | The unique identifier of the vehicle |
| worker_id | The unique identifer of the worker |
| job_id | The unique identifer of the job |
| saved_route_id | The unique identifer of the saved route |
| scheduled_route_id | The unique identifer of the scheduled route |
Get Saved Route
POST /api/v1/routes/identifier HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/routes/identifier"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/routes/identifier',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"JobRouteName": "TestRouteRest180322-58",
"RouteJobID": "J322-7",
"JobStopNumber": 1,
"JobName": "Caryl Ruckert",
"JobTechnician": "Fred",
"JobStreet": "4511 Chavez Ct.",
"JobCity": "Chesapeake Beach",
"JobState": "MD",
"JobZip": "20732",
"JobNotes": "Here are the notes job 2",
"JobLat": 38.4977,
"JobLon": -76.9378,
"JobEmail": "",
"JobPhone": "",
"JobType": "",
"JobLinkExpiration": null,
"JobServiceDate": "2018-03-22T16:27:28",
"JobStartTime": "2018-03-22T18:27:28",
"JobFinishTime": "2018-03-22T19:27:28",
"JobCommitTime": "1970-01-01T00:00:00",
"EstimatedJobTime": 60,
"JobStatus": "New",
"SendToDevice": false,
"SendEmail": false,
"IconID": -1,
"VehicleIconID": -1,
"ServiceOrderURL": "",
"EmailSubject": "",
"EmailBody": "",
"JobLabelForeground": null,
"JobLabelBackground": null,
"JobVehLabelForeground": null,
"JobVehLabelBackground": null,
"AddressString": null,
"UnassignedJobBackground": null,
"Directions": "",
"DoFormsFields": null,
"DoFormsValues": null,
"DoFormsWSID": null,
"DoFormsFormName": null
}
]
This endpoint retrieves a single route.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/routes/{identifier}
HTTP path parameter
| Parameter | Description |
|---|---|
| identifier | The saved route ID or saved route name of the route |
Request Body Parameters
Only the transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
Delete Saved Route
DELETE /api/v1/routes/identifer HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/routes/identifer"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'DELETE',
url: 'http://api.insightmobiledata.com/api/v1/routes/identifer',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
This endpoint deletes a single route.
HTTP Request
DELETE https://api.insightmobiledata.com/api/v1/routes/{identifer}
HTTP path parameter
| Parameter | Description |
|---|---|
| identifier | The saved route ID or saved route name of the route |
Request Body Parameters
Only the transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
Delete Scheduled Route Job
DELETE /api/v1/routes/scheduled/scheduled_route_id/routestop HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/routes/scheduled/scheduled_route_id/routestop"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'DELETE',
url: 'http://api.insightmobiledata.com/api/v1/routes/scheduled/scheduled_route_id/routestop',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
This endpoint deletes one or more jobs for a specified scheduled route.
HTTP Request
DELETE https://api.insightmobiledata.com/api/v1/routes/scheduled/{scheduled_route_id}/routestop
HTTP path parameter
| Parameter | Description |
|---|---|
| scheduled_route_id | The unique identifier of a scheduled route instance |
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| job_ids | JSON array of route_job_id values. |
Put Scheduled Route Job
PUT /api/v1/routes/scheduled/scheduled_route_id/routestop HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api/v1/routes/scheduled/scheduled_route_id/routestop"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/routes/scheduled/scheduled_route_id/routestop',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
[
{
"transaction_id": "1",
"filters": {},
"fields": {},
"params": {
"route_delivery_dt": "2018-03-13T02:27:28.040Z",
"jobs": [
{
"route_job_id": "J3151",
"job_stop_number": "1",
"job_name": "Jo Short",
"job_technician": "",
"job_street": "10809 Tip Hill Ct.",
"job_city": "LaPlata",
"job_state": "MD",
"job_zip": "20646",
"job_notes": "Here are the notes job 1",
"job_lat": "38.4977",
"job_lon": "-76.9378",
"job_email": "",
"job_phone": "",
"job_type": "",
"job_link_expiration": "",
"job_service_date": "2018-03-12T16:27:28.040Z",
"job_start_time": "2018-03-12T18:27:28.040Z",
"job_finish_time": "2018-03-12T19:27:28.040Z",
"job_commit_time": "",
"estimated_job_time": "60",
"job_status": "New",
"send_to_device": true,
"send_email": false,
"icon_id": "",
"vehicle_icon_id": "",
"service_order_url": "",
"email_subject": "",
"email_body": "",
"address_string": {},
"do_forms_fields": "",
"do_forms_values": "",
"do_forms_wsid": "",
"do_forms_form_name": "",
"service_label_ids":""
}
]
}
This endpoint adds one or more jobs to a specified scheduled route.
HTTP Request
PUT https://api.insightmobiledata.com/api/v1/routes/scheduled/{scheduled_route_id}/routestop
HTTP path parameter
| Parameter | Description |
|---|---|
| scheduled_route_id | The unique identifier of a scheduled route instance |
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| route_delivery_dt | Datetime for the delivery of the route. |
| jobs | JSON array of jobs of type jobInfo. |
Put Saved Route Job
PUT /api/v1/routes/saved_route_id/routestop HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/routes/saved_route_id/routestop"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/routes/saved_route_id/routestop',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
[
{
"transaction_id": "1",
"filters": {},
"fields": {},
"params": {
"jobs": [
{
"route_job_id": "J3151",
"job_stop_number": "1",
"job_name": "Jo Short",
"job_technician": "",
"job_street": "10809 Tip Hill Ct.",
"job_city": "LaPlata",
"job_state": "MD",
"job_zip": "20646",
"job_notes": "Here are the notes job 1",
"job_lat": "38.4977",
"job_lon": "-76.9378",
"job_email": "",
"job_phone": "",
"job_type": "",
"job_link_expiration": "",
"job_service_date": "2018-03-12T16:27:28.040Z",
"job_start_time": "2018-03-12T18:27:28.040Z",
"job_finish_time": "2018-03-12T19:27:28.040Z",
"job_commit_time": "",
"estimated_job_time": "60",
"job_status": "New",
"send_to_device": true,
"send_email": false,
"icon_id": "",
"vehicle_icon_id": "",
"service_order_url": "",
"email_subject": "",
"email_body": "",
"address_string": {},
"do_forms_fields": "",
"do_forms_values": "",
"do_forms_wsid": "",
"do_forms_form_name": "",
"service_label_ids":""
}
]
}
This endpoint sends one or more jobs to the StreetEagle Pro Route Manager.
HTTP Request
PUT https://api.insightmobiledata.com/api/v1/routes/{saved_route_id}/routestop
HTTP path parameter
| Parameter | Description |
|---|---|
| saved_route_id | The unique identifier of a saved route instance |
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| jobs | JSON array of jobs of type jobInfo. |
Delete Saved Route Job
DELETE /api/v1/routes/saved_route_id/routestop HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/routes/saved_route_id/routestop"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'DELETE',
url: 'http://api.insightmobiledata.com/api/v1/routes/saved_route_id/routestop',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
This endpoint deletes one or more jobs for a specified scheduled route.
HTTP Request
DELETE https://api.insightmobiledata.com/api/v1/routes/{saved_route_id}/routestop
HTTP path parameter
| Parameter | Description |
|---|---|
| saved_route_id | The unique identifier of a saved route instance |
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| job_ids | JSON array of route_job_id values. |
Cameras
Get Cameras
POST /api/v1/cameras/ HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/cameras"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/cameras',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"CameraID": "83821443",
"CameraModel": "ROSCO",
"DataUsage": 62,
"DataLimit": 1024,
"VehicleID": 86683,
"WorkerID": -1,
"VehicleName": "ROSCO Bench",
"WorkerName": "",
"OnlineState": true,
"OnlineState_UTC": "2020-02-10T10:13:23",
"LiveStreamURL": "http://instantreplay.insightmobiledata.com/live.aspx?dXNlcm5hbWU9c2FsZXMxMjMmcGFzc3dvcmQ9c2FsZXMxMjMmY2FtZXJhSUQ9ODM4MjE0NDM=z"
}
]
This endpoint retrieves camera data.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/cameras
Request Body Parameters
Only the transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
HTTP request body filters
| Filter | Description |
|---|---|
| online_state | The online status for the camera. Pass 0 for offline cameras only, 1 for online cameras only, blank for all cameras. |
| camera_ids | JSON array of camera ID values |
| vehicle_ids | JSON array of vehicle ID values |
| worker_ids | JSON array of worker ID values |
Get Camera Analytics
POST /api/v1/cameras/ HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/cameras/camera_id/analytics"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/cameras/camera_id/analytics',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
{
"status": 200,
"response": {
"live_stream_count": 10,
"clip_count": 0,
"snapshot_count": 2
}
}
This endpoint retrieves camera analytics information including live stream, clips, and snapshots count for the previous 30 days.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/cameras/{camera_id}/analytics
Request Body Parameters
Only the transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
Get Camera Events
POST /api/v1/cameras/clips/ HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/cameras/clips"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/cameras/clips',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"EventID": 76414,
"EventUTC": "2020-02-05T00:27:13",
"EventType": "Hard Braking",
"EventStatus": "No Video",
"Duration": 20,
"IsSnapshot": false,
"Description": "",
"ReplayURL": "http://instantreplay.insightmobiledata.com/replay.aspx?dXNlcm5hbWU9c2FsZXMxMjMmcGFzc3dvcmQ9c2FsZXMxMjMmY2xpcElEPTc2NDE0z",
"CameraID": "17355601",
"VehicleID": 97779,
"WorkerID": -1,
"VehicleName": "LMU 3 wire David",
"WorkerName": "",
"Latitude": 40.92416,
"Longitude": -74.37408
},
{
"EventID": 76429,
"EventUTC": "2020-02-06T12:57:32",
"EventType": "Hard Braking",
"EventStatus": "Uploaded",
"Duration": 20,
"IsSnapshot": false,
"Description": "",
"ReplayURL": "http://instantreplay.insightmobiledata.com/replay.aspx?dXNlcm5hbWU9c2FsZXMxMjMmcGFzc3dvcmQ9c2FsZXMxMjMmY2xpcElEPTc2NDI5z",
"CameraID": "17355601",
"VehicleID": 97779,
"WorkerID": -1,
"VehicleName": "LMU 3 wire David",
"WorkerName": "",
"Latitude": 40.90647,
"Longitude": -74.39782
}
]
This endpoint retrieves camera event data.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/cameras/clips
HTTP body parameters
The transaction_id is required. A valid start_utc and end_utc date is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| start_utc | Start date and time of a camera event. |
| end_utc | End date and time of a camera event. |
HTTP request body filters
| Filter | Description |
|---|---|
| event_ids | JSON array of camera event ID values. |
| camera_ids | JSON array of camera ID values |
| vehicle_ids | JSON array of vehicle ID values |
| worker_ids | JSON array of worker ID values |
Put Camera Event
PUT /api/v1/cameras/camera_id/clips HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/cameras/-1/clips"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/cameras/clips',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
[
{
"transaction_id": "1",
"filters": {},
"fields": {},
"params": {}
}
]
This endpoint creates a camera event.
HTTP Request
PUT https://api.insightmobiledata.com/api/v1/cameras/{camera_id}/clips
HTTP path parameter
| Parameter | Description |
|---|---|
| camera_id | The unique identifier of a camera |
HTTP body parameters
The transaction_id is required. A valid start_utc, duration and is_snapshot is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| event_utc | Start date and time of a camera event. |
| duration | Camera event duration in seconds. |
| is_snapshot | Boolean for requesting an image or a video. A value of True will overwrite the duration parameter. |
| worker_id | Optional parameter. Default will be -1. |
| event_latitude | Optional parameter. Default will be -1. |
| event_longitude | Optional parameter. Default will be -1. |
Put Camera Data Limit
PUT /api/v1/cameras/camera_id/data_limit HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/cameras/-1/data_limit"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/cameras/data_limit',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
[
{
"transaction_id": "1",
"filters": {},
"fields": {},
"params": {
"data_limit": 1024
}
}
]
This endpoint updates the camera data limit (MB).
HTTP Request
POST https://api.insightmobiledata.com/api/v1/cameras/{camera_id}/data_limit
HTTP path parameter
| Parameter | Description |
|---|---|
| camera_id | The unique identifier of a camera |
HTTP body parameters
The transaction_id and a valid data_limit value are required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| data_limit | Numeric value in Megabytes. |
Customers
Get All Assets
POST /api/v1/customers/assets/ HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/customers/assets"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/customers/assets',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"record_id": null,
"assetID": "1",
"assetName": "Trailer 1",
"assetType": "ELD Trailer",
"tacID": null,
"lastScannedByVehicle": null,
"lastScannedByDriver": null,
"address": null,
"scannedLocalDateTime": "1970-01-01T00:00:00",
"scannedGMTDateTime": "1970-01-01T00:00:00",
"latitude": 0,
"longitude": 0,
"batteryLevel": 0,
"lastAction": "",
"lastNotes": ""
},
{
"record_id": null,
"assetID": "10",
"assetName": "Trailer 10",
"assetType": "ELD Trailer",
"tacID": null,
"lastScannedByVehicle": null,
"lastScannedByDriver": null,
"address": null,
"scannedLocalDateTime": "1970-01-01T00:00:00",
"scannedGMTDateTime": "1970-01-01T00:00:00",
"latitude": 0,
"longitude": 0,
"batteryLevel": 0,
"lastAction": "",
"lastNotes": ""
}
]
This endpoint retrieves asset data for a customer.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/customers/assets/
Request Body Parameters
Only the transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
Get Customers Asset History
POST /api/v1/customers/assets/asset_id/history HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/customers/assets/-1/history"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/customers/assets/-1/history',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"record_id": "1753",
"assetID": "P000005",
"assetName": "DiCarlo Desk",
"assetType": "Portable",
"tacID": null,
"lastScannedByVehicle": "Not Available",
"lastScannedByDriver": "Jack O",
"address": "23322 Cottonwood Pkwy, California, MD 20619",
"scannedLocalDateTime": "0001-01-01T00:00:00",
"scannedGMTDateTime": "2018-02-05T19:24:00",
"latitude": 38.30973,
"longitude": -76.54468,
"batteryLevel": 0,
"lastAction": "Service",
"lastNotes": ""
}
]
}
This endpoint retrieves asset history data for a single asset.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/customers/assets/{asset_id}/history
HTTP path parameter
| Parameter | Description |
|---|---|
| asset_id | The unique identifier of an asset |
HTTP path parameter
| Parameter | Description |
|---|---|
| asset_id | The unique identifier of the asset to retrieve history data |
HTTP body parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
Get Customers Custom Forms
POST /api/v1/customers/job_id/custom_forms HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/customers/-1/custom_forms"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/customers/-1/custom_forms',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
[
{
"ID": 299,
"formName": "End of Route Vehicle Inspection",
"formFields": [
"Tires:Checked",
"Fluids:Checked",
"Pump Operating Correctly:Checked",
"Heater/Defroster:NULL",
"Stability Items:NULL"
],
"driverID": 41,
"vehicleID": "70414",
"jobID": "7589-7565-S",
"gmtTime": "2016-08-23T16:40:45",
"formType": "Default",
"latitude": 38.30961,
"longitude": -76.54444
}
]
}
This endpoint retrieves custom forms data for a single job.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/customers/{job_id}/custom_forms
HTTP path parameter
| Parameter | Description |
|---|---|
| job_id | The unique identifier of the job to retrieve custom forms data |
HTTP Body Parameters
The transaction_id is required. A valid utc_start and utc_end date or a previous_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| utc_start | A valid start date for retrieving data is required. |
| utc_end | A valid end date for retrieving data is required. |
| previous_id | A record id is returned in the json data. This value can be used to limit the records retrieved to those greater than that value. |
| form_type | The form type is a list of types that can be included to limit the data retrieved to be just those alert types (e.g. "Default,Job"). |
Form Types
Available form types are defined in the table shown below:
| Form Type | Description |
|---|---|
| Default | Default form |
| Inspection | Inspection form |
| Inventory | Inventory form |
| Job | Job form |
| Maintenance | Maintenance form |
| Service | Service form |
| Weight | Weight form |
Get Image Data
POST /api/v1/customers/images/{image_id} HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/customers/images/{image_id}"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/customers/images/{image_id}',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
{
"status": 200,
"response": {
"worker_id": 305,
"vehicle_id": 84286,
"job_id": "001-151 SENIOR CIR-0000404",
"scheduled_route_id": 32543,
"latitude": 38.3095589,
"longitude": -76.54471,
"utc_time": "2020-03-09T19:27:14",
"image_type": "Picture",
"signature_name": "",
"image_data": "/9j/4AAQSkZJRgABAQAAAQA..."
}
}
}
This endpoint retrieves image information based on an image_id.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/customers/images/{image_id}
HTTP path parameter
| Parameter | Description |
|---|---|
| image_id | The unique identifier of the image to data |
HTTP Body Parameters
The transaction_id is required.
Get User Link
POST /api/v1/customers/user_link HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/customers/user_link"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/customers/user_link',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
{
"transaction_id":"1",
"filters":{},
"fields":{},
"params":{
"link_type":"myScore"
}
}
This endpoint retrieves user links.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/customers/user_link
HTTP Body Parameters
The transaction_id is required.
| Parameter | Description |
|---|---|
| link_type | Used to indicate what link to return (i.e. "myScore") |
Service Labels
Get Service Labels
POST /api/v1/service_labels/ HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/service_labels"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'POST',
url: 'http://api.insightmobiledata.com/api/v1/service_labels',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command returns JSON structured like this:
{
[
{
"id": 1,
"name": "Monday",
"description": "DoW Mon",
"hex_color": "#CCC009",
"order": 1
},
{
"id": 2,
"name": "Tuesday",
"description": "DoW Tue",
"hex_color": "#FF33CC",
"order": 2
},
{
"id": 3,
"name": "Wednesday",
"description": "DoW Wed",
"hex_color": "#1F497D",
"order": 3
},
{
"id": 8,
"name": "Thursday",
"description": "DoW Thu",
"hex_color": "#00B050",
"order": 4
},
{
"id": 17,
"name": "Friday",
"description": "Test",
"hex_color": "#1F497D",
"order": 5
}
]
}
This endpoint retrieves service labels used for dispatching.
HTTP Request
POST https://api.insightmobiledata.com/api/v1/service_labels
Request Body Parameters
Only the transaction_id is required for this method.
| { |
| "transaction_id": "1", |
| "filters": {}, |
| "fields": {}, |
| "params": {} |
| } |
Put Service Label
PUT /api/v1/service_labels HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/service_labels"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'PUT',
url: 'http://api.insightmobiledata.com/api/v1/service_labels',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
The above command requires JSON structured like this:
[
{
"transaction_id": "1",
"filters": {},
"fields": {},
"params": {
"id":17,
"name":"Friday",
"description":"Test",
"hex_color":"#1F497D",
"order":-1
}
}
]
This endpoint creates a camera event.
HTTP Request
PUT https://api.insightmobiledata.com/api/v1/service_labels
HTTP body parameters
The transaction_id is required. The table shown below describes the request body params contents.
| Parameter | Description |
|---|---|
| id | Integer for specifying a service label to update. Use -1 to add a new service label |
| name | Unique name for identifying a service label |
| hex_color | Used for display in the mobile application. |
| order | Integer for specifying display order in the mobile application. Use -1 to make last |
| description | Optional parameter. Used to describe a service label |
Delete Service Label
DELETE /api/v1/service_labels/{service_label_id} HTTP/1.0
Accept: application/json
X-Insight-Key: YOUR API KEY
Host: api.insightmobiledata.com
Content-Type: application/json
curl "https://api.insightmobiledata.com/api/v1/service_labels/service_label_id"
-H "Authorization: X-Insight-Key"
var inputObj = {
"transaction_id": 1
};
var ajaxCall = $.ajax({
type: 'DELETE',
url: 'http://api.insightmobiledata.com/api/v1/service_labels/service_label_id',
headers: {
"X-InSight-Key": "YOUR_API_KEY_HERE"
},
data: JSON.stringify(inputObj),
dataType: 'json',
});
ajaxCall.done(function (data) {
console.log(data);
});
This endpoint deletes a service label.
HTTP Request
DELETE https://api.insightmobiledata.com/api/v1/service_labels/{service_label_id}
HTTP path parameter
| Parameter | Description |
|---|---|
| service_label_id | The unique identifier of a service label |
Object Definitions
Vehicles
{
"vehicleID": "82002",
"vehicleName": "Gumbo1",
"driverName": "",
"type": "type",
"reportDateTime": "2018-04-11T14:25:20",
"reportGMTDateTime": "2018-04-11T16:25:20",
"latitude": 35.44606,
"longitude": -82.53406,
"speed": 0,
"heading": 226,
"direction": -1,
"DirectionTxt": "0",
"vehStatus": "Parked",
"AssignedJobID": "-1",
"ETA": "0001-01-01T00:00:00",
"isGarmin": false,
"actualMileage": 115197.74,
"AlertContactEmail": "",
"Address": "400 Airport Rd, Arden, NC 28704",
"fuelusage": -1,
"fuelLevelPercentage": -1,
"fuelEconomy": -1,
"engCoolantTemp": -1,
"engOilTemp": -1,
"RPM": -1,
"lastEventDT": "2018-02-15T22:18:27",
"VIN": "",
"hasCamera": true
}
| Property | Type | Description |
|---|---|---|
| vehicleID | String | The unique identifier for a Vehicle |
| vehicleName | String | The name assigned to the Vehicle |
| driverName | String | The name of the worker assigned to the Vehicle |
| type | String | A user-defined type (e.g. Truck) assigned to the Vehicle |
| reportDateTime | DateTime | The local datetime of the last GPS report |
| reportGMTDateTime | DateTime | The UTC datetime of the last GPS report |
| latitude | Double | The latitude of the location of the last GPS report |
| longitude | Double | The longitude of the location of the last GPS report |
| speed | Integer | The speed of the Vehicle at the time of the last GPS report |
| heading | Integer | The heading of the Vehicle at the time of the last GPS report |
| direction | Integer | The direction of the Vehicle at the time of the last GPS report |
| DirectionTxt | String | The direction of the Vehicle as a text value (e.g. NW) |
| AssignedJobID | String | The jobID of the StreetEagle Pro job that is currently assigned to the |
| ETA | DateTime | The estimated time of arrival for a vehicle (only provided with Garmin device) |
| vehStatus | String | The vehicle status (e.g. Parked, In Transit) at the time of the last GPS report |
| actualMileage | Double | The latest accumulated mileage for a Vehicle in miles |
| isGarmin | Boolean | Indicates whether the unit has a connected Garmin device |
| AlertContactEmail | String | The email address that receives alert messages for the Vehicle |
| Address | String | Last known address at the time of the last GPS report |
| fuelusage | Double | The accumulated fuel usage for the Vehicle |
| fuelLevelPercentage | Double | The accumulated percentage of fuel used by the Vehicle |
| fuelEconomy | Double | The fuel economy value for the Vehicle |
| engCoolantTemp | Double | The temperature of the engine coolant in the Vehicle |
| engOilTemp | Double | The temperature of the engine oil in the Vehicle |
| RPM | Double | The revolutions per minute (RPM) of the engine of the Vehicle |
| lastEventDT | DateTime | The datetime of an event after the Vehicle parks (e.g. Ping, PTO event) |
| VIN | String | The vehicle's VIN if available |
| hasCamera | Boolean | Indicates whether or not the vehicle has an assigned camera |
Workers
{
"driverID": "2",
"userName": "Jack",
"password": "Oberhausen",
"firstName": "Jack",
"lastName": "O",
"buttonID": "",
"email": null,
"phoneNumber": null,
"phoneCarrier": null,
"lastLoginDT": "2018-02-22T20:41:21",
"currentVehicleName": null,
"currentInsightID": "0",
"loginMethod": "SEUtility",
"licenseNumber": "08",
"licenseState": "MD",
"licenseType": "",
"currentJobID": "-1",
"isUtilityWorker": true,
"UtilityWorkerUserName": "Jack",
"UtilityWorkerPassword": "Oberhausen",
"UtilityWorkerLastLoginDT": "2018-03-22T16:32:20",
"UtilityWorkerDeviceType": "3.1.14",
"UtilityWorkerPermission": "Asset,Form,Dispatch,Hos,Fuel,Maintenance,Driver_Portal",
"UtilityWorkerRegistrationID": "APA91bGO2LV7bOKE6iL25AM-vRgTdDOmOiN8g6e9B2QpsaXhi-KdTI2bTo107Wf9T_u2WDjXtbFN1KEZhb_rmGkPksDp1IA7fFMpVI1e0G9_QV9EkaUd0hSx2WbZFibyj54__aVsBc3t",
"UtilityWorkerRegistrationType": "Android",
"groupString": null,
"employeeID": "",
"elogsUpdated": "2018-03-23T15:46:12",
"elogsAvailableHours": 8,
"elogsDaysMissing": 97,
"elogsLogsheetDate": "2017-11-28T00:00:00",
"elogsInspectionDate": "2017-11-15T00:00:00",
"elogsLastStatus": "Off Duty",
"elogsHoursBreakdown": "Driving: 11/11<br/>On Duty: 11/14<br/>Rest: 8/8<br/>US 70/8: 70/70",
"elogsHoursUntilRest": 8,
"lastUpdateDT": "0001-01-01T00:00:00",
"dutyStatus": null,
"drivingHours": 0,
"workingHours": 0,
"weekHours": 0,
"hoursUntilBreak": 0,
"hoursUntilShiftRestart": 0,
"hoursUntilWeekRestart": 0
}
| Property | Type | Description |
|---|---|---|
| driverID | String | The unique identifier for the worker |
| userName | String | The username of the worker |
| Password | String | The password of the worker |
| firstName | String | The first name of the worker |
| lastName | String | The last name of the worker |
| currentVehicleName | String | The vehicle name for the eld worker |
| currentInsightID | String | The unique identifier for vehicle of eld worker |
| lastUpdateDT | DateTime | The lat datetime update from the eld worker |
| dutyStatus | String | The current duty status for the eld worker |
| drivingHours | Double | The current number of hours driving for the eld worker |
| workingHours | Double | The current number of hours working for the eld worker |
| hoursUntilBreak | Double | The current number of hours until the next break for the eld worker |
| hoursUntilShiftRestart | Double | The current number of hours until the shift restarts for the eld worker |
| hoursUntilWeekRestart | Double | The current number of hours until week restarts for the eld worker |
| buttonID | String | The unique identifier of a worker's iButton |
| String | The email address for the worker | |
| phoneNumber | String | The phone number of the worker |
| phoneCarrier | String | The phone carrier for the phone of the worker |
| lastLoginDT | DateTime | The last login datetime of the worker |
| currentVehicleName | String | The name of the vehicle currently assigned to the worker |
| currentInsightID_currentInsightID | String | The vehicle identifier currently assigned to the worker |
| loginMethod | String | The login method of the worker (e.g. iButton, Utility) |
| licenseNumber | String | The license number of the worker |
| licenseState | String | The state where the worker's license was issued |
| licenseType | String | The type of license of the worker |
| currentJobID | String | The current jobID assigned to the worker |
| isUtilityWorker | String | The boolean value that is set to true when the worker is a Utility worker |
| UtilityWorkerUserName | String | The Utility worker username of the worker |
| UtilityWorkerPassword | String | The Utility worker password of the worker |
| UtilityWorkerLastLoginDT | String | The last login into the Utility app for the worker |
| UtilityWorkerDeviceType | String | The device type used by the Utility worker |
| UtilityWorkerPermission | String | The permission available for the Utility worker in the app |
| UtilityWorkerRegistrationID | String | The registration ID for the Utility worker |
| UtilityWorkerRegistrationType | String | The registration type for the Utility worker |
| groupString | String | The StreetEagle Pro groups assigned to the worker |
| employeeID | String | The unique identifier for the worker in a 3rd party software system |
| UtilityWorkerPermission | String | The permission available for the Utility worker in the app |
| elogsUpdated | DateTime | The datetime of the log update from the eld worker |
| elogsAvailableHours | Double | The number of hours available for the eld worker |
| elogsDaysMissing | Long | The number of missing days from the eLogs Log sheet |
| elogsLogsheetDate | DateTime | The datetime from the Log sheet |
| elogsInspectionDate | DateTime | The datetime of the last Inspection |
| elogsLastStatus | String | The last status from the ELD worker |
| elogsHoursBreakdown | String | The breakdown of hours for the ELD worker |
| elogsHoursUntilRest | Double | The number of hours until rest for the ELD worker |
| lastUpdateDT | DateTime | The last datetime duty status update from the eld worker |
| dutyStatus | String | The current duty status for the eld worker |
| drivingHours | Double | The current number of hours driving for the eld worker |
| workingHours | Double | The current number of hours working for the eld worker |
| hoursUntilBreak | Double | The current number of hours until the next break for the eld worker |
| hoursUntilShiftRestart | Double | The current number of hours until the shift restarts for the eld worker |
| hoursUntilWeekRestart | Double | The current number of hours until week restarts for the eld worker |
Alerts
{
"alertID": 76202,
"alertDate": "2018-03-05T12:48:20",
"alertType": "GF",
"alertMsg": "Truck 1 (Driver: C. Smith) has entered geofence: Sunshine at 3/5/2018 7:48 AM",
"driverID": 335,
"driverName": "C. Smith",
"VehicleName": "Truck 1",
"InsightID": 999999
}
| Property | Type | Description |
|---|---|---|
| alertID | Long | The unique identifier for the alert message |
| alertDate | Date | The date for the alert message |
| alertType | String | The type of the alert (e.g. GF, MM) |
| alertMsg | String | The text contained in the alert message |
| driverID | String | The unique identifier for the worker |
| driverName | String | The full name of the worker |
| insightID | Long | The unique identifier for a Vehicle |
| vehicleName | String | The name assigned to the Vehicle |
Asset History
{
"record_id": "1753",
"assetID": "P000005",
"assetName": "DiCarlo Desk",
"assetType": "Portable",
"tacID": null,
"lastScannedByVehicle": "Not Available",
"lastScannedByDriver": "Jack O",
"address": "23322 Cottonwood Pkwy, California, MD 20619",
"scannedLocalDateTime": "0001-01-01T00:00:00",
"scannedGMTDateTime": "2018-02-05T19:24:00",
"latitude": 38.30973,
"longitude": -76.54468,
"batteryLevel": 0,
"lastAction": "Service",
"lastNotes": ""
}
| Property | Type | Description |
|---|---|---|
| record_id | Long | The record identifier for the asset history |
| assetID | String | The unique identifier for the asset |
| assetName | String | The name of the asset |
| assetType | String | The user-defined type of the asset (e.g. Portable) |
| tacID | String | The unique identifier for the asset a 3rd party software system |
| lastScannedByVehicle | String | The vehicle name that was associated with the last scan of the asset |
| lastScannedByDriver | String | The driver name that was associated with the last scan of the asset |
| address | String | The address of the asset scan |
| scannedLocalDateTime | DateTime | The local time of the scan of the asset |
| scannedGMTDateTime | DateTime | The UTC time of the scan of the asset |
| latitude | Double | The latitude of the asset scan |
| longitude | Double | The longitude of the asset scan |
| batteryLevel | Integer | The battery level of the asset |
| lastAction | String | The last action recorded for the asset |
| lastNotes | String | The notes recorded for the last asset scan |
Custom Forms
{
"ID": 299,
"formName": "End of Route Vehicle Inspection",
"formFields": [
"Tires:Checked",
"Fluids:Checked",
"Pump Operating Correctly:Checked",
"Heater/Defroster:NULL",
"Stability Items:NULL"
],
"driverID": 41,
"vehicleID": "70414",
"jobID": "7589-7565-S",
"gmtTime": "2016-08-23T16:40:45",
"formType": "Default",
"latitude": 38.30961,
"longitude": -76.54444
}
| Property | Type | Description |
|---|---|---|
| ID | Long | The unique identifier of the form |
| formName | String | The name of the form |
| formFields | List(Of String) | A list of the form fields |
| driverID | Long | The unique identifier for a driver or worker |
| VehicleID | String | The unique identifier for the vehicle |
| jobID | String | The jobID attached to the form |
| gmtTime | DateTime | The datetime the form was submitted |
| formType | String | The type of the form |
| latitude | Double | The latitude where the form was submitted by the worker |
| longitude | Double | The longitude where the form was submitted by the worker |
Driver Performance
{
"reportDate": "2018-04-06T00:00:00",
"driverID": "0",
"driverName": null,
"employeeID": null,
"VehicleName": "Van 100",
"InsightID": "999999",
"SpeedingEventCount": 12,
"PostedSpeedingEventCount": 14,
"IdlingEventCount": 0,
"TotalBrakingEventCount": 6,
"HardBrakingEventCount": 4,
"HardBrakingEventGforceAverage": 1.03,
"HardBrakingEventDuration": 8,
"HarshBrakingEventCount": 2,
"HarshBrakingEventGforceAverage": 0.62,
"HarshBrakingEventDuration": 5,
"SevereBrakingEventCount": 0,
"SevereBrakingEventGforceAverage": 0,
"SevereBrakingEventDuration": 0,
"CorneringEventCount": 5,
"CorneringEventGforceAverage": 1.52,
"CorneringEventDuration": 16,
"TotalAccelerationEventCount": 7,
"HardAccelerationEventCount": 6,
"HardAccelerationEventGforceAverage": 1.4,
"HardAccelerationEventDuration": 14,
"HarshAccelerationEventCount": 1,
"HarshAccelerationEventGforceAverage": 0.26,
"HarshAccelerationEventDuration": 3,
"SevereAccelerationEventCount": 0,
"SevereAccelerationEventGforceAverage": 0,
"SevereAccelerationEventDuration": 0,
"TotalSpeedingDuration": 1528,
"TotalPostedSpeedingDuration": 1514,
"TotalPostedSpeedingMileage": 0,
"TotalSpeedingMileage": 22.46,
"TotalIdlingDuration": 0,
"TotalEventCount": 44,
"TotalVehicleMileage": 138.9,
"TotalScore": 85.21,
"SpeedingScore": 20.42,
"IdlingScore": 25,
"PostedScore": 20.46,
"DriverExceptionScore": 19.33,
"PercentSpeeding": 9.17,
"PercentSpeedingPosted": 9.08,
"TotalPercentSpeeding": 18.25,
"PercentIdling": 0,
"DriverBehaviorEventRate": 4.54,
"TotalSpeedingEventCount": 26,
"TotalSevereEventCount": 0,
"TotalHarshEventCount": 3,
"TotalHardEventCount": 15,
"VTU": "V072",
"vid": null,
"TotalInTransitTime": 16665
}
| Property | Type | Description |
|---|---|---|
| reportDate | Date | The date of the Driver Performance daily summary |
| driverID | String | The unique ID for the worker |
| employeeID | String | The unique value for a worker in a 3rd party backend system |
| driverName | String | The full name of the worker |
| VehicleName | String | The name of assigned to the Vehicle |
| VTU | String | The SE Pro identifier for Vehicle |
| vid | String | The numeric value identifier for the SE Pro Vehicle |
| InsightID | String | The SE Pro unique identifier for a GPS unit |
| SpeedingEventCount | Integer | The count of speeding events |
| PostedSpeedingEventCount | Integer | The count of "posted" speeding events (over the posted speed limit) |
| IdlingEventCount | Integer | The count of idling events |
| TotalBrakingEventCount | Integer | The total count of braking events (Hard, Harsh and Severe) |
| HardBrakingEventCount | Integer | The count of "hard" braking events |
| HardBrakingEventGforceAverage | Double | The average "G Force" for the hard braking events |
| HardBrakingEventDuration | Integer | The duration in seconds of the hard braking events |
| HarshBrakingEventCount | Integer | The count of "harsh" braking events |
| HarshBrakingEventGforceAverage | Double | The average "G Force" for the harsh braking events |
| HarshBrakingEventDuration | Integer | The duration in seconds of the harsh braking events |
| SevereBrakingEventCount | Integer | The count of "severe" braking events |
| SevereBrakingEventGforceAverage | Double | The average "G Force" for the severe braking events |
| SevereBrakingEventDuration | Integer | The duration in seconds of the severe braking events |
| CorneringEventCount | Integer | The count of "cornering" events |
| CorneringEventGforceAverage | Double | The average "G Force" for the cornering events |
| CorneringEventDuration | Integer | The duration in seconds of the cornering events |
| TotalAccelerationEventCount | Integer | The total count of acceleration events (Hard, Harsh and Severe) |
| HardAccelerationEventCount | Integer | The count of "hard" acceleration events |
| HardAccelerationEventGforceAverage | Double | The average "G Force" for the hard acceleration events |
| HardAccelerationEventDuration | Integer | The duration in seconds of the hard acceleration events |
| HarshAccelerationEventCount | Integer | The count of "harsh" acceleration events |
| HarshAccelerationEventGforceAverage | Double | The average "G Force" for the harsh acceleration events |
| HarshAccelerationEventDuration | Integer | The duration in seconds of the harsh acceleration events |
| SevereAccelerationEventCount | Integer | The count of "severe" acceleration events |
| SevereAccelerationEventGforceAverage | Double | The average "G Force" for the severe acceleration events |
| SevereAccelerationEventDuration | Integer | The duration in seconds of the severe acceleration events |
| TotalSpeedingDuration | Integer | The accumulation of speeding duration for all speeding events |
| TotalPostedSpeedingDuration | Integer | The accumulation of "posted" speeding duration for all speeding events |
| TotalSpeedingMileage | Double | The accumulation of mileage for all speeding events |
| TotalPostedSpeedingMileage | Double | The accumulation of mileage for all "posted" speeding events |
| TotalIdlingDuration | Integer | The accumulation of idling duration for all idling events |
| TotalEventCount | Integer | The total number of driver performance events |
| TotalVehicleMileage | Double | The accumulated mileage for the date range requested |
| TotalScore | Double | The total score of the vehicle or worker for the date range requested (see here for details on our scoring rubric) |
| IdlingScore | Double | The score for the idling events for the vehicle or worker |
| SpeedingScore | Double | The score for the speeding events for the vehicle or worker |
| DriverExceptionScore | Double | The score for the exception (braking, acceleration and cornering) events for the vehicle or worker |
| PostedScore | Double | The score for the posted speeding events for the vehicle or worker |
| PercentSpeeding | Double | The percentage of speeding events for the vehicle or worker |
| PercentSpeedingPosted | Double | The percentage of posted speeding events for the vehicle or worker |
| TotalPercentSpeeding | Double | The percentage of all speeding events for the vehicle or worker |
| PercentIdling | Double | The percentage of all idling events for the vehicle or worker |
| DriverBehaviorEventRate | Double | The rate of all events for the vehicle or worker |
| TotalSpeedingEventCount | Integer | The total number of speeding events |
| TotalSevereEventCount | Integer | The total number of severe driver performance events |
| TotalHarshEventCount | Integer | The total number of harsh driver performance events |
| TotalHardEventCount | Integer | The total number of hard driver performance events |
| TotalInTransitTime | Double | The accumulated duration that the vehicle or worker was in transit |
DTC History
{
"vehicleID": "999999",
"vehicleName": "Escape",
"dtcOriginatedDT": "2017-05-27T13:08:16",
"dtcCode": "SPN:277,FMI:2",
"dtcCodeDescription": " [Erratic, Intermittent, or Incorrect]",
"dtcCategory": "",
"dtcClearedDT": "1970-01-01T00:00:00",
"recID": 19
}
| Property | Type | Description |
|---|---|---|
| VehicleId | String | The vehicleID that received the DTC code |
| VehicleName | String | The vehicle name that received the DTC code |
| dtcOriginatedDT | DateTime | The datetime the DTC code was originated |
| dtcCode | String | The DTC code |
| dtcCodeDescription | String | The DTC code description |
| dtcCategory | String | The DTC code category |
| dtcClearedDT | DateTime | The datetime the DTC code was cleared |
| recID | Long | The unique record id for the DTC history event |
ELD History
{
"record_index": 343979,
"driverID": 355,
"driver_name": "Charles Smith",
"status_change_local_dt": "2018-04-12T08:28:49",
"status_change_utc_dt": "2018-04-12T12:28:49",
"time_zone": "EDT",
"duty_status_number": 3,
"duty_status_name": "Driving",
"vehicle_id": 999999,
"vehicle_name": "Truck 1",
"vehicle_vin": "5TFHY5F1XFX472683",
"eld_trip_type": null,
"eld_rule_set": null
}
| Property | Type | Description |
|---|---|---|
| record_index | Long | The record ID for the message |
| driverId | String | The driver ID for the message |
| driver_name | String | The driver name for the message |
| status_change_local_dt | Datetime | The local datetime of the duty status change |
| status_change_utc_dt | Datetime | The utc datetime of the duty status change |
| time_zone | String | The time zone abbreviation for the duty status change |
| duty_status_number | Integer | The status number for the duty status change |
| duty_status_name | String | The status name for the duty status change |
| vehicle_id | String | The vehicle ID for the the duty status change |
| vehicle_name | String | The vehicle name for the duty status change |
| vehicle_vin | String | The vehicle vin for the duty status change |
| eld_trip_type | String | The trip type for the duty status change |
| eld_rule_set | String | The trip type for the duty status change |
ELD Info
{
"driverID": "355",
"firstName": "Charles",
"lastName": "Smith",
"lastUpdateDT": "2018-04-12T12:34:36",
"currentVehicleName": "Truck 1",
"currentInsightID": "84275",
"dutyStatus": "Off Duty",
"drivingHours": 11,
"workingHours": 14,
"weekHours": 70,
"hoursUntilBreak": 0,
"hoursUntilShiftRestart": 0,
"hoursUntilWeekRestart": 0
}
| Property | Type | Description |
|---|---|---|
| driverID | String | The unique identifier for the eld worker |
| firstName | String | The first name of the eld worker |
| lastName | String | The last name of the eld worker |
| currentVehicleName | String | The vehicle name for the eld worker |
| currentInsightID | String | The unique identifier for vehicle of eld worker |
| lastUpdateDT | DateTime | The lat datetime update from the eld worker |
| dutyStatus | String | The current duty status for the eld worker |
| drivingHours | Double | The current number of hours driving for the eld worker |
| workingHours | Double | The current number of hours working for the eld worker |
| weekHours | Double | The current number of hours available for the week for the eld worker |
| hoursUntilBreak | Double | The current number of hours until the next break for the eld worker |
| hoursUntilShiftRestart | Double | The current number of hours until the shift restarts for the eld worker |
| hoursUntilWeekRestart | Double | The current number of hours until week restarts for the eld worker |
Job Info
{
"route_job_id": "J3151",
"job_stop_number": "1",
"job_name": "Jo Short",
"job_technician": "",
"job_street": "10809 Tip Hill Ct.",
"job_city": "LaPlata",
"job_state": "MD",
"job_zip": "20646",
"job_notes": "Here are the notes job 1",
"job_lat": "38.4977",
"job_lon": "-76.9378",
"job_email": "",
"job_phone": "",
"job_type": "",
"job_link_expiration": "",
"job_service_date": "2018-03-12T16:27:28.040Z",
"job_start_time": "2018-03-12T18:27:28.040Z",
"job_finish_time": "2018-03-12T19:27:28.040Z",
"job_commit_time": "",
"estimated_job_time": "60",
"job_status": "New",
"send_to_device": true,
"send_email": false,
"icon_id": "",
"vehicle_icon_id": "",
"service_order_url": "",
"email_subject": "",
"email_body": "",
"address_string": "",
"do_forms_fields": "",
"do_forms_values": "",
"do_forms_wsid": "",
"do_forms_form_name": "",
"service_label_ids":""
}
| Property | Type | Description |
|---|---|---|
| JobRouteName | String | The route name for the job (not required) |
| RouteJobID | String | The unique identifier for the job |
| JobName | String | The name of the job |
| JobTechnician | String | The technician name of the job |
| JobStreet | String | The street address for the job |
| JobCity | String | The city name for the job |
| JobState | String | The state name for the job |
| JobZip | String | The postal code for the job |
| JobNotes | String | The notes for the job |
| JobLat | Double | The latitude of the job location |
| JobLon | Double | the longitude of the job location |
| JobEmail | String | The email address contact for the job |
| JobPhone | String | The phone number contact for the job |
| JobType | String | The user-define type for a job |
| JobLinkExpiration | String | The number of hours that the clickable link in the email notification to the customer is active |
| JobStartTime | DateTime | The datetime that represents when a job starts |
| JobServiceDate | DateTime | The datetime that represents what day the job is scheduled for |
| JobFinishTime | DateTime | The datetime that represents when a job is finished |
| JobCommitTime | DateTime | The datetime when the job was scheduled |
| EstimatedJobTime | Integer | The duratoin of a job in minutes |
| JobStatus | String | The status of the job |
| SendToDevice | Boolean | Set to True if the job should be sent to a device |
| SendEmail | Boolean | Set to True if a job information email should be sent to the end customer |
| IconID | Integer | The integer value of the icon for the job |
| VehicleIconID | Integer | The integer value of the vehicle icon for the job |
| ServiceOrderURL | String | An external URL that can be associated with a jobID on the embeddable Dispatch View map |
| EmailSubject | String | The subject text for the email sent to a customer |
| EmailBody | String | The body text for the email sent to a customer |
| AddressString | String | The string value for a full address for a job location |
| DoFormsFields | List(Of String) | The string that contains a list of form fields for a DoForms job |
| DoFormsValues | List(Of String) | The string that contains a list of form values for a DoForms job |
| DoFormsWSID | String | The string that contains the unique WSID for a DoForms job |
| DoFormsFormName | String | The string that contains a list of DoForms form names |
| service_label_ids | String | Service Label IDs separated by a comma |
Job Status Info
{
"jobID": "124-25-S",
"messageID": 35847,
"driverID": 325,
"vehicleName": null,
"driverUserName": "Dave",
"vehicleID": 84686,
"deliveryStatus": "Unread",
"latitude": 38.98314,
"longitude": -76.53634,
"gmtDateTime": "2018-04-02T13:39:48"
}
| Property | Type | Description |
|---|---|---|
| JobID | String | The unique identifier for the job |
| messageID | Long | The unique identifier for the message |
| DriverId | String | The driver ID for the message |
| DriverUserName | String | The driver user name for the message |
| VehicleName | String | The vehicle name for the message |
| VehicleId | String | The vehicle ID for the message |
| deliveryStatus | String | The status of the job at the time of the job status message (e.g. Read, Deleted, In Transit, On Site) |
| latitude | Double | The latitude of the vehicle or worker at the time of the job status message |
| longitude | Double | The longitude of the vehicle or worker at the time of the job status message |
| gmtDateTime | DateTime | The datetime of the job status message |
Status History Info
{
"indx": 3680,
"driverID": 35,
"driverName": "Chris Eller",
"driverStatus": "Clock In",
"utcTime": "2020-01-22T17:48:54",
"latitude": 38.3095983,
"longitude": -76.5447501,
"device": "Pixel",
"vehicleName": "Celler WL-360",
"vehicleID": 98550
}
| Property | Type | Description |
|---|---|---|
| indx | Integer | The unique identifier for the status event |
| driverID | Date | TThe driver ID for the status event |
| driverName | String | The driver name for the status event |
| driverStatus | String | The specific status set for the status event |
| utcTime | DateTime | The datetime of the status event |
| latitude | Double | The latitude of the worker at the time of the status event |
| longitude | Double | The longitude of the worker at the time of the status event |
| device | String | Device information from where the status was set |
| vehicleName | String | The vehicle name for the status event |
| vehicleID | Integer | The vehicle ID for the status event |
Message
{
"MessageID": "28662651",
"MessageType": "Incoming Text",
"MessageDateTime": "2017-05-18T14:42:31",
"VehicleID": "84288",
"VehicleName": "Vehicle 013",
"DriverID": "40",
"DriverName": "Bob Hall",
"MessageText": "Resend location",
"MessageStatus": "Read"
}
| Property | Type | Description |
|---|---|---|
| MessageID | String | The unique identifier for the message |
| MessageType | String | Indicates if the message is incoming or outgoing from the dispatcher |
| MessageDateTime | Date | The datetime value for the message |
| VehicleId | String | The vehicle ID for the message |
| VehicleName | String | The vehicle name for the message |
| DriverId | String | The driver ID for the message |
| DriverName | String | The driver name for the message |
| MessageText | String | The text of the message |
| MessageStatus | String | The status of the message |
Route Info
{
"route_name": "TestRouteRest180313-45",
"route_dt": "2018-03-13T20:27:28.040Z",
"route_delivery_dt": "2018-03-13T02:27:28.040Z",
"jobs": []
}
| Property | Type | Description |
|---|---|---|
| route_name | String | Name specific to the route |
| route_dt | String | Date corresponding to when the route becomes active |
| route_delivery_dt | String | Date corresponding to when the route will be delivered to a vehicle |
| jobs | List(Of JobInfo) | JSON array of jobs of type jobInfo |
Service Label
{
"id": "1",
"name": "Monday",
"description":"Pick-up on Mondays"
"hex_color": "#1F497D",
"order": 1
}
| Property | Type | Description |
|---|---|---|
| id | Integer | Unique identifier for a service label |
| name | String | String used to identify service label |
| description | String | String used to describe service label |
| hex_color | String | String corresponding to the display color on the mobile application |
| order | Integer | Integer corresponding to the display order on the mobile application |
Threshold
{
"speedingThreshold": "65",
"postedSpeedingThreshold": "10",
"idlingThreshold": "5"
}
| Property | Type | Description |
|---|---|---|
| speedingThreshold | Integer | The speed of the vehicle in mph which triggers a Speeding Threshold alert. |
| postedSpeedingThreshold | Integer | The mph over the posted speed limit which triggers a Posted Speeding alert. |
| idlingThreshold | Integer | The number of minutes a vehicle idles which triggers a Idling alert. |
Weight
{
"IdlingScoreWeight": "25",
"SpeedingScoreWeight": "25",
"SpeedingOverLimitScoreWeight": "25",
"DriverExceptionScoreWeight": "25"
}
| Property | Type | Description |
|---|---|---|
| IdlingScoreWeight | Double | The weight given to Idling when scoring the vehicle or worker for driver performance |
| SpeedingScoreWeight | Double | The weight given to Speeding when scoring the vehicle or worker for driver performance |
| SpeedingOverLimitScoreWeight | Double | The weight given to Speeding over a posted limit when scoring the vehicle or worker for driver performance |
| DriverExceptionScoreWeight | Double | The weight given to Exceptions (hard braking, acceleration or cornering) when scoring the vehicle or worker for driver performance |
Workflows
IMD Route Workflow
Definitions
| Term | Definition |
|---|---|
| Saved Route | a saved instance of a planned route which does not include a vehicle/worker assignment OR scheduled date and time |
| Scheduled Route | a saved route that has a vehicle/worker assignment and a date and time of execution |
Setting up Saved Routes
- Put Saved Route – create a saved route object which contains a list of jobs. This method will return a saved route ID.
- Get Saved Route – retrieve a route and its jobs using the route_name value used in #1
- Put Saved Route Job – using the saved route ID, add one or more jobs to a route. If the job_stop_number is -1, the jobs will be added at the end of the route.
- Delete Saved Route Job – using the saved route ID, remove one or more jobs from a route using the route_job_id values.
- Delete Saved Route – delete a route using the route_name value used in #1.
StreetEagle Professional
- Management – saved routes are listed in the Dispatch -> Route Manager section using the route_name value used in the API. Users can add, remove, or re-order jobs; rename a saved route; display the route on the map; or print the route.
- Optimization – saved routes can be optimized, affecting the route jobs orders. Users can review the changes from the optimization prior to updating the saved route definition.
- Schedule – saved routes can be scheduled for delivery to a vehicle or worker for a specific date and time, creating a scheduled route instance.
- Recurrence – saved routes can be added to a recurring schedule based on day of the week and vehicle or worker assignment.
Manage Scheduled Routes
- Get Scheduled Routes – retrieve scheduled routes for a specified day with an option to view summary or detailed information. Filter options allow to view scheduled routes that are linked to a saved route using the saved_route_id filter.
- Put Scheduled Route Job – using the scheduled_route_id value from #1, jobs can be added to the scheduled route without affecting the saved route. If the job_stop_number is -1, the jobs are added at the end of the scheduled route.
- Delete Scheduled Route Job – using the scheduled_route_id value from #1 and route_job_id values, jobs can be removed from the scheduled route without affecting the saved route.
Errors
The Insight Mobile Data API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 429 | Too Many Requests -- You're exceeded the rate limit! Slow down! |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |