Relating to vehicle records and their associated GPS trackpoints.

Action-Get

Return the latest information and recorded trackpoint data for a single vehicle or all vehicles associated with the user’s account.

module=devices&action=get

Input Variables

The following variables can be added to the request via query parameters

VariableTypeDescriptionRequired?Default valueExample
jsonboolReturned data formatted as JSONNo

Will default to XML data format if not supplied.
01

The data will be returned in JSON data format.
limitboolTo limit aaData and aaData_encoded array of data points to the 1 most recent data point.No

Recommended if you have a larger dataset of devices (> 100) on your account to improve the responsiveness of your request as the returned data set can be quite large.
01

Limit the datapoints returned in aaData and aaData_encoded to the most recent 1 data point
limit_aaDataboolTo limit aaData array of data points to the 1 most recent data point.

Note: Does not limit aaData_encoded
No10

All data points for the period requested will be returned in aaData
minutesintReturn the GPS data points in aaData and aaData_encoded that have been recorded within the last x minutes from now.

If no data points have been recorded within this time period, the most recent recorded point will be returned.

Default : 1440
Minimum : 0
Maximum : 4320
No

Recommended if you have a larger dataset of devices (> 100) on your account to improve the responsiveness of your request as the returned data set can be quite large.
144060

Limit the returned data set to the past 60 minutes of driving data.
filter_vehiclestringFilter the returned results so that only the vehicle/device that matches the supplied unique_id is returned.

If this value is not supplied, all devices associated with the account will be returned.
No56dfefe32345

Only data for the vehicle/device with unique_id 56dfefe32345 will be returned.

Example Request

https://app.trackmyride.com.au/v2/php/api.php?api_key=GF83FDSa72hds82jfFD82js123j3284mw8223&user_key=gtr873ns2eDSf111&module=devices&action=get&limit=1&filter_vehicle=7198bf67b5fd&json=1

Returned Data

NameDescriptionExample
If XML: data contained inside <data>An array of device data grouped by _<device ID>[
_56dfefe32345: {...},
_7198bf67b5fd: {...}
]

Data included in returned data

For each device, the following data is included in the returned data

NameDescriptionExample
aaDataGPS location (lat, lng), speed (km/h), time (YYYY-MM-DD HH:MM:SS) and voltage (Volts) data.[{
epoch: 1633390153,
lat: -37.5695504111,
lng: 144.725723918,
speed: 0,
time: "2021-10-05 10:29:13",
volts: 12.313,
}]
aaData_encodedAn encoded array of aaData. The data is encoded to the Google polyline algorithm standard. Click to view more

As part of the encoding, we have extended the algorithm to also store the time (YYYY-MM-DD HH:MM:SS) in epoch seconds and speed in km/h in addition to the default algorithm standard of lat and lng.

Data is stored in the order of
lat, lng, time, speed

For a code sample of storing encoded polyline data with lat, lng and time elements.
Click to view code
"txhdFwvirZqnsoj`B?"
acc_counterThe engine on time. Decimal hour meter counting the total duration the vehicle has been turned on in Minutes in 1/10 increments."2167.0"
-> approx. 36 hours
activityDeprecated - For internal use only.-
arrow_colorDeprecated - For internal use only.-
assignmentDeprecated - For internal use only.-
comms_deltaThe number of seconds since the vehicle last communicated with the TMR servers.1777
cidTrack My Ride hardware unique communication ID, as marked on the tracker."E061"
daylight_savingDoes this vehicle observe DST within Australia?

String: "1" or "0"
"1"
device_dataTMR internal use only"0000000001"
engine_runtimeCounter for the duration of all recorded journeys in decimal hours."1856.6"
-> approx. 31 hours
external_powerIs the hardware tracker connected to an external power source? If this is 0, it is running on its internal battery (Or was until it went flat)

Boolean: 1 or 0
1
engineFor hardware trackers, is the engine on or off?

Boolean: 1 or 0
1
gps_antenna
gps_module
gps_signal
gsm_module
gsm_signal
TMR internal use only-
internal_batteryFor hardware trackers, the state of the internal battery.

String: "Charging", "Charged", "Discharging"
-
last_data_atThe time the tracker last communicated with the TMR servers. Shown in the tracker’s local time with DST applied if applicable.

YYYY-MM-DD HH:MM:SS
"2021-10-05 10:26:20"
last_data_at_epochEpoch representation of last_data_at1633353980
line_colorThe colour in Hexadecimal that the vehicle's traveled path will be drawn in on the main map.#FE2712
nameVehicle's name"Delivery Van 2"
odometerThe odometer reading, in decimal km.

Automatically updated as journeys are recorded and completed.
153011.5
operatorUnique ID of the operator (driver) associated with this vehicle, if applicable."Qk7G6ZGzjteR"
optionsSee info below JSON object containing device option details
regoVehicle registration number"AD28BF"
timezoneThe timezone in hours of this vehicle/tracker. GMT+value

Example
10 would be GMT+10
9.5 would be GMT+9.5
10
->
GMT+10
unique_idThe vehicle's TMR unique identifier"56dfefe32345"
updated_atWhen the vehicle’s data was last updated or modified (UTC Timezone).

YYYY-MM-DD HH:MM:SS
"2021-10-05 00:34:16"
voltsA voltage reading of the TMR hardware unit's external power supply13.482
zoneThe unique IDs of the zone(s) the vehicle is currently in, if applicable.

If not in a zone, the value will be an empty string.

A comma-separated list of zone unique IDs will be returned if the vehicle is in multiple zones.
"aA8qJyIwzhPR"
zone_entryUTC timestamp that the vehicle entered the current zone(s).

YYYY-MM-DD HH:MM:SS
"2021-10-02 03:23:39"

Action-Save

Update a vehicle’s associated records and values.

module=devices&action=save

Required data

To update a device, send the variables as query params or via form-data.

Data for the vehicle shall be supplied within the array variable "data". For example, to set the variable "odometer" to 20000, add data[odometer]=20000 to your request.

❗️

Updating

When updating a device, if a variable is not supplied in the update request it will remain set to its current value.

Variables

NameTypeDescriptionExample
unique_idstringThe vehicle’s unique_id7198bf67b5fd
namestringName of the vehicleTMR Rodeo
regostringRegistration number of the vehicle576 KCH
odometerfloatOdometer reading in km of the vehicle, with 1 decimal of precision185533.0
hourmeterfloatJourney hour meter in decimal hours, with 1 decimal of precision124.5
hourmeter_accfloatAcc/Engine hour meter in decimal hours, with 1 decimal of precision127.4
timezonefloatThe timezone in hours (GMT+ or -), with 1 decimal of precision9.5
dstboolAustralian DST enabled = 1, disabled = 0. If set to 1, the vehicle's times will be automatically adjusted during Australian DST time periods.1
line_colorstringThe colour in Hexadecimal that the vehicle's traveled path will be drawn in on the main map.#0247FE
input_action_1stringSee below for info0
input_action_2stringSee below for infopanic
output_nickname_1stringSee below for infoSecurity system
output_nickname_2stringSee below for infoUnused
output_mode_1boolSee below for info0
output_mode_2boolSee below for info1
ignition_detection_modeintSee below for info4
ignition_low_voltage_levelintSee below for info13200
iconintSee below for info1
output_modify_1stringSee below for infotrue
output_modify_2stringSee below for infofalse
output_state_1stringSee below for infotrue
output_state_2stringSee below for infofalse
output_duration_1intSee below for info3600
output_duration_2intSee below for info60

Example Request and Returned Data

For further info see here

Device-Options

Track My Ride GPS devices have a number of options that are returned under the parameter options.

NameDescriptionOptions
input_action_1What internal function should occur when input #1 moves from low to high 0 - No action
panic - Trigger the panic/SOS button for this vehicle
input_action_2What internal function should occur when input #2 moves from low to high 0 - No action
panic - Trigger the panic/SOS button for this vehicle
output_nickname_1Nickname for output 1"Security system"
output_nickname_2Nickname for output 2""
output_mode_1Whether output 1 is in manual or driver-login-reminder mode 0 - Manual mode
1- driver-login-reminder Click to view more
output_mode_2Whether output 2 is in manual or driver-login-reminder mode 0 - Manual mode
1- driver-login-reminder Click to view more
output_modify_1Whether you would like to modify the current values of output 1 ''true"- to modify output
"false"
output_modify_2Whether you would like to modify the current values of output 2 ''true"- to modify output
"false"
output_state_1The new state of output 1 ''true"- Activate output (path to ground)
"false"- Deactivate (No path to ground)
output_state_2The new state of output 2 ''true'- Activate output (path to ground)
"false"- Deactivate (No path to ground)
output_duration_1How long you would like output 1 to be changed forTime in seconds to apply the modification
0 - 86400 (24 hours). 0 is permanently (Until device reboot, or firmware update)
output_duration_2How long you would like output 1 to be changed forTime in seconds to apply the modification
0 - 86400 (24 hours). 0 is permanently (Until device reboot, or firmware update)
ignition_detection_modeHow the device determines when the engine is turned on 1- ignition wire
2- motion sensor
4 - voltage
5 - voltage or ignition wire
6- voltage or motion sensor
ignition_low_voltage_levelThe ignition on voltage in millivolts. If using an ignition detection mode that uses voltage, a reading above this will cause the device to determine the engine as on.0 to 30000 (0V to 30V)
iconThe vehicle's map icon is used to show this vehicle's location on the map. There are presently 59 different vehicle icons that can be used to represent the vehicle's type on the map. The map marker style (In application settings) must be set to "Round vehicle icons" for this to take effect. 1- Car
2- Car (EV)
...
59- Cement Truck

Action-Export

Export all device details including sub-account vehicle access as a CVS file

module=devices&action=export

Request returned data

NameDescriptionExample
successThe result of the request1
filenameA link to download the csv filehttps://app.trackmyride.com.au/v2/php/temp_output/vehicle_template.ee8004.csv
noticeInformation on the request

CSV file

The downloadable csv file containes a list of all vehicles associated with the API and user keys. It contains the following information

HeadingDescriptionExample
imeiTrack My Ride external hardware identifier, as marked on the tracker.E061
nameThe name of this vehicle/tracker.Delivery Van 3
rego_numRegistration number of this vehicle/tracker.TMR 007
odometerThe odometer reading in km123 321
time_zoneThe timezone in minutes for this vehicle/tracker.600
-> GMT+10
daylight_savingWhether this vehicle observes DST1
-> yes
username_<sub-account-name>

A heading for each sub-account.

eg. username_manager
Whether the given sub-account has access to this vehicle.

"TRUE" for yes or blank if not
TRUE

Example file

Action-Import

Update a vehicle’s associated records and values via a CSV file

module=devices&action=import

CSV file format

Mutatable values are: name, rego_num, odometer, timezone, daylight_saving and username_<user> (sub-account permissions). For a description of these values, see the above table under Action-Export.

To update a vehicle's details, input the new details in the device row for the original imei. To grant vehicle access to a sub-account, use TRUE, to remove use FALSE.

CSV file in Excel

858

Updating device E061

CSV raw

imei,name,rego_num,odometer,timezone,daylight_saving,username_joe,username_tmr
E061,New Name,NEW 007,200000,600,1,FALSE,FALSE

Returned data

For further info see here

Action-Set Driver

Update the assigned driver (operator) of a vehicle.

module=devices&action=set_driver

Required data

To set the driver for a vehicle, you will need to have the following properties contained in data through query params or via form-data.

Variables

NameDescriptionRequiredExample
unique_idThe unique ID for the vehicleyes7198bf67b5fd
driver_idThe unique id for the driveryes8ab787d08ab787de

Example Request and Returned Data

For further info see here

Action-Playback

Return historic tracking data for a vehicle over a period of time specified by the user.

module=devices&action=playback

This function uses the from_date and to_date, along with the same variables as the device get request. The returned data is also in the same format.

If no data is found during the given times, the latest data from the tracker will be returned.

Input data variables, in addition to those of action-get

NameDescriptionRequiredExample
from_dateThe starting date-time to return data from.

YYYY-MM-DD HH:MM:SS
yes2021-10-12 00:00:00
to_dateData will be returned up to this date time

YYYY-MM-DD HH:MM:SS
yes2021-10-12 23:59:59