### Get Access Token Request Example Source: https://www.protrack365.com/api.html Example of a GET request to the /api/authorization endpoint with a calculated signature. ```http http://api.protrack365.com/api/authorization?time=1556243443&account=test&signature=3844afd2c3bf68f0f3f4aa0a9ee8ee6c ``` -------------------------------- ### Get account information request Source: https://www.protrack365.com/api.html Example GET request to retrieve brief account information. ```http http://api.protrack365.com/api/user/info?access_token=ACCESS_TOKEN&account=demo ``` -------------------------------- ### Playback API Example Request Source: https://www.protrack365.com/api.html GET request to retrieve GPS data for a target within a time period. Requires access_token, imei, begintime, and endtime parameters. ```http http://api.protrack365.com/api/playback?access_token=ACCESS_TOKEN&imei=358899051025339&begintime=1406746394&endtime=1407746394 ``` -------------------------------- ### Get device basic information request Source: https://www.protrack365.com/api.html Example GET request to retrieve device details by IMEI. Supports up to 100 IMEIs per request. ```http http://api.protrack365.com/api/device/detail?access_token=ACCESS_TOKEN&imeis=358899051025339,355139000000234 ``` -------------------------------- ### Track Device Request Example Source: https://www.protrack365.com/api.html Example of a GET request to the /api/track endpoint to retrieve coordinate data for specific IMEIs. ```http http://api.protrack365.com/api/track?access_token=ACCESS_TOKEN&imeis=358899051025339,355139000000234 ``` -------------------------------- ### GET /api/device/list Source: https://www.protrack365.com/api.html Get the device(s) basic information. Returns maximum 500 devices for each account. ```APIDOC ## GET /api/device/list ### Description Get the device(s) basic information. Returns maximum 500 devices for each account. ### Method GET ### Endpoint /api/device/list ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token ### Request Example http://api.protrack365.com/api/device/list?access_token=ACCESS_TOKEN ### Response #### Success Response (200) - **code** (int) - Response code - **record** (array) - List of device objects - **imei** (string) - Target's IMEI - **devicename** (string) - Device name - **devicetype** (string) - Device model - **platenumber** (string) - Licence plate number - **onlinetime** (long) - Device first online time - **platformduetime** (long) - Device platform expire time #### Response Example { "code": 0, "record": [ { "imei": "512345678901234", "devicename": "VT05S-01234", "devicetype": "VT05S", "platenumber": "TheOne", "onlinetime": 0, "platformduetime": 0 }, { "imei": "123456789123456", "devicename": "VT05S-23456", "devicetype": "VT05S", "platenumber": "", "onlinetime": 1419905754, "platformduetime": 1588603848 } ] } ``` -------------------------------- ### Send Command API Example Request Source: https://www.protrack365.com/api.html POST request to send a command to a device. Requires access_token, imei, and command (e.g., RELAY,1 to stop engine). ```http http://api.protrack365.com/api/command/send?access_token=ACCESS_TOKEN&imei=358899051025339&command=RELAY,1 ``` -------------------------------- ### GET /api/user/info Source: https://www.protrack365.com/api.html Get the account's brief information. ```APIDOC ## GET /api/user/info ### Description Get the account's brief information. ### Method GET ### Endpoint /api/user/info ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token - **account** (string) - Required - Account ### Request Example http://api.protrack365.com/api/user/info?access_token=ACCESS_TOKEN&account=demo ### Response #### Success Response (200) - **record** (Object) - - **account** (String) - Account - **username** (String) - User name - **email** (String) - Email address - **mobile** (String) - Mobile number - **telephone** (String) - Telephone - **createtime** (long) - Create time - **roletype** (int) - 1 Distributor, 2 End user, 3 Virtual account - **blockstatus** (int) - 0:block, 1:unblock #### Response Example { "code": 0, "record": { "createtime": 1562570435, "mobile": "", "telephone": "", "roletype": 1, "account": "demo", "email": "openapidemo@gmail.com", "blockstatus": 1, "username": "openapidemo" } } ``` -------------------------------- ### GET /api/device/detail Source: https://www.protrack365.com/api.html Get the device(s) basic information according to IMEIs. (Maximum 100pcs in one request.) ```APIDOC ## GET /api/device/detail ### Description Get the device(s) basic information according to IMEIs. (Maximum 100pcs in one request.) ### Method GET ### Endpoint /api/device/detail ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token - **imeis** (string) - Required - Target IMEI list, separated by comma, max 100 IMEIs in one request. ### Request Example http://api.protrack365.com/api/device/detail?access_token=ACCESS_TOKEN&imeis=358899051025339,355139000000234 ### Response #### Success Response (200) - **record** (Object) - - **imei** (string) - Target's IMEI - **devicename** (String) - Device name - **devicetype** (String) - Device model - **platenumber** (String) - Licence plate number - **onlinetime** (long) - Device first online time - **platformduetime** (long) - Device platform expire time #### Response Example { "code": 0, "record": [ { "imei": "512345678901234", "devicename": "VT05S-01234", "devicetype": "VT05S", "platenumber": "TheOne", "onlinetime": 0, "platformduetime": 0 }, { "imei": "123456789123456", "devicename": "VT05S-23456", "devicetype": "VT05S", "platenumber": "", "onlinetime": 1419905754, "platformduetime": 1588603848 } ] } ``` -------------------------------- ### Query Command Response API Example Request Source: https://www.protrack365.com/api.html POST request to query the command response using the commandid returned from the send command API. ```http http://api.protrack365.com/api/command/query?access_token=ACCESS_TOKEN&commandid=1B454 ``` -------------------------------- ### GET /api/playback Source: https://www.protrack365.com/api.html Get the GPS data of the target in the time period. ```APIDOC ## GET /api/playback ### Description Get the GPS data of the target in the time period. ### Method GET ### Endpoint /api/playback ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token - **imei** (string) - Required - Target's IMEI - **begintime** (long) - Required - Begin time - **endtime** (long) - Required - End time ### Request Example http://api.protrack365.com/api/playback?access_token=ACCESS_TOKEN&imei=358899051025339&begintime=1406746394&endtime=1407746394 ### Response #### Success Response (200) - **record** (String) - Data is separated by semicolon, the data in each group is: longitude,latitude,gpstime,speed,course #### Response Example { "record": "113.97196,22.568616,1406858664,0,228;113.97196,22.56861,1406858684,0,228;113.97196,22.56861,1406858704,0,228;113.97196,22.56861,1406858724,0,228;113.97196,22.56861,1406858724,0,228;113.97196,22.56861,1406858724,0,228;113.97196,22.56861,1406858724,0,228;113.971934,22.568583,1406858780,0,61;113.971925,22.568585,1406858800,0,61", "code": 0 } ``` -------------------------------- ### Get device basic information request Source: https://www.protrack365.com/api.html Retrieves basic information for up to 500 devices associated with an account. ```http http://api.protrack365.com/api/device/list?access_token=ACCESS_TOKEN ``` ```json { "code": 0, "record": [ { "imei": "512345678901234", "devicename": "VT05S-01234", "devicetype": "VT05S", "platenumber": "TheOne", "onlinetime": 0, "platformduetime": 0 }, { "imei": "123456789123456", "devicename": "VT05S-23456", "devicetype": "VT05S", "platenumber": "", "onlinetime": 1419905754, "platformduetime": 1588603848 } ] } ``` -------------------------------- ### Create Geofence API Example Request Source: https://www.protrack365.com/api.html POST request to create a circular geofence. Requires access_token, imei, efencename, alarmtype, longitude, latitude, and radius (100-5000 meters). ```http http://api.protrack365.com/api/geofence/create?access_token=ACCESS_TOKEN&imei=358899051025339&efencename=home&alarmtype=0&longitude=113.97196&latitude=22.56861&radius=300 ``` -------------------------------- ### Get device basic information response Source: https://www.protrack365.com/api.html JSON response structure for the device detail endpoint. ```json { "code": 0, "record": [ { "imei": "512345678901234", "devicename": "VT05S-01234", "devicetype": "VT05S", "platenumber": "TheOne", "onlinetime": 0, "platformduetime": 0 }, { "imei": "123456789123456", "devicename": "VT05S-23456", "devicetype": "VT05S", "platenumber": "", "onlinetime": 1419905754, "platformduetime": 1588603848 } ] } ``` -------------------------------- ### GET /api/alarm/list Source: https://www.protrack365.com/api.html Get the device(s) alarm information in the time period. Max return 100 alarm records at one time. ```APIDOC ## GET /api/alarm/list ### Description Get the device(s) alarm information in the time period. Max return 100 alarm records at one time. ### Method GET ### Endpoint /api/alarm/list ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token - **imei** (string) - Required - Target IMEI - **begintime** (long) - Required - Begin time - **endtime** (long) - Required - End time ### Request Example http://api.protrack365.com/api/alarm/list?access_token=ACCESS_TOKEN&imei=358899051025339&begintime=1406746394&endtime=1407746394 ### Response #### Success Response (200) - **code** (int) - Response code - **record** (string) - Data separated by semicolon, each group: alarm type, longitude, latitude, gpstime, system time, speed, course, Geo-fence ID #### Response Example { "code": 0, "record": "27,113.885888,22.580592,1541575497,1541575507,40,40,0" } ### Notes - This API max return 100 alarm records at one time. When the client gets 100 records, the client has to request next 100 records, in this request, the begin time is the last 100th record's system time, until client gets records less than 100. When you get records less than 100, it means you've got all the alarm records. - Alarm types: 1=sosAlarm, 2=lowBatteryAlarm, 3=powerDisconnectAlarm, 4=vibrationAlarm, 5=geoFenceInAlarm, 6=geoFenceOutAlarm, 7=speedingAlarm, 8=carMoveAlarm, 9=engineOn, 10=engineOff, 11=tireTemperatureAlarm, 12=tireLeakPressureAlarm, 13=tireLowPressureAlarm, 14=tireHighPressureAlarm, 15=gpsDeadZoneInAlarm, 16=gpsDeadZoneOutAlarm, 17=obdDtcAlarm, 18=disassembleAlarm, 19=powerOffAlarm, 20=collisionAlarm, 21=dropAlarm, 22=routeAlarm, 23=rapidAccelerationAlarm, 24=rapidDecelerationAlarm, 25=sharpTurnAlarm, 26=dooropenAlarm, 27=doorcloseAlarm ``` -------------------------------- ### Get account information response Source: https://www.protrack365.com/api.html JSON response structure for the account information endpoint. ```json { "code": 0, "record": { "createtime": 1562570435, "mobile": "", "telephone": "", "roletype": 1, "account": "demo", "email": "openapidemo@gmail.com", "blockstatus": 1, "username": "openapidemo" } } ``` -------------------------------- ### GET /api/track Source: https://www.protrack365.com/api.html Get the latest coordinate data for tracking device. ```APIDOC ## GET /api/track ### Description Get the latest coordinate data for tracking device. ### Method GET ### Endpoint /api/track ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token - **imeis** (string) - Required - Target IMEI list, separated by comma, max 100 IMEIs in one request. ### Request Example http://api.protrack365.com/api/track?access_token=ACCESS_TOKEN&imeis=358899051025339,355139000000234 ### Response #### Success Response (200) - **record** (Array) - Array of tracking data objects - **record.imei** (string) - The imei of the target - **record.servertime** (long) - Current server time - **record.gpstime** (long) - Gps time - **record.hearttime** (long) - Heart time, the last time when the target sent data. - **record.systemtime** (long) - The system time when the target sent gps data. - **record.longitude** (double) - Longitude - **record.latitude** (double) - Latitude - **record.course** (int) - Course (North is 0, clockwise increase, max 360.) - **record.speed** (int) - Speed (KM/H) - **record.acctime** (long) - ACC status kept time interval in seconds - **record.accstatus** (int) - ACC status: 1:ACC ON, 0:ACC OFF, -1:No acc status - **record.doorstatus** (int) - Door status: 1:Door open, 0:Door closed, -1:No door status - **record.chargestatus** (int) - Charging status: 1:Charging, 0:Not in charging, -1:No such status - **record.oilpowerstatus** (int) - Fuel status: 1:Fuel supply ok, 0:Fuel supply off, -1:No such status - **record.defencestatus** (int) - Defence status: 1:Defence on, 0:Defence off, -1:No such status - **record.datastatus** (int) - 1:Never online, 2:OK, 3:Expired, 4:Offline, 5:Block - **record.battery** (int) - The battery, -1:No battery status #### Response Example { "record": [ { "imei": "358899051025339", "course": 195, "systemtime": 1419905754, "gpstime": 1419906052, "speed": 0, "hearttime": 1419906952, "servertime": 1420964313, "longitude": 113.909813, "latitude": 22.583197, "acctime": 1400, "accstatus": 1, "doorstatus": 0, "chargestatus": 0, "oilpowerstatus": 1, "defencestatus": 0, "datastatus": 2, "battery": 100 } ], "code": 0 } ``` -------------------------------- ### GET /api/authorization Source: https://www.protrack365.com/api.html Get access token for the others requests, every api must contain the access token. The access token is valid for 2 hours only, please refresh it frequently. When you get a new access token, the old one will be invalid automatically. ```APIDOC ## GET /api/authorization ### Description Get access token for the others requests, every api must contain the access token. The access token is valid for 2 hours only, please refresh it frequently. When you get a new access token, the old one will be invalid automatically. ### Method GET ### Endpoint /api/authorization ### Parameters #### Query Parameters - **time** (long) - Required - The time when the client sends request - **account** (string) - Required - Account - **signature** (string) - Required - Encrypted signature, the algorithm is: md5(md5(password) + time), md5 use 32 lower-case characters. ### Request Example http://api.protrack365.com/api/authorization?time=1556243443&account=test&signature=3844afd2c3bf68f0f3f4aa0a9ee8ee6c ### Response #### Success Response (200) - **record** (Object) - Contains access_token and expires_in - **record.access_token** (string) - The access token - **record.expires_in** (long) - access_token expire time in seconds #### Response Example { "record": { "access_token": "ACCESS_TOKEN", "expires_in": 7200 }, "code": 0 } ``` -------------------------------- ### Get Access Token Response JSON Source: https://www.protrack365.com/api.html The JSON structure returned upon a successful authorization request. ```json { "record": { "access_token": "ACCESS_TOKEN", "expires_in": 7200 }, "code": 0 } ``` -------------------------------- ### Get device alarm information request Source: https://www.protrack365.com/api.html Retrieves alarm records for a specific device within a time range. This API returns a maximum of 100 records per request. ```http http://api.protrack365.com/api/alarm/list?access_token=ACCESS_TOKEN&imei=358899051025339&begintime=1406746394&endtime=1407746394 ``` ```json { "code": 0, "record": "27,113.885888,22.580592,1541575497,1541575507,40,40,0" } ``` -------------------------------- ### POST /api/geofence/create Source: https://www.protrack365.com/api.html Create a circle geofence. ```APIDOC ## POST /api/geofence/create ### Description Create a circle geofence. ### Method POST ### Endpoint /api/geofence/create ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token - **imei** (string) - Required - Target's IMEI - **efencename** (string) - Required - The name of Geofence - **alarmtype** (int) - Required - Alarm type(0:out,1:in,2:in/out) - **longitude** (double) - Required - The longitude of the geofence center - **latitude** (double) - Required - The latitude of the geofence center - **radius** (int) - Required - Geofence radius(100~5000,unit:meter) ### Request Example http://api.protrack365.com/api/geofence/create?access_token=ACCESS_TOKEN&imei=358899051025339&efencename=home&alarmtype=0&longitude=113.97196&latitude=22.56861&radius=300 ### Response #### Success Response (200) - **code** (int) - Response code #### Response Example {"code":0} ``` -------------------------------- ### Create Geofence API Response JSON Demo Source: https://www.protrack365.com/api.html Response JSON indicating success with code 0. ```json {"code":0} ``` -------------------------------- ### POST /api/command/send Source: https://www.protrack365.com/api.html send a command to device from server. ```APIDOC ## POST /api/command/send ### Description send a command to device from server. ### Method POST ### Endpoint /api/command/send ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token - **imei** (string) - Required - Target's IMEI - **command** (string) - Required - The command RELAY,1: Stop Engine RELAY,0: Restore Engine RESET: Reset device LOCKDOOR : Lock Door UNLOCKDOOR : Unlock Door ### Request Example http://api.protrack365.com/api/command/send?access_token=ACCESS_TOKEN&imei=358899051025339&command=RELAY,1 ### Response #### Success Response (200) - **record** (Object) - - **commandid** (string) - The id to query command response. #### Response Example { "record": { "commandid": "1B454" }, "code": 0 } ``` -------------------------------- ### POST /api/command/query Source: https://www.protrack365.com/api.html query the command response. ```APIDOC ## POST /api/command/query ### Description query the command response. ### Method POST ### Endpoint /api/command/query ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token - **commandid** (string) - Required - The id returned from send command ### Request Example http://api.protrack365.com/api/command/query?access_token=ACCESS_TOKEN&commandid=1B454 ### Response #### Success Response (200) - **record** (Object) - - **response** (string) - The command response - **commandstatus** (int) - Command status 1: has received response from device 0: not receive response from device #### Response Example { "record": { "response": "Cut off the fuel supply: Success! Speed: 2km/h.", "commandstatus": 1 }, "code": 0 } ``` -------------------------------- ### Query Command Response API Response JSON Demo Source: https://www.protrack365.com/api.html Response JSON containing a record object with response text and commandstatus (1 for received, 0 for not received). ```json { "record": { "response": "Cut off the fuel supply: Success! Speed: 2km/h.", "commandstatus": 1 }, "code": 0 } ``` -------------------------------- ### POST /api/user/unblock Source: https://www.protrack365.com/api.html Unblock an account. ```APIDOC ## POST /api/user/unblock ### Description Unblock an account. ### Method POST ### Endpoint /api/user/unblock ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token - **account** (string) - Required - Account ### Request Example http://api.protrack365.com/api/user/unblock?access_token=ACCESS_TOKEN&account=demo ### Response #### Success Response (200) - **code** (int) - Response code #### Response Example { "code": 0 } ``` -------------------------------- ### Playback API Response JSON Demo Source: https://www.protrack365.com/api.html Response JSON containing a semicolon-separated record string with longitude, latitude, gpstime, speed, and course for each GPS record. The API returns at most 1000 records per request. ```json { "record": "113.97196,22.568616,1406858664,0,228;113.97196,22.56861,1406858684,0,228;113.97196,22.56861,1406858704,0,228;113.97196,22.56861,1406858724,0,228;113.97196,22.56861,1406858724,0,228;113.97196,22.56861,1406858724,0,228;113.97196,22.56861,1406858724,0,228;113.971934,22.568583,1406858780,0,61;113.971925,22.568585,1406858800,0,61", "code": 0 } ``` -------------------------------- ### Send Command API Response JSON Demo Source: https://www.protrack365.com/api.html Response JSON containing a record object with a commandid used to query the command response. ```json { "record": { "commandid": "1B454" }, "code": 0 } ``` -------------------------------- ### Track Device Response JSON Source: https://www.protrack365.com/api.html The JSON structure returned containing the latest tracking data for the requested devices. ```json { "record": [ { "imei": "358899051025339", "course": 195, "systemtime": 1419905754, "gpstime": 1419906052, "speed": 0, "hearttime": 1419906952, "servertime": 1420964313, "longitude": 113.909813, "latitude": 22.583197, "acctime": 1400, "accstatus": 1, "doorstatus": 0, "chargestatus": 0, "oilpowerstatus": 1, "defencestatus": 0, "datastatus": 2, "battery": 100 } ], "code": 0 } ``` -------------------------------- ### POST /api/user/block Source: https://www.protrack365.com/api.html Block an account. ```APIDOC ## POST /api/user/block ### Description Block an account. ### Method POST ### Endpoint /api/user/block ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token - **account** (string) - Required - Account ### Request Example http://api.protrack365.com/api/user/block?access_token=ACCESS_TOKEN&account=demo ### Response #### Success Response (200) - **code** (int) - Response code #### Response Example { "code": 0 } ``` -------------------------------- ### Unblock an account request Source: https://www.protrack365.com/api.html Unblocks a specified account using a POST request. ```http http://api.protrack365.com/api/user/unblock?access_token=ACCESS_TOKEN&account=demo ``` ```json { "code": 0 } ``` -------------------------------- ### Block an account request Source: https://www.protrack365.com/api.html Blocks a specified account using a POST request. ```http http://api.protrack365.com/api/user/block?access_token=ACCESS_TOKEN&account=demo ``` ```json { "code": 0 } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.