Update a Geofence

The update geofence API allows you to edit the details of an existing geofence. Only one geofence can be updated by a single API call. You are allowed to update geofences for those you have access to modify.

Log in to see full request history

📘

Sample Request

https://services.azuga.com/azuga-ws-oauth/v3/geomarks/c7901e27-0914-11ed-9e0e-33ad67f9cc1d.json

{ "name": "test-geofence123", "latitude": 39.3642834, "longitude": -74.4229266, "address": "Atlantic City, NJ, USA", "color": "#15eb15", "landmarkCategory": { "name": "AAA customer", "categoryId": "ad06e894-5c88-11ea-9163-8bcd2b9b59cc" }, "iconName": "Default", "groupIds": [ "20fe8441-e730-11ec-898a-05437a90b851" ], "alertType": "IN", "notEntered": 0, "notExited": 0, "fenceType": "Circular", "geoMarkType": 1, "radiusUnit": "meters", "geofenceRadius": 90, "activationDate": "", "inActivationDate": "", "workHours": "trackAllTime", "webNotificationEnabled": false, "mobileNotificationEnabled": false, "soundNotification": false, "alertNotification": false, "userIds": [], "ccAddress": "", "mode": 1, "roleIds": null, "customAlertHours": 1, "emailAdminGeo": false, "emailDriverGeo": false, "email": ["test1@azuga.com","test2@azuga.com"] }

API Response explanation

FieldDescriptionData Type
generatedAtInMillisAPI generation timestamp in UTC millisecondsLong
dataAPI Message (Success/Failure)String
errorError description - if anyList
Path Params
string
required

Unique identifier representing the geofence

Body Params
string

Name of the geofence

double

Latitude coordinate of the geofence (One of the following parameters is mandatory - latitude and longitude coordinates or address)

double

Longitude coordinate of the geofence (One of the following parameters is mandatory - latitude and longitude coordinates or address)

string

Address of the geofence location (One of the following parameters is mandatory - latitude and longitude coordinates or address)

string

Hex color of the geofence(Eg. #eb1515 for red)

string

Name of the icon

groupIds
array of strings

Comma separated unique identifiers of the groups to be associated with geofence

groupIds
string

Comma separated strings representing the alertType. Specifies the event (vehicle entry and/or exit) for which an alert needs to be sent. BOTH = To track when the vehicle enters or exits the geofence IN= To track when the vehicle enters the geofence NOTOUT = To track when the vehicle is inside the geofence longer than a particular period OUT = To track when the vehicle exits the geofence is selected NOTIN = To track when the vehicle is outside the geofence longer than a particular period NULL = To track when the vehicle makes a stop at the geofence

int32

Provide a value in seconds if the alert needs to be triggered when vehicle is not entered the geofence

int32

Provide an integer value in seconds if the alert needs to be triggered when vehicle is not exited the geofence

string

Specify the type of fence - Circular/Polygon

string

Set this value based on the requirement. 0 = Both Geofence & Landmark, 1= Geofence, 2 = Landmark

geometry
array of doubles

Coordinates(minimum three) for creating a polygon Example: "geometry": "[[[-122.408977,37.774215],[-122.408457,37.772781],[-122.410195,37.772803],[-122.410935,37.773965]]]"

geometry
int32

Unit of the Geofence radius Meters/Kilometers. "meters" = Meters, "km" = Kilometers

string

Radius of the geofence(unit as per the radiusUnit).

date-time

Start time in UTC "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" to compute the historical data

date-time

End time in UTC "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" to compute the historical data

geofenceTimeConfig
array

Add this field when to track based on custom hours. This parameter should detail about the time configuration for the geofence to track. Add detail for each day in each blocks(inside array). "day" : Integer value represents the day (1: Sunday, 2: Monday ...), "startTime": Start time to track in minutes, "endTime": End time to track in minutes. Eg: { "day": 2, "startTime": 720, "endTime": 1319 }, { "day": 3, "startTime": 0, "endTime": 1439 }

geofenceTimeConfig
boolean

Boolean value representing web notification needs to be enabled. True = Enabled False = Disabled

boolean

The boolean value represents whether the mobile notification needs to be enabled. True = Enabled False = Disabled

boolean

Boolean value represents the whether the sound notification needs to be enabled. True = Enabled False = Disabled

boolean

Boolean value representing whether the notification needs to be turned on. For web/mobile/sound notification to work, this parameter should be enabled. True = Notification is ON False - Notification is OFF

userIds
array of strings

Array of strings represents the unique identifiers of the user that needs to be associated with the geofence and the email to be triggered.

userIds
string

List of email address as comma separated strings that needs to be added as CC in email

string

This denotes the frequency of alert to be triggered 0 = Instant alert/notification. This enables the Email notification as well. 1 = Default, no selection 60 = A summary of alert/notification. This enables the Email notification as well.

roleIds
array

This denotes the notification to be triggered only to specific group admin with the specified role. Eg: "roles": [ { "roleId": "6e50e52b-2312-11ea-8356-313859509722", "roleName": "xvxxxcbxbv" } ],

roleIds
int32

Time in hours to send the summary alert. Add value to this parameter only when the mode is set to 60.

boolean

The boolean value represents whether the email needs to be sent to the admin. True = send to admin False = donot send to admin

boolean

Boolean value represents whether the paired driver to be notified True = Notify paired driver False = Don't notify paired driver

string

Type of web notification POPUP = Popup with any user acknowledgement POPUP_EVERYUSER = Popup with every user acknowledgment BANNER = Banner Notification

string

Time in minutes to start the summary alert

email
array of strings

Email address of the users to be configured to receive the email. This field accepts the email address of the users which are already configured on the account. Please add the other email address in ccAddress field.

email
Responses

Language
Credentials
Click Try It! to start a request and see the response here! Or choose an example:
application/json