You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/backend-api/resources/tracking/asset/index.md
+172-123
Original file line number
Diff line number
Diff line change
@@ -52,25 +52,24 @@ settings will provide us with necessary info by default.
52
52
53
53
```json
54
54
{
55
-
"success": true,
56
-
"list": [
57
-
{
58
-
"tracker_id": 2793258,
59
-
"limit_exceeded": false,
60
-
"interval": {
61
-
"from": "2023-11-01 03:00:00",
62
-
"to": "2023-11-30 03:00:00"
63
-
},
64
-
"tracks": [track_info]
65
-
}
66
-
]
55
+
"success": true,
56
+
"list": [
57
+
{
58
+
"tracker_id": 2793258,
59
+
"limit_exceeded": false,
60
+
"interval": {
61
+
"from": "2023-11-01 03:00:00",
62
+
"to": "2023-11-30 03:00:00"
63
+
},
64
+
"tracks": [track_info]
65
+
}
66
+
]
67
67
}
68
68
```
69
69
70
70
*`tracker_id` - int. Tracker identifier.
71
71
*`limit_exceeded` - boolean. It will be `true` if the requested time period surpasses the limit set in the tracker's tariff.
72
-
For instance, if the device's plan has a maximum storage period of three months (the default value), and we request trips
73
-
for six months.
72
+
For instance, if the device's plan has a maximum storage period of three months (the default value), and we request trips for six months.
74
73
*`from` - [date/time](../../../getting-started.md#data-types). This is timestamp of the start of the interval when the asset was attached to the tracker.
75
74
*`to` - [date/time](../../../getting-started.md#data-types). This is timestamp of the end of the interval when the asset was attached to the tracker.
76
75
*`tracks` - an array of JSON objects containing track information.
@@ -81,123 +80,166 @@ where `track_info` is either `regular`, `single_report`, `merged` or `cluster`:
81
80
82
81
```json
83
82
{
84
-
"id": 123456,
85
-
"start_date": "2023-11-23 03:39:44",
86
-
"start_address": "1255 6th Ave, New York, NY 10020, USA",
87
-
"max_speed": 62,
88
-
"end_date": "2023-11-23 06:39:44",
89
-
"end_address": "888 5th Ave, New York, NY 10021, USA",
90
-
"length": 5.5,
91
-
"points": 327,
92
-
"avg_speed": 49,
93
-
"event_count": 3,
94
-
"norm_fuel_consumed": 1.07,
95
-
"type": "regular",
96
-
"gsm_lbs": false
83
+
"id": 123456,
84
+
"start_date": "2023-11-23 03:39:44",
85
+
"start_address": "1255 6th Ave, New York, NY 10020, USA",
86
+
"max_speed": 62,
87
+
"end_date": "2023-11-23 06:39:44",
88
+
"end_address": "888 5th Ave, New York, NY 10021, USA",
89
+
"length": 5.5,
90
+
"points": 327,
91
+
"avg_speed": 49,
92
+
"event_count": 3,
93
+
"norm_fuel_consumed": 1.07,
94
+
"type": "regular",
95
+
"gsm_lbs": false,
96
+
"points_list": [point_info],
97
+
"bounds": {
98
+
"nw": {
99
+
"lat": 57.151005,
100
+
"lng": 59.92729333
101
+
},
102
+
"se": {
103
+
"lat": 56.47945333,
104
+
"lng": 61.19021833
105
+
}
106
+
}
97
107
}
98
108
```
99
109
100
110
*`id` - int. Track id.
101
-
*`start_date` - [date/time](../../../getting-started.md#data-types). Track start date, in user's timezone e.g. "2011-06-18 03:39:44".
111
+
*`start_date` - [date/time](../../../getting-started.md#data-types). Track start date, in user's timezone.
102
112
*`start_address` - string. Track start address.
103
-
*`max_speed` - int. Maximum speed registered during track in km/h, e.g. 96.
104
-
*`end_date` - [date/time](../../../getting-started.md#data-types). Track end date, in user's timezone e.g. "2011-06-18 05:18:36".
113
+
*`max_speed` - int. Maximum speed registered during track in km/h.
114
+
*`end_date` - [date/time](../../../getting-started.md#data-types). Track end date, in user's timezone.
105
115
*`end_address` - string. Track end address.
106
-
*`length` - float. Track length in kilometers, e.g. 85.5.
107
-
*`points` - int. Total number of points in a track, e.g. 724.
108
-
*`avg_speed` - int. Average speed in km/h, e.g. 70.
109
-
*`event_count` - int. It represents the number of events recorded during this track. This field will not be present if "count_events" is set to `false`.
110
-
*`norm_fuel_consumed` - float. It is representing the amount of fuel consumed during the track, measured
111
-
in litres. This field will not be present if there's no [vehicle_object](../../fleet/vehicle/index.md#vehicle) linked to the
112
-
tracker or if "normAvgFuelConsumption" is not defined for the linked vehicle object.
113
-
*`type` - [enum](../../../getting-started.md#data-types) with possible values: `regular`, `single_report`, `merged`, `cluster`.
114
-
It's used to differentiate this regular track type from other types.
116
+
*`length` - float. Track length in kilometers.
117
+
*`points` - int. Total number of points in a track.
118
+
*`avg_speed` - int. Average speed in km/h.
119
+
*`event_count` - int. Number of events recorded during this track. This field will not be present if "count_events" is set to `false`.
120
+
*`norm_fuel_consumed` - float. Amount of fuel consumed during the track, measured in litres.
121
+
This field will not be present if there's no [vehicle_object](../../fleet/vehicle/index.md#vehicle) linked to the tracker or
122
+
if "normAvgFuelConsumption" is not defined for the linked vehicle object.
*`gsm_lbs` - optional boolean. GSM LBS point flag.
125
+
*`points_list` - array of JSON objects. A list of [point info](#point-info).
126
+
*`bounds` - object. North-west and south-east coordinates of the bounding box that contains all points.
116
127
117
128
`single_report` object is returned when the device operates in "interval" mode or only one point per track is provided
118
129
(for example, an M7 tracker operating in interval mode):
119
130
120
131
```json
121
132
{
122
-
"id": 123456,
123
-
"start_date": "2023-11-24 03:39:44",
124
-
"start_address": "1255 6th Ave, New York, NY 10020, USA",
125
-
"avg_speed": 34,
126
-
"gsm_lbs": false,
127
-
"type": "single_report",
128
-
"precision": 10
133
+
"id": 123456,
134
+
"start_date": "2023-11-24 03:39:44",
135
+
"start_address": "1255 6th Ave, New York, NY 10020, USA",
136
+
"avg_speed": 34,
137
+
"gsm_lbs": false,
138
+
"type": "single_report",
139
+
"precision": 10,
140
+
"points_list": [point_info]
129
141
}
130
142
```
131
143
132
144
*`id` - int. Track id.
133
-
*`start_date` - [date/time](../../../getting-started.md#data-types). It represents the date and time when the tracker registered the point, adjusted to
134
-
the user's timezone, for example, "2011-06-18 03:39:44".
145
+
*`start_date` - [date/time](../../../getting-started.md#data-types). Date when the tracker registered the point, in user's timezone.
135
146
*`start_address` - string. Point address.
136
-
*`avg_speed` - int. Average speed in km/h, e.g. 70.
147
+
*`avg_speed` - int. Average speed in km/h.
137
148
*`gsm_lbs` - optional boolean. GSM LBS point flag.
*`precision` - optional int. Precision of the location in meters. Its presence relies on the device model.
151
+
*`points_list` - array of JSON objects. A list of [point info](#point-info).
141
152
142
153
`merged` object. Only returned if "split" is set to `false`:
143
154
144
155
```json
145
156
{
146
-
"start_date": "2023-11-24 03:39:44",
147
-
"start_address": "1255 6th Ave, New York, NY 10020, USA",
148
-
"max_speed": 62,
149
-
"end_date": "2023-11-24 06:39:44",
150
-
"end_address": "888 5th Ave, New York, NY 10021, USA",
151
-
"length": 5.5,
152
-
"points": 327,
153
-
"avg_speed": 49,
154
-
"event_count": 3,
155
-
"norm_fuel_consumed": 1.07,
156
-
"type": "merged",
157
-
"gsm_lbs": false
157
+
"start_date": "2023-11-24 03:39:44",
158
+
"start_address": "1255 6th Ave, New York, NY 10020, USA",
159
+
"max_speed": 62,
160
+
"end_date": "2023-11-24 06:39:44",
161
+
"end_address": "888 5th Ave, New York, NY 10021, USA",
162
+
"length": 5.5,
163
+
"points": 327,
164
+
"avg_speed": 49,
165
+
"event_count": 3,
166
+
"norm_fuel_consumed": 1.07,
167
+
"type": "merged",
168
+
"gsm_lbs": false,
169
+
"points_list": [point_info],
170
+
"bounds": {
171
+
"nw": {
172
+
"lat": 57.151005,
173
+
"lng": 59.92729333
174
+
},
175
+
"se": {
176
+
"lat": 56.47945333,
177
+
"lng": 61.19021833
178
+
}
179
+
}
158
180
}
159
181
```
160
182
161
-
*`start_date` - [date/time](../../../getting-started.md#data-types). Track start date, in user's timezone e.g. "2011-06-18 03:39:44". It signifies the
162
-
initial point identified as a track for a specified time period.
183
+
*`start_date` - [date/time](../../../getting-started.md#data-types). Track start date, in user's timezone.
184
+
It signifies the initial point identified as a track for a specified time period.
163
185
*`start_address` - string. Track start address.
164
-
*`max_speed` - int. Maximum speed registered during period in km/h, e.g. 96.
165
-
*`end_date` - [date/time](../../../getting-started.md#data-types). Track end date, in user's timezone e.g. "2011-06-18 05:18:36". It signifies the
166
-
last point identified as a track for a specified time period.
186
+
*`max_speed` - int. Maximum speed registered during period in km/h.
187
+
*`end_date` - [date/time](../../../getting-started.md#data-types). Track end date, in user's timezone.
188
+
It signifies the last point identified as a track for a specified time period.
167
189
*`end_address` - string. Track end address.
168
-
*`length` - float. Track length during period in kilometers, e.g. 85.5.
169
-
*`points` - int. Total number of points in a track, e.g. 724.
170
-
*`avg_speed` - int. Average speed in km/h, e.g. 70.
171
-
*`event_count` - int. It represents the number of events recorded during this track. This field will not be present if "count_events" is set to `false`.
172
-
*`norm_fuel_consumed` - float. It is representing the amount of fuel consumed during the track, measured
173
-
in litres. This field will not be present if there's no [vehicle_object](../../fleet/vehicle/index.md#vehicle) linked to the
174
-
tracker or if "normAvgFuelConsumption" is not defined for the linked vehicle object.
*`gsm_lbs` - optional boolean. GSM LBS flag. `true` if a cluster contains only GSM LBS points.
242
+
*`bounds` - object. North-west and south-east coordinates of the bounding box that contains all points.
201
243
202
244
#### errors
203
245
@@ -242,47 +284,54 @@ are `true`, we should list them in our request.
242
284
243
285
```json
244
286
{
245
-
"success": true,
246
-
"list": [
247
-
{
248
-
"tracker_id": 2793258,
249
-
"limit_exceeded": false,
250
-
"interval": {
251
-
"from": "2023-11-01 03:00:00",
252
-
"to": "2023-11-01 23:00:00"
253
-
},
254
-
"track_points": [
255
-
{
256
-
"lat": 43.0375133,
257
-
"lng": -79.226505,
258
-
"alt": 0,
259
-
"satellites": 10,
260
-
"mileage": 43.93,
261
-
"get_time": "2023-11-01 04:38:39",
262
-
"address": "Kottmeier Road, Thorold, Golden Horseshoe, Ontario, Canada, L3B 5N6",
263
-
"heading": 280,
264
-
"speed": 53,
265
-
"precision": 100,
266
-
"gsm_lbs": false,
267
-
"parking": false,
268
-
"buffered": true
269
-
}
270
-
]
271
-
}
272
-
]
287
+
"success": true,
288
+
"list": [
289
+
{
290
+
"tracker_id": 2793258,
291
+
"limit_exceeded": false,
292
+
"interval": {
293
+
"from": "2023-11-01 03:00:00",
294
+
"to": "2023-11-01 23:00:00"
295
+
},
296
+
"track_points": [point_info]
297
+
}
298
+
]
273
299
}
274
300
```
275
301
276
302
*`tracker_id` - int. Tracker identifier.
277
303
*`limit_exceeded` - boolean. It will be `true` if the requested time period surpasses the limit set in the tracker's tariff.
278
-
For instance, if the device's plan has a maximum storage period of three months (the default value), and we request trips
279
-
for six months.
304
+
For instance, if the device's plan has a maximum storage period of three months (the default value), and we request trips
305
+
for six months.
280
306
*`from` - [date/time](../../../getting-started.md#data-types). This is timestamp of the start of the interval when the asset was attached to the tracker.
281
307
*`to` - [date/time](../../../getting-started.md#data-types). This is timestamp of the end of the interval when the asset was attached to the tracker.
308
+
*`track_points` - array of JSON objects. A list of [point info](#point-info).
309
+
310
+
#### point info
311
+
312
+
```json
313
+
{
314
+
"lat": 43.0375133,
315
+
"lng": -79.226505,
316
+
"alt": 0,
317
+
"satellites": 10,
318
+
"mileage": 43.93,
319
+
"get_time": "2023-11-01 04:38:39",
320
+
"address": "Kottmeier Road, Thorold, Golden Horseshoe, Ontario, Canada, L3B 5N6",
321
+
"heading": 280,
322
+
"speed": 53,
323
+
"precision": 100,
324
+
"gsm_lbs": false,
325
+
"parking": false,
326
+
"buffered": true
327
+
}
328
+
```
329
+
282
330
*`lat` - float. Represents latitude.
283
331
*`lng` - float. Represents longitude.
284
332
*`alt` - int. Indicates the altitude in meters.
285
333
*`satellites` - int. Shows the number of GPS satellites used to determine this point.
334
+
*`mileage` - float. Represents mileage.
286
335
*`get_time` - [date/time](../../../getting-started.md#data-types). This is the GPS timestamp of the point, adjusted to the user's timezone.
287
336
*`address` - string. Represents the location's address. Will be "" if no address recorded. If no address has been recorded, it will appear as "". An address is recorded when it marks the beginning or end of a trip, or when an event occurs.
288
337
*`heading` - int. A value that represents the direction in degrees, with a range of 0 to 360. 0 corresponds to North.
@@ -296,4 +345,4 @@ are `true`, we should list them in our request.
296
345
297
346
* 201 - Not found in database – The asset with ID from your request does not exist.
298
347
* 211 - Requested time span is too big – If the interval between the "from" and "to" dates is too large, it may exceed
299
-
the maximum value defined in the API configuration.
348
+
the maximum value defined in the API configuration.
0 commit comments