Geofence

APIs for geofence management

List Geofences in Enterprise

API to view all the geofences in an enterprise

SecurityapiKey
Request
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

401

Authorization information is missing or invalid.

404

Not Found.

500

Internal server error

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

Get geofence information

Returns geofence instance

SecurityapiKey
Request
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

401

Authorization information is missing or invalid.

404

Not Found.

500

Internal server error

get/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/
Request samples
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

SecurityapiKey
Request
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: */*
required
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

400

Bad Request

401

Authorization information is missing or invalid

404

Not Found

500

Internal server error

put/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/
Request samples
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

SecurityapiKey
Request
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

The resource was deleted successfully.

400

Bad Request

401

Authorization information is missing or invalid.

404

Not Found.

500

Internal server error

delete/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/
Request samples
Response samples
application/json
{
  • "errors": [
    ],
  • "message": "string",
  • "status": 0
}

Partially updates geofence information

Returns geofence instance

SecurityapiKey
Request
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: */*
required
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

400

Bad Request.

401

Authorization information is missing or invalid.

404

Not Found.

500

Internal server error

patch/v0/enterprise/{enterprise_id}/geofence/{geofence_id}/
Request samples
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"
}

Create a geofence

Returns Geofence instance

SecurityapiKey
Request
path Parameters
enterprise_id
required
string <uuid>

A UUID string identifying the enterprise.

Request Body schema: */*
required
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"
devices
Array of strings (List of device ids)

List of ids of devices on which the geofence is to be applied

Responses
201

successful operation

400

Bad Request

401

Authorization information is missing or invalid.

500

Internal server error

post/v0/enterprise/{enterprise_id}/create-apply-geo-fence/
Request samples
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"
}

List Geofences in Enterprise

API to view all the geofences in an enterprise

SecurityapiKey
Request
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

401

Authorization information is missing or invalid.

404

Not Found.

500

Internal server error

get/v0/enterprise/{enterprise_id}/create-apply-geo-fence/
Request samples
Response samples
application/json
{
  • "count": 0,
  • "next": "string",
  • "previous": "string",
  • "results": [
    ]
}

Get geofence information

Returns geofence instance

SecurityapiKey
Request
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

401

Authorization information is missing or invalid.

404

Not Found.

500

Internal server error

get/v0/enterprise/{enterprise_id}/create-apply-geofence/{geofence_id}/
Request samples
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

SecurityapiKey
Request
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

The resource was deleted successfully.

400

Bad Request

401

Authorization information is missing or invalid.

404

Not Found.

500

Internal server error

delete/v0/enterprise/{enterprise_id}/create-apply-geofence/{geofence_id}/
Request samples
Response samples
application/json
{
  • "errors": [
    ],
  • "message": "string",
  • "status": 0
}