DOKUMENTASI
Dokumentasi API, Data Parameter dan Webhook
Integrasi data pada aplikasi server GPS Tracking System tracker.id dapat dilakukan dengan menggunakan akses httpget API dan data parameter.
Autentikasi Login
Login kedalam sistem aplikasi melalui halaman web berbeda (3rd party login page)
LOGINDesktop | |||
---|---|---|---|
Struktur | https://tracker.id/login.php?username=[USERNAME]&password=[PASSWORD]&mobile=false |
Mobile | |||
---|---|---|---|
Struktur | https://tracker.id/login.php?username=[USERNAME]&password=[PASSWORD]&mobile=true |
Penarikan Data Objek
Mengambil seluruh data objek pada akun pengguna
USER_GET_OBJECTSStruktur Perintah | |||
---|---|---|---|
Command | USER_GET_OBJECTS |
Struktur | https://tracker.id/api/api.php?api=user&key=[API_KEY]&cmd=USER_GET_OBJECTS |
[ { "imei": "xxxxxxxxxxxxxxxxx", "protocol": "concoxgt02", "ip": "114.125.60.1", "port": "10203", "active": "true", "object_expire": "false", "object_expire_dt": "0000-00-00", "name": "Motor Operasional" }, { "imei": "xxxxxxxxxxxxxxxxx", "protocol": "teltonikafm", "ip": "114.125.60.2", "port": "11922", "active": "true", "object_expire": "false", "object_expire_dt": "0000-00-00", "name": "Mobil Operasional" } ]
Perintah Kontrol Objek
Kirim perintah ASCII atau HEX ke objek menggunakan gateway GPRS
OBJECT_CMD_GPRSStruktur Perintah | |||
---|---|---|---|
Command | OBJECT_CMD_GPRS |
Struktur | https://tracker.id/api/api.php?api=user&key=[API_KEY]&cmd=OBJECT_CMD_GPRS,[IMEI],[nama perintah],[HEX atau ASCII],[isi perintah] |
Penarikan Data Lokasi Objek
Mengambil data lokasi terakhir yang diketahui objek dalam format JSON
OBJECT_GET_LOCATIONSStruktur Perintah | |||
---|---|---|---|
Command | OBJECT_GET_LOCATIONS | ||
Parameter #1 | IMEI objek, untuk beberapa IMEI pisahkan dengan titik koma. Gunakan "*" untuk mendapatkan semua lokasi objek yang tersedia |
Struktur | https://tracker.id/api/api.php?api=user&key=[API_KEY]&cmd=OBJECT_GET_LOCATIONS,[IMEI];[IMEI] |
{ "xxxxxxxxxxx": { "dt_server": "2023-08-24 17:29:33", "dt_tracker": "2023-08-24 17:29:33", "lat": "-6.890457", "lng": "108.491184", "altitude": "0", "angle": "27", "speed": "0", "params": { "batp": "82", "bats": "0", "chat": "1", "acc": "1" }, "loc_valid": "1" } "xxxxxxxxxxx": { "dt_server": "2023-08-24 17:29:33", "dt_tracker": "2023-08-24 17:29:33", "lat": "-6.890457", "lng": "108.491184", "altitude": "0", "angle": "16", "speed": "0", "params": { "batp": "89", "bats": "0", "chat": "0", "acc": "1" }, "loc_valid": "1" } }
Penarikan Data Riwayat Objek
Mengambil data riwayat pergerakan objek untuk periode waktu tertentu dalam format JSON
OBJECT_GET_ROUTEStruktur Perintah | |||
---|---|---|---|
Command | OBJECT_GET_ROUTE | ||
Parameter #1 | IMEI Objek | ||
Parameter #2 | Tanggal dan waktu dari, format: YYYY-MM-DD HH:MM:SS | ||
Parameter #3 | Tanggal dan waktu ke, format: YYYY-MM-DD HH:MM:SS | ||
Parameter #4 | Durasi berhenti dalam menit (1, 2, 5, 10, 20, 30, 60, 120, 300) |
Struktur | https://tracker.id/api/api.php?api=user&key=[API_KEY]&cmd=OBJECT_GET_ROUTE,[IMEI],2016-01-01 00:00:00,2016-02-01 00:00:00,60 |
{ "route": [ "2024-08-13 00:00:06", "-6.914562", "107.658675", "735", "285", 0, { "gpslev": "14", "gsmlev": "4", "hdop": "0.8", "io1": "0", "io113": "100", "io15": "0", "io16": "220840", "io175": "-1", "io66": "12124", "io67": "4059", "io69": "1", "io9": "1301", "pdop": "1.1" } ], "stops": [ { "id_start": 0, "id_end": 2951, "lat": "-6.914562", "lng": "107.658675", "altitude": "735", "angle": "285", "speed": 0, "dt_start": "2024-08-13 00:00:06", "dt_end": "2024-08-13 09:54:27", "duration": "9 h 54 min 21 s", "fuel_consumption": 0, "fuel_cost": 0, "engine_idle": "0 s", "params": { "gpslev": "14", "gsmlev": "4", "hdop": "0.8", "io1": "0", "io113": "100", "io15": "0", "io16": "220840", "io175": "-1", "io66": "12124", "io67": "4059", "io69": "1", "io9": "1301", "pdop": "1.1" } } ], "drives": [ { "id_start_s": 2978, "id_start": 3752, "id_end": 3937, "dt_start_s": "2024-08-13 09:57:13", "dt_start": "2024-08-13 12:27:31", "dt_end": "2024-08-13 12:47:04", "duration": "19 min 33 s", "route_length": 6.59, "top_speed": 42, "avg_speed": 20, "fuel_consumption": 0.13, "fuel_cost": 1300, "engine_work": "19 min 30 s", "fuel_consumption_per_100km": 1.97, "fuel_consumption_mpg": 50.69 } ], "events": [ { "event_desc": "Mesin Hidup", "dt_tracker": "2024-08-13 09:54:27", "lat": "-6.914602", "lng": "107.65855", "altitude": "749", "angle": "167", "speed": 0, "params": { "gpslev": "14", "gsmlev": "4", "hdop": "0.8", "io1": "1", "io113": "100", "io16": "220862", "io175": "-1", "io239": "1", "io24": "5", "io240": "1", "io66": "13345", "io67": "4060", "io69": "1", "io9": "952", "pdop": "1.2" } } ], "route_length": 7.38, "top_speed": 42, "avg_speed": 19, "fuel_consumption": 0.13, "fuel_cost": 1300, "stops_duration_time": 60039, "stops_duration": "16 h 40 min 39 s", "drives_duration_time": 1339, "drives_duration": "22 min 19 s", "engine_work_time": 1333, "engine_idle_time": 0, "engine_work": "22 min 13 s", "engine_idle": "0 s", "fuel_consumption_per_100km": 1.76, "fuel_consumption_mpg": 56.77 }
Penarikan Data Peristiwa Objek
Mengambil data peristiwa yang terjadi pada objek untuk periode waktu tertentu dalam format JSON
OBJECT_GET_EVENTSStruktur Perintah | |||
---|---|---|---|
Command | OBJECT_GET_EVENTS | ||
Parameter #1 | IMEI Objek | ||
Parameter #2 | Tanggal dan waktu dari, format: YYYY-MM-DD HH:MM:SS | ||
Parameter #3 | Tanggal dan waktu ke, format: YYYY-MM-DD HH:MM:SS |
Struktur | https://tracker.id/api/api.php?api=user&key=[API_KEY]&cmd=OBJECT_GET_EVENTS,[IMEI],2016-01-01 00:00:00,2016-02-01 00:00:00 |
[ "sensor", "Mesin Hidup", "350xxxxxxxxx090", "Teltonika FMB920", "2024-08-13 09:54:27", "-6.914602", "107.65855", "749", "167", "5", { "gpslev": "14", "gsmlev": "4", "hdop": "0.8", "io1": "1", "io113": "100", "io16": "220862", "io175": "-1", "io239": "1", "io24": "5", "io240": "1", "io66": "13345", "io67": "4060", "io69": "1", "io9": "952", "pdop": "1.2" } ]
Penarikan Data Jadwal Perawatan Objek
Mengambil data jadwal perawatan objek dalam format JSON
USER_GET_MAINTENANCEStruktur Perintah | |||
---|---|---|---|
Command | USER_GET_MAINTENANCE | ||
Parameter #1 | IMEI Objek, pisahkan dengan titik koma apabila IMEI lebih dari 1 (satu) |
Struktur | https://tracker.id/api/api.php?api=user&key=[API_KEY]&cmd=USER_GET_MAINTENANCE,[IMEI] |
{ "1": { "imei": "350xxxxxxxxx090", "object_name": "Teltonika FMB920", "service_name": "Ganti Oli", "odometer": 228, "odometer_left": 4772, "event": true }, "2": { "imei": "350xxxxxxxxx090", "object_name": "Teltonika FMB920", "service_name": "Perpanjang STNK", "days": 225, "days_left": 140, "event": true } }
Penarikan Data Pengeluaran Objek
Mengambil data pengeluaran objek pada akun user untuk periode waktu tertentu dalam format JSON
USER_GET_EXPENSESStruktur Perintah | |||
---|---|---|---|
Command | USER_GET_EXPENSES | ||
Parameter #1 | IMEI Objek, pisahkan dengan titik koma apabila IMEI lebih dari 1 (satu) | ||
Parameter #2 | Tanggal dan waktu dari, format: YYYY-MM-DD HH:MM:SS | ||
Parameter #3 | Tanggal dan waktu ke, format: YYYY-MM-DD HH:MM:SS |
Struktur | https://tracker.id/api/api.php?api=user&key=[API_KEY]&cmd=USER_GET_EXPENSES,[IMEI],2016-01-01 00:00:00,2016-02-01 00:00:00 |
{ "1": { "name": "Isi Bensin", "imei": "350xxxxxxxxx090", "object_name": "Teltonika FMB920", "dt_expense": "2024-08-13", "quantity": "3", "cost": "10000", "supplier": "SPBU Antapani", "buyer": "Adi HIJ", "odometer": "213", "engine_hours": "32400", "desc": "Operasional Harian" } }
Integrasi Data Objek
Integrasi Data Objek berguna untuk memasukkan data lokasi ke dalam server GPS
Struktur Lokasi | |||
---|---|---|---|
imei | Pengidentifikasi objek GPS | ||
dt | Tanggal dan waktu, format: YYYY-MM-DD HH:MM:SS, zona waktu: 0 UTC | ||
lat | Lintang | ||
lng | Bujur | ||
altitude | Ketinggian dalam meter | ||
angle | Sudut dalam derajat | ||
speed | Kecepatan dalam km/jam | ||
loc_valid | 1 untuk lokasi GPS yang valid, 0 untuk lokasi GPS yang tidak valid | ||
params | Parameter tambahan untuk sensor, semuanya harus dipisahkan dengan karakter "|" | ||
event | Peristiwa yang mungkin terjadi: sos, bracon, bracoff, mandown, shock, tow, haccel, hbrake, hcorn, pwrcut, gpscut, lowdc, lowbat, jamming |
Struktur Lokasi |
---|
https://tracker.id/api/api_loc.php?imei=[IMEI]&dt=2016-01-01 00:00:00&lat=54.000000&lng=25.000000&altitude=100&angle=45&speed=60&loc_valid=1¶ms=batp=100|acc=1| |
Struktur Lokasi + Peristiwa |
---|
https://tracker.id//api/api_loc.php?imei=[IMEI]&dt=2016-01-01 00:00:00&lat=54.000000&lng=25.000000&altitude=100&angle=45&speed=60&loc_valid=1¶ms=batp=100|acc=1|&event=sos |
Parameter Data Input Digital
CODE | KETERANGAN |
---|---|
alaX | ala = alarm, X = nilai sensor |
acc | Status ACC |
bats | Status Baterai |
diX | di = digital input |
doX | do = digital output |
pump | Status Pompa Bahan Bakar |
track | Status Pelacakan |
sleep | Status Mode Tidur |
move | Status Mode Gerak |
accel | Status Accelerometer |
dlog | Status Data Log |
Parameter Data Input Analog
CODE | KETERANGAN |
---|---|
accv | Voltase ACC |
batl | Level Baterai |
batp | Persentase Baterai |
batv | Voltase Baterai |
aiX | ai = analog input, X = nilai sensor |
aoX | ao = analog output, X = nilai sensor |
canX | can = can data, X = nilai sensor |
tempX | temp = temperatur, X = nilai sensor |
fuelX | fuel = bahan bakar, X = nilai sensor |
odo | Jarak Tempuh dalam Kilometer |
odor | Jarak Tempuh Relatif dalam Kilometer |
engh | Jam Kerja Mesin |
enghr | Jam Kerja Mesin Relatif |
gsmlev | Level Sinyal GSM |
gpslev | Level Sinyal GPS |
hdop | Horizontal Dilution of Precision |
pdop | Position [3D] Dilution of Precision |
vdop | Vertical Dilution of Precision |
Parameter Data Input String
CODE | KETERANGAN |
---|---|
ibut | ibutton Data |
rfid | RFID Data |
balance | Nilai Data Saldo |
lac | Kode Area Lokasi GSM |
cellid | Nomor Identitas BTS GSM |
mcc | Code Negara Provider GSM |
mnc | Code Provider GSM |
can_sysev | Peristiwa Sistem - CAN |
can_vemot | Pergerakan Kendaraan - CAN |
can_clus | Status Pedal Kopling - CAN |
can_bres | Status Pedal Rem - CAN |
can_accs | Status Pedal Gas - CAN |
can_crus | Status Cruise Control |
can_ptos | Status PTO - CAN |
can_enplcs | Data PLCS Mesin |
can_tyreloc | Data Posisi Ban - CAN |
can_axlew | Berat Sistem Roda - CAN |
can_axloc | Posisi Sistem Roda - CAN |
can_haninf | Data Informasi Penanganan - CAN |
can_dirind | Indikator Arah - CAN |
can_flev | Level Bahan Bakar - CAN |
can_fcr | Penilaian Penggunaan Bahan Bakar - CAN |
can_feco | Penggunaan Ekonomis Bahan Bakar - CAN |
can_pto | Data PTO - CAN |
can_hrfc | Data HRFC - CAN |
can_dist | Data Jarak Tempuh - CAN |
can_amt | Temperatur Suhu Sekitar - CAN |
can_ect | Temperatur Suhu Mesin - CAN |
can_rpm | Data RPM Mesin - CAN |
can_engh | Jam Kerja Mesin - CAN |
can_srdist | Jarak Tempuh Sebelum Perawatan - CAN |
tco_dist | TCO Berdasarkan Jarak Tempuh |
tco_trip | TCO Berdasarkan Perjalanan |
tco_vespd | TCO Berdasarkan Kecepatan |
tco_rpm | TCO Berdasarkan RPM |
PHP GET
CODE | KETERANGAN |
---|---|
$username = $_GET['username']; | Username pengguna |
$name = $_GET['name']; | Nama lengkap pengguna |
$imei = $_GET['imei']; | IMEI perangkat |
$type = $_GET['type']; | Tipe perangkat atau data |
$desc = $_GET['desc']; | Deskripsi tambahan |
$zone_name = @$_GET['zone_name']; | Nama zona lokasi |
$route_name = @$_GET['route_name']; | Nama rute perjalanan |
$lat = $_GET['lat']; | Latitude (garis lintang) lokasi |
$lng = $_GET['lng']; | Longitude (garis bujur) lokasi |
$speed = $_GET['speed']; | Kecepatan kendaraan |
$altitude = $_GET['altitude']; | Ketinggian lokasi |
$angle = $_GET['angle']; | Arah kendaraan (sudut) |
$dt_server = $_GET['dt_server']; | Waktu server |
$dt_tracker = $_GET['dt_tracker']; | Waktu pada perangkat pelacak |
$tr_model = $_GET['tr_model']; | Model kendaraan |
$vin = $_GET['vin']; | Nomor identifikasi kendaraan (VIN) |
$plate_number = $_GET['plate_number']; | Nomor pelat kendaraan |
$sim_number = @$_GET['sim_number']; | Nomor kartu SIM |
$driver_name = $_GET['driver_name']; | Nama pengemudi |
$trailer_name = $_GET['trailer_name']; | Nama trailer (jika ada) |
$odometer = $_GET['odometer']; | Jarak tempuh (odometer) |
$eng_hours = $_GET['eng_hours']; | Jam kerja mesin |
PHP POST
CODE | KETERANGAN |
---|---|
$username = $_POST['username']; | Username pengguna |
$name = $_POST['name']; | Nama lengkap pengguna |
$imei = $_POST['imei']; | IMEI perangkat |
$type = $_POST['type']; | Tipe perangkat atau data |
$desc = $_POST['desc']; | Deskripsi tambahan |
$zone_name = @$_POST['zone_name']; | Nama zona lokasi |
$route_name = @$_POST['route_name']; | Nama rute perjalanan |
$lat = $_POST['lat']; | Latitude (garis lintang) lokasi |
$lng = $_POST['lng']; | Longitude (garis bujur) lokasi |
$speed = $_POST['speed']; | Kecepatan kendaraan |
$altitude = $_POST['altitude']; | Ketinggian lokasi |
$angle = $_POST['angle']; | Arah kendaraan (sudut) |
$dt_server = $_POST['dt_server']; | Waktu server |
$dt_tracker = $_POST['dt_tracker']; | Waktu pada perangkat pelacak |
$tr_model = $_POST['tr_model']; | Model kendaraan |
$vin = $_POST['vin']; | Nomor identifikasi kendaraan (VIN) |
$plate_number = $_POST['plate_number']; | Nomor pelat kendaraan |
$sim_number = @$_POST['sim_number']; | Nomor kartu SIM |
$driver_name = $_POST['driver_name']; | Nama pengemudi |
$trailer_name = $_POST['trailer_name']; | Nama trailer (jika ada) |
$odometer = $_POST['odometer']; | Jarak tempuh (odometer) |
$eng_hours = $_POST['eng_hours']; | Jam kerja mesin |
$params = $_POST['params']; | Parameter tambahan untuk pengolahan data |