API IDTRACK

  1. Create token

METHODE : POST

URLhttp://server-gps.com:8082/login/create_token

Body: sesuai user password yang telah dbuat

{“Username”:”demo@server-gps.com”, “Password”:”1234″}

api json gps tracking

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”

}

  

  1. List Device/truk

Method : GET

FORMAT : http://server.gpsku.co.id:8082/api/device?apikey=[API_KEY]

URL : http://server-gps.com:8082/api/device?apikey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDA1ODQwMzYsInVzZXJfaWQiOjYyfQ.RwhxSUJ2xTWHYr28-TMv_vNGl4M_S9LL2VespDx9gMU

RESULT :

[

    {

        “DeviceID”: 4210,

        “Nopol”: “B2152BZP”

    },

    {

        “DeviceID”: 4211,

        “Nopol”: “B9169BCE”

    },

    {

        “DeviceID”: 4212,

        “Nopol”: “B9347BCR”

    }

]

  1. List Marker POI

Methode: GET

                URL : http://server-gps.com:8082/api/marker?apikey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDA1ODQwMzYsInVzZXJfaWQiOjYyfQ.RwhxSUJ2xTWHYr28-TMv_vNGl4M_S9LL2VespDx9gMU

                Result :

                [

    {

        “IDMarker”: 115,

        “Name”: “Lotte Avenue”,

        “Address”: “”,

        “Lat”: -6.224055,

        “Lng”: 106.82308,

        “IconPoi”: “47.png”,

        “PoiGrupID”: 0,

        “AreaID”: 0

    },

    {

        “IDMarker”: 114,

        “Name”: “Kota Kasablanka”,

        “Address”: “”,

        “Lat”: -6.2235756,

        “Lng”: 106.84268,

        “IconPoi”: “47.png”,

        “PoiGrupID”: 0,

        “AreaID”: 0

    }

]

  1. Set SPJ to Device

METHODE: POST

URL : http://server-gps.com:8082/api/spj?apikey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDA1ODQwMzYsInVzZXJfaWQiOjYyfQ.RwhxSUJ2xTWHYr28-TMv_vNGl4M_S9LL2VespDx9gMU

BODY :

{

    “DeviceID”: 115,

    “PickupMarkerID”: 99,

    “DestinationMarkerID”: 100,

    “PickupDate”: “2019-03-10T07:00:00+07:00”,

    “Driver”: “Arif Raharjo”,

    “NomorSurat”: “7403-ZLF-83324894”,

    “UrlCallback”: “http://domainAnda.com/……..”

}

  1. Callback Status SPJ

Update status ketika truck sudah sampai di destination marker

METHODE: POST

URL : Sesui dengan UrlCallback (ini merupakan Server API milik anda sendiri)

BODY :

{

    “DeviceID”: 115,

    “NomorSurat”: “7403-ZLF-83324894”,

    “DestinationMarkerID”: 100,

    “DestinationMarkerInDate”: “2019-03-25T07:00:00+07:00”   

}

RESULT

OK

  1. Show Device Position

Mencari posisi truk berdasarkan DeviceID

                Methode: GET

                URL : http://server-gps.com:8082/api/device/[DEVICE_ID]?apikey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDA1ODQwMzYsInVzZXJfaWQiOjYyfQ.RwhxSUJ2xTWHYr28-TMv_vNGl4M_S9LL2VespDx9gMU

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”

}

  1. List Device Status ONLINE/OFFLINE

Melihat semua truk dengan kondisi online/offline

                Methode: GET

                URL : http://server-gps.com:8082/api/devicetracking?apikey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MDA1ODQwMzYsInVzZXJfaWQiOjYyfQ.RwhxSUJ2xTWHYr28-TMv_vNGl4M_S9LL2VespDx9gMU

RESULT:

[

    {

        “ID”: 1781,

        “Nama”: “USER 

get api json gps tracking

“,

        “Devices”: [

            {

                “DeviceID”: 4210,

                “Imei”: “864180030920172”,

                “Phone”: “081139xxxxx”,

                “Nopol”: “B2152BZP”,

                “Icon”: “http://server-gps.com/images/gps/mobil2/0-on.png”,

                “LastUpdate”: “2018-10-04T10:17:33+07:00”,

                “Latitude”: -6.30489,

                “Longitude”: 106.64405,

                         “Direction”: 90,

                “Status”: “EXPIRED”

            },

            {

                “DeviceID”: 4211,

                “Imei”: “864180030888940”,

                “Phone”: “08119837xxxxx”,

                “Nopol”: “B9169BCE”,

                “DriverName”: “”,

                “Icon”: “http://server-gps.com/images/gps/mobil2/0-on.png”,

                “LastUpdate”: “2018-10-03T16:21:50+07:00”,

                “Latitude”: -6.1650515,

                “Longitude”: 106.82367,

                “Direction”: 0,

                “Status”: “ACTIVE”

            },

            {

                “DeviceID”: 4212,

                “Imei”: “864180036279391”,

                “Phone”: “982374xxxx4”,

                “Nopol”: “B9347BCR”,

                “DriverName”: “”,

                “Icon”: “http://server-gps.com/images/gps/mobil2/90-on.png”,

                “LastUpdate”: “2018-10-03T14:18:23+07:00”,

                “Latitude”: -6.163515,

                “Longitude”: 106.821754,

                “Direction”: 96,

                “Status”: “NOT UPDATE”

            }

        ]

    }

]