Skip to content

Get Device Location History

API Address:/v2/quecdatastorage/enduserapi/getLocationHistory

Request Method:GET

Request Data Type:application/x-www-form-urlencoded

Response Data Type:*/*

API Description:Get device location history

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
dkDevice Keyquerytruestring
endTimestampEnd time (millisecond timestamp)querytrueinteger(int64)
pkProduct Keyquerytruestring
startTimestampStart time (millisecond timestamp)querytrueinteger(int64)
gatewayDkGateway device's Device Keyqueryfalsestring
gatewayPkGateway device's Product Keyqueryfalsestring
locateTypesLocation types (by default queries all types of locations): GP/GL/GA/GN/BD/PQ/LBS, when querying multiple types, separate with commasqueryfalsestring
timeStrQuery datequeryfalsestring

Response Status:

Status CodeDescriptionSchema
200Successfully got device location historyRegistration code response data OfListOf Device Track
401Unauthorized
403Forbidden
404Not Found
5032Token verification failed
5106Please enter token

Response Parameters:

Parameter NameParameter DescriptionTypeSchema
codeResponse status codeinteger(int32)integer(int32)
dataResponse dataarrayDevice Track
  accuracyAccuracystring
  bdLatDevice latitude. BD09number
  bdLngDevice longitude. BD09number
  deviceKeydkstring
  gcjLatDevice latitude. GCJ02number
  gcjLngDevice longitude. GCJ02number
  hdopHorizontal Dilution of Precision. 0.5-99.99number(float)
  idTrack IDstring
  locateTimestring(date-time)
  locateTimeTsinteger(int64)
  locationTypeLocation type, GP/GL/GA/GN/BD/PQ/LBSstring
  productKeypkstring
  satellitesCurrent number of satellitesinteger(int32)
  tsLocateTimeinteger(int64)
  wgsLatDevice latitude. WGS84number
  wgsLngDevice longitude. WGS84number
extMsgExtended messagestring
msgResponse messagestring

Response Example:

javascript
{
	"code": 0,
	"data": [
		{
			"accuracy": "",
			"bdLat": 0,
			"bdLng": 0,
			"deviceKey": "",
			"gcjLat": 0,
			"gcjLng": 0,
			"hdop": 0,
			"id": "",
			"locateTime": "",
			"locateTimeTs": 0,
			"locationType": "",
			"productKey": "",
			"satellites": 0,
			"tsLocateTime": 0,
			"wgsLat": 0,
			"wgsLng": 0
		}
	],
	"extMsg": "",
	"msg": ""
}