GET Geofence API

This API gives you the filtered list of geofences.

get
GET Geofence API

https://api.roam.ai/v1/api/geofence/
Request
Response
Request
Headers
Api-key
required
string
Auth-key E.g.- 33223kjhdcscijhb5sdbsdmjsdcbj5f
Query Parameters
user_id
optional
string
Filter the geofence which is enabled for this user_id E.g.- 6073325bcf3e4eba5a1123a
group_id
optional
string
Filter the geofences which is enabled for this group_id E.g.- 6073325bc3fe343ab6c1324b
page_number
optional
integer
This field can be used for getting 10 entries at a time. If the response returns an empty list in the data field, it is safe to assume the pages are exhausted. E.g.-1
start_date
required
string
Date from when the geofences created to be fetched. E.g.- 2020-09-28
end_date
required
string
Date till when the data need to be returned. E.g.- 2020-09-29
geofence_id
optional
string
Get the details of one geofence. E.g.- 5f73326ce5fc231ba4b253eb
Response
200: OK
{
"status": true,
"msg": "Success.",
"code": 200,
"data": {
"next_page": null,
"pages": 1,
"prev_page": null,
"geofences": [
{
"geofence_id": "60ee8ea4ffb3fb728c120d8b",
"geometry_type": "circle",
"geometry_radius": 177,
"geometry_center": {
"type": "Point",
"coordinates": [
-72.28122,
42.926042
]
},
"is_enabled": [
true,
"2021-06-10T18:45:00.000",
"2021-06-10T19:29:00.000"
],
"user_ids": [
"6bda16edea01848b3b419163"
],
"is_deleted": false,
"created_at": "2021-07-14T07:13:40.765",
"updated_at": "2021-07-14T07:13:40.765"
},
{
"geofence_id": "60ee8e6effb3fb728c120d8a",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-0.08789347686767579,
51.50619618452938
],
[
-0.0905934768676758,
51.50619618452938
],
[
-0.0905934768676758,
51.503796184529385
],
[
-0.08789347686767579,
51.50619618452938
]
]
]
},
"geometry_type": "polygon",
"geometry_center": {
"type": "Point",
"coordinates": [
-0.08969347686882724,
51.505396185373506
]
},
"is_enabled": [
true,
"2021-06-10T18:45:00.000",
"2021-06-10T19:29:00.000"
],
"is_deleted": false,
"created_at": "2021-07-14T07:12:46.811",
"updated_at": "2021-07-14T07:12:46.811"
}
]
}
}

Sample Request

curl --location --request GET 'https://api.roam.ai/v1/api/geofence/?start_date=2020-09-28&end_date=2020-09-29' \
--header 'Api-Key: e566c098cc6b441a9c3453b6fcf76e88'