Geofence

APIs for geofence management

List Geofences in Enterprise

API to view all the geofences in an enterprise

Request
Security:
path Parameters
enterprise_id
required
string <uuid>

A UUID string identifying the enterprise.

query Parameters
search
string

A search term.

limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

Responses
200

successful operation

get/v0/enterprise/{enterprise_id}/geofence/
Response samples
application/json
{
  • "count": 0,
  • "next": "string",
  • "previous": "string",
  • "results": [
    ]
}

Create a geofence

Returns Geofence instance

Request
Security:
path Parameters
enterprise_id
required
string <uuid>

A UUID string identifying the enterprise.

Request Body schema: */*
name
required
string (Geofence name)

Name of the geofence

description
string (Geofence description)

A description about the geofence

latitude
required
string <decimal> (Geofence latitude)

Latitude corresponding to the geofence

longitude
required
string <decimal> (Geofence longitude)

Longitude corresponding to the geofence

radius
integer (Geofence radius)

The radius within which the geofence should be applied

radius_unit
string (Unit of radius)

The unit in which the radius is taken, eg - kilometers, meters etc

Enum: "KILOMETERS" "METERS" "MILES"
device_actions
Array of strings (Device Actions)

The actions to be performed on the device

Items Enum: "LOCK_DOWN" "BEEP"
Responses
201

successful operation

post/v0/enterprise/{enterprise_id}/geofence/
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "enterprise": "796caaf9-a7de-4817-9ffa-39d04bf83de9",
  • "latitude": "string",
  • "longitude": "string",
  • "radius": 0,
  • "radius_unit": "KILOMETERS",
  • "device_actions": [
    ],
  • "device_count": 0,
  • "created_by": "string",
  • "created_on": "2019-08-24T14:15:22Z",
  • "updated_on": "2019-08-24T14:15:22Z"
}

Get geofence information

Returns geofence instance

Request
Security:
path Parameters
geofence_id
required
string <uuid>

A UUID string identifying the geofence.

enterprise_id
required
string <uuid>

A UUID string identifying the enterprise.

Responses
200

successful operation

get/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "enterprise": "796caaf9-a7de-4817-9ffa-39d04bf83de9",
  • "latitude": "string",
  • "longitude": "string",
  • "radius": 0,
  • "radius_unit": "KILOMETERS",
  • "device_actions": [
    ],
  • "device_count": 0,
  • "created_by": "string",
  • "created_on": "2019-08-24T14:15:22Z",
  • "updated_on": "2019-08-24T14:15:22Z"
}

Update geofence information

Returns geofence instance

Request
Security:
path Parameters
geofence_id
required
string <uuid>

A UUID string identifying the geofence.

enterprise_id
required
string <uuid>

A UUID string identifying the enterprise.

Request Body schema: */*
name
required
string (Geofence name)

Name of the geofence

description
string (Geofence description)

A description about the geofence

latitude
required
string <decimal> (Geofence latitude)

Latitude corresponding to the geofence

longitude
required
string <decimal> (Geofence longitude)

Longitude corresponding to the geofence

radius
integer (Geofence radius)

The radius within which the geofence should be applied

radius_unit
string (Unit of radius)

The unit in which the radius is taken, eg - kilometers, meters etc

Enum: "KILOMETERS" "METERS" "MILES"
device_actions
Array of strings (Device Actions)

The actions to be performed on the device

Items Enum: "LOCK_DOWN" "BEEP"
Responses
200

successful operation

put/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "enterprise": "796caaf9-a7de-4817-9ffa-39d04bf83de9",
  • "latitude": "string",
  • "longitude": "string",
  • "radius": 0,
  • "radius_unit": "KILOMETERS",
  • "device_actions": [
    ],
  • "device_count": 0,
  • "created_by": "string",
  • "created_on": "2019-08-24T14:15:22Z",
  • "updated_on": "2019-08-24T14:15:22Z"
}

Delete a geofence

Empty response

Request
Security:
path Parameters
geofence_id
required
string <uuid>

A UUID string identifying the geofence.

enterprise_id
required
string <uuid>

A UUID string identifying the enterprise.

Responses
204

successful operation

delete/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/

Partially updates geofence information

Returns geofence instance

Request
Security:
path Parameters
geofence_id
required
string <uuid>

A UUID string identifying the geofence.

enterprise_id
required
string <uuid>

A UUID string identifying the enterprise.

Request Body schema: */*
name
string (Geofence name)

Name of the geofence

description
string (Geofence description)

A description about the geofence

latitude
string <decimal> (Geofence latitude)

Latitude corresponding to the geofence

longitude
string <decimal> (Geofence longitude)

Longitude corresponding to the geofence

radius
integer (Geofence radius)

The radius within which the geofence should be applied

radius_unit
string (Unit of radius)

The unit in which the radius is taken, eg - kilometers, meters etc

Enum: "KILOMETERS" "METERS" "MILES"
device_actions
Array of strings (Device Actions)

The actions to be performed on the device

Items Enum: "LOCK_DOWN" "BEEP"
Responses
200

successful operation

patch/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "enterprise": "796caaf9-a7de-4817-9ffa-39d04bf83de9",
  • "latitude": "string",
  • "longitude": "string",
  • "radius": 0,
  • "radius_unit": "KILOMETERS",
  • "device_actions": [
    ],
  • "device_count": 0,
  • "created_by": "string",
  • "created_on": "2019-08-24T14:15:22Z",
  • "updated_on": "2019-08-24T14:15:22Z"
}