Description:

  • request for alert notification and gps history of trip based on trip id

Version:

Ver. Maker Established Date Revision Date
1.0.0 lenny 2021-12-31

Request URL:

Request Method:

  • POST

Request Header:

Parameter Name Whether Must Type Instructions
Content-Type Yes string Request Type: x-www-form-urlencoded

Request Parameter:

Parameter Name Whether Must Type Instructions
tripId Yes string Trip ID
fTokenID Yes string Token
startTime Yes string Start Time (Time is allowed to be empty, if not, it must be a string in time format)
endTime Yes string End Time (Time is allowed to be empty, if not, it must be a string in time format)

Return Example:

Return when correct:

{
    "Result": 200,
    "Message": "success",
    "FObject": {
        "ContainerNo": "1314",
        "AssetID": "207010199999",
        "TripID": "BOC-A-12242021-0001",
        "TrackInfoList": [
            {
                "Battery": 1,
                "Latitude": 22.5805062743706,
                "Longitude": 113.918000624462,
                "LocationType": 3,
                "LockStatus": 0,
                "GPSTime": "2021-12-20T06:08:36",
                "RecvTime": "2021-12-22T08:16:37",
                "Speed": 0,
                "Mileage": 0,
                "GPSSignal": 0,
                "GSMSignal": 99
            },
            {
                "Battery": 1,
                "Latitude": 22.5805062743706,
                "Longitude": 113.918000624462,
                "LocationType": 3,
                "LockStatus": 0,
                "GPSTime": "2021-12-20T08:40:02",
                "RecvTime": "2021-12-22T07:46:16",
                "Speed": 0,
                "Mileage": 0,
                "GPSSignal": 0,
                "GSMSignal": 99
            },
            {
                "Battery": 1,
                "Latitude": 22.5805062743706,
                "Longitude": 113.918000624462,
                "LocationType": 3,
                "LockStatus": 0,
                "GPSTime": "2021-12-20T18:08:36",
                "RecvTime": "2021-12-22T08:16:45",
                "Speed": 0,
                "Mileage": 0,
                "GPSSignal": 0,
                "GSMSignal": 99
            },
            {
                "Battery": 1,
                "Latitude": 22.5805062743706,
                "Longitude": 113.918000624462,
                "LocationType": 3,
                "LockStatus": 0,
                "GPSTime": "2021-12-20T20:40:05",
                "RecvTime": "2021-12-22T07:46:16",
                "Speed": 0,
                "Mileage": 0,
                "GPSSignal": 0,
                "GSMSignal": 99
            },
            {
                "Battery": 1,
                "Latitude": 22.5805062743706,
                "Longitude": 113.918000624462,
                "LocationType": 3,
                "LockStatus": 0,
                "GPSTime": "2021-12-21T06:08:39",
                "RecvTime": "2021-12-22T08:16:47",
                "Speed": 0,
                "Mileage": 0,
                "GPSSignal": 0,
                "GSMSignal": 99
            },
            {
                "Battery": 1,
                "Latitude": 22.5805062743706,
                "Longitude": 113.918000624462,
                "LocationType": 3,
                "LockStatus": 0,
                "GPSTime": "2021-12-21T08:40:07",
                "RecvTime": "2021-12-22T07:46:24",
                "Speed": 0,
                "Mileage": 0,
                "GPSSignal": 0,
                "GSMSignal": 99
            },
            {
                "Battery": 1,
                "Latitude": 22.5805062743706,
                "Longitude": 113.918000624462,
                "LocationType": 3,
                "LockStatus": 1,
                "GPSTime": "2021-12-21T09:11:01",
                "RecvTime": "2021-12-22T07:46:36",
                "Speed": 0,
                "Mileage": 0,
                "GPSSignal": 0,
                "GSMSignal": 99
            }
        ],
        "AlarmInfoList": [
            {
                "DataType": 40,
                "DateTime": "2021-12-21T09:11:01",
                "Longitude": 0.0,
                "Latitude": 0.0,
                "Speed": 0,
                "Mileage": 0
            }
        ]
    }
}

Return on error:

{
    "Result": 105,
    "Message": "Fail:tripId is null",
    "FObject": null
}

{
    "Result": 105,
    "Message": "Fail:without this trip ID",
    "FObject": null
}

{
    "Result": 105,
    "Message": "Fail:token error or timeout",
    "FObject": null
}

Return Parameter Description:

TrackInfoList

Parameter Name Type Instructions
Battery Int Battery
Latitude Float Latitude
Longitude Float Longitude
LocationType Int LocationType 1:Satellite 2:LBS 3:Cell 4:Phone 0:Unlocated
LockStatus Int LockStatus(1:open;0:close)
GPSTime DateTime Satellite Time(UTC)
RecvTime DateTime Receive Time(UTC)
Speed Int Speed
Mileage Int Mileage
GPSSignal Int GPS Signal
GSMSignal Int GSM Signal
Direction Int Direction 1: N 2:NE 3:E 4:SE 5:S 6:SW 7:W 8:NW Other:N
Address String Address

AlarmInfoList

Parameter Name Type Instructions
Latitude Float Latitude
Longitude Float Longitude
DateTime DateTime DateTime Time(UTC)
Speed Int Speed
Mileage Int Mileage
DataType Int Alarm Type
Address String Address

Alarm Type:

Alarm Type Alarm Type Name
1 Speeding Alarm
2 Fatigue driving
3 Danger warningv
9 Terminal LCD or display failure
10 TTS module failure
11 Camera fault
12 IC card module failure
15 Power failure
19 Overtime parking
23 Route deviation alarm
24 Vehicle VSS failure
26 Vehicle theft
27 Illegal vehicle ignition
28 Illegal vehicle displacement
29 Collision warning
30 Rollover warning
31 Illegal door opening alarm
32 Video signal loss alarm
33 Video signal blocking alarm
34 Storage unit failure alarm
35 Other video equipment fault alarm
36 Passenger train overload alarm
37 Abnormal driving behavior alarm
38 Video recording reaches storage threshold alarm
40 Lock rope cut
41 Vibration
42 Long-time unlocking
43 Unlock password error for 5 consecutive times
44 Swiping illegal RFID card
45 Low power
46 Back cover opened
47 Motor stuck
48 Enter fence alarm
49 Exit fence alarm
50 Enable backup battery
51 SOS
52 Towing alarm
54 Fuel level change alarm
55 Enter hot spot alarm
56 Exit hot spot alarm
57 Access road alarm
58 Exit road alarm
63 Temperature and humidity alarm
160 Safety belt alarm
161 Emergency brake alarm
162 Neutral skating
163 GPRS reconnection
164 Dispatching panel connection
165 Dispatch panel disconnected
166 CANbus disconnection alarm
167 CANbus fault code upload alarm
168 Limit start-up alarm
180 Host dismantling
190 Damage of upper cover
191 GPS antenna interference
192 Low power sleep alarm
193 Lock device abnormal
194 Unlock password error
195 Do not perform unlocking without positioning
196 No unlocking outside the fence
197 Attitude alarm
198 Slave sensor signal lost
316 Light alarm
400 Idling alarm
402 Fence stop alarm
403 Out fence unlock
404 Departure delay warning
405 Departure delay alarm
406 Late warning
407 Late alarm

Request Example:

String result = "";
//request url
String url ="http://icloud.assetscontrols.com:8092/api/AscentPH/GetTxnRouteHistory?tripId=BOC-A-12312021-0002&fTokenID=DB7F20D9-84C3-44C3-B05A-06A9C392A189";
//Create post request object
  HttpPost post = new HttpPost(url);
 CloseableHttpClient client = HttpClients.createDefault();
 //Start the execution request and get the return value
 HttpResponse response = client.execute(post);
 //Get the returned entity object
HttpEntity entity = response.getEntity();
//Convert entity object to string
String result = EntityUtils.toString(entity, "UTF-8");
 return result;
文档更新时间: 2023-02-06 16:05   作者:刘家帅