Skip to content
  • There are no suggestions because the search field is empty.

Using the API

Learn how customers can use the Track My Ride API to securely connect GPS tracking data with websites, dashboards, portals, and other business systems.

 

Note: The Fleet Metrics plan is required to access the API. See https://www.trackmyride.com.au/pricing for details on our plans.

The Track My Ride API allows customers to programmatically access their Track My Ride account data, including GPS tracking information, vehicle data, reports, driver information, playback data and more.

API access is available on the Fleet Metrics service plan.

You can view the full technical API reference here:

Track My Ride API Reference - https://trackmyride.readme.io


What is an API?

An API, or Application Programming Interface, is a way for one software system to securely communicate with another.

In simple terms, the Track My Ride API allows your own website, internal system, dashboard, or application to request information from Track My Ride in a structured format.

For example, instead of logging in to the Track My Ride web app to view a vehicle’s latest location, a developer could use the API to request that location and display it in another system.


Why would I use the Track My Ride API?

You may want to use the Track My Ride API if you need to:

  • Display vehicle locations on your own website or customer portal
  • Send GPS tracking data into another business system
  • Build a custom fleet dashboard
  • Create internal reports using Track My Ride data
  • Connect Track My Ride with dispatch, logistics, compliance, or customer service tools
  • Retrieve tracking, driver, alert, report, zone, or device data programmatically

Our older API page described this use case as integrating the Track My Ride data feed directly into a customer website, especially where customers need to see vehicle locations or where Track My Ride data needs to connect with another application.


Who can use the API?

API access is only available to customers on the Fleet Metrics service plan.

The API is intended for customers or developers who are comfortable working with web technologies such as HTTPS requests, JSON, XML, and API authentication. The API reference also notes that using the API requires prerequisite knowledge in computer programming and web technologies.


What data can the API access?

The Track My Ride API can provide access to data used within the Track My Ride GPS tracking platform. Depending on your account access and the API module being used, this may include:

  • Vehicle and device data
  • GPS tracking and location data
  • Driver information
  • Alerts
  • Reports
  • Playback data
  • Zones
  • Sub-account data
  • Other Fleet Metrics data

The available API calls are grouped into modules, such as alerts, devices, drivers, emergency, subaccounts, user, zones, auxiliary data and reports.


How API authentication works

To use the Track My Ride API, you need an API key pair:

  • API key
  • User key

These keys authenticate your request and determine which Track My Ride account data can be returned. Sub-accounts can also have their own API keys, which can be useful when you want to restrict API access to only selected vehicles.

API keys can be created, managed, or revoked from your Track My Ride account.

Keep your API keys secure. They provide access to your Track My Ride data, so they should not be published publicly or embedded into public websites where visitors can view them.


API endpoint

All API calls are made to the following endpoint:

https://app.trackmyride.com.au/v2/php/api.php
 

API variables may be submitted using either GET or POST requests as query parameters.

Common parameters include:

Parameter Required Description
api_key Yes Your Track My Ride API key
user_key Yes Your Track My Ride user key
module Yes The API module being requested
action Yes The action to perform for that module
json No Set to 1 to request JSON output
data Sometimes Data to send with the request, depending on the action

Example API request

The following example shows the general format of a GET request:

https://app.trackmyride.com.au/v2/php/api.php?api_key=YOUR_API_KEY&user_key=YOUR_USER_KEY&module=alerts&action=get&json=1
 

Replace YOUR_API_KEY and YOUR_USER_KEY with the API credentials from your Track My Ride account.

The full API reference includes examples for GET requests, POST requests, modules, actions, and returned data formats.


JSON and XML responses

The Track My Ride API can return data in common developer-friendly formats. We recommend using JSON data formatting.

By default, API actions will return XML formatting. To request JSON, add:

&json=1
 

For example:

https://app.trackmyride.com.au/v2/php/api.php?api_key=YOUR_API_KEY&user_key=YOUR_USER_KEY&module=alerts&action=get&json=1
 

JSON is often preferred when building modern web applications, dashboards, and integrations.


Example: displaying vehicle locations on a map

A common API use case is displaying vehicle locations on a map.

Track My Ride does not provide public map tile hosting. If you are building a map, you should use a suitable public or commercial map tile provider. For example, you may use OpenStreetMap-compatible tiles with a mapping library such as Leaflet, subject to the tile provider’s usage policy.

Important: do not expose your Track My Ride API keys directly in public browser-side JavaScript. For production websites, your own server should call the Track My Ride API, then return only the required location data to your website.

Basic Leaflet map example

API keys provide access to many account level actions and should not be published publicly. 

This simplified example shows how a website could display locations returned by your own backend endpoint.

<div id="map" style="height: 600px; width: 100%;"></div>

<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
/>

<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>

<script>
const map = L.map('map').setView([-37.8136, 144.9631], 12);

L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; OpenStreetMap contributors'
}).addTo(map);

async function loadVehicleLocations() {
// This should be your own backend endpoint.
// Your backend securely calls the Track My Ride API.
const response = await fetch('/api/vehicle-locations');
const vehicles = await response.json();

vehicles.forEach(vehicle => {
L.marker([vehicle.lat, vehicle.lng])
.addTo(map)
.bindPopup(`
<strong>${vehicle.name}</strong><br>
Last update: ${vehicle.updated_at}
`);
});
}

loadVehicleLocations();
</script>
 

Your backend would be responsible for securely calling the Track My Ride API using your API key and user key.


Example backend request

The example below shows the general idea using JavaScript on a server, such as Node.js that you could serve at /api/vehicle-locations

const params = new URLSearchParams({
api_key: process.env.TMR_API_KEY,
user_key: process.env.TMR_USER_KEY,
module: 'devices',
action: 'get',
json: '1'
});

const response = await fetch(
`https://app.trackmyride.com.au/v2/php/api.php?${params}`
);

const data = await response.json();

console.log(data);
 

Store your API credentials in environment variables or another secure secrets manager. Do not hard-code them into public source code.


Using sub-accounts to restrict access

If you only want an integration to access certain vehicles, you can create a Track My Ride sub-account and assign only the relevant vehicles to that sub-account.

Sub-accounts can have their own API key pair. This allows your integration to access a reduced set of vehicles rather than your full account. The API reference describes this as a way to restrict access to selected vehicles.

This is useful when:

  • A customer portal should only show vehicles for one customer
  • A contractor should only access assigned vehicles
  • A public display should only show selected vehicles
  • You want to limit the impact of a key being exposed or misused

Security recommendations

When using the Track My Ride API:

  • Keep your API key and user key private
  • Do not place API keys in public websites, mobile apps, or client-side JavaScript
  • Use your own backend server to make API requests
  • Revoke unused API keys
  • Use sub-account API keys where possible to limit data access
  • Only request the data your integration actually needs
  • Avoid making unnecessary repeated requests

API calls may be rate-limited and cached where applicable.


Getting API access

API access is available on the Fleet Metrics service plan.

To get started:

  1. Confirm that your Track My Ride account is on the Fleet Metrics plan.
  2. Log in to Track My Ride.
  3. Go to your account settings.
  4. Open the API Keys area.
  5. Create or retrieve your API key pair.
  6. Review the API reference.
  7. Build and test your integration.

View the full API reference here:

https://trackmyride.readme.io/reference/getting-started-with-the-tmr-api