0% found this document useful (0 votes)
50 views4 pages

Jsonp Interface File: 4.login

This document outlines the API specifications for a JsonP interface, detailing the structure and requirements for various commands such as port requests, user login, and device information retrieval. It includes data formats, request and response examples, and descriptions of parameters and expected outcomes. Additionally, it provides insights into device status and location data management.

Uploaded by

Cinty Ny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views4 pages

Jsonp Interface File: 4.login

This document outlines the API specifications for a JsonP interface, detailing the structure and requirements for various commands such as port requests, user login, and device information retrieval. It includes data formats, request and response examples, and descriptions of parameters and expected outcomes. Additionally, it provides insights into device status and location data management.

Uploaded by

Cinty Ny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

7/16/25, 9:04 PM API

JsonP Interface File


[Link] description
Item Name Remarks
1 Port Request Utilize JsonP, detailed remarks at [Link]

2 Data Type Port answer to Json data all use string, integer 1 is also described as string “1”
3 Device ID The unique ID of device
4 Time All time are integer, from 1970-01-01 [Link] to current time. Time zone is not
included. APP uses the cellphone time.
5 Coordinates Coordinates uses degree as unit. Port coordinates are real data, in map,
correction is needed.
6 Speed km/h.

7 Angle 0-360 degrees, 0 means due north

[Link] Format of Port Request


Item Name Remarks
1 Request [Link]
Format parameter'&Field=display field&callback=callback function Name
2 Remark [Link] Server IP
[Link] Fixed request file
Cmd Command Name
Data Request data, multiple data, format N'data1',N'data2',N'data3'
Field Data that needs to display while call back. Leave empty, show
all data. It is used to reduce data flow when request big data.
callback JsonP callback function Name
3 example [Link]
Cmd=Proc_GetCarInfo&Data=N'00012836'&Field=&Callback=JsonP2

[Link] data Remarks


Item Name Remarks
1 Return JsonP1({
format "m_isResultOk":1,
"m_arrField":["field 1","field 2","field 3","field 4"],
"m_arrRecord":[
["value11","value12","value13","value14"],
["value21","value22","value23","value24"],
["value31","value32","value33","value34"],
["value41","value42","value43","value44"],
]
});
2 Remark JsonP1 Jsonp response callback function
m_isResultOk Request result, 0/fail, 1/success
m_arrField Return result field array
m_arrRecord Return result table content, composed of multiple filed
array

[Link]
User login
Item Name Remarks
1 Request [Link]
command Cmd=Proc_Login&Data=N'User',N'strPassword'&Field=&Callback=JsonP5
2 Parameter Proc_Login Login command
N'User' User ID,Must, Length 2-23
N'strSubUser' Password, Must, Length 2-23
JsonP5 callback function
3 Response JsonP5({
Content "m_isResultOk":1,
"m_arrField":["Result"],
"m_arrRecord":[["1"]]
})
4 Response m_isResultOk read-write database, 1/success, 0/fail.
Remarks
Result Logic operation resultfield
1 Logic operation result,1/success, 0/fail.

[Link] User information


Item Name Remarks
1 Request [Link]
command
2 Parameter Proc_GetUser request User inf
N'User' User ID,Must, L
JsonP5 callback functio
3 Response Json5({
Content "m_isResultOk":1,
"m_arrField":
["nID","strUser","strPassword","strName","strTel","strCompany","strAddress","strEmail","strRemark","nLimitSubUser","nLimitCar","nLimitCtrlTE","nLimitClie
 
"m_arrRecord":[["205","XXWL","686868","æ¬£æ¬£ç ‰ ©æµ ","18688955956","æ·±åœ³å¸‚æ¬£æ¬£ç ‰ ©æµ æœ ‰ é™ å…¬å ¸","æ·±åœ³å¸‚é  
112","","","0","0","0","64","1428681600","o2hZouPyJ8E5ocLwSUKTqLa-IIZ8","1418835573"]]
})
4 Response m_isResultOk read-write database, 1/success, 0/fail.
Remarks

[Link] 1/4
7/16/25, 9:04 PM API
nID record Item
strUser account
strPassword Password
strName User
strTel User cell
strCompany Company
strAddress address
strEmail User email
strRemark remark
nLimitSubUser Sub-user quantity limit
nLimitCar Device quantity limit
nLimitCtrlTE Null
nLimitClientSoft Null
nTimeout Expire time
strOpenID Null
nServerTime Null

[Link] User Sub-account device information


Item Name Remarks
1 Request [Link]
command
2 Parameter Proc_GetCar request User Sub-account device information command
N'strUser' User ID
JsonP2 callback functionID
3 Response JsonP2({
Content "m_isResultOk":1,
"m_arrField":
["nID","strTEID","strCarNum","strTESim","nTEType","strGroupName","strOwnerName","strOwnerTel","strOwnerAddress","strRemark","strIconID","nFuelBo
  
"m_arrRecord":[["288","00012836","粤BP6063","13789812644","10242","æ·±åœ³å¸‚å…¨ç¨‹è¿ é€šç‰©æµ æœ‰é™ å…¬å ¸","æ ŽèŒ‚æž—2","135708 
})
4 Response nID
Remarks
strTEID
strCarNum
strTESim
nTEType
strGroupName
strOwnerName
strOwnerTel
strOwnerAddress
strRemark
strIconID
nFuelBoxSize
nMileageInit
nInterval
nOverSpeed
nSMSNoticeState
strSMSNoticeTel1
strSMSNoticeTel2
strSMSNoticeTel3
5 Device If Request information has Requested 3 times without information Return , but Return Request succeed, it means this device is not valid at platform. Inval
valid
6 Device Return string nLimitTime, expire time. If it is 0, means forever valid, if UTC time is less than current time, device expires.
expire

[Link] single device information


Item Name Remarks
1 Request [Link]
command
2 Parameter Proc_GetCarInfo Request car information commandName
N'00012836' Device IMEI
JsonP2 callback functionID
3 Response JsonP2({
Content "m_isResultOk":1,
"m_arrField":
["nID","strTEID","strCarNum","strTESim","nTEType","strGroupName","strOwnerName","strOwnerTel","strOwnerAddress","strRemark","strIconID","nFuelBo
  
"m_arrRecord":[["288","00012836","粤BP6063","13789812644","10242","æ·±åœ³å¸‚å…¨ç¨‹è¿ é€šç‰©æµ æœ‰é™ å…¬å ¸","æ ŽèŒ‚æž—2","135708 
})
4 Response nID
Remarks
strTEID
strCarNum
strTESim
nTEType
strGroupName
strOwnerName
strOwnerTel
strOwnerAddress

[Link] 2/4
7/16/25, 9:04 PM API
strRemark
strIconID
nFuelBoxSize
nMileageInit
nInterval
nOverSpeed
nSMSNoticeState
strSMSNoticeTel1
strSMSNoticeTel2
strSMSNoticeTel3
5 Device If Request information has Requested 3 times without information Return , but Return Request succeed, it means this device is not valid at platform. Inval
valid
6 Device Return string nLimitTime, expire time. If it is 0, means forever valid, if UTC time is less than current time, device expires.
expire

[Link]
Request device last location
Item Name Remarks
1 Request [Link]
command
2 Parameter Proc_GetLastPosition Request last location commandID
N'00012836' Requested Device serial number IMEI
JsonP4 Callback function
3 Response JsonP4({
Content "m_isResultOk":1,
"m_arrField":
["nID","strTEID","nTime","dbLon","dbLat","nDirection","nSpeed","nGSMSignal","nGPSSignal","nFuel","nMileage","nTemp","nCarState","nTEState","nAlarm
"m_arrRecord":[["1","00012836","1414956901","113.9392","22.5700667","198","0","0","8","0","3056919","0","-1342177280","0","0","null"]]
})
4 Response nID table record ID nMileage St
Remarks strTEID Device serial number IMEI nTemp Te
nTime UTC seconds nCarState Ca
dbLon Longitude nTEState De
dbLat Latitude nAlarmState Al
nDirection Direction, 0-360°C strOther Nu
nSpeed Speed
nGSMSignal GSM signal
nGPSSignal GPS signal
nFuel Null
5 State Car state, device state, alarm state. The value ia a 4-byte integer with mark, each byte has 8 bits so a integer table can represent 4*8=32 status bit. One
remark can include all state and alarms. Need device if status bit has value. As bekiw,
If( nTEState & 0x80 )
{
location invaliad…
}
hexadecimal table as below

9. Car state:
7th bit 6th bit 5th bit 4th bit 3rd bit 2nd bit 1st bit 0 bit
Door
engine Job on Job on shock Job off Fuel disarm
sensor
Byte1 0 static/1
0 off/1 on 0 off/1 on 0 off/1 on 0 off/1 on 0 off/1 on 0no/1 Yes 0 off/1 on
shock
0x80 0x40 0x20 0x10 0x08 0x04 0x02 0x01
Engine on
engine off to Heavy Fuel
speed Taxi meter arm Door lock Add fuel
on vehicle abnormal
change
Byte2 0 off/1
0no/1change 0no/1change 0 off/1 on 0 off/1 on 0 off/1 on 0 off/1 on 0 off/1 on
loading
0x80 00 0x40 00 0x20 00 0x10 00 0x08 00 0x04 00 0x02 00 0x01 00
Tire
Tire temp Tire pressure
high high
pressure Tire air leak static move roll F all
Byte3 low
0 off/1 on 0 off/1 on 0 off/1 on 0 off/1 on 0no/1yes 0no/1yes 0no/1yes 0no/1yes
0x80 00 00 0x40 00 00 0x20 00 00 0x10 00 00 0x08 00 00 0x04 00 00 0x02 00 00 0x01 00 00
Device Device Device Device Device Device fast-
device off Device ride
standby sleep static walking slow-run run
Byte4 0no/1yes 0no/1yes 0no/1yes 0no/1yes 0no/1yes 0no/1yes 0no/1yes 0no/1yes
0x80 00 00 0x20 00 00 0x10 00 00 0x08 00 00 0x04 00 00 0x02 00 00 0x01 00 00
0x40 00 00 00
00 00 00 00 00 00 00
10. Device state:
7th bit 6th bit 5th bit 4th bit 3rd bit 2nd bit 1st bit 0 bit
Battery
Location Gsm blind Gprs Gps blind GPS fault GPS on GPS off
connected
Byte1 0
0 Yes/1no 0 Yes/1 no 0no/1yes 0 yes/1 no 0 okay/1fault 0 Yes/1 no 0 on/1 off
Yes/1补报
0x80 0x40 0x20 0x10 0x08 0x04 0x02 0x01
External Battery LBS Virtual Camera
Wifi location LCD fault TTS fault
power power location location fault
Byte2
0no/1yes 0no/1yes 0no/1yes 0no/1yes 0no/1yes 0no/1yes 0no/1yes 0no/1yes
0x80 00 0x40 00 0x20 00 0x10 00 0x08 00 0x04 00 0x02 00 0x01 00
3rd Byte reserved for leftover battery percentage
Byte3
0x80 00 00 0x40 00 00 0x20 00 00 0x10 00 00 0x08 00 00 0x04 00 00 0x02 00 00 0x01 00 00
4th byte reserved
Byte4
0x80 00 00 0x40 00 00 0x20 00 00 0x10 00 00 0x08 00 00 0x04 00 00 0x02 00 00 0x01 00 00
00 00 00 00 00 00 00 00
11. Alarm state:
7th bit 6th bit 5th bit 4th bit 3rd bit 2nd bit 1st bit 0 bit

[Link] 3/4
7/16/25, 9:04 PM API
overspeed Fence-in Fence-out Power cut collision
SOS Fuel cut Circuit cut
alarm alarm alarm alarm alarm
0 connect/ 0 Y connect/
Byte1 0 Yes/1 0 Yes/1 0 connect/ 1 0 Yes/1
0 Yes/1 alarm 0 Yes/1 alarm 1 1
alarm alarm disconnect alarm
disconnect disconnect
0x80 0x40 0x20 0x10 0x08 0x04 0x02 0x01
Low information Fatigue
emergency Engine idle
power fault alarm application siren alarm driving tow alarm
alarm alarm
alarm alarm alarm
Byte2
0 Yes/1 0 Yes/1 0 Yes/1 0 Yes/1 0 Yes/1 0 Yes/1
0 Yes/1 alarm 0 Yes/1 alarm
alarm alarm alarm alarm alarm alarm
0x80 00 0x40 00 0x20 00 0x10 00 0x08 00 0x04 00 0x02 00 0x01 00
Forbid Temperature Illeage
Temperature Door open Engine on
driving high Fuel thft Engine on shock alarm
low alarm alarm alarm
alarm alarm alarm alarm
Byte3 0 Yes/1 0 Yes/1 0 Yes/1 0 Yes/1 0 Yes/1 0 Yes/1
0 Yes/1 alarm 0 Yes/1 alarm
alarm alarm alarm alarm alarm alarm
0x80 00
0x40 00 00 0x20 00 00 0x10 00 00 0x08 00 00 0x04 00 00 0x02 00 00 0x01 00 00
00
Parking
custom custom custom Custom arrearage Gas leak
theft alarm overtime
alarm1 alarm2 alarm3 alarm4 alarm alarm
alarm
Byte4 0 Yes/1 0 Yes/1 0 Yes/1 0 Yes/1 0 Yes/1 0 Yes/1
0 Yes/1 alarm 0 Yes/1 alarm
alarm alarm alarm alarm alarm alarm
0x80 00 0x40 00 00 0x20 00 00 0x10 00 00 0x08 00 00 0x04 00 00 0x02 00 00 0x01 00 00
00 00 00 00 00 00 00 00 00

12. Request history trace


Item Name Remarks
1. Request [Link]
command Cmd=Proc_GetTrack&Data=N'00012836',N'1400999683',N'1401033599',N'5000'&Field=&Callback=JsonP5
1. Parameter Proc_GetTrack Request history trace command
N'00012836' Device serial number IMEI
N'1400999683' start time, UTC seconds does not include time zone
N'1401033599' Stop time, UTC seconds does not include time zone
N'5000' One Request 1000 pieces at most
JsonP5 callback function
1. Response Return Content is multiple location data, data format is same as request device last location
Content
13. request mileage
Item Name Remarks
1. Request [Link]
command Cmd=Proc_GetMileage&Data=N'00012836',N'1403712000',N'1403798399'&Field=&Callback=JsonP5
1. Parameter Proc_GetMileage Request mileage command
N'00012836' Device serial number IMEI
N'1400999683' start time, UTC seconds does not include time zone
N'1401033599' Stop time, UTC seconds does not include time zone
JsonP5 callback function
1. Response JsonP5({
Content "m_isResultOk":1,
"m_arrField":["strTEID","nStartMileage","nEndMileage","nMileage"],"
m_arrRecord":[["00012836","1947450","2028983","81533"]]
})
1. Response strTEID Device serial number IMEI
Remarks
nStartMileage Start mileage, unit M
nEndMileage Stop mileage, unit M
nMileage Mileage travelled

[Link] 4/4

You might also like