Get Locations API
The Get Location API provides a list of locations of the users who are using your app for a specified project corresponding to the project secret API key provided by you.
Get Locations API
GET
https://api.roam.ai/v1/api/location/
Query Parameters
Name | Type | Description |
---|---|---|
user_id | string | user_id for which the locations have to be returned. E.g.- 5d9450ace47bae6d70064a9b |
start_date | string | Date from when the location is to be fetched. E.g.- 2021-05-31T18:48:52 |
end_date | string | Date till when the location is to be returned. E.g.- 2021-05-31T18:48:58 |
timezone_offset | string | If the timezone is provided the response will be returned as the provided local timezone.
If the timezone is not provided, the response will be returned in UTC.
If points_encoded value is |
page_number | integer | This field is used for getting 10 entries at a time.
If the response returns an empty list in the data field, the pages are exhausted.
If points_encoded value is |
Headers
Name | Type | Description |
---|---|---|
Api-key | string | Auth-key E.g.- 33223kjhdcscijhb5sdbsdmjsdcbj5f |
{
"status": true,
"msg": "Success.",
"code": 200,
"data": {
"next_page": 2,
"pages": 208,
"prev_page": null,
"app_id": "61dfb41b06f8a05d35522133_2",
"user_id": "61fa120106f8a03320a88e71",
"locations": [{
"altitude": 892.3450775146484,
"tz_offset": "+0530",
"vertical_accuracy": 19.1458740234375,
"network_status": true,
"tracking_mode": "manual",
"battery_remaining": 15,
"activity": "STOP",
"app_context": "F",
"battery_status": "charging",
"speed": 0,
"location_permission": true,
"horizontal_accuracy": 17.071232461095033,
"course": -1,
"coordinates": {
"type": "Point",
"coordinates": [77.61589418628188, 12.900758328664052]
},
"created_at": "2022-08-10T13:51:16.066",
"recorded_at": "2022-08-10T13:51:12.877",
"id": "62f3b7d00000c4b052de369a"
}, {
"battery_status": "unplugged",
"network_status": true,
"battery_saver": false,
"tracking_mode": "passive",
"battery_remaining": 5,
"activity": "MOVING",
"course": -1,
"speed": 0,
"vertical_accuracy": 23.39385414123535,
"tz_offset": "+0530",
"horizontal_accuracy": 17.071232461095033,
"app_context": "B",
"location_permission": true,
"altitude": 892.3696823120117,
"coordinates": {
"type": "Point",
"coordinates": [77.61589418628188, 12.900758328664052]
},
"created_at": "2022-08-10T13:12:00.915",
"recorded_at": "2022-08-10T13:11:55.164",
"id": "62f3ae9b0000afe64ac6cac5"
}, {
"horizontal_accuracy": 1414,
"network_status": true,
"battery_saver": false,
"altitude": 0,
"battery_status": "unplugged",
"location_permission": true,
"speed": 0,
"course": -1,
"battery_remaining": 5,
"vertical_accuracy": -1,
"tracking_mode": "passive",
"app_context": "B",
"tz_offset": "+0530",
"activity": "STOP",
"coordinates": {
"type": "Point",
"coordinates": [77.61679076999997, 12.900112149999995]
},
"created_at": "2022-08-10T13:12:00.915",
"recorded_at": "2022-08-10T13:11:55.150",
"id": "62f3ae9b0000f98b18c6cac4"
}, {
"altitude": 893.5367736816406,
"battery_status": "unplugged",
"horizontal_accuracy": 17.071232461095033,
"network_status": true,
"location_permission": true,
"tracking_mode": "passive",
"vertical_accuracy": 20.849611282348633,
"battery_remaining": 45,
"speed": 0,
"app_context": "B",
"activity": "MOVING",
"tz_offset": "+0530",
"course": -1,
"coordinates": {
"type": "Point",
"coordinates": [77.61589418628188, 12.900758328664052]
},
"created_at": "2022-08-10T00:42:49.415",
"recorded_at": "2022-08-10T00:42:48.478",
"id": "62f2ff800000c14b1ba8f09f"
}, {
"vertical_accuracy": 8.873176330313447,
"network_status": true,
"horizontal_accuracy": 16.806443087050994,
"tracking_mode": "manual",
"altitude": 893.2683876520023,
"speed": 0,
"location_permission": true,
"battery_status": "unplugged",
"course": -1,
"activity": "STOP",
"battery_remaining": 51,
"app_context": "B",
"tz_offset": "+0530",
"coordinates": {
"type": "Point",
"coordinates": [77.61586109896076, 12.900552716084862]
},
"created_at": "2022-08-09T22:22:45.874",
"recorded_at": "2022-08-09T22:22:45.424",
"id": "62f2de350000137fdfa8f09e"
}, {
"battery_status": "unplugged",
"location_permission": true,
"app_context": "F",
"network_status": true,
"course": -1,
"tz_offset": "+0530",
"horizontal_accuracy": 17.071232461095033,
"vertical_accuracy": 20.690359115600586,
"activity": "MOVING",
"speed": 0,
"battery_remaining": 51,
"altitude": 893.362922668457,
"tracking_mode": "passive",
"coordinates": {
"type": "Point",
"coordinates": [77.61589418628188, 12.900758328664052]
},
"created_at": "2022-08-09T22:12:50.800",
"recorded_at": "2022-08-09T22:12:47.305",
"id": "62f2dbdf00004d8e9fa8f09d"
}, {
"battery_remaining": 51,
"altitude": 893.2115707397461,
"tz_offset": "+0530",
"battery_status": "unplugged",
"horizontal_accuracy": 17.071232461095033,
"activity": "MOVING",
"course": -1,
"network_status": true,
"battery_saver": false,
"tracking_mode": "passive",
"speed": 0,
"app_context": "F",
"location_permission": true,
"vertical_accuracy": 20.604103088378906,
"coordinates": {
"type": "Point",
"coordinates": [77.61589418628188, 12.900758328664052]
},
"created_at": "2022-08-09T22:12:45.797",
"recorded_at": "2022-08-09T22:12:43.647",
"id": "62f2dbdb0000c2501ca8f09c"
}, {
"battery_status": "unplugged",
"location_permission": true,
"app_context": "F",
"network_status": true,
"course": -1,
"tz_offset": "+0530",
"horizontal_accuracy": 17.071232461095033,
"vertical_accuracy": 20.604103088378906,
"activity": "MOVING",
"speed": 0,
"battery_remaining": 51,
"battery_saver": false,
"altitude": 893.2115707397461,
"tracking_mode": "passive",
"coordinates": {
"type": "Point",
"coordinates": [77.61589418628188, 12.900758328664052]
},
"created_at": "2022-08-09T22:12:45.796",
"recorded_at": "2022-08-09T22:12:41.600",
"id": "62f2dbd9000030ef66a8f09b"
}, {
"battery_saver": false,
"battery_status": "unplugged",
"horizontal_accuracy": 40,
"activity": "STOP",
"speed": 0,
"app_context": "F",
"tracking_mode": "passive",
"course": -1,
"location_permission": true,
"network_status": true,
"battery_remaining": 51,
"vertical_accuracy": -1,
"tz_offset": "+0530",
"altitude": 0,
"coordinates": {
"type": "Point",
"coordinates": [77.6159101969165, 12.900724173934503]
},
"created_at": "2022-08-09T22:12:45.796",
"recorded_at": "2022-08-09T22:12:41.586",
"id": "62f2dbd90000c6975aa8f09a"
}, {
"network_status": true,
"horizontal_accuracy": 17.071232461095033,
"battery_remaining": 51,
"vertical_accuracy": 8.44229507446289,
"battery_status": "unplugged",
"activity": "STOP",
"course": -1,
"tz_offset": "+0530",
"altitude": 892.7507934570312,
"app_context": "B",
"location_permission": true,
"speed": 0,
"tracking_mode": "manual",
"coordinates": {
"type": "Point",
"coordinates": [77.61589418628188, 12.900758328664052]
},
"created_at": "2022-08-09T22:11:25.785",
"recorded_at": "2022-08-09T22:11:21.548",
"id": "62f2db89000079b041a8f099"
}]
}
}
Sample Request
curl --location --request GET 'https://api.roam.ai/v1/api/location/?start_date=2022-08-09T00:00:00&end_date=2022-08-15T10:00:00&user_id=61fa120106f8a03320a88e71' \
--header 'Api-key: e190697f74b64ac8ad0273a13c06e94f'
Last updated