Log in to your account and on Dashboard navigate to "View/Generate Token" under the Admin Settings menu.
Inside the modal you'll have the option to generate Basic Auth credentials (username and password). Please see the attached screenshot below.
Once you have the credentials, you can start actively using the API.
Overview: This API allows users to retrieve a list of all devices and their details. The API request is authenticated using Basic Authentication.
API Method and URL:
Method: GET
URL: https://api.matrack.live/api/matrack/getDrivers/
Required Fields:
Authorization: Basic <Base64(username:password)>
Sample Return:
{
"status": true,
"message": "Request processed successfully",
"data": [{
"notes": "Fleet Vehicle #123",
"id": 1,
"name": "John Doe",
"imei": "862094067403956",
"deviceType": "MA1085"
}, {...}]
}
Error Handling:
{"status": false, "message": "No Basic Auth credentials found."}
{"status": false, "message": "Invalid credentials."}
Overview: This method is used to retrieve the current status of all devices associated with the account.
API Method and URL:
Method: POST
URL: https://api.matrack.live/api/matrack/allDevicesCurrentStatus/
Required Fields:
How to Call the API:
Authorization: Basic <Base64-encoded(username:password)>
How to Generate Basic Auth Token:
username:password
base64_encode("username:password");
Authorization: Basic <Base64-encoded(username:password)>
Sample Return:
{
"status": true,
"message": "Request processed successfully",
"data": [{
"device": "123456789456123",
"date": "07/15/2024",
"lat": "37.556233",
"lng": "-121.988623",
"time": "17:22:15",
"speed": 0,
"battery": "",
"deviceAddedOn": "04-29-2024",
"packetType": "NA",
"gpsfix": "NA",
"dateTimeago": "07/15/2024 10:22 AM"
}, {...}]
}
Failure Response (Invalid or Missing Credentials):
{
"status": false,
"message": "No Basic Auth credentials found."
}
Error Handling:
{"status": false, "message": "No Basic Auth credentials found."}
{"status": false, "message": "Invalid credentials."}
Overview: This API allows users to retrieve data from a device using the IMEI, Start Date , and End Date parameters. The API request is authenticated using Basic Authentication.
API Method and URL:
Method: POST
URL: https://api.matrack.live/api/matrack/getTrackReport/
Required Fields:
Authorization: Basic <Base64(username:password)>
Sample Return:
{
"status": true,
"message": "Request processed successfully",
"data": [{
"event": "Ignition On",
"eventCode": "6011",
"date": "08/22/2024",
"color": "DarkOrange",
"time": "08:07 PM",
"lat": "37.76911",
"lng": "-121.959191",
"gpsFix": "Not Available",
"satellite": "3",
"speed": "1.24",
"mileage": "0.00",
"direction": "North"
}, {...}]
}
Failure Response:
{"status": false, "message": "IMEI is required."}
Error Handling:
{"status": false, "message": "IMEI is required."}
{"status": false, "message": "No Basic Auth credentials found."}
{"status": false, "message": "Invalid credentials."}
Overview: This API allows users to retrieve frequent locations for a device using the IMEI parameter. The API request is authenticated using Basic Authentication.
API Method and URL:
Method: POST
URL: https://api.matrack.live/api/matrack/frequentLoc/
Required Fields:
Authorization: Basic <Base64(username:password)>
Sample Return:
{
"status": true,
"message": "Request processed successfully",
"data": [{
"location": "123 Main St, City, State",
"lat": "37.76911",
"lng": "-121.959191",
"count": 5
}, {...}]
}
Failure Response:
{"status": false, "message": "IMEI is required."}
Error Handling:
{"status": false, "message": "IMEI is required."}
{"status": false, "message": "No Basic Auth credentials found."}
{"status": false, "message": "Invalid credentials."}
Overview: This API allows users to retrieve stop reports for a device using the IMEI and date range parameters. The API request is authenticated using Basic Authentication.
API Method and URL:
Method: POST
URL: https://api.matrack.live/api/matrack/getStopReport/
Required Fields:
Authorization: Basic <Base64(username:password)>
Sample Return:
{
"status": true,
"message": "Request processed successfully",
"data": [{
"dateTime": "08/22/2024 08:07 PM",
"location": "123 Main St, City, State",
"duration": "45 minutes"
}, {...}]
}
Failure Response:
{"status": false, "message": "IMEI is required."}
Error Handling:
{"status": false, "message": "[Parameter name] is required."}
{"status": false, "message": "Invalid date format."}
{"status": false, "message": "No Basic Auth credentials found."}
{"status": false, "message": "Invalid credentials."}
Overview: This API allows users to retrieve landmark exit reports, providing information about when devices exit defined landmark boundaries. The API request is authenticated using Basic Authentication.
API Method and URL:
Method: GET
URL: https://api.matrack.live/api/matrack/getLandmarkExitReport/
Required Fields:
Authorization: Basic <Base64(username:password)>
Sample Return:
{
"status": true,
"message": "Request processed successfully",
"data": [{
"imei": "862094067403956",
"device_name": "Fleet Vehicle #123",
"exit_time": "08/22/2024 08:07 PM",
"landmark_id": "156",
"landmark_name": "Downtown Depot",
"lat": "37.76911",
"lng": "-121.959191",
"lat1": "37.77000",
"lng1": "-121.960000",
"csq": "4- Good"
}, {...}]
}
Response Fields:
Failure Response:
{"status": false, "message": "No Basic Auth credentials found."}
Error Handling:
{"status": false, "message": "No Basic Auth credentials found."}
{"status": false, "message": "Invalid credentials."}
{"status": false, "message": "No landmark exit data found."}
Overview: This API retrieves the current status and detailed information for a single device, including its location, speed, battery status, and dealership information if applicable. The API request is authenticated using Basic Authentication.
API Method and URL:
Method: POST
URL: https://api.matrack.live/api/matrack/CurrentDeviceStatus/
Required Fields:
Authorization: Basic <Base64(username:password)>
Sample Return:
{
"status": true,
"message": "Request processed successfully",
"data": [{
"dealerName": "Sample Dealership",
"dealerId": "123",
"device": "862094067401234",
"date": "01/25/2025",
"lat": "37.774238",
"lng": "-121.994419",
"event": "Location Update",
"time": "14:30:00",
"speed": 45.3,
"battery": "100",
"status": "Moving 45.3 mph",
"dateTimeago": "01/25/2025 02:30 PM",
"dwellTime": 3600
}]
}
Error Handling:
{"status": false, "message": "IMEI is required."}
{"status": false, "message": "No Basic Auth credentials found."}
{"status": false, "message": "Invalid credentials."}
{"status": false, "message": "Device not found."}
Overview: This API endpoint performs comprehensive mileage analysis on device data to detect unusual patterns, mileage jumps, and periods of no GPS updates. It helps identify potential odometer tampering, device malfunctions, or data inconsistencies.
API Method and URL:
Method: POST
URL: https://api.matrack.live/api/matrack/dataAnalysis/
Required Fields:
How to Call the API:
Authorization: Basic <Base64-encoded(username:password)>
Sample Return:
{
"status": true,
"message": "Mileage jump analysis completed successfully",
"summary": {
"totalJumpsDetected": 1,
"totalNoUpdatePeriods": 2,
"totalMileageInconsistency": 137.3073,
"largestJump": 137.3073,
"displayUnit": "Miles",
"analysisThreshold": 50,
"note": "Uses actual GPS packet speed instead of calculated speed for accuracy"
},
"data": {
"mileageJumps": [
{
"date": "06/16/2025",
"time": "02:00 PM",
"dateTime": "06/16/2025 02:00 PM",
"lat": "29.736573",
"lng": "-95.188975",
"previousMileage": 2949.9324,
"currentMileage": 3087.2397,
"mileageDifference": 137.3073,
"timeDifferenceHours": 334.44,
"packetSpeed": 10.42,
"jumpReason": "Large mileage increase: 137.3073 units | Mileage/speed mismatch: Expected ~3484.8 units based on speed, got 137.3073 units",
"speed": "10.42",
"direction": "E",
"battery": "14.58",
"satellite": "9",
"deviceType": "MA2106",
"displayUnit": "Miles"
}
],
"noUpdatePeriods": [
{
"lastUpdateBefore": "06/02/2025 03:34 PM",
"firstUpdateAfter": "06/16/2025 02:00 PM",
"gapDurationHours": 334.4,
"gapDurationDays": 13.9,
"mileageBefore": 2949.9324,
"mileageAfter": 3087.2397,
"mileageChangeInGap": 137.3073,
"locationBefore": {
"lat": "29.712590",
"lng": "-95.208480"
},
"locationAfter": {
"lat": "29.736573",
"lng": "-95.188975"
}
}
]
}
}
Error Responses:
{
"status": false,
"message": "IMEI is required."
}
{
"status": false,
"message": "No Basic Auth credentials found."
}
{
"status": false,
"message": "Invalid credentials."
}
Sample PHP Code:
{
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.matrack.live/api/matrack/dataAnalysis/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'imei=YOUR_DEVICE_IMEI&startDateTime=START_TIMESTAMP&endDateTime=END_TIMESTAMP',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded',
'Authorization: Basic YOUR_BASE64_ENCODED_CREDENTIALS'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
}
Response Data Structure:
Analysis Features:
Notes: