Telematics Guru Third Party Device API: Detailed Setup
Endpoint, authentication, and full payload field reference
Table of Contents
Telematics Guru Third Party Device API: Detailed Setup
This article is the technical reference for sending telemetry into Telematics Guru with the Third Party Device API. It covers prerequisites, the regional endpoint and authentication, the serial-number prefix requirement, the full JSON payload structure, the LogReason and Driver ID tables, how trips and ignition are modelled from digital inputs, the StatusFlags rule, and the responses you should expect. For the concept and use cases, see the Third Party Device API overview.
Prerequisites
An API username (a three-letter prefix) and password, used for Basic HTTP authentication. You request a desired three-letter username and your Telematics Guru provider assigns it if it is still available.
The correct region endpoint for your Telematics Guru instance. If you are unsure which region you are on, see TG Region Specific Details.
The asset created in Telematics Guru with a serial number (SN) that matches what you will send, including your prefix.
Serial Number Prefix Requirement
Your assigned three-letter API username becomes part of every asset serial number you send. When you add the asset in Telematics Guru, its serial number must include this prefix, for example AAA123. You are responsible for keeping serial numbers unique within your prefix.
Endpoint and Authentication
Send HTTP POST requests to the regional endpoint:
https://api-<region>.telematics.guru:7082Replace <region> with your instance's region. Authentication is Basic HTTP authentication using your API username and password. The request body must be JSON.
Request Body: Payload Structure
The payload is a single JSON object containing an asset identifier and an array of one or more records. Each record is a point-in-time update, typically a GPS update plus IO and analogue values. Any field that is not required can be omitted.
Top-level fields
| Field | Type | Required | Description |
|---|---|---|---|
SN |
String | Required | Serial number exactly as entered in Telematics Guru, including your username prefix (for example, AAA123). |
IMEI |
String | Optional | Modem IMEI. |
ICCID |
String | Optional | SIM ICCID. |
Records |
Array | Required | One or more records (see below). |
Record fields
| Field | Type | Required | Description |
|---|---|---|---|
DateUTC |
DateTime | Required | Timestamp of the record (second precision). A value without a timezone suffix is interpreted as UTC. |
SeqNum |
Int64 | Required | Used for deduplication. Telematics Guru keeps a counter per asset and ignores out-of-order records, so this should be monotonically increasing. |
LogReason |
Byte | Required | Why the record was logged (see Log Reasons below). |
Lat |
Double | Required | Latitude in degrees (sign indicates N/S). |
Lng |
Double | Required | Longitude in degrees (sign indicates W/E). |
SpeedKmH |
Int16 | Optional | Speed in km/h. |
Heading |
Int16 | Optional | Heading in degrees. |
Alt |
Int16 | Optional | Altitude in metres. |
SpeedAcc |
Byte | Optional | Speed accuracy indicator (cm/s / 10). |
PositionAcc |
Byte | Optional | Positional accuracy in metres. |
PDOP |
Byte | Optional | GPS PDOP (x10). |
GpsFixOK |
Bool | Optional | GPS fix valid. |
GpsFix3D |
Bool | Optional | GPS fix is 3D. |
DigIn |
Int32 | Required | 32-bit integer of digital inputs (Input 0 = bit 0 / LSB, Input 1 = bit 1, and so on). |
DigOut |
Int16 | Optional | 16-bit integer of digital outputs (Output 0 = bit 0 / LSB, and so on). |
StatusFlags |
Int16 | Optional | General status flags. See the StatusFlags note below. |
DriverIdType |
Byte | Optional | Driver ID type (see Driver ID Types below). |
DriverIdData |
Byte[] | Optional | Driver ID data. Contact support if you need help with formatting. |
A1...A10
|
Int16 | Optional | 16-bit signed analogue values (for example, battery voltage). |
A11...A20
|
Int32 | Optional | 32-bit signed analogue values. |
TTCode |
String | Optional | Trip Type code as defined in Telematics Guru. Any record received during a trip assigns that trip type to the trip. |
ProjCode |
String | Optional | Project code as defined in Telematics Guru. Any record received during a trip assigns that project to the trip. |
Log Reasons
Set LogReason on each record to indicate why it was generated. Log reasons are generally informative. Harsh driving reasons (12, 13, and 14) are treated as an exception rather than purely informative.
| Value | Meaning |
|---|---|
| 1 | Start Of Trip |
| 2 | End Of Trip |
| 3 | Elapsed Time |
| 4 | Speed Change |
| 5 | Heading Change |
| 6 | Distance Travelled |
| 7 | Maximum Speed |
| 8 | Stationary |
| 9 | Digital Input Changed |
| 10 | Digital Output Changed |
| 11 | Heartbeat |
| 12 | Harsh Brake |
| 13 | Harsh Acceleration |
| 14 | Harsh Cornering |
| 15 | External Power Change |
| 17 | Driver ID Tag Read |
| 29 | Tamper Alert |
| 32 | Trip Restart |
Driver ID Types
If you send driver identification, set DriverIdType and populate DriverIdData. If you need help with the data formatting, contact support.
| Value | Type |
|---|---|
| 0 | None |
| 1 | DM RFID |
| 2 | iButton |
| 3 | 4 Digit PIN |
| 4 | 5 Digit PIN |
| 5 | Username |
Trips and Ignition from Digital Inputs
Telematics Guru decides whether an asset is currently in a trip using the "In Trip IO" digital input. By default this is Input 1 (bit 1). While this input is high, the asset is considered to be in a trip.
Ignition is tracked separately, by default on Input 0 (bit 0). The asset only accumulates run hours and odometer distance when ignition is high during a trip. Keeping these separate helps distinguish towing trips from ignition trips.
Example DigIn bit patterns using the default mapping:
| DigIn | Meaning |
|---|---|
0x00000000 |
Neither trip nor ignition bits are high. |
0x00000001 |
Ignition IO high, Trip IO low. |
0x00000002 |
Ignition IO low, Trip IO high. |
0x00000003 |
Ignition IO and Trip IO both high. |
Digital Outputs
DigOut supplies digital output states. For example, DigOut=1 sets output 0, and DigOut=0 clears it.
StatusFlags and the DigIn High Byte
When StatusFlags is present, its least significant byte overrides the most significant byte of DigIn. Because DigIn is a 32-bit value, do not assume all 32 submitted input bits are preserved unchanged when you also send StatusFlags. If you rely on the high input bits, account for this overlay.
Timestamps
DateUTC is specified at second precision. A value sent without a timezone suffix is interpreted as UTC. Values with fractional seconds were accepted and processed.
Responses
Each POST returns one of the following:
| Status | Meaning |
|---|---|
| HTTP 200 | Success. The payload was accepted. |
| HTTP 500 | Failure. The response body contains a textual error description. |
Next Steps
To see these fields in a running scenario, continue to the Third Party Device API tutorial, which walks through a single vehicle and one trip with sample start, mid-trip, and end JSON POSTs and the resulting Telematics Guru behaviour.