Integrate GPS tracking and location services using our HTTP REST API. Perfect for web applications, server-side integrations, and general-purpose development.
💡 Looking for MQTT/IoT Integration?
For hardware GPS devices and IoT applications, check out our MQTT Integration Guide →
Register and authenticate devices via HTTP endpoints.
Push real-time location data via HTTP POST requests.
Easy integration for web and server applications.
Register a new hardware device to the TripQube system. This is a public endpoint that does not require user authentication.
{
"device_id": "TRK-ABC-12345",
"pin": "98765",
"firmware_version": "2.1.0",
"manufacturer": "TripQube Hardware"
}
| Field | Type | Required | Description |
|---|---|---|---|
device_id |
string | ✅ Yes | Unique device identifier (max 100 chars) |
pin |
string | ✅ Yes | 5-digit authentication PIN |
firmware_version |
string | ✅ Yes | Device firmware version (max 50 chars) |
manufacturer |
string | ✅ Yes | Device manufacturer name (max 100 chars) |
{
"success": true,
"message": "Approved device registered successfully.",
"device_id": "TRK-ABC-12345"
}
Push location data from your hardware device to update tracker position. Supports both single location updates and buffered batch updates for offline scenarios.
{
"device_id": "TRK-ABC-12345",
"pin": "98765",
"latitude": 37.7749,
"longitude": -122.4194,
"battery_level": 85,
"timestamp": 1705012345000
}
{
"device_id": "TRK-ABC-12345",
"pin": "98765",
"location_buffer": [
{
"latitude": 37.7749,
"longitude": -122.4194,
"timestamp": 1705012345000,
"speed": 15.5,
"altitude": 50
},
{
"latitude": 37.7750,
"longitude": -122.4195,
"timestamp": 1705012375000,
"speed": 20.2,
"altitude": 55
}
],
"battery_level": 84
}
| Field | Type | Required | Description |
|---|---|---|---|
device_id |
string | ✅ Yes | Hardware device identifier |
pin |
string | ✅ Yes | 5-digit authentication PIN |
latitude |
number | ⚠️ Conditional* | Latitude (-90 to 90) for single update |
longitude |
number | ⚠️ Conditional* | Longitude (-180 to 180) for single update |
battery_level |
number | ❌ Optional | Battery percentage (0-100) |
timestamp |
number | ❌ Optional | Unix timestamp (ms or seconds) |
location_buffer |
array | ⚠️ Conditional* | Array of location objects for batch update |
* Either (latitude AND longitude) OR location_buffer must be provided.
Simple Python implementation for pushing location data via HTTP.
import requests
import time
DEVICE_ID = "TRK-ABC-12345"
PIN = "98765"
PUSH_URL = "https://pushtrackerlocation-3y3utatgia-uc.a.run.app"
def push_location(lat, lon, battery=None):
payload = {
"device_id": DEVICE_ID,
"pin": PIN,
"latitude": lat,
"longitude": lon,
"timestamp": int(time.time() * 1000)
}
if battery is not None:
payload["battery_level"] = battery
response = requests.post(PUSH_URL, json=payload)
return response.json()
# Usage
result = push_location(37.7749, -122.4194, battery=85)
print(result)
Example implementation for Node.js server applications.
const axios = require('axios');
const DEVICE_ID = 'TRK-ABC-12345';
const PIN = '98765';
const PUSH_URL = 'https://pushtrackerlocation-3y3utatgia-uc.a.run.app';
async function pushLocation(lat, lon, battery = null) {
const payload = {
device_id: DEVICE_ID,
pin: PIN,
latitude: lat,
longitude: lon,
timestamp: Date.now()
};
if (battery !== null) {
payload.battery_level = battery;
}
const response = await axios.post(PUSH_URL, payload);
return response.data;
}
// Usage
pushLocation(37.7749, -122.4194, 85)
.then(result => console.log(result));
Get in touch with our developer support team or explore additional resources.