Berikut ini adalah dokumentasi API JSON GPSKU :
1. Create token
METHODE : POST
URL: http://server.gpsku.co.id:8082/login/create_token
Body: sesuai user password yang telah dbuat
{“Username”:”demo@gpsku.co.id”, “Password”:”1234″}
Result:
{
“access_token”: “eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDA1ODQwMzYsInVzZXJfaWQiOjYyfQ
.RwhxSUJ2xTWHYr28-TMv_vNGl4M_S9LL2VespDx9gMU”, “code”: 200,
“expire”: “2020-03-09T09:15:12+07:00”,
“login_type”: “login”, “refresh_token”:
“eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDA1ODQwMzYsInVzZXJfaWQiOjYyfQ
.RwhxSUJ2xTWHYr28-TMv_vNGl4M_S9LL2VespDx9gMU”
}
2. List Device/truk
Method : GET
URL : http://server.gpsku.co.id:8082/api/device?apikey=[API_KEY]
RESULT :
[
{
“DeviceID”: 4210, “Nopol”: “B2152BZP”
},
{
“DeviceID”: 4211, “Nopol”: “B9169BCE”
},
{
“DeviceID”: 4212, “Nopol”: “B9347BCR”
3. Show Device Position
Mencari posisi truk berdasarkan DeviceID
Methode: GET
URL : http://server.gpsku.co.id:8082/api/device/[DEVICE_ID]?apikey=[API_KEY] Parameter : Device ID
RESULT:
{
“DeviceID”: 4210,
“Imei”: “864180030920172”, “Nopol”: “B2152BZP”,
“DriverName”: “RAHARJO”, “DestinationMarkerID”: 100,
“Address”: “Jl. Bambu no 46 Yogyakarta”, “LastUpdatePostionDate”: “2017-10-01T10:22:37+07:00”
}
4. List Device Status ONLINE/OFFLINE
Melihat semua truk dengan kondisi online/offline
Methode: GET
URL : http://server.gpsku.co.id:8082/api/devicetracking?apikey=[API_KEY] RESULT:
[
{
“ID”: 1781,
“Nama”: “USER SEMEN INDONESIA”,
“Devices”: [
{
“DeviceID”: 4210,
“Imei”: “864180030920172”,
“Phone”: “081139384324”, “Nopol”: “B2152BZP”,
“Icon”: “http://server.gpsku.co.id/images/gps/mobil2/0–on.png”, “LastUpdate”: “2018-10-04T10:17:33+07:00”,
“Latitude”: -6.30489,
“Longitude”: 106.64405,
“Direction”: 90,
“Acc”: false, “Status”: “EXPIRED”,
“Odometer”:42922.91, “Alarm”:””, “EngineSec”:5477720, “Speed”:0, “ParkirSec”:5934
},
{
“DeviceID”: 4211,
“Imei”: “864180030888940”,
“Phone”: “08119837492834”, “Nopol”: “B9169BCE”,
“DriverName”: “”,
“Icon”: “http://server.gpsku.co.id/images/gps/mobil2/0–on.png”, “LastUpdate”: “2018-10-03T16:21:50+07:00”,
“Latitude”: -6.1650515,
“Longitude”: 106.82367,
“Direction”: 0, “Acc”: false, “Status”: “ACTIVE”,
“Odometer”:42922.91, “Alarm”:””, “EngineSec”:5477720, “Speed”:0, “ParkirSec”:5934
},
{
“DeviceID”: 4212,
“Imei”: “864180036279391”,
“Phone”: “98237498234”, “Nopol”: “B9347BCR”,
“DriverName”: “”,
“Icon”: “http://server.gpsku.co.id/images/gps/mobil2/90–on.png”, “LastUpdate”: “2018-10-03T14:18:23+07:00”,
“Latitude”: -6.163515,
“Longitude”: 106.821754,
“Direction”: 96, “Acc”: false,
“Status”: “NOT UPDATE”,
“Odometer”:42922.91, “Alarm”:””, “EngineSec”:5477720, “Speed”:0, “ParkirSec”:5934
}
]
}
]
Keterangan :
NO | Parameter | Description |
1 | DeviceID | Unik ID device |
2 | Imei | Imei dari GPS |
3 | Phone | |
4 | Nopol | Plat nomor kendaraan |
5 | DriverName | |
6 | Icon | |
7 | LastUpdate | Time Ketika data diterima server |
8 | Latitude | Koordinat latitude |
9 | Longitude | Koordinat longitude |
10 | Direction | Sudut arah laju kendaraan |
11 | Acc | Status Mesin , Hidup = true, Mati = false |
12 | Status | Status device |
13 | Odometer | Akumulasi Jarak tempuh kendaraan |
14 |
Alarm |
Event |
15 | EngineSec | Akumulasi detik kendaraan hidup |
16 | Speed | Kecepatan kendaraan |
17 | ParkirSec | Akumulasi detik kendaraan parkir, akan menjadi 0 ketika kendaraan hidup/berjalan |
Silahkan hubungi customer service kami untuk mendapatkan TOKEN API
terimakasih