Bulk Upload Geofences

Use this API to create/update/delete geofences in bulk. Geofence is a virtual boundary around a geographical area. A geofence can have radius configured up to 10 Miles. Azuga will notify you when your vehicle enters or exits a geofence. This helps you to determine how long your vehicle was in a particular area.

📘

Sample Request

https://services.azuga.com/azuga-ws-oauth/v3/geomarks/bulkUpload.json

{
    "create": [
        {
        "name": "TestGeo1",
        "latitude": 36.171563,
        "longitude": -115.1391009,
        "address": "Las Vegas, NV, USA",
        "color": "#15EB15",
        "landmarkCategory": {
            "name": "AAA customer",
            "categoryId": "ad06e894-5c88-11ea-9163-8bcd2b9b59cc"
        },
        "iconName": "Default",
        "groupIds": [
            "20fe8441-e730-11ec-898a-05437a90b851"
        ],
        "trackeeIds": [],
        "alertType": "BOTH,NOTOUT,NOTIN",
        "notEntered": "11",
        "notExited": "10",
        "fenceType": "Circular",
        "geoMarkType": 0,
        "fenceInNotTrackIgnitionOff": true,
        "fenceOutNotTrackIgnitionOff": true,
        "radiusUnit": "meters",
        "geofenceRadius": "50",
        "landmarkRadius": 50,
        "landMarkRadiusUnit": "meters",
        "activationDate": "",
        "inActivationDate": "",
        "workHours": "trackAllTime",
        "webNotificationEnabled": true,
        "mobileNotificationEnabled": true,
        "soundNotification": false,
        "alertNotification": true,
        "userIds": [
            "8a9388a9-8346-2dc5-0183-471e70c70262",
            "8a94d6f8-8069-dc2a-0180-6a28e0e50014"
        ],
        "ccAddress": "[email protected]",
        "mode": 0,
        "roleIds": null,
        "customAlertHours": 1,
        "emailAdminGeo": false,
        "emailDriverGeo": false,
        "webNotificationType": "BANNER"
    },
    {
        "name": "TestGeo2",
        "latitude": 36.171563,
        "longitude": -115.1391009,
        "address": "Las Vegas, NV, USA",
        "color": "#15EB15",
        "landmarkCategory": {
            "name": "AAA customer",
            "categoryId": "ad06e894-5c88-11ea-9163-8bcd2b9b59cc"
        },
        "iconName": "Default",
        "groupIds": [
            "20fe8441-e730-11ec-898a-05437a90b851"
        ],
        "trackeeIds": [],
        "alertType": "BOTH,NOTOUT,NOTIN",
        "notEntered": "11",
        "notExited": "10",
        "fenceType": "Circular",
        "geoMarkType": 0,
        "fenceInNotTrackIgnitionOff": true,
        "fenceOutNotTrackIgnitionOff": true,
        "radiusUnit": "meters",
        "geofenceRadius": "50",
        "landmarkRadius": 50,
        "landMarkRadiusUnit": "meters",
        "activationDate": "",
        "inActivationDate": "",
        "workHours": "trackAllTime",
        "webNotificationEnabled": true,
        "mobileNotificationEnabled": true,
        "soundNotification": false,
        "alertNotification": true,
        "userIds": [
            "8a9388a9-8346-2dc5-0183-471e70c70262"
        ],
        "ccAddress": "[email protected]",
        "mode": 0,
        "roleIds": null,
        "customAlertHours": 1,
        "emailAdminGeo": false,
        "emailDriverGeo": false,
        "webNotificationType": "BANNER"
    }
    ]
}
{
    "update": [
    {
        "name": "TestGeo2244",
        "latitude": 36.171563,
        "longitude": -115.1391009,
        "address": "Las Vegas, NV, USA",
        "color": "#15EB15",
        "landmarkCategory": {
            "name": "AAA customer",
            "categoryId": "ad06e894-5c88-11ea-9163-8bcd2b9b59cc"
        },
        "iconName": "Default",
        "groupIds": [
            "20fe8441-e730-11ec-898a-05437a90b851"
        ],
        "trackeeIds": [],
        "alertType": "BOTH,NOTOUT,NOTIN",
        "notEntered": "11",
        "notExited": "10",
        "fenceType": "Circular",
        "geoMarkType": 0,
        "radiusUnit": "meters",
        "geofenceRadius": "50",
        "landmarkRadius": 50,
        "landMarkRadiusUnit": "meters",
        "activationDate": "",
        "inActivationDate": "",
        "workHours": "trackAllTime",
        "webNotificationEnabled": true,
        "mobileNotificationEnabled": true,
        "soundNotification": false,
        "alertNotification": true,
        "userIds": [
            "8a9388a9-8346-2dc5-0183-471e70c70262",
            "8a94d6f8-8069-dc2a-0180-6a28e0e50014"
        ],
        "ccAddress": "[email protected]",
        "mode": 0,
        "roleIds": null,
        "customAlertHours": 1,
        "emailAdminGeo": false,
        "emailDriverGeo": false,
        "webNotificationType": "BANNER",
        "edit": true,
        "fenceId": "9553c202-fa08-11ed-96c2-41980bc1982a"
    },
      
    {
        "name": "TestGeo1122",
        "latitude": 36.171563,
        "longitude": -115.1391009,
        "address": "Las Vegas, NV, USA",
        "color": "#15EB15",
        "landmarkCategory": {
            "name": "AAA customer",
            "categoryId": "ad06e894-5c88-11ea-9163-8bcd2b9b59cc"
        },
        "iconName": "Default",
        "groupIds": [
            "20fe8441-e730-11ec-898a-05437a90b851"
        ],
        "trackeeIds": [],
        "alertType": "BOTH,NOTOUT,NOTIN",
        "notEntered": "11",
        "notExited": "10",
        "fenceType": "Circular",
        "geoMarkType": 0,
        "radiusUnit": "meters",
        "geofenceRadius": "50",
        "landmarkRadius": 50,
        "landMarkRadiusUnit": "meters",
        "activationDate": "",
        "inActivationDate": "",
        "workHours": "trackAllTime",
        "webNotificationEnabled": true,
        "mobileNotificationEnabled": true,
        "soundNotification": false,
        "alertNotification": true,
        "userIds": [
            "8a9388a9-8346-2dc5-0183-471e70c70262"
        ],
        "ccAddress": "[email protected]",
        "mode": 0,
        "roleIds": null,
        "customAlertHours": 1,
        "emailAdminGeo": false,
        "emailDriverGeo": false,
        "webNotificationType": "BANNER",
        "edit": true,
        "fenceId": "e225b4dc-f628-11ed-a329-39709a4688"
    }
      
      
    ]
}

{
	"delete": [
        {
            "fenceId": "cb09919b-f628-11ed-a329-1313dc5ffc1e",
            "name": "Test1"
        },
        {
            "fenceId": "52c9dac0-f55c-11ed-845c-ad2edebad501",
            "name": "Test2"
        }
    ]
}

API Response explanation - Update

FieldDescription
generatedAtInMillisAPI generation timestamp in UTC milliseconds
dataAPI Message
idUnique identifier representing the geofence
customerIdUnique identifier representing the customer
nameName of the geofence
typeType of the geofence
landmarkIdUnique identifier representing the landmark
latLatitude of the location
lonLongitude of the location
addressAddress of the location
radiusUnitUnit of the geofence
geofenceRadiusRadius of the geofence
geoMarkTypeThis field indicates whether the fence is geofence/landmark

0 = Both Geofence & Landmark,
1= Geofence,
2 = Landmark
alertNotificationBoolean representing the alert notification
radiusRadius of the geofence in meters
colorHex color of the geofence(Eg. #eb1515 for red)
ccAddressList of email address as comma separated strings that needs to be added as CC in email
modeThis denotes the frequency of alert to be triggered 0 = Instant alert/notification. This enables the Email notification as well. 1 = Default, disable the Send Emails 60 = A summary of alert/notification. This enables the Email notification as well.
createdByUnique identifier of the user who created the geofence
createdAtCreated time of the geofence in UTC milliseconds
lastModifiedByUnique identifier of the user who modified the geofence last
lastModifiedAtModified time of the geofence in UTC milliseconds
groupsObject representing the meta-data of the group
groupIdUnique identifier representing the group
groupNameName of the group
trackeesObject representing the meta-data of the vehicles
trackeeIdUnique identifier representing the vehicle
trackeeNameName of the vehicle
geofenceIdFor Azuga internal use
ticketTokenFor Azuga internal use
truckStatusFor Azuga internal use
createdByFor Azuga internal use
createdAtFor Azuga internal use
usersFor Azuga internal use
categoryObject representing the meta-data of the category
categoryIdUnique identifier representing the category
categoryNameName of the category
alertTypesComma 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
customAlertHoursTime in hours to send the summary alert. Add value to this parameter only when the mode is set to 60.
rolesObject representing the meta-data of the roles
radiusInMetersRadius of the geofence in meters
notEnteredValue in seconds if the alert needs to be triggered when vehicle is not entered the geofence
notExitedInteger value in seconds if the alert needs to be triggered when vehicle is not exited the geofence
locObject representing the type of the geofence
typeType of the geofence - Polygon/Circular
coordinatescoordinates of the polygon geofence
deletedBoolean representing whether the fence is deleted
True - Deleted
false - Active
historicalDataProcessedFor Azuga internal use
fenceInNotTrackIgnitionOffThis field is set to 'True' when the geofence needs to track only when the vehicle is moving INSIDE the geofence
iconNameName of the icon
fenceIdUnique identifier representing the geofence
errorError description - if any

API Response explanation - Create

FieldDescription
generatedAtInMillisAPI generation timestamp in UTC milliseconds
dataAPI Message
createObject representing the Create operation
idUnique identifier representing the geofence
customerIdUnique identifier representing the customer
nameName of the geofence
typeType of the geofence
landmarkIdUnique identifier representing the landmark
latLatitude of the location
lonLongitude of the location
addressAddress of the location
radiusUnitUnit of the geofence
geofenceRadiusRadius of the geofence
geoMarkTypeThis field indicates whether the fence is geofence/landmark

0 = Both Geofence & Landmark,
1= Geofence,
2 = Landmark
alertNotificationBoolean representing the alert notification
radiusRadius of the geofence in meters
colorHex color of the geofence(Eg. #eb1515 for red)
ccAddressList of email address as comma separated strings that needs to be added as CC in email
modeThis denotes the frequency of alert to be triggered 0 = Instant alert/notification. This enables the Email notification as well. 1 = Default, disable the Send Emails 60 = A summary of alert/notification. This enables the Email notification as well.
createdByUnique identifier of the user who created the geofence
createdAtCreated time of the geofence in UTC milliseconds
lastModifiedAtModified time of the geofence in UTC milliseconds
groupsObject representing the meta-data of the group
groupIdUnique identifier representing the group
groupNameName of the group
trackeesObject representing the meta-data of the vehicles
trackeeIdUnique identifier representing the vehicle
trackeeNameName of the vehicle
geofenceIdFor Azuga internal use
ticketTokenFor Azuga internal use
truckStatusFor Azuga internal use
createdByFor Azuga internal use
createdAtFor Azuga internal use
usersFor Azuga internal use
categoryObject representing the meta-data of the category
categoryIdUnique identifier representing the category
categoryNameName of the category
alertTypesComma 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
customAlertHoursTime in hours to send the summary alert. Add value to this parameter only when the mode is set to 60.
radiusInMetersRadius of the geofence in meters
notEnteredValue in seconds if the alert needs to be triggered when vehicle is not entered the geofence
notExitedInteger value in seconds if the alert needs to be triggered when vehicle is not exited the geofence
locObject representing the type of the geofence
typeType of the geofence - Polygon/Circular
coordinatescoordinates of the polygon geofence
deletedBoolean representing whether the fence is deleted
True - Deleted
false - Active
historicalDataProcessedFor Azuga internal use
fenceInNotTrackIgnitionOffThis field is set to 'True' when the geofence needs to track only when the vehicle is moving INSIDE the geofence
iconNameName of the icon
preValidatedFor Azuga internal use
fenceIdUnique identifier representing the geofence
updateObject representing the update operation
deleteObject representing the delete operation
errorError description - if any

API Response explanation - Delete

FieldDescription
generatedAtInMillisAPI generation timestamp in UTC milliseconds
dataAPI Message (Success/Failure)
createObject representing the Create operation
updateObject representing the Update operation
deleteObject representing the Delete operation
idUnique identifier of the geofence which is deleted
errorError description - if any
Language
Authorization
Header
Click Try It! to start a request and see the response here!