API Pengguna
- Beranda
- DOKUMENTASI
- API Pengguna
API Pengguna
Dokumentasi lengkap API dan parameter data untuk mengakses dan mengelola informasi pada aplikasi server GPS Tracking System trackgps.id.
- GET List Get Protocols
- GET List Get Alerts
- GET List Add Alert Data
- POST Create a Add Alert
- GET List Edit Alert Data
- POST Create a Edit Alert
- GET Get a Destroy Alert
- GET Get a Change Active Alert
- GET Get a Get Custom Events By Device
- GET List Set Alert Devices
- GET Get device alerts
- POST Set when alerts are active from or/and to
- GET Get events by protocol
- GET Get alert types with input fields
- GET Get alert commands
- GET Get alerts summary
API Alerts
GET List Protocols
Mengambil seluruh data device protocol.
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | get_protocols |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/get_protocols?lang=[lang]&user_api_hash=[user_api_hash] |
{
"0": {
"id": 0,
"value": {
"type": 1,
"items": [
{
"id": "osmand",
"value": "osmand"
}
]
}
},
"1": {
"id": 1,
"value": {
"type": 2,
"items": []
}
},
"status": 1
}
GET List Alerts
Mengambil seluruh data alerts.
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | get_alerts |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/get_alerts?lang=[lang]&user_api_hash[user_api_hash] |
{
"items": {
"alerts": [
{
"id": 1,
"name": "Test event",
"email": "",
"active": 1,
"devices": [
3
],
"drivers": [],
"user_id": 2,
"ac_alarm": "0",
"geofences": [
1,
2
],
"created_at": "2016-04-29 17:34:07",
"updated_at": "2016-04-29 19:06:23",
"mobile_phone": "",
"events_custom": [],
"overspeed_speed": "110",
"overspeed_distance": "1"
}
]
},
"status": 1
}
GET Add Alert Data
Mengambil data untuk membuat alerts.
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | add_alert_data |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/add_alert_data?lang=[lang]&user_api_hash[user_api_hash] |
{
"status": 1,
"devices": [
{
"id": 3,
"value": "Device name"
}
],
"drivers": [
{
"id": 1,
"value": "Drive first"
},
{
"id": 2,
"value": "Second drive name"
}
],
"geofences": [
{
"id": 1,
"value": "Test geo"
}
],
"alert_zones": [
{
"id": 1,
"value": "Zone in"
},
{
"id": 2,
"value": "Zone out"
}
],
"event_types": [
{
"id": 1,
"value": "Custom events"
},
{
"id": 2,
"value": "System events"
}
],
"alert_distance": [
{
"id": 1,
"value": "km"
},
{
"id": 2,
"value": "mi"
}
],
"alert_fuel_type": [
{
"id": 1,
"value": "L"
},
{
"id": 2,
"value": "Gal"
}
],
"event_protocols": [
{
"id": "-",
"value": "- Protocol -"
}
]
}
POST Add Alert
Membuat data alert.
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Command | add_alert |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/add_alert?lang=[lang]&user_api_hash[user_api_hash] |
{
"active": 0,
"type": "string",
"name": "string",
"schedules": {},
"notifications": {
"color": {
"active": 0,
"input": "string"
},
"silent": {
"active": 0,
"input": 0
},
"sound": {
"active": 0,
"input": "string"
},
"popup": {
"active": 0,
"input": 0
},
"push": {
"active": 0
},
"email": {
"active": 0,
"input": "string"
},
"webhook": {
"active": 0,
"input": "string"
}
},
"command": {
"active": 0,
"type": "string"
},
"zone": 0,
"zones": [
0
],
"drivers": [
0
],
"events_custom": [
0
],
"geofences": [
0
],
"pois": [
0
],
"overspeed": 0,
"stop_duration": 0,
"idle_duration": 0,
"ignition_duration": 0,
"offline_duration": 0,
"move_duration": 0,
"min_parking_duration": 0,
"distance": 0,
"distance_tolerance": 0
}
{
"status": 1
}
GET Edit Alert Data
Mengambil data untuk mengedit alerts.
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | add_alert_data |
| Query Parameters |
alert_id integer
required
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/edit_alert_data?alert_id=[alert_id]⟨=[lang]&user_api_hash[user_api_hash] |
{
"item": {
"id": 0,
"user_id": 0,
"active": 0,
"name": "string",
"type": "string",
"created_at": "string",
"updated_at": "string",
"devices": [
0
],
"drivers": [
0
],
"geofences": [
0
],
"events_custom": [
0
],
"zone": 0,
"zones": [
{}
],
"schedule": true,
"schedules": [
{
"id": "string",
"title": "string",
"items": [
{
"id": "string",
"title": "string",
"active": true
}
]
}
],
"notifications": {
"sound": {
"active": true
},
"push": {
"active": true
},
"email": {
"active": true,
"input": "string"
},
"sms": {
"active": true,
"input": "string"
},
"webhook": {
"active": true,
"input": "string"
}
},
"command": {
"active": true,
"type": "string",
"key": "string"
}
},
"devices": [
{
"id": 0,
"value": "string"
}
],
"geofences": [
{
"id": 0,
"value": "string"
}
],
"alert_zones": [
{
"id": 0,
"value": "string"
}
],
"types": [
{
"type": "string",
"title": "string",
"attributes": [
{
"name": "string",
"type": "integer",
"title": "string",
"default": "string",
"options": [
{
"id": "string",
"value": "string"
}
]
}
]
}
],
"notifications": [
{
"name": "string",
"active": true,
"title": "string",
"input": "string",
"description": "string"
}
],
"schedules": [
{
"id": "monday",
"title": "string",
"items": [
{
"id": "string",
"title": "string",
"active": true
}
]
}
]
}
POST Edit Alert
Mengedit/Mengubah data alert.
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Command | edit_alert |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/edit_alert?lang=[lang]&user_api_hash[user_api_hash] |
{
"id": 0,
"active": 0,
"type": "string",
"name": "string",
"schedules": {},
"notifications": {
"color": {
"active": 0,
"input": "string"
},
"silent": {
"active": 0,
"input": 0
},
"sound": {
"active": 0,
"input": "string"
},
"popup": {
"active": 0,
"input": 0
},
"push": {
"active": 0
},
"email": {
"active": 0,
"input": "string"
},
"webhook": {
"active": 0,
"input": "string"
}
},
"command": {
"active": 0,
"type": "string"
},
"zone": 0,
"zones": [
0
],
"drivers": [
0
],
"events_custom": [
0
],
"geofences": [
0
],
"pois": [
0
],
"overspeed": 0,
"stop_duration": 0,
"idle_duration": 0,
"ignition_duration": 0,
"offline_duration": 0,
"move_duration": 0,
"min_parking_duration": 0,
"distance": 0,
"distance_tolerance": 0
}
{
"status": 1
}
GET Destroy Alert
Menghapus data alert
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | destroy_alert |
| Query Parameters |
alert_id integer
required
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/destroy_alert?alert_id=[alert_id]⟨=[lang]&user_api_hash[user_api_hash] |
{
"status": 1
}
GET Change Active Alert
Mengganti active status untuk data alert
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | change_active_alert |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/change_active_alert?lang=[lang]&user_api_hash[user_api_hash] |
{
"id": 0,
"active": true
}
Success
GET Custom Events By Device
Mendapatkan custom events dari perangkat
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | get_custom_events_by_device |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/get_custom_events_by_device?lang=[lang]&user_api_hash=[user_api_hash] |
{
"devices": [0]
}
[
{
"key": "string",
"name": "string",
"items": [
{
"id": 0,
"value": "string"
}
]
}
]
GET Set Alert Devices
Mengatur alert untuk perangkat
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | set_alert_devices |
| Query Parameters |
alert_id integer
required
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/set_alert_devices?alert_id=[alert_id]⟨=[lang]&user_api_hash=[user_api_hash] |
{
"devices": [0]
}
Success
GET Device Alerts
Mengambil data alert untuk perangkat tertentu
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | devices/{device_id}/alerts |
| Path Parameters |
device_id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/devices/{device_id}/alerts?lang=[lang]&user_api_hash=[user_api_hash] |
{
"data": [
{
"id": 1,
"name": "overspeed",
"active": true,
"date_to": null,
"date_from": null
}
],
"pagination": {
"total": 1,
"per_page": 15,
"last_page": 1,
"current_page": 1
}
}
POST Set Active Alerts
Mengatur kapan alert aktif dari atau/hingga
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Command | devices/{device_id}/alerts/{alert_id}/time_period |
| Path Parameters |
alert_id integer
required
device_id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/devices/{device_id}/alerts/{alert_id}/time_period?lang=[lang]&user_api_hash=[user_api_hash] |
{
"date_from": "string",
"date_to": "string"
}
{
"status": 1
}
GET Events by Protocol
Mengambil data event berdasarkan protokol
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | get_events_by_protocol |
| Query Parameters |
lang string
required
protocol string
required
type integer
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/get_events_by_protocol?lang=[lang]&protocol=[protocol]&type=[type]&user_api_hash=[user_api_hash] |
{
"0": {
"id": 0,
"title": {
"id": 2,
"title": "test",
"value": "test"
},
"value": {
"id": 2,
"title": "test",
"value": "test"
}
},
"status": 1
}
GET Alert Types With Input Fields
Mengambil Jenis Alert Dengan Kolom Input Yang Diperlukan
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | get_alerts_attributes |
| Query Parameters |
Lang String
Required
User API Hash String
Required
|
| Struktur | https://trackgps.id/api/get_alerts_attributes?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 0,
"types": [
{
"name": "string",
"type": "string",
"title": "string",
"options": [
{
"id": "string",
"title": "string"
}
]
}
]
}
GET Alert Commands
Mengambil perintah alert
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | get_alerts_commands |
| Query Parameters |
Lang String
Required
User API Hash String
Required
|
| Struktur | https://trackgps.id/api/get_alerts_commands?lang=[lang]&user_api_hash=[user_api_hash] |
{
"alert_id": 0,
"devices": [0],
"selected_devices": [0]
}
{
"status": 200
}
GET Alerts Summary
Mengambil Ringkasan alert
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | get_alerts_summary |
| Query Parameters |
Lang String
Required
User API Hash String
Required
|
| Struktur | https://trackgps.id/api/get_alerts_summary?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 200,
"message": "OK"
}
API Authentication
POST Login
Mengirim data login untuk mendapatkan `user_api_hash`
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Command | login |
| Body Parameters |
Email String
Required
Password String
Required
|
| Struktur | https://trackgps.id/api/login |
{
"status": 1,
"user_api_hash": "$2y$10$5RACGMNX..."
}
GET Initiate Password Change
Mendapatkan kode pengingat untuk mengubah password melalui email
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | password_reminder |
| Body Parameters |
Email String
Required
|
| Struktur | https://trackgps.id/api/password_reminder |
{
"email": "test@test.com"
}
{
"success": 1
}
POST Change Password
Mengubah kata sandi menggunakan kode yang telah diberikan
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Command | password_reminder |
| Body Parameters |
Email String
Required
Code String
Required
Password String
Required
|
| Struktur | https://trackgps.id/api/password_reminder |
{
"email": "test@test.com",
"code": "123456",
"password": "newpassword"
}
{
"success": 1
}
API Command
GET Send Command Data
Mendapatkan data untuk membuat perintah GPRS/SMS
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | send_command_data |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/send_command_data?lang=[lang]&user_api_hash=[user_api_hash] |
{
"units": [
{
"id": "second",
"value": "Second"
},
{
"id": "minute",
"value": "Minute"
},
{
"id": "hour",
"value": "Hour"
}
],
"status": 1,
"actions": [
{
"id": 1,
"value": "On"
},
{
"id": 0,
"value": "Off"
}
],
"commands": [
{
"id": "engineStop",
"value": "Engine stop"
},
{
"id": "engineResume",
"value": "Engine resume"
},
{
"id": "alarmArm",
"value": "Alarm arm"
},
{
"id": "alarmDisarm",
"value": "Alarm disarm"
},
{
"id": "positionSingle",
"value": "Position single"
},
{
"id": "positionPeriodic",
"value": "Periodic reporting"
},
{
"id": "positionStop",
"value": "Stop reporting"
},
{
"id": "movementAlarm",
"value": "Movement alarm"
},
{
"id": "setTimezone",
"value": "Set timezone"
},
{
"id": "rebootDevice",
"value": "Reboot device"
},
{
"id": "sendSms",
"value": "Send sms"
},
{
"id": "custom",
"value": "Custom command"
}
],
"devices_sms": [],
"commands_all": {
"pt502": {
"engineStop": "Engine stop",
"engineResume": "Engine resume"
},
"watch": {
"alarmSos": "SOS message alarm",
"sosNumber": "SOS number setting",
"alarmClock": "Alarm clock setting order",
"alarmRemove": "Alarm of taking watch",
"silenceTime": "Time interval setting of silence time",
"alarmBattery": "Low battery alarm",
"rebootDevice": "Restart",
"setPhonebook": "Phone book setting order"
},
"default": {
"custom": "Custom command",
"sendSms": "Send sms",
"alarmArm": "Alarm arm",
"engineStop": "Engine stop",
"alarmDisarm": "Alarm disarm",
"setTimezone": "Set timezone",
"engineResume": "Engine resume",
"positionStop": "Stop reporting",
"rebootDevice": "Reboot device",
"movementAlarm": "Movement alarm",
"positionSingle": "Position single",
"positionPeriodic": "Periodic reporting"
}
},
"devices_gprs": [
{
"id": 3,
"value": "Device name"
}
],
"number_index": [
{
"id": 1,
"value": "First"
},
{
"id": 2,
"value": "Second"
},
{
"id": 3,
"value": "Third"
},
{
"id": 0,
"value": "Three SOS numbers at the same time"
}
],
"sms_templates": [
{
"id": "0",
"title": "No template",
"message": null
},
{
"id": "1",
"title": "Template title",
"message": "Template message"
}
],
"gprs_templates": [
{
"id": "0",
"title": "No template",
"message": null
},
{
"id": "1",
"title": "Template title",
"message": "Template message"
}
],
"devices_protocols": {
"3": "osmand"
}
}
POST Send GPRS Command
Membuat perintah GPRS
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Command | send_gprs_command |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
device_id integer
required
type string
required
message string
required
|
| Struktur | https://trackgps.id/api/send_gprs_command?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
POST Send SMS Command
Membuat perintah SMS
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Command | send_sms_command |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
message string
required
devices array[integer]
required
|
| Struktur | https://trackgps.id/api/send_sms_command?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
GET Device Commands
Mendapatkan perintah yang dikirim ke perangkat
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | get_device_commands |
| Query Parameters |
device_id integer
required
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/get_device_commands?device_id=[device_id]⟨=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1,
"commands": [
{
"command_id": 123,
"status": "sent",
"created_at": "2024-09-09"
}
]
}
API Custom Event
GET Custom Events
Mendapatkan acara kustom dari sistem
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Endpoint | get_custom_events |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_custom_events?lang=[lang]&user_api_hash=[user_api_hash] |
{
"items": {
"events": {
"to": 1,
"url": "/api/get_custom_events",
"data": [
{
"id": "1",
"tags": [
{
"tag": "speed",
"event_custom_id": "1"
}
],
"always": "1",
"message": "Message",
"user_id": "2",
"protocol": "osmand",
"conditions": [
{
"tag": "speed",
"type": "2",
"tag_value": "110"
}
]
}
],
"from": 1,
"total": 1,
"per_page": 10,
"last_page": 1,
"current_page": 1,
"next_page_url": null,
"prev_page_url": null
}
},
"status": 1
}
GET Add Custom Event
Mendapatkan data untuk membuat event kustom dari sistem
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Endpoint | add_custom_event_data |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_custom_event_data?lang=[lang]&user_api_hash=[user_api_hash] |
{
"types": [
{
"id": "1",
"value": "Equals to (=)"
},
{
"id": "2",
"value": "Greater than (>)"
},
{
"id": "3",
"value": "Less than (<)"
}
],
"status": 1,
"protocols": [
{
"id": "adm",
"value": "adm"
},
{
"id": "apel",
"value": "apel"
},
{
"id": "aplicom",
"value": "aplicom"
},
{
"id": "appello",
"value": "appello"
}
]
}
POST Add Custom Event
Menambahkan acara kustom baru ke sistem
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Endpoint | add_custom_event |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_custom_event?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
GET Edit Custom Event Data
Mengambil data untuk mengedit acara kustom di sistem
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Endpoint | edit_custom_event_data |
| Query Parameters |
custom_event_id integer
required
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_custom_event_data?custom_event_id=[custom_event_id]⟨=[lang]&user_api_hash=[user_api_hash] |
{
"item": {
"id": 1,
"always": 1,
"message": "Message",
"user_id": 2,
"protocol": "osmand",
"conditions": [
{
"tag": "speed",
"type": "2",
"tag_value": "110"
}
]
},
"types": [
{
"id": "1",
"value": "Equals to (=)"
},
{
"id": "2",
"value": "Greater than (>)"
},
{
"id": "3",
"value": "Less than (<)"
}
],
"status": 1,
"protocols": [
{
"id": "adm",
"value": "adm"
},
{
"id": "apel",
"value": "apel"
},
{
"id": "aplicom",
"value": "aplicom"
},
{
"id": "appello",
"value": "appello"
},
{
"id": "aquila",
"value": "aquila"
},
{
"id": "ardi01",
"value": "ardi01"
}
]
}
POST Edit Custom Event
Mengedit acara kustom di sistem
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Endpoint | edit_custom_event |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
id integer
required
protocol string
required
message string
required
tag array[string]
type array[integer]
tag_value array[string]
show_always integer
|
| Contoh Permintaan | https://trackgps.id/api/edit_custom_event?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 0,
"protocol": "string",
"message": "string",
"tag": [
"string"
],
"type": [
0
],
"tag_value": [
"string"
],
"show_always": 0
}
{
"status": 1
}
GET Destroy Custom Event
Menghapus acara kustom dari sistem
| REQUEST STRUCTURE | |
|---|---|
| Method | GET |
| Endpoint | destroy_custom_event |
| Query Parameters |
custom_event_id integer
required
lang string
required
user_api_hash string
required
|
| Request Example | https://trackgps.id/api/destroy_custom_event?custom_event_id=[custom_event_id]⟨=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
API Devices
GET Devices
Get devices from the system
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Endpoint | get_devices |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Request Example | https://trackgps.id/api/get_devices?lang=[lang]&user_api_hash=[user_api_hash] |
[
{
"items": [
{
"id": 3,
"lat": 55.922996,
"lng": 23.3466906,
"name": "Device name",
"tail": [
{
"lat": "55.91986482",
"lng": "23.3255625"
},
{
"lat": "55.91590619",
"lng": "23.33778733"
},
{
"lat": "55.91928624",
"lng": "23.34572509"
},
{
"lat": "55.92336524",
"lng": "23.34666575"
},
{
"lat": "55.92297793",
"lng": "23.34665713"
}
],
"time": "2016-04-29 21:01:26",
"alarm": "",
"power": "-",
"speed": 0,
"course": "0",
"driver": "Drive first",
"online": "offline",
"address": "-",
"sensors": [
{
"name": "Sensor test",
"value": "- nn",
"show_in_popup": "0"
},
{
"name": "test acc",
"value": "- nn",
"show_in_popup": "1"
}
],
"altitude": 175,
"protocol": "osmand",
"services": [
{
"name": "Test service",
"value": "Engine hours Left (1000 )"
}
],
"timestamp": 1461956486,
"device_data": {
"id": "3",
"vin": "",
"imei": "789832",
"name": "Device name",
"pivot": {
"active": "1",
"user_id": "2",
"group_id": null,
"device_id": "3",
"timezone_id": null,
"current_driver_id": "1"
},
"active": "1",
"deleted": "0",
"icon_id": "8",
"user_id": null,
"group_id": null,
"created_at": "2016-04-25 16:21:19",
"fuel_price": "0.00",
"sim_number": "",
"tail_color": "#33cc33",
"updated_at": "2016-06-26 15:52:46",
"fuel_per_km": "0.00",
"tail_length": "5",
"device_model": "",
"engine_hours": "gps",
"object_owner": "",
"plate_number": "",
"snap_to_road": "0",
"detect_engine": "gps",
"fuel_quantity": "0.00",
"expiration_date": "0000-00-00",
"min_fuel_thefts": "10",
"min_moving_speed": "6",
"current_driver_id": "1",
"min_fuel_fillings": "10",
"traccar_device_id": "3",
"fuel_measurement_id": "1",
"registration_number": ""
},
"acktimestamp": 0,
"distance_unit_hour": "kph"
}
],
"title": "Ungrouped"
}
]
GET Devices Latest
Mengembalikan hanya perangkat yang informasinya telah berubah. Semua respon akan mengembalikan 'liner', waktu yang diperlukan untuk mengirimkan permintaan berikutnya.
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Endpoint | get_devices_latest |
| Query Parameters |
filter[device_model] string
filter[group_id] integer
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_devices_latest?lang=[lang]&user_api_hash=[user_api_hash]&filter[device_model]=[model]&filter[group_id]=[group_id] |
{
"time": 1466992735,
"items": [
{
"id": 3,
"lat": 55.922996,
"lng": 23.3466906,
"name": "Device name",
"tail": "[\n {\n \"lat\": \"55.91986482\",\n \"lng\": \"23.3255625\"\n },\n {\n \"lat\": \"55.91590619\",\n \"lng\": \"23.33778733\"\n },\n {\n \"lat\": \"55.91928624\",\n \"lng\": \"23.34572509\"\n },\n {\n \"lat\": \"55.92336524\",\n \"lng\": \"23.34666575\"\n },\n {\n \"lat\": \"55.92297793\",\n \"lng\": \"23.34665713\"\n }\n]",
"time": "2016-04-29 21:01:26",
"alarm": "",
"power": "-",
"speed": 0,
"course": "0",
"driver": "Drive first",
"online": "offline",
"address": "-",
"sensors": "[\n {\n \"name\": \"Sensor test\",\n \"value\": \"- nn\",\n \"show_in_popup\": \"0\"\n },\n {\n \"name\": \"test acc\",\n \"value\": \"- nn\",\n \"show_in_popup\": \"1\"\n }\n]",
"altitude": 175,
"protocol": "osmand",
"services": "[\n {\n \"name\": \"Test service\",\n \"value\": \"Engine hours Left (1000 )\"\n }\n]",
"timestamp": 1461956486,
"device_data": {
"id": "3",
"vin": "",
"imei": "789832",
"name": "Device name",
"pivot": {
"active": "1",
"user_id": "2",
"group_id": null,
"device_id": "3",
"timezone_id": null,
"current_driver_id": "1"
},
"active": "1",
"deleted": "0",
"icon_id": "8",
"group_id": null,
"created_at": "2016-04-25 16:21:19",
"fuel_price": "0.00",
"sim_number": "",
"tail_color": "#33cc33",
"updated_at": "2016-06-26 15:52:46",
"fuel_per_km": "0.00",
"tail_length": "5",
"device_model": "",
"engine_hours": "gps",
"object_owner": "",
"plate_number": "",
"snap_to_road": "0",
"detect_engine": "gps",
"fuel_quantity": "0.00",
"expiration_date": "0000-00-00",
"min_fuel_thefts": "10",
"min_moving_speed": "6",
"current_driver_id": "1",
"min_fuel_fillings": "10",
"traccar_device_id": "3",
"fuel_measurement_id": "1",
"registration_number": ""
},
"acktimestamp": 0,
"distance_unit_hour": "kph"
}
],
"events": [],
"version": "2.5.1"
}
GET Add Device Data
Data untuk membuat perangkat baru
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | add_device_data |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_device_data?lang=[lang]&user_api_hash=[user_api_hash] |
{
"users": [],
"status": 1,
"timezones": [
{
"id": 0,
"value": "Default"
},
{
"id": 1,
"value": "-14:00"
},
{
"id": 2,
"value": "-13:45"
},
{
"id": 3,
"value": "-13:30"
},
{
"id": 4,
"value": "-13:15"
},
{
"id": 5,
"value": "-13:00"
},
{
"id": 6,
"value": "-12:45"
},
{
"id": 7,
"value": "-12:30"
},
{
"id": 8,
"value": "-12:15"
},
{
"id": 9,
"value": "-12:00"
},
{
"id": 10,
"value": "-11:45"
}
],
"device_icons": [
{
"id": "4",
"path": "frontend/images/device_icons/4.png",
"order": "4",
"width": "43.00",
"height": "57.00"
},
{
"id": "1",
"path": "frontend/images/device_icons/1.png",
"order": "3",
"width": "43.00",
"height": "57.00"
},
{
"id": "2",
"path": "frontend/images/device_icons/2.png",
"order": "3",
"width": "43.00",
"height": "57.00"
},
{
"id": "3",
"path": "frontend/images/device_icons/3.png",
"order": "3",
"width": "43.00",
"height": "57.00"
}
],
"device_groups": [
{
"id": 0,
"value": "Ungrouped"
}
],
"sensor_groups": [
{
"id": 0,
"value": "None"
},
{
"id": 1,
"value": "Senson group"
}
],
"expiration_date_select": {
"1": "Expiration date",
"0000-00-00": "Unlimited"
},
"device_fuel_measurements": [
{
"id": "1",
"lang": "en",
"title": "l/100km",
"created_at": "2016-04-19 16:31:00",
"fuel_title": "liter",
"updated_at": "2016-04-19 16:31:00",
"distance_title": "Kilometers"
},
{
"id": "2",
"lang": "en",
"title": "MPG",
"created_at": "2016-04-19 16:31:00",
"fuel_title": "gallon",
"updated_at": "2016-04-19 16:31:00",
"distance_title": "Miles"
}
]
}
POST Add Device Data
membuat perangkat baru
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_device |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_device_data?lang=[lang]&user_api_hash=[user_api_hash] |
{
"name": "string",
"imei": "string",
"icon_id": 0,
"fuel_measurement_id": 0,
"tail_length": 0,
"min_moving_speed": 0,
"min_fuel_fillings": 0,
"min_fuel_thefts": 0,
"fuel_quantity": 0,
"fuel_price": 0,
"group_id": 0,
"device_icons_type": "arrow",
"timezone_id": 0,
"icon_moving": "green",
"icon_stopped": "red",
"icon_offline": "red",
"icon_engine": "yellow",
"sim_number": "string",
"vin": "string",
"device_model": "string",
"plate_number": "string",
"registration_number": "string",
"object_owner": "string",
"additional_notes": "string"
}
{
"status": 1
}
GET Edit Device Data
Data to edit device
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | edit_device_data |
| Query Parameters |
device_id integer
required
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_device_data?device_id=[device_id]⟨=[lang]&user_api_hash=[user_api_hash] |
{
"device_groups": [
{
"id": 0,
"value": "string"
}
],
"sensor_groups": [
{
"id": 0,
"value": "string"
}
],
"device_fuel_measurements": [
{
"id": "string",
"title": "string",
"fuel_title": "string",
"distance_title": "string",
"lang": "string",
"created_at": "string",
"updated_at": "string"
}
],
"device_icons": [
{
"id": "string",
"order": "string",
"width": "string",
"height": "string",
"path": "string"
}
],
"users": [
{}
],
"timezones": [
{
"id": 0,
"value": "string"
}
],
"expiration_date_select": {
"1": "string",
"0000-00-00": "string"
},
"engine_hours": [
{
"id": "string",
"value": "string"
}
],
"detect_engine": [
{
"id": "string",
"value": "string"
}
],
"sensors": {
"total": 0,
"per_page": 0,
"current_page": 0,
"last_page": 0,
"from": 0,
"to": 0,
"next_page_url": "string",
"prev_page_url": "string",
"url": "string",
"data": [
{
"id": "2",
"name": "test acc",
"type": "acc",
"value": "-",
"formula": null,
"on_type": null,
"user_id": "2",
"off_type": null,
"on_value": "on",
"tag_name": "tag",
"device_id": "3",
"full_tank": null,
"max_value": null,
"min_value": null,
"off_value": "off",
"calibrations": null,
"on_tag_value": null,
"off_tag_value": null,
"show_in_popup": "1",
"value_formula": "0",
"add_to_history": "0",
"fuel_tank_name": null,
"odometer_value": null,
"shown_value_by": null,
"full_tank_value": null,
"temperature_max": null,
"temperature_min": null,
"odometer_value_by": null,
"odometer_value_unit": "km",
"unit_of_measurement": "nn",
"temperature_max_value": null,
"temperature_min_value": null
}
]
},
"services": {
"total": 0,
"per_page": 0,
"current_page": 0,
"last_page": 0,
"from": 0,
"to": 0,
"next_page_url": "string",
"prev_page_url": "string",
"url": "string",
"data": [
{
"id": "1",
"name": "Test service",
"email": "",
"device": {},
"remind": "1000",
"expired": "0",
"expires": "1000",
"user_id": "2",
"interval": "0",
"device_id": "3",
"event_sent": "0",
"remind_date": null,
"expires_date": null,
"last_service": "1000",
"mobile_phone": "",
"expiration_by": "engine_hours",
"trigger_event_left": "0",
"renew_after_expiration": "0"
}
]
},
"item": {
"id": "32",
"vin": "",
"icon": {
"id": "8",
"path": "frontend/images/device_icons/8.png",
"order": "3",
"width": "43.00",
"height": "57.00"
},
"imei": "789832",
"name": "Device name",
"pivot": {
"active": "1",
"user_id": "2",
"group_id": null,
"device_id": "3",
"timezone_id": null,
"current_driver_id": "1"
},
"active": "1",
"deleted": "0",
"icon_id": "8",
"sensors": [
{
"id": "1",
"name": "Sensor test",
"type": "battery",
"value": "-",
"formula": null,
"on_type": null,
"user_id": "2",
"off_type": null,
"on_value": null,
"tag_name": "Parameter name",
"device_id": "3",
"full_tank": null,
"max_value": null,
"min_value": null,
"off_value": null,
"calibrations": null,
"on_tag_value": null,
"off_tag_value": null,
"show_in_popup": "0",
"value_formula": "0",
"add_to_history": "0",
"fuel_tank_name": null,
"odometer_value": null,
"shown_value_by": "tag_value",
"full_tank_value": null,
"temperature_max": null,
"temperature_min": null,
"odometer_value_by": null,
"odometer_value_unit": "km",
"unit_of_measurement": "nn",
"temperature_max_value": null,
"temperature_min_value": null
}
],
"traccar": {
"id": "3",
"name": "Device name",
"time": "2016-04-29 19:01:26",
"other": "31.0 83.181.149.238 ",
"power": null,
"speed": "0.00",
"course": "0",
"address": null,
"ack_time": null,
"altitude": "175",
"protocol": "osmand",
"uniqueId": "789832",
"server_time": "2016-04-29 19:01:26",
"latest_positions": "55.92297793/23.34665713;55.92336524/23.34666575;55.91928624/23.34572509;55.91590619/23.33778733;55.91986482/23.3255625;55.92581495/23.30829421;55.92748307/23.30725942;55.92966571/23.31183084;55.93430696/23.31986459;55.93769598/23.32408059;55.94483741/23.33093897;55.94417471/23.33107782;55.93988092/23.32629426;55.93719855/23.32534909;55.93344595/23.32372258",
"lastValidLatitude": "55.92299604",
"latestPosition_id": "99",
"lastValidLongitude": "23.34669059"
},
"user_id": null,
"services": [
{
"id": "1",
"name": "Test service",
"email": "",
"remind": "1000",
"expired": "0",
"expires": "1000",
"user_id": "2",
"interval": "0",
"device_id": "3",
"event_sent": "0",
"remind_date": null,
"expires_date": null,
"last_service": "1000",
"mobile_phone": "",
"expiration_by": "engine_hours",
"trigger_event_left": "0",
"renew_after_expiration": "0"
}
],
"created_at": "2016-04-25 16:21:19",
"fuel_price": "0.00",
"sim_number": "",
"tail_color": "#33cc33",
"updated_at": "2016-06-26 15:52:46",
"fuel_per_km": "0.00",
"tail_length": "5",
"device_model": "",
"engine_hours": "gps",
"object_owner": "",
"plate_number": "",
"snap_to_road": "0",
"detect_engine": "gps",
"fuel_quantity": "0.00",
"expiration_date": "0000-00-00",
"min_fuel_thefts": "10",
"min_moving_speed": "6",
"min_fuel_fillings": "10",
"traccar_device_id": "3",
"fuel_measurement_id": "1",
"registration_number": ""
},
"status": 0
}
POST Edit Device
Mengubah data device berdasarkan parameter yang diberikan.
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Command | edit_device |
| Query Parameters |
device_id integer
required
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/edit_device?device_id=[device_id]⟨=[lang]&user_api_hash=[user_api_hash] |
{
"name": "string",
"imei": "string",
"icon_id": 0,
"fuel_measurement_id": 0,
"tail_length": 0,
"min_moving_speed": 0,
"min_fuel_fillings": 0,
"min_fuel_thefts": 0,
"fuel_quantity": 0,
"fuel_price": 0,
"group_id": 0,
"device_icons_type": "arrow",
"timezone_id": 0,
"icon_moving": "green",
"icon_stopped": "red",
"icon_offline": "red",
"icon_engine": "yellow",
"sim_number": "string",
"vin": "string",
"device_model": "string",
"plate_number": "string",
"registration_number": "string",
"object_owner": "string",
"additional_notes": "string"
}
{
"status": 1
}
GET Change Active Device
Mengubah status aktif device berdasarkan ID device yang diberikan.
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Command | change_active_device |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Struktur | https://trackgps.id/api/change_active_device?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 0,
"active": true
}
{
"status": 1
}
GET Device Groups List
Mengambil daftar grup perangkat dari sistem
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Endpoint | devices_groups |
| Query Parameters |
lang string
required
user_api_hash string
required
filter array
optional
limit integer
optional
search_phrase string
optional
sorting[sort] string
optional
sorting[sort_by] string
optional
|
| Contoh Permintaan | https://trackgps.id/api/devices_groups?lang=[lang]&user_api_hash=[user_api_hash] |
{
"0": {
"id": 1,
"open": true,
"title": "group",
"user_id": 1
},
"pagination": {
"total": 2,
"per_page": 1,
"last_page": 2,
"current_page": 1,
"next_page_url": "/api/devices_groups?page=2",
"prev_page_url": null
}
}
POST Create Device Group
Membuat grup perangkat baru
| STRUKTUR PERINTAH | |
|---|---|
| Method | POST |
| Endpoint | devices_groups/store |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/devices_groups/store?lang=[lang]&user_api_hash=[user_api_hash] |
{
"title": "string",
"open": true,
"devices": [
0
]
}
{
"status": 1
}
PUT Update Device Group
Memperbarui grup perangkat
| STRUKTUR PERINTAH | |
|---|---|
| Method | PUT |
| Endpoint | devices_groups/update/{id} |
| Path Parameters |
id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/devices_groups/update/{id}?lang=[lang]&user_api_hash=[user_api_hash] |
{
"title": "string",
"open": true,
"devices": [
0
]
}
{
"id": 5,
"status": 1
}
API Devices Media
GET Device Media
Mendapatkan media dari perangkat
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Endpoint | devices/{device_id}/media |
| Path Parameters |
device_id string
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/devices/{device_id}/media?lang=[lang]&user_api_hash=[user_api_hash] |
{
"data": [
{
"url": "/api/devices/3/media/file/eyJpdiI6IitOMGtwZEVVSWJCZVpnMzdNeTJLOGc9PSIsInZhbHVlIjoiMVlmS0k4TGVSa1JvdzlaRXFid1RjQ1VHYnhjWkozSWFOdGxOeWlIcDRSWT0iLCJtYWMiOiJmYWY1ZjAwMjczMDM2OTFhMzQ3NzdkZmFiNmRkOGY0MWU1MDU2MjFmMmJlYzQ3MmVhZGE1YzM4NjM0ZGM5Nzk3IiwidGFnIjoiIn0%3D",
"size": "96.2 KB",
"camera_id": null,
"created_at": "2023-07-16 00:00:36",
"camera_name": ""
}
],
"success": true,
"pagination": {
"total": 1,
"per_page": 15,
"last_page": 1,
"current_page": 1,
"next_page_url": null,
"prev_page_url": null
}
}
GET Download Device Media Image
Mengunduh gambar media dari perangkat
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Endpoint | devices/{device_id}/media/file/{filename} |
| Path Parameters |
device_id integer
required
filename string
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/devices/{device_id}/media/file/{filename}?lang=[lang]&user_api_hash=[user_api_hash] |
Image content
DELETE Device Media Image
Menghapus gambar media dari perangkat
| STRUKTUR PERINTAH | |
|---|---|
| Method | DELETE |
| Endpoint | devices/{device_id}/media/file/{filename} |
| Path Parameters |
device_id integer
required
filename string
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/devices/{device_id}/media/file/{filename}?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1,
"delete_count": 1
}
API Drivers
GET User Drivers
Mendapatkan daftar pengemudi yang terhubung dengan pengguna
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Endpoint | get_user_drivers |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_user_drivers?lang=[lang]&user_api_hash=[user_api_hash] |
{
"items": {
"drivers": {
"to": 1,
"url": "/api/get_user_drivers",
"data": [
{
"id": "1",
"name": "Driver name",
"rfid": "",
"email": "",
"phone": "",
"device": {
"id": "3",
"vin": "",
"imei": "789832",
"name": "Device name",
"active": "1",
"deleted": "0",
"icon_id": "8",
"user_id": null,
"created_at": "2016-04-25 16:21:19",
"fuel_price": "0.00",
"sim_number": "",
"tail_color": "#33cc33",
"updated_at": "2016-06-09 13:51:59",
"fuel_per_km": "0.00",
"tail_length": "5",
"device_model": "",
"engine_hours": "gps",
"object_owner": "",
"plate_number": "",
"snap_to_road": "0",
"detect_engine": "gps",
"fuel_quantity": "0.00",
"expiration_date": "0000-00-00",
"min_fuel_thefts": "10",
"min_moving_speed": "6",
"min_fuel_fillings": "10",
"traccar_device_id": "3",
"fuel_measurement_id": "1",
"registration_number": ""
},
"user_id": "2",
"device_id": "3",
"created_at": "2016-04-27 22:18:25",
"updated_at": "2016-04-27 22:18:25",
"description": "",
"device_port": null
}
],
"from": 1,
"total": 1,
"per_page": 5,
"last_page": 1,
"current_page": 1,
"next_page_url": null,
"prev_page_url": null
}
},
"status": 1
}
GET Add User Driver Data
Mendapatkan data untuk membuat pengemudi baru
| STRUKTUR PERINTAH | |
|---|---|
| Method | GET |
| Endpoint | add_user_driver_data |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_user_driver_data?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1,
"devices": {
"3": "Device name"
}
}
POST Add User Driver
Membuat pengemudi baru
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_user_driver |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_user_driver?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1,
"item": {
"id": 2,
"name": "Driver name",
"user_id": "2",
"created_at": "2016-06-26 16:11:16",
"updated_at": "2016-06-26 16:11:16"
}
}
GET Edit User Driver Data
Mengambil data untuk mengedit pengemudi
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | edit_user_driver_data |
| Query Parameters |
lang string
required
user_api_hash string
required
user_driver_id integer
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_user_driver_data?lang=[lang]&user_api_hash=[user_api_hash]&user_driver_id=[user_driver_id] |
{
"item": {
"id": 1,
"name": "Drive name",
"rfid": "",
"email": "",
"phone": "",
"user_id": 2,
"device_id": 3,
"created_at": "2016-04-27 22:18:25",
"updated_at": "2016-04-27 22:18:25",
"description": "",
"device_port": null
},
"status": 1,
"devices": {
"3": "Device name"
}
}
POST Edit User Driver
Mengedit pengemudi
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | edit_user_driver |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_user_driver?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
GET Destroy User Driver
Menghapus pengemudi
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_user_driver |
| Query Parameters |
lang string
required
user_api_hash string
required
user_driver_id integer
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_user_driver?lang=[lang]&user_api_hash=[user_api_hash]&user_driver_id=[user_driver_id] |
{
"status": 1
}
API Event
GET Events
Mengambil data event
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_events |
| Query Parameters |
lang string
required
user_api_hash string
required
date_from date-time
required
date_to date-time
required
device_id integer
optional
search string
optional
type string
optional
|
| Contoh Permintaan | https://trackgps.id/api/get_events?lang=[lang]&user_api_hash=[user_api_hash]&date_from=[date_from]&date_to=[date_to] |
{
"items": {
"from": 1,
"total": 1,
"per_page": 30,
"current_page": 1,
"last_page": 1,
"data": [
{
"id": 1,
"url": "/api/get_events",
"data": {}
}
]
},
"status": 1
}
GET Destroy Events
Mengambil event yang di hapus pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_events |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_events?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
API Geofence
GET Geofences
Mendapatkan daftar geofences pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_geofences |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_geofences?lang=[lang]&user_api_hash=[user_api_hash] |
{
"items": {
"": {}
},
"geofences": [
{
"id": 0,
"type": "polygon",
"user_id": 0,
"group_id": 0,
"active": 0,
"name": "string",
"center": {
"lat": 54.9155080710091,
"lng": 23.04992559814453
},
"radius": 0,
"coordinates": "string",
"polygon_color": "string",
"created_at": "string"
}
]
}
POST Add Geofence
Membuat geofence baru
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_geofence |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_geofence?lang=[lang]&user_api_hash=[user_api_hash] |
{
"name": "string",
"active": true,
"device_id": 0,
"group_id": 0,
"type": "string",
"polygon": [
{
"lat": 0,
"lng": 0
}
],
"radius": 0,
"center": {
"lat": 0,
"lng": 0
},
"polygon_color": "string",
"speed_limit": 0
}
{
"status": 1
}
POST Edit Geofence
Edit geofence yang sudah ada
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | edit_geofence |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_geofence?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 0,
"name": "string",
"active": true,
"device_id": 0,
"group_id": 0,
"type": "polygon",
"polygon": [
{
"lat": 0,
"lng": 0
}
],
"radius": 0,
"center": {
"lat": 0,
"lng": 0
},
"polygon_color": "string",
"speed_limit": 0
}
{
"status": 1
}
GET Destroy Geofence
Menghapus geofence
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_geofence |
| Query Parameters |
geofence_id integer
required
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_geofence?geofence_id=[geofence_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
GET Change Active Geofence
Mengubah status active geofence
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | change_active_geofence |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
id integer
required
active boolean
required
|
| Contoh Permintaan | https://trackgps.id/api/change_active_geofence?id=[id]&active=[true/false]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
GET Point in Geofences
Dapatkan nama geofences dari titik yang diberikan
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | point_in_geofences |
| Query Parameters |
lang string
required
lat number
required
lng number
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/point_in_geofences?lat=[latitude]&lng=[longitude]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"zones": [
"Geofence 1",
"Geofence 2"
],
"status": 1
}
GET Geofence Groups List
Dapatkan daftar grup geofence
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | geofences_groups |
| Query Parameters |
lang string
required
user_api_hash string
required
limit integer
optional
search_phrase string
optional
sort string
optional
sort_by string
optional
|
| Contoh Permintaan | https://trackgps.id/api/geofences_groups?lang=en&user_api_hash=[user_api_hash] |
{
"0": {
"id": 1,
"open": true,
"title": "group",
"user_id": 1
},
"pagination": {
"total": 2,
"per_page": 1,
"last_page": 2,
"current_page": 1,
"next_page_url": "/api/geofences_groups?page=2",
"prev_page_url": null
}
}
POST Create Geofence Group
Buat grup geofence
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | geofences_groups/store |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
title string
required
open boolean
required
geofences array[integer]
required
|
| Contoh Permintaan | https://trackgps.id/api/geofences_groups/store |
{
"title": "string",
"open": true,
"geofences": [
0
]
}
{
"id": 5,
"status": 1
}
PUT Update Geofence Group
Perbarui grup geofence
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | PUT |
| Endpoint | geofences_groups/update/{id} |
| Path Parameters |
id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
title string
required
open boolean
required
geofences array[integer]
required
|
| Contoh Permintaan | https://trackgps.id/api/geofences_groups/update/{id} |
{
"title": "string",
"open": true,
"geofences": [
0
]
}
{
"id": 5,
"status": 1
}
API GPRS Template
GET User GPRS Templates
Mendapatkan template GPRS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_user_gprs_templates |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_user_gprs_templates?lang=[lang]&user_api_hash=[user_api_hash] |
{
"items": {
"user_gprs_templates": {
"to": 1,
"url": "api/get_user_gprs_templates",
"data": [
{
"id": 1,
"title": "Template title",
"message": "Template message",
"user_id": 2,
"created_at": "2016-06-26 17:31:48",
"updated_at": "2016-06-26 17:31:48"
}
],
"from": 1,
"total": 1,
"per_page": 10,
"last_page": 1,
"current_page": 1,
"next_page_url": null,
"prev_page_url": null
}
},
"status": 1
}
GET Add User GPRS Template Data
Mendapatkan data untuk membuat template GPRS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | add_user_gprs_template_data |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_user_gprs_template_data?lang=[lang]&user_api_hash=[user_api_hash] |
{
"protocols": [
{
"id": "string",
"title": "string"
}
]
}
POST Add User GPRS Template
Membuat template GPRS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_user_gprs_template |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_user_gprs_template?lang=[lang]&user_api_hash=[user_api_hash] |
{
"title": "GPRS Title",
"message": "message content",
"user_id": 2
}
{
"item": {
"id": 2,
"title": "GPRS Title",
"message": "message content",
"user_id": 2,
"created_at": "2016-06-26 17:41:43",
"updated_at": "2016-06-26 17:41:43"
},
"status": 1
}
GET Edit User GPRS Template Data
Mendapatkan data untuk mengedit template GPRS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | edit_user_gprs_template_data |
| Query Parameters |
lang string
required
user_api_hash string
required
user_gprs_template_id integer
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_user_gprs_template_data?lang=[lang]&user_api_hash=[user_api_hash]&user_gprs_template_id=[user_gprs_template_id] |
{
"item": {
"id": 1,
"title": "Template title",
"message": "Template message",
"user_id": 2,
"created_at": "2016-06-26 17:31:48",
"updated_at": "2016-06-26 17:31:48"
},
"status": 1
}
POST Edit User GPRS Template
Mengedit template GPRS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | edit_user_gprs_template |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_user_gprs_template?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 2,
"title": "GPRS Title",
"message": "message content",
"user_id": 2,
}
{
"item": {
"id": 2,
"title": "GPRS Title",
"message": "message content",
"user_id": 2,
"created_at": "2016-06-26 17:41:43",
"updated_at": "2016-06-26 17:41:43"
},
"status": 1
}
GET Destroy User GPRS Template
Menghapus template GPRS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_user_gprs_template |
| Query Parameters |
lang string
required
user_api_hash string
required
user_gprs_template_id integer
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_user_gprs_template?lang=[lang]&user_api_hash=[user_api_hash]&user_gprs_template_id=[id] |
{
"status": 1
}
GET User GPRS Message
Mendapatkan pesan GPRS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_user_gprs_message |
| Query Parameters |
lang string
required
user_api_hash string
required
user_gprs_template_id integer
required
|
| Contoh Permintaan | https://trackgps.id/api/get_user_gprs_message?lang=[lang]&user_api_hash=[user_api_hash]&user_gprs_template_id=[id] |
{
"status": 1,
"message": "message content"
}
API History
GET Device History
Mendapatkan riwayat perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_history |
| Query Parameters |
snap_to_road boolean
device_id integer
required
from_date string
required
from_time string
required
lang string
required
to_date string
required
to_time string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_history?device_id=[device_id]&from_date=[from_date]&from_time=[from_time]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"items": [
{
"show": "2016-04-25 18:53:39",
"time": null,
"items": [
{
"id": "12",
"lat": "55.9229127",
"lng": "23.3460678",
"sort": 1461603219,
"time": "2016-04-25 18:53:39",
"other": "73.0 78.63.151.5 ",
"power": null,
"speed": 8,
"valid": "1",
"course": "265.200012207031",
"item_id": "i1",
"altitude": 189,
"distance": 0,
"latitude": "55.92291271",
"protocol": "osmand",
"raw_time": "2016-04-25 18:53:39",
"device_id": "3",
"longitude": "23.34606776",
"other_arr": [
"battery: 73.0",
"ip: 78.63.151.5"
],
"sensor_id": "1",
"server_time": "2016-04-25 16:53:39",
"sensors_data": [
{
"id": "speed",
"value": 8
},
{
"id": "altitude",
"value": 189
}
]
}
],
"driver": {
"id": "1",
"date": 1461795505,
"name": "Linas",
"rfid": "",
"email": "",
"phone": "",
"user_id": "2",
"device_id": "3",
"created_at": "2016-04-27 22:18:25",
"updated_at": "2016-04-27 22:18:25",
"description": "",
"device_port": null
},
"status": 3,
"distance": 0,
"raw_time": "2016-04-25 18:53:39"
}
],
"distance_sum": "string",
"top_speed": "string",
"move_duration": "string",
"stop_duration": "string",
"fuel_consumption": "string",
"device": {
"id": "32",
"vin": "",
"icon": {
"id": "8",
"path": "frontend/images/device_icons/8.png",
"order": "3",
"width": "43.00",
"height": "57.00"
},
"imei": "789832",
"name": "Device name",
"pivot": {
"active": "1",
"user_id": "2",
"group_id": null,
"device_id": "3",
"timezone_id": null,
"current_driver_id": "1"
},
"active": "1",
"deleted": "0",
"icon_id": "8",
"sensors": [
{
"id": "1",
"name": "Sensor test",
"type": "battery",
"value": "-",
"formula": null,
"on_type": null,
"user_id": "2",
"off_type": null,
"on_value": null,
"tag_name": "Parameter name",
"device_id": "3",
"full_tank": null,
"max_value": null,
"min_value": null,
"off_value": null,
"calibrations": null,
"on_tag_value": null,
"off_tag_value": null,
"show_in_popup": "0",
"value_formula": "0",
"add_to_history": "0",
"fuel_tank_name": null,
"odometer_value": null,
"shown_value_by": "tag_value",
"full_tank_value": null,
"temperature_max": null,
"temperature_min": null,
"odometer_value_by": null,
"odometer_value_unit": "km",
"unit_of_measurement": "nn",
"temperature_max_value": null,
"temperature_min_value": null
}
],
"traccar": {
"id": "3",
"name": "Device name",
"time": "2016-04-29 19:01:26",
"other": "31.0 83.181.149.238 ",
"power": null,
"speed": "0.00",
"course": "0",
"address": null,
"ack_time": null,
"altitude": "175",
"protocol": "osmand",
"uniqueId": "789832",
"server_time": "2016-04-29 19:01:26",
"latest_positions": "55.92297793/23.34665713;55.92336524/23.34666575;55.91928624/23.34572509;55.91590619/23.33778733;55.91986482/23.3255625;55.92581495/23.30829421;55.92748307/23.30725942;55.92966571/23.31183084;55.93430696/23.31986459;55.93769598/23.32408059;55.94483741/23.33093897;55.94417471/23.33107782;55.93988092/23.32629426;55.93719855/23.32534909;55.93344595/23.32372258",
"lastValidLatitude": "55.92299604",
"latestPosition_id": "99",
"lastValidLongitude": "23.34669059"
},
"user_id": null,
"services": [
{
"id": "1",
"name": "Test service",
"email": "",
"remind": "1000",
"expired": "0",
"expires": "1000",
"user_id": "2",
"interval": "0",
"device_id": "3",
"event_sent": "0",
"remind_date": null,
"expires_date": null,
"last_service": "1000",
"mobile_phone": "",
"expiration_by": "engine_hours",
"trigger_event_left": "0",
"renew_after_expiration": "0"
}
],
"created_at": "2016-04-25 16:21:19",
"fuel_price": "0.00",
"sim_number": "",
"tail_color": "#33cc33",
"updated_at": "2016-06-26 15:52:46",
"fuel_per_km": "0.00",
"tail_length": "5",
"device_model": "",
"engine_hours": "gps",
"object_owner": "",
"plate_number": "",
"snap_to_road": "0",
"detect_engine": "gps",
"fuel_quantity": "0.00",
"expiration_date": "0000-00-00",
"min_fuel_thefts": "10",
"min_moving_speed": "6",
"min_fuel_fillings": "10",
"traccar_device_id": "3",
"fuel_measurement_id": "1",
"registration_number": ""
},
"sensors": [
{}
],
"item_class": [
{
"id": 0,
"value": "string"
}
],
"images": [
{
"id": 0,
"value": "string"
}
],
"sensors_values": [
{}
],
"fuel_consumption_arr": [
{}
],
"status": 0
}
GET Device History Messages
Mendapatkan riwayat perangkat dengan pagination
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_history_messages |
| Query Parameters |
limit integer
page integer
device_id integer
required
from_date string
required
from_time string
required
lang string
required
to_date string
required
to_time string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_history_messages?device_id=[device_id]&from_date=[from_date]&from_time=[from_time]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"limit": 50,
"status": 1,
"sensors": [
{
"id": "2",
"name": "test acc",
"type": "acc",
"value": "-",
"formula": null,
"on_type": null,
"user_id": "2",
"off_type": null,
"on_value": "on",
"tag_name": "tag",
"device_id": "3",
"full_tank": null,
"max_value": null,
"min_value": null,
"off_value": "off",
"calibrations": null,
"on_tag_value": null,
"off_tag_value": null,
"show_in_popup": "1",
"value_formula": "0",
"add_to_history": "0",
"fuel_tank_name": null,
"odometer_value": null,
"shown_value_by": null,
"full_tank_value": null,
"temperature_max": null,
"temperature_min": null,
"odometer_value_by": null,
"odometer_value_unit": "km",
"unit_of_measurement": "nn",
"temperature_max_value": null,
"temperature_min_value": null
}
],
"sorting": "asc",
"messages": {
"to": 50,
"url": "/api/get_history_messages",
"data": [
{
"id": "1",
"sort": 1461603219,
"time": "2016-04-25 18:53:39",
"other": "73.0 78.63.151.5 ",
"power": null,
"speed": 8,
"valid": "1",
"course": "265.200012207031",
"altitude": 189,
"distance": "0",
"latitude": "55.92291271",
"protocol": "osmand",
"device_id": "3",
"longitude": "23.34606776",
"other_arr": [
"battery: 73.0",
"ip: 78.63.151.5"
],
"sensor_id": "1",
"server_time": "2016-04-25 16:53:39",
"popup_sensors": {
"2": {
"name": "test acc",
"value": "- nn"
}
},
"sensors_value": {
"2": "- nn"
}
},
{
"id": "2",
"sort": 1461603348,
"time": "2016-04-25 18:55:48",
"other": "73.0 78.63.151.5 ",
"power": null,
"speed": 4,
"valid": "1",
"course": "148.699996948242",
"altitude": 217,
"distance": "0.067153151821832",
"latitude": "55.92245666",
"protocol": "osmand",
"device_id": "3",
"longitude": "23.34677656",
"other_arr": [
"battery: 73.0",
"ip: 78.63.151.5"
],
"sensor_id": "2",
"server_time": "2016-04-25 16:55:48",
"popup_sensors": {
"2": {
"name": "test acc",
"value": "- nn"
}
},
"sensors_value": {
"2": "- nn"
}
}
],
"from": 1,
"total": 104,
"per_page": 50,
"last_page": 3,
"current_page": 1,
"next_page_url": "/?page=2",
"prev_page_url": null
},
"pagination_limits": {
"50": 50,
"100": 100,
"200": 200,
"400": 400
}
}
API Map Icon
GET User Map Icons
Mendapatkan ikon peta pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_user_map_icons |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_user_map_icons?lang=[lang]&user_api_hash=[user_api_hash] |
{
"items": {
"mapIcons": [
{
"id": 1,
"name": "Test icon",
"active": 1,
"user_id": 2,
"map_icon": {
"id": 26,
"path": "frontend/images/map_icons/543cec0b0e95d2.88837937.png",
"width": "32.00",
"height": "37.00"
},
"created_at": "2016-06-26 16:33:46",
"updated_at": "2016-06-26 16:37:17",
"coordinates": "{\n \"lat\": 54.948442387473655,\n \"lng\": 23.94847869873047\n}",
"description": "",
"map_icon_id": 26
}
]
},
"status": 1
}
GET Map Icons
Mendapatkan ikon peta
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_map_icons |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_map_icons?lang=[lang]&user_api_hash=[user_api_hash] |
{
"items": [
{
"id": 1,
"path": "frontend/images/map_icons/543ccabd1373b8.41756394.png",
"width": "32.00",
"height": "37.00"
},
{
"id": 2,
"path": "frontend/images/map_icons/543ccabd141637.00777195.png",
"width": "32.00",
"height": "37.00"
},
{
"id": 3,
"path": "frontend/images/map_icons/543ccabd509796.35593817.png",
"width": "32.00",
"height": "37.00"
},
{
"id": 53,
"path": "frontend/images/map_icons/test-2.png",
"width": "32.00",
"height": "37.00"
},
{
"id": 54,
"path": "frontend/images/map_icons/velocimeter.png",
"width": "32.00",
"height": "37.00"
}
],
"status": 1
}
POST Add Map Icon
Membuat ikon peta
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_map_icon |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_map_icon?lang=[lang]&user_api_hash=[user_api_hash] |
{
"name": "string",
"description": "string",
"map_icon_id": 0,
"coordinates": {
"lat": 54.91550070170091,
"lng": 23.04992559814453
}
}
{
"status": 1
}
POST Edit Map Icon
Mengubah ikon peta
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | edit_map_icon |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_map_icon?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 0,
"name": "string",
"description": "string",
"map_icon_id": 0,
"coordinates": {
"lat": 54.91550070170091,
"lng": 23.04992559814453
}
}
{
"status": 1
}
GET Change Active Map Icon
Mengubah status active dari ikon peta
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | change_active_map_icon |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/change_active_map_icon?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 0,
"active": true
}
{
"status": 1
}
GET Destroy Map Icon
Menghapus ikon peta
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_map_icon |
| Query Parameters |
lang string
required
map_icon_id integer
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_map_icon?map_icon_id=[map_icon_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
GET Map Icon Groups List
Mendapatkan daftar grup ikon peta
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | pois_groups |
| Query Parameters |
lang string
required
user_api_hash string
required
limit integer
search_phrase string
sort string
sort_by string
|
| Contoh Permintaan | https://trackgps.id/api/pois_groups?lang=[lang]&user_api_hash=[user_api_hash]&limit=[limit]&search_phrase=[search_phrase]&sort=[sort]&sort_by=[sort_by] |
{
"0": {
"id": 1,
"open": true,
"title": "group",
"user_id": 1
},
"pagination": {
"total": 2,
"per_page": 1,
"last_page": 2,
"current_page": 1,
"next_page_url": "/api/pois_groups?page=2",
"prev_page_url": null
}
}
POST Create Map Icon Group
Membuat grup ikon peta
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | pois_groups/store |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/pois_groups/store?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 5,
"title": "string",
"open": true,
"pois": [
0
]
}
{
"id": 5,
"status": 1
}
PUT Update Map Icon Group
Memperbarui grup ikon peta
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | PUT |
| Endpoint | pois_groups/update/{id} |
| Path Parameters |
id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/pois_groups/update/{id}?lang=[lang]&user_api_hash=[user_api_hash] |
{
"title": "string",
"open": true,
"pois": [
0
]
}
{
"id": 5,
"status": 1
}
API Report
GET Reports
Mendapatkan laporan
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_reports |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_reports?lang=[lang]&user_api_hash=[user_api_hash] |
{
"items": {
"types": [
{
"id": 1,
"title": "General information"
},
{
"id": 2,
"title": "General information (merged)"
},
{
"id": 3,
"title": "Drives and stops"
},
{
"id": 18,
"title": "Drives and stops / Geofences"
},
{
"id": 4,
"title": "Travel sheet"
},
{
"id": 5,
"title": "Overspeed"
},
{
"id": 6,
"title": "Underspeed"
},
{
"id": 7,
"title": "Geofence in/out"
},
{
"id": 15,
"title": "Geofence in/out 24 hour mode"
},
{
"id": 8,
"title": "Events"
},
{
"id": 10,
"title": "Fuel level"
},
{
"id": 11,
"title": "Fuel fillings"
},
{
"id": 12,
"title": "Fuel thefts"
},
{
"id": 13,
"title": "Temperature"
},
{
"id": 14,
"title": "RAG"
}
],
"reports": {
"to": 1,
"url": "/api/get_reports",
"data": [
{
"id": "2",
"type": "4",
"daily": null,
"email": "",
"stops": "1",
"title": "Report title",
"format": "html",
"weekly": null,
"devices": [
3
],
"user_id": "2",
"geofences": [],
"speed_limit": null,
"zones_instead": null,
"show_addresses": null,
"daily_email_sent": "2016-06-26 00:00:00",
"weekly_email_sent": "2016-06-27 00:00:00"
}
],
"from": 1,
"total": 1,
"per_page": 10,
"last_page": 1,
"current_page": 1,
"next_page_url": null,
"prev_page_url": null
}
},
"status": 1
}
GET Report Types
Mendapatkan jenis laporan
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_reports_types |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_reports_types?lang=[lang]&user_api_hash=[user_api_hash] |
{
"items": {
"types": [
{
"id": 1,
"title": "General information"
},
{
"id": 2,
"title": "General information (merged)"
},
{
"id": 3,
"title": "Drives and stops"
},
{
"id": 18,
"title": "Drives and stops / Geofences"
}
]
}
}
GET Add Report Data
Mendapatkan data untuk membuat laporan
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | add_report_data |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_report_data?lang=[lang]&user_api_hash=[user_api_hash] |
{
"logs": {
"sorting": {
"sort": "desc",
"sort_by": "id"
}
},
"stops": [
{
"id": 1,
"value": "> 1 min"
},
{
"id": 2,
"value": "> 2 min"
},
{
"id": 5,
"value": "> 5 min"
},
{
"id": 10,
"value": "> 10 min"
},
{
"id": 20,
"value": "> 20 min"
},
{
"id": 30,
"value": "> 30 min"
},
{
"id": 60,
"value": "> 1 h"
},
{
"id": 120,
"value": "> 2 h"
},
{
"id": 300,
"value": "> 5 h"
}
],
"types": [
{
"id": 1,
"value": "General information"
},
{
"id": 2,
"value": "General information (merged)"
},
{
"id": 3,
"value": "Drives and stops"
},
{
"id": 18,
"value": "Drives and stops / Geofences"
},
{
"id": 4,
"value": "Travel sheet"
},
{
"id": 5,
"value": "Overspeed"
},
{
"id": 6,
"value": "Underspeed"
},
{
"id": 7,
"value": "Geofence in/out"
},
{
"id": 15,
"value": "Geofence in/out 24 hour mode"
},
{
"id": 8,
"value": "Events"
},
{
"id": 10,
"value": "Fuel level"
},
{
"id": 11,
"value": "Fuel fillings"
},
{
"id": 12,
"value": "Fuel thefts"
},
{
"id": 13,
"value": "Temperature"
},
{
"id": 14,
"value": "RAG"
}
],
"status": 1,
"devices": [
{
"id": "3",
"vin": "",
"icon": {
"id": "8",
"path": "frontend/images/device_icons/8.png",
"order": "3",
"width": "43.00",
"height": "57.00"
},
"imei": "789832",
"name": "Device name",
"pivot": {
"active": "1",
"user_id": "2",
"group_id": null,
"device_id": "3",
"timezone_id": null,
"current_driver_id": "1"
},
"active": "1",
"deleted": "0",
"icon_id": "8",
"sensors": [
{
"id": "1",
"name": "Sensor test",
"type": "battery",
"value": "-",
"formula": null,
"on_type": null,
"user_id": "2",
"off_type": null,
"on_value": null,
"tag_name": "Parameter name",
"device_id": "3",
"full_tank": null,
"max_value": null,
"min_value": null,
"off_value": null,
"calibrations": null,
"on_tag_value": null,
"off_tag_value": null,
"show_in_popup": "0",
"value_formula": "0",
"add_to_history": "0",
"fuel_tank_name": null,
"odometer_value": null,
"shown_value_by": "tag_value",
"full_tank_value": null,
"temperature_max": null,
"temperature_min": null,
"odometer_value_by": null,
"odometer_value_unit": "km",
"unit_of_measurement": "nn",
"temperature_max_value": null,
"temperature_min_value": null
}
],
"traccar": {
"id": "3",
"name": "Device name",
"time": "2016-04-29 19:01:26",
"other": "31.0 83.181.149.238 ",
"power": null,
"speed": "0.00",
"course": "0",
"address": null,
"ack_time": null,
"altitude": "175",
"protocol": "osmand",
"uniqueId": "789832",
"server_time": "2016-04-29 19:01:26",
"latest_positions": "55.92297793/23.34665713;55.92336524/23.34666575;55.91928624/23.34572509;55.91590619/23.33778733;55.91986482/23.3255625;55.92581495/23.30829421;55.92748307/23.30725942;55.92966571/23.31183084;55.93430696/23.31986459;55.93769598/23.32408059;55.94483741/23.33093897;55.94417471/23.33107782;55.93988092/23.32629426;55.93719855/23.32534909;55.93344595/23.32372258",
"lastValidLatitude": "55.92299604",
"latestPosition_id": "99",
"lastValidLongitude": "23.34669059"
},
"user_id": null,
"services": [
{
"id": "1",
"name": "Test service",
"email": "",
"remind": "1000",
"expired": "0",
"expires": "1000",
"user_id": "2",
"interval": "0",
"device_id": "3",
"event_sent": "0",
"remind_date": null,
"expires_date": null,
"last_service": "1000",
"mobile_phone": "",
"expiration_by": "engine_hours",
"trigger_event_left": "0",
"renew_after_expiration": "0"
}
],
"created_at": "2016-04-25 16:21:19",
"fuel_price": "0.00",
"sim_number": "",
"tail_color": "#33cc33",
"updated_at": "2016-06-26 15:52:46",
"fuel_per_km": "0.00",
"tail_length": "5",
"device_model": "",
"engine_hours": "gps",
"object_owner": "",
"plate_number": "",
"snap_to_road": "0",
"detect_engine": "gps",
"fuel_quantity": "0.00",
"expiration_date": "0000-00-00",
"min_fuel_thefts": "10",
"min_moving_speed": "6",
"min_fuel_fillings": "10",
"traccar_device_id": "3",
"fuel_measurement_id": "1",
"registration_number": ""
}
],
"filters": [
{
"id": 0,
"value": ""
},
{
"id": 1,
"value": "Today"
},
{
"id": 2,
"value": "Yesterday"
},
{
"id": 3,
"value": "Before 2 days"
},
{
"id": 4,
"value": "Before 3 days"
},
{
"id": 5,
"value": "This week"
},
{
"id": 6,
"value": "Last week"
},
{
"id": 7,
"value": "This month"
},
{
"id": 8,
"value": "Last month"
}
],
"formats": [
{
"id": "html",
"value": "HTML"
},
{
"id": "xls",
"value": "XLS"
},
{
"id": "pdf",
"value": "PDF"
},
{
"id": "pdf_land",
"value": "PDF (Landscape)"
}
],
"reports": {
"to": 1,
"url": "/api/get_reports",
"data": [
{
"id": "2",
"type": "4",
"daily": null,
"email": "",
"stops": "1",
"title": "Report title",
"format": "html",
"weekly": null,
"devices": [
1,
2,
3
],
"user_id": "2",
"geofences": [],
"speed_limit": null,
"zones_instead": null,
"show_addresses": null,
"daily_email_sent": "2016-06-26 00:00:00",
"weekly_email_sent": "2016-06-27 00:00:00"
}
],
"from": 1,
"total": 1,
"per_page": 10,
"last_page": 1,
"current_page": 1,
"next_page_url": null,
"prev_page_url": null
},
"geofences": [
{
"id": 1,
"name": "Test geo",
"active": 1,
"user_id": 2,
"group_id": null,
"created_at": "2016-04-28 22:13:17",
"updated_at": "2016-04-28 22:13:34",
"coordinates": "[\n {\n \"lat\": 55.925307141049,\n \"lng\": 23.350710868835\n },\n {\n \"lat\": 55.926918076798,\n \"lng\": 23.333630561829\n },\n {\n \"lat\": 55.91948797954,\n \"lng\": 23.331656455994\n },\n {\n \"lat\": 55.916000873283,\n \"lng\": 23.340711593628\n },\n {\n \"lat\": 55.925066697134,\n \"lng\": 23.353199958801\n }\n]",
"polygon_color": "#d000df"
}
]
}
POST Add Report
Membuat laporan
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_report |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
title string
required
type integer
required
format string
required
speed_limit number
optional
devices array[integer]
optional
geofences array[integer]
optional
|
| Contoh Permintaan | https://trackgps.id/api/add_report?lang=[lang]&user_api_hash=[user_api_hash] |
{
"title": "string",
"type": 0,
"format": "string",
"speed_limit": 0,
"devices": [
0
],
"geofences": [
0
],
"daily": 0,
"weekly": 0,
"send_to_email": "string",
"date_from": "2019-08-24",
"date_to": "2019-08-24",
"from_time": "14:15:22Z",
"to_time": "14:15:22Z",
"show_addresses": true,
"zones_instead": true,
"stops": 0
}
{
"status": 1
}
POST Edit Report
Edit laporan
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | edit_report |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
id integer
required
title string
required
type integer
required
format string
required
speed_limit number
optional
devices array[integer]
optional
geofences array[integer]
optional
|
| Contoh Permintaan | https://trackgps.id/api/edit_report?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 0,
"title": "string",
"type": 0,
"format": "string",
"speed_limit": 0,
"devices": [
0
],
"geofences": [
0
],
"daily": 0,
"weekly": 0,
"send_to_email": "string",
"date_from": "2019-08-24",
"date_to": "2019-08-24",
"from_time": "14:15:22Z",
"to_time": "14:15:22Z",
"show_addresses": true,
"zones_instead": true,
"stops": 0
}
{
"status": 1
}
POST Generate Report
Generate laporan
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | generate_report |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
title string
required
type string
required
format string
required
speed_limit number
optional
devices array[integer]
optional
geofences array[integer]
optional
|
| Contoh Permintaan | https://trackgps.id/api/generate_report?lang=[lang]&user_api_hash=[user_api_hash] |
{
"title": "string",
"type": 0,
"format": "string",
"speed_limit": 0,
"devices": [
0
],
"geofences": [
0
],
"daily": 0,
"weekly": 0,
"send_to_email": "string",
"date_from": "2019-08-24",
"date_to": "2019-08-24",
"from_time": "14:15:22Z",
"to_time": "14:15:22Z",
"show_addresses": true,
"zones_instead": true,
"stops": 0
}
{
"status": 1,
"url": "string"
}
GET Destroy Report
Delete laporan
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_report |
| Query Parameters |
lang string
required
report_id integer
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_report?lang=[lang]&report_id=[report_id]&user_api_hash=[user_api_hash] |
{
"status": 1
}
API Route
GET Get Routes
Mengambil daftar rute yang tersedia
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_routes |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_routes?lang=[lang]&user_api_hash=[user_api_hash] |
{
"data": [
{
"id": 0,
"group_id": 0,
"active": 0,
"name": "string",
"color": "string",
"coordinates": [
{
"lat": 0,
"lng": 0
}
]
}
],
"pagination": {
"total": 0,
"per_page": 0,
"current_page": 0,
"last_page": 0,
"next_page_url": "string",
"prev_page_url": "string",
"url": "string"
}
}
POST Add Route
Membuat rute baru
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_route |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
name string
required
color string
required
coordinates array[object]
required
|
| Contoh Permintaan | https://trackgps.id/api/add_route?lang=[lang]&user_api_hash=[user_api_hash] |
{
"name": "string",
"color": "string",
"coordinates": [
{
"lat": 0,
"lng": 0
}
]
}
{
"status": 1
}
POST Edit Route
Mengedit rute yang sudah ada
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | edit_route |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
id integer
required
name string
required
color string
required
coordinates array[object]
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_route?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 0,
"name": "string",
"color": "string",
"coordinates": [
{
"lat": 0,
"lng": 0
}
]
}
{
"status": 1
}
GET Destroy Route
Menghapus rute yang sudah ada
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_route |
| Query Parameters |
lang string
required
route_id integer
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_route?lang=[lang]&route_id=[route_id]&user_api_hash=[user_api_hash] |
{
"status": 1
}
GET Change Active Route
Mengubah status aktif untuk rute
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | change_active_route |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
id integer
required
active boolean
required
|
| Contoh Permintaan | https://trackgps.id/api/change_active_route?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 0,
"active": true
}
{
"status": 1
}
GET Route Groups List
Mengambil daftar grup rute
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | routes_groups |
| Query Parameters |
lang string
required
user_api_hash string
required
limit integer
optional
search_phrase string
optional
sort string
optional
sort_by string
optional
|
| Contoh Permintaan | https://trackgps.id/api/routes_groups?lang=[lang]&user_api_hash=[user_api_hash] |
{
"0": {
"id": 1,
"open": true,
"title": "group",
"user_id": 1
},
"pagination": {
"total": 2,
"per_page": 1,
"last_page": 2,
"current_page": 1,
"next_page_url": "/api/routes_groups?page=2",
"prev_page_url": null
}
}
POST Create Route Group
Membuat grup rute baru
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | routes_groups/store |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
title string
required
open boolean
required
routes array[integer]
required
|
| Contoh Permintaan | https://trackgps.id/api/routes_groups/store?lang=[lang]&user_api_hash=[user_api_hash] |
{
"title": "string",
"open": true,
"routes": [
0
]
}
{
"id": 5,
"status": 1
}
PUT Update Route Group
Memperbarui grup rute
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | PUT |
| Endpoint | routes_groups/update/{id} |
| Path Parameters |
id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
title string
required
open boolean
required
routes array[integer]
required
|
| Contoh Permintaan | https://trackgps.id/api/routes_groups/update/{id}?lang=[lang]&user_api_hash=[user_api_hash] |
{
"title": "string",
"open": true,
"routes": [
0
]
}
{
"id": 5,
"status": 1
}
API Sensor
GET Add Sensor Data
Mengambil data untuk membuat sensor perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | add_sensor_data |
| Query Parameters |
device_id integer
required
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_sensor_data?device_id=[device_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"route": "sensors.store",
"status": 1,
"sensors": {
"acc": "ACC ON/OFF",
"gsm": "GSM",
"door": "Door Open/Close",
"engine": "Engine ON/OFF",
"battery": "Battery",
"ignition": "Ignition ON/OFF",
"odometer": "Odometer",
"fuel_tank": "Fuel tank",
"satellites": "Satellites",
"tachometer": "Tachometer",
"temperature": "Temperature",
"engine_hours": "Engine hours",
"harsh_braking": "Harsh braking",
"harsh_acceleration": "Harsh acceleration",
"fuel_tank_calibration": "Fuel tank (with calibration)"
},
"device_id": 1
}
POST Add Sensor
Menambahkan sensor untuk perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_sensor |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
device_id integer
required
sensor_type string
required
sensor_name string
required
unit_of_measurement string
required
show_in_popup string
required
tag_name string
required
min_value string
required
max_value string
required
formula string
optional
odometer_value string
optional
calibrations array[object]
optional
on_value string
optional
off_value string
optional
|
| Contoh Permintaan | https://trackgps.id/api/add_sensor?lang=[lang]&user_api_hash=[user_api_hash] |
{
"device_id": 0,
"sensor_type": "string",
"sensor_name": "string",
"unit_of_measurement": "string",
"show_in_popup": 0,
"tag_name": "string",
"shown_value_by": "string",
"min_value": "string",
"max_value": "string",
"formula": "string",
"odometer_value_by": "string",
"odometer_value": "string",
"calibrations": [
{
"key": 0
}
],
"on_value": "string",
"off_value": "string"
}
{
"status": 1
}
GET Edit Sensor Data
Mengambil data untuk mengedit sensor perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | edit_sensor_data |
| Query Parameters |
lang string
required
sensor_id integer
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_sensor_data?sensor_id=[sensor_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"item": {
"id": "2",
"name": "test acc",
"type": "acc",
"value": "-",
"formula": null,
"on_type": null,
"user_id": "2",
"off_type": null,
"on_value": "on",
"tag_name": "tag",
"device_id": "3",
"full_tank": null,
"max_value": null,
"min_value": null,
"off_value": "off",
"calibrations": null,
"on_tag_value": null,
"off_tag_value": null,
"show_in_popup": "1",
"value_formula": "0",
"add_to_history": "0",
"fuel_tank_name": null,
"odometer_value": null,
"shown_value_by": null,
"full_tank_value": null,
"temperature_max": null,
"temperature_min": null,
"odometer_value_by": null,
"odometer_value_unit": "km",
"unit_of_measurement": "nn",
"temperature_max_value": null,
"temperature_min_value": null
},
"route": "sensors.update",
"status": 1,
"sensors": {
"acc": "ACC ON/OFF",
"gsm": "GSM",
"door": "Door Open/Close",
"engine": "Engine ON/OFF",
"battery": "Battery",
"ignition": "Ignition ON/OFF",
"odometer": "Odometer",
"fuel_tank": "Fuel tank",
"satellites": "Satellites",
"tachometer": "Tachometer",
"temperature": "Temperature",
"engine_hours": "Engine hours",
"harsh_breaking": "Harsh breaking",
"harsh_acceleration": "Harsh acceleration ",
"fuel_tank_calibration": "Fuel tank (with calibration)"
},
"device_id": "3"
}
POST Edit Sensor
Mengedit sensor perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | edit_sensor |
| Query Parameters |
lang string
required
sensor_id integer
required
user_api_hash string
required
|
| Body Parameters |
device_id integer
required
sensor_type string
required
sensor_name string
required
unit_of_measurement string
required
show_in_popup string
required
tag_name string
required
min_value string
required
max_value string
required
odometer_value string
optional
calibrations array[object]
optional
on_value string
optional
off_value string
optional
|
| Contoh Permintaan | https://trackgps.id/api/edit_sensor?sensor_id=[sensor_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"device_id": 0,
"sensor_type": "string",
"sensor_name": "string",
"unit_of_measurement": "string",
"show_in_popup": 0,
"tag_name": "string",
"shown_value_by": "string",
"min_value": "string",
"max_value": "string",
"formula": "string",
"odometer_value_by": "string",
"odometer_value": "string",
"calibrations": [
{
"key": 0
}
],
"on_value": "string",
"off_value": "string"
}
{
"status": 1
}
GET Destroy Sensor
Menghapus sensor perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_sensor |
| Query Parameters |
lang string
required
sensor_id integer
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_sensor?sensor_id=[sensor_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
GET Device Sensors
Mengambil sensor perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_sensors |
| Query Parameters |
device_id integer
required
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_sensors?device_id=[device_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"to": 5,
"url": "/api/get_sensors",
"data": [
{
"id": 1,
"data": null,
"name": "engine on",
"type": "engine",
"value": "-",
"decbin": 0,
"hexbin": 0,
"formula": null,
"on_type": 1,
"user_id": 1,
"off_type": 1,
"on_value": null,
"tag_name": "enginehours",
"device_id": 3,
"full_tank": null,
"max_value": null,
"min_value": null,
"off_value": null,
"skip_empty": null,
"type_title": "Engine ON/OFF",
"calibrations": null,
"on_tag_value": "1",
"off_tag_value": "-1",
"show_in_popup": 0,
"value_formula": 0,
"add_to_history": 0,
"fuel_tank_name": null,
"odometer_value": null,
"shown_value_by": null,
"full_tank_value": null,
"temperature_max": null,
"temperature_min": null,
"skip_calibration": null,
"odometer_value_by": null,
"odometer_value_unit": "km",
"unit_of_measurement": "",
"temperature_max_value": null,
"temperature_min_value": null
}
],
"from": 1,
"path": "/api/get_sensors",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/api/get_sensors?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"total": 5,
"status": 1,
"per_page": 10,
"last_page": 1,
"current_page": 1,
"last_page_url": "/api/get_sensors?page=1",
"next_page_url": null,
"prev_page_url": null,
"first_page_url": "/api/get_sensors?page=1"
}
API Service
GET Add Service Data
Mengambil data untuk membuat layanan perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | add_service_data |
| Query Parameters |
device_id integer
required
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_service_data?device_id=[device_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1,
"device_id": 1,
"expiration_by": {
"days": "Days",
"odometer": "Odometer",
"engine_hours": "Engine hours"
},
"odometer_value": "0",
"engine_hours_value": "0"
}
POST Add Service
Menambahkan layanan perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_service |
| Query Parameters |
device_id integer
required
lang string
required
user_api_hash string
required
|
| Body Parameters |
device_id integer
required
expiration_by string
required
odometer_value string
optional
engine_hours_value string
optional
|
| Contoh Permintaan | https://trackgps.id/api/add_service?device_id=[device_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"device_id": 1,
"expiration_by": "Days",
"odometer_value": "1000",
"engine_hours_value": "500"
}
{
"status": 1
}
GET Edit Service Data
Mengambil data untuk mengedit layanan perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | edit_service_data |
| Query Parameters |
lang string
required
service_id integer
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_service_data?service_id=[service_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"device_id": 0,
"odometer_value": "string",
"engine_hours_value": "string",
"expiration_by": {
"days": "Days",
"odometer": "Odometer",
"engine_hours": "Engine hours"
},
"item": {
"id": "1",
"name": "Test service",
"email": "",
"device": {},
"remind": "1000",
"expired": "0",
"expires": "1000",
"user_id": "2",
"interval": "0",
"device_id": "3",
"event_sent": "0",
"remind_date": null,
"expires_date": null,
"last_service": "1000",
"mobile_phone": "",
"expiration_by": "engine_hours",
"trigger_event_left": "0",
"renew_after_expiration": "0"
},
"status": 0
}
POST Edit Service
Mengedit layanan perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | edit_service |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
id integer
required
device_id integer
required
name string
required
expiration_by string
required
interval string
required
last_service string
required
trigger_event_left string
required
renew_after_expiration integer
required
email string
required
mobile_phone string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_service?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 0,
"device_id": 0,
"name": "string",
"expiration_by": "string",
"interval": "string",
"last_service": "string",
"trigger_event_left": "string",
"renew_after_expiration": 0,
"email": "string",
"mobile_phone": "string"
}
{
"status": 1
}
GET Destroy Service
Menghapus layanan perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_service |
| Query Parameters |
lang string
required
service_id integer
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_service?service_id=[service_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
GET Device Services
Mengambil data layanan perangkat
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_services |
| Query Parameters |
device_id integer
required
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_services?device_id=[device_id]&lang=[lang]&user_api_hash=[user_api_hash] |
{
"to": 1,
"url": "/api/get_services",
"data": [
{
"id": 1,
"name": "odomter",
"email": "",
"device": {
"id": 3,
"vin": "",
"imei": "100000001",
"kind": 0,
"name": "Demo 1",
"active": 1,
"msisdn": null,
"comment": "",
"deleted": 0,
"forward": null,
"icon_id": 0,
"sensors": [
{
"id": 4054,
"data": null,
"name": "temp",
"type": "temperature",
"value": "43",
"decbin": 0,
"hexbin": 0,
"formula": "[value]*50",
"on_type": null,
"user_id": 1,
"off_type": null,
"on_value": null,
"tag_name": "hdop",
"device_id": 3,
"full_tank": null,
"max_value": null,
"min_value": null,
"off_value": null,
"skip_empty": null,
"calibrations": null,
"on_tag_value": null,
"off_tag_value": null,
"show_in_popup": 0,
"value_formula": 0,
"add_to_history": 0,
"fuel_tank_name": null,
"odometer_value": null,
"shown_value_by": null,
"full_tank_value": null,
"temperature_max": null,
"temperature_min": null,
"skip_calibration": null,
"odometer_value_by": null,
"odometer_value_unit": "km",
"unit_of_measurement": "C",
"temperature_max_value": null,
"temperature_min_value": null
}
],
"user_id": null,
"currents": null,
"created_at": "2023-09-28 14:06:41",
"fuel_per_h": "0.0000",
"fuel_price": "0.00",
"parameters": "[\"sat\",\"hdop\",\"rfid\",\"valid\",\"enginehours\"]",
"sim_number": "",
"tail_color": "#33cc33",
"updated_at": "2023-11-30 14:32:11",
"fuel_per_km": "0.0000",
"icon_colors": {
"engine": "yellow",
"moving": "green",
"offline": "red",
"stopped": "yellow"
},
"tail_length": 5,
"timezone_id": null,
"detect_speed": "gps",
"device_model": "",
"engine_hours": "gps",
"object_owner": "",
"plate_number": "",
"snap_to_road": 0,
"detect_engine": "gps",
"fuel_quantity": "0.00",
"authentication": "",
"device_type_id": null,
"detect_distance": null,
"expiration_date": null,
"min_fuel_thefts": 10,
"additional_notes": "",
"min_moving_speed": 6,
"app_tracker_login": 0,
"current_driver_id": 1,
"installation_date": "0000-00-00",
"min_fuel_fillings": 10,
"traccar_device_id": 3,
"valid_by_avg_speed": 1,
"fuel_measurement_id": 1,
"gprs_templates_only": false,
"registration_number": "",
"sim_activation_date": "0000-00-00",
"sim_expiration_date": "0000-00-00",
"fuel_detect_sec_after_stop": 0
},
"remind": 3599,
"expired": 0,
"expires": "\"Sensor\" was not found.",
"user_id": 1,
"interval": 3600,
"device_id": 3,
"event_sent": 0,
"description": "",
"remind_date": null,
"expires_date": null,
"last_service": "0",
"mobile_phone": "",
"expiration_by": "odometer",
"trigger_event_left": 1,
"renew_after_expiration": 0
}
],
"from": 1,
"path": "/api/get_services",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "/api/get_services?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"total": 1,
"status": 1,
"per_page": 10,
"last_page": 1,
"current_page": 1,
"last_page_url": "/api/get_services?page=1",
"next_page_url": null,
"prev_page_url": null,
"first_page_url": "/api/get_services?page=1"
}
API Sharing
GET Sharing List
Mengambil daftar berbagi
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | sharing |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/sharing?lang=[lang]&user_api_hash=[user_api_hash] |
{
"data": [
{
"id": 1,
"hash": "hash",
"name": "share",
"active": 0,
"user_id": 1,
"expiration_date": "2124-03-01 00:00:00",
"delete_after_expiration": 0
}
],
"pagination": {
"total": 1,
"per_page": 15,
"last_page": 1,
"current_page": 1,
"next_page_url": null,
"prev_page_url": null
}
}
POST Create Sharing
Membuat berbagi
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | sharing |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
devices array[integer]
required
active boolean
required
name string
required
enable_expiration_date boolean
required
expiration_date string
required
|
| Contoh Permintaan | https://trackgps.id/api/sharing |
{
"devices": [0],
"active": true,
"name": "string",
"enable_expiration_date": true,
"expiration_date": "string"
}
{
"id": 1,
"name": "hash",
"active": 0,
"user_id": 1,
"expiration_date": "2124-03-01 00:00:00",
"delete_after_expiration": 0
}
GET Sharing Item
Mendapatkan data berbagi
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | sharing/{id} |
| Path Parameters |
id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/sharing/{id} |
{
"id": 1,
"hash": "hash",
"name": "share",
"active": 0,
"user_id": 1,
"expiration_date": "2124-03-01 00:00:00",
"delete_after_expiration": 0
}
Update Sharing Item
Memperbarui data berbagi item
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | PUT |
| Endpoint | sharing/{id} |
| Path Parameters |
id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
devices array[integer]
required
active boolean
required
name string
required
enable_expiration_date boolean
required
expiration_date string
required
|
| Contoh Permintaan | https://trackgps.id/api/sharing/{id} |
{
"id": 1,
"hash": "hash",
"name": "share",
"active": 0,
"user_id": 1,
"expiration_date": "2124-03-01 00:00:00",
"delete_after_expiration": 0
}
Delete Sharing Item
Menghapus data berbagi item berdasarkan ID
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | DELETE |
| Endpoint | sharing/{id} |
| Path Parameters |
id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/sharing/{id} |
{
"status": 1
}
Update Sharing Item Devices
Mengubah daftar perangkat berbagi item berdasarkan ID
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | PUT |
| Endpoint | sharing/{id}/devices |
| Path Parameters |
id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
devices array[integer]
required
|
| Contoh Permintaan | https://trackgps.id/api/sharing/{id}/devices |
{
"id": 1,
"hash": "hash",
"name": "share",
"active": 0,
"user_id": 1,
"expiration_date": "2124-03-01 00:00:00",
"delete_after_expiration": 0
}
API SMS Template
GET User SMS Templates
Mengambil daftar template SMS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_user_sms_templates |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_user_sms_templates?lang=[lang]&user_api_hash=[user_api_hash] |
{
"items": {
"user_sms_templates": {
"tot": 1,
"url": "/api/get_user_sms_templates",
"data": [
{
"id": 1,
"title": "Template title",
"message": "Template message",
"user_id": 1,
"created_at": "2016-06-26 17:32:48",
"updated_at": "2016-06-26 17:32:48"
}
]
},
"pagination": {
"total": 1,
"per_page": 10,
"last_page": 1,
"current_page": 1,
"next_page_url": null,
"prev_page_url": null
}
},
"status": 1
}
GET Add User SMS Template Data
Mengambil data untuk membuat template SMS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | add_user_sms_template_data |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_user_sms_template_data?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 200
}
POST Add User SMS Template
Membuat template SMS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_user_sms_template |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_user_sms_template?lang=[lang]&user_api_hash=[user_api_hash] |
{
"title": "GPRS Title",
"message": "message content",
"user_id": 2
}
{
"item": {
"id": 2,
"title": "GPRS Title",
"message": "message content",
"user_id": 2,
"created_at": "2016-06-26 17:41:43",
"updated_at": "2016-06-26 17:41:43"
},
"status": 1
}
GET Edit User SMS Template Data
Mengambil data untuk mengedit template SMS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | edit_user_sms_template_data |
| Query Parameters |
lang string
required
user_api_hash string
required
user_sms_template_id integer
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_user_sms_template_data?lang=[lang]&user_api_hash=[user_api_hash]&user_sms_template_id=[id] |
{
"item": {
"id": 1,
"title": "Template title",
"message": "Template message",
"user_id": 2,
"created_at": "2016-06-26 17:41:48",
"updated_at": "2016-06-26 17:41:48"
},
"status": 1
}
POST Edit User SMS Template
Mengedit template SMS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | edit_user_sms_template |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_user_sms_template?lang=[lang]&user_api_hash=[user_api_hash] |
{
"id": 2,
"title": "GPRS Title",
"message": "message content",
"user_id": 2
}
{
"item": {
"id": 2,
"title": "GPRS Title",
"message": "message content",
"user_id": 2,
"created_at": "2016-06-26 17:41:43",
"updated_at": "2016-06-26 17:41:43"
},
"status": 1
}
GET Destroy User SMS Template
Menghapus template SMS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_user_sms_template |
| Query Parameters |
lang string
required
user_api_hash string
required
user_sms_template_id integer
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_user_sms_template?lang=[lang]&user_api_hash=[user_api_hash]&user_sms_template_id=[user_sms_template_id] |
{
"status": 1
}
GET Destroy User SMS Template
Menghapus template SMS pengguna
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | destroy_user_sms_template |
| Query Parameters |
lang string
required
user_api_hash string
required
user_sms_template_id integer
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_user_sms_template?lang=[lang]&user_api_hash=[user_api_hash]&user_sms_template_id=[user_sms_template_id] |
{
"status": 1
}
API Task
GET Tasks
Mengambil daftar tugas
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_tasks |
| Query Parameters |
lang string
required
user_api_hash string
required
search_device_id integer
search_invoice_number string
search_task_status integer
search_time_from string
search_time_to string
|
| Contoh Permintaan | https://trackgps.id/api/get_tasks?lang=[lang]&user_api_hash=[user_api_hash]&search_device_id=[search_device_id]&search_invoice_number=[search_invoice_number]&search_task_status=[search_task_status]&search_time_from=[search_time_from]&search_time_to=[search_time_to] |
{
"status": 1
}
GET Task by ID
Mengambil detail tugas berdasarkan ID
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | GET |
| Endpoint | get_task/{id} |
| Path Parameters |
id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/get_task/{id}?lang=[lang]&user_api_hash=[user_api_hash] |
{
"status": 1
}
POST Add Task
Membuat tugas baru
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | add_task |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Body Parameters |
device_id integer
required
title string
required
comment string
required
priority integer
required
status integer
required
pickup_address string
required
pickup_address_lat number
required
pickup_time_from string<date-time>
required
pickup_time_to string<date-time>
required
delivery_address string
required
delivery_address_lat number
required
delivery_time_from string<date-time>
required
delivery_time_to string<date-time>
required
invoice_number string
required
|
| Contoh Permintaan | https://trackgps.id/api/add_task |
{
"device_id": 0,
"title": "string",
"comment": "string",
"priority": 0,
"status": 0,
"pickup_address": "string",
"pickup_address_lat": 0,
"pickup_time_from": "2019-08-24T14:15:22Z",
"pickup_time_to": "2019-08-24T15:22Z",
"delivery_address": "string",
"delivery_address_lat": 0,
"delivery_time_from": "2019-08-24T14:15:22Z",
"delivery_time_to": "2019-08-24T15:22Z",
"invoice_number": "string"
}
{
"status": 1
}
POST Edit Task
Mengedit tugas yang sudah ada
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | edit_task/{id} |
| Path Parameters |
id integer
required
|
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/edit_task/123 |
{
"device_id": 1,
"title": "Task Title",
"comment": "Task Comment",
"priority": 1,
"status": 1,
"pickup_address": "Pickup Location",
"pickup_address_lat": 123.456,
"pickup_time_from": "2023-09-25T08:00:00Z",
"pickup_time_to": "2023-09-25T10:00:00Z",
"delivery_address": "Delivery Location",
"delivery_address_lat": 789.012,
"delivery_time_from": "2023-09-25T12:00:00Z",
"delivery_time_to": "2023-09-25T14:00:00Z",
"invoice_number": "INV123456"
}
{
"status": 1
}
POST Destroy Task
Menghapus tugas
| STRUKTUR PERMINTAAN | |
|---|---|
| Method | POST |
| Endpoint | destroy_task |
| Query Parameters |
lang string
required
user_api_hash string
required
|
| Contoh Permintaan | https://trackgps.id/api/destroy_task?lang=[lang]&user_api_hash=[user_api_hash] |
{
"task_id": 12345
}
{
"status": 1
}
Integrasikan Bisnis Anda dengan Solusi GPS Tracking Terbaik di Indonesia!
Unduh dokumentasi API kami untuk mempelajari cara integrasi lebih lanjut dengan aplikasi server trackgps.id.