POST api/Location/Tracking

Get real time tracking data for a device

Request Information

Body Parameters

{ "DeviceId": 1, "TimeZone": "UTC","MapType": "Google","Token": "this token is come from login11"}

TrackingModel
NameDescriptionTypeAdditional information
DeviceId

id

integer

None.

MapType

地图类型

string

None.

TimeOffset

手机时区差

decimal number

None.

Token

登录后获取到的 Token

string

None.

Language

语言选项

string

None.

AppId

APP应用标识

string

None.

Request Formats

application/json, text/json

Sample:
{
  "DeviceId": 1,
  "MapType": "sample string 2",
  "TimeOffset": 3.1,
  "Token": "sample string 4",
  "Language": "sample string 5",
  "AppId": "sample string 6"
}

application/xml, text/xml

Sample:
<TrackingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 6</AppId>
  <Language>sample string 5</Language>
  <Token>sample string 4</Token>
  <DeviceId>1</DeviceId>
  <MapType>sample string 2</MapType>
  <TimeOffset>3.1</TimeOffset>
</TrackingModel>

Response Information

Resource Description

State 状态码
0. 成功
1100. 设备不存在
1300. 设备未定位

TrackingResult
NameDescriptionTypeAdditional information
Item

TrackingInfo

None.

State

状态码

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Item": {
    "DeviceId": 1,
    "DeviceName": "sample string 2",
    "Latitude": 3.0,
    "Longitude": 4.0,
    "OLat": 5.0,
    "OLng": 6.0,
    "ShowSpeed": 7,
    "Speed": 8.0,
    "Course": 9.0,
    "IsStop": 10,
    "Acc": 11,
    "Status": 12,
    "DeviceUtcDate": "sample string 13",
    "LastCommunication": "sample string 14",
    "ShowDataType": 15,
    "DataType": 16,
    "ShowBattery": 17,
    "Signal": 18,
    "Battery": 19,
    "Icon": "sample string 20",
    "Distance": 21.0,
    "StopTimeStr": "sample string 22",
    "NickName": "sample string 23"
  },
  "State": 1
}

application/xml, text/xml

Sample:
<TrackingResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>1</State>
  <Item xmlns:d2p1="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ViewModel">
    <d2p1:Acc>11</d2p1:Acc>
    <d2p1:Battery>19</d2p1:Battery>
    <d2p1:Course>9</d2p1:Course>
    <d2p1:DataType>16</d2p1:DataType>
    <d2p1:DeviceId>1</d2p1:DeviceId>
    <d2p1:DeviceName>sample string 2</d2p1:DeviceName>
    <d2p1:DeviceUtcDate>sample string 13</d2p1:DeviceUtcDate>
    <d2p1:Distance>21</d2p1:Distance>
    <d2p1:Icon>sample string 20</d2p1:Icon>
    <d2p1:IsStop>10</d2p1:IsStop>
    <d2p1:LastCommunication>sample string 14</d2p1:LastCommunication>
    <d2p1:Latitude>3</d2p1:Latitude>
    <d2p1:Longitude>4</d2p1:Longitude>
    <d2p1:NickName>sample string 23</d2p1:NickName>
    <d2p1:OLat>5</d2p1:OLat>
    <d2p1:OLng>6</d2p1:OLng>
    <d2p1:ShowBattery>17</d2p1:ShowBattery>
    <d2p1:ShowDataType>15</d2p1:ShowDataType>
    <d2p1:ShowSpeed>7</d2p1:ShowSpeed>
    <d2p1:Signal>18</d2p1:Signal>
    <d2p1:Speed>8</d2p1:Speed>
    <d2p1:Status>12</d2p1:Status>
    <d2p1:StopTimeStr>sample string 22</d2p1:StopTimeStr>
  </Item>
</TrackingResult>