post https://services.azuga.com/azuga-ws-oauth/v3/geomarks/bulkUpload.json
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
Field | Description |
---|---|
generatedAtInMillis | API generation timestamp in UTC milliseconds |
data | API Message |
id | Unique identifier representing the geofence |
customerId | Unique identifier representing the customer |
name | Name of the geofence |
type | Type of the geofence |
landmarkId | Unique identifier representing the landmark |
lat | Latitude of the location |
lon | Longitude of the location |
address | Address of the location |
radiusUnit | Unit of the geofence |
geofenceRadius | Radius of the geofence |
geoMarkType | This field indicates whether the fence is geofence/landmark 0 = Both Geofence & Landmark, 1= Geofence, 2 = Landmark |
alertNotification | Boolean representing the alert notification |
radius | Radius of the geofence in meters |
color | Hex color of the geofence(Eg. #eb1515 for red) |
ccAddress | List of email address as comma separated strings that needs to be added as CC in email |
mode | This 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. |
createdBy | Unique identifier of the user who created the geofence |
createdAt | Created time of the geofence in UTC milliseconds |
lastModifiedBy | Unique identifier of the user who modified the geofence last |
lastModifiedAt | Modified time of the geofence in UTC milliseconds |
groups | Object representing the meta-data of the group |
groupId | Unique identifier representing the group |
groupName | Name of the group |
trackees | Object representing the meta-data of the vehicles |
trackeeId | Unique identifier representing the vehicle |
trackeeName | Name of the vehicle |
geofenceId | For Azuga internal use |
ticketToken | For Azuga internal use |
truckStatus | For Azuga internal use |
createdBy | For Azuga internal use |
createdAt | For Azuga internal use |
users | For Azuga internal use |
category | Object representing the meta-data of the category |
categoryId | Unique identifier representing the category |
categoryName | Name of the category |
alertTypes | 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 |
customAlertHours | Time in hours to send the summary alert. Add value to this parameter only when the mode is set to 60. |
roles | Object representing the meta-data of the roles |
radiusInMeters | Radius of the geofence in meters |
notEntered | Value in seconds if the alert needs to be triggered when vehicle is not entered the geofence |
notExited | Integer value in seconds if the alert needs to be triggered when vehicle is not exited the geofence |
loc | Object representing the type of the geofence |
type | Type of the geofence - Polygon/Circular |
coordinates | coordinates of the polygon geofence |
deleted | Boolean representing whether the fence is deleted True - Deleted false - Active |
historicalDataProcessed | For Azuga internal use |
fenceInNotTrackIgnitionOff | This field is set to 'True' when the geofence needs to track only when the vehicle is moving INSIDE the geofence |
iconName | Name of the icon |
fenceId | Unique identifier representing the geofence |
error | Error description - if any |
API Response explanation - Create
Field | Description |
---|---|
generatedAtInMillis | API generation timestamp in UTC milliseconds |
data | API Message |
create | Object representing the Create operation |
id | Unique identifier representing the geofence |
customerId | Unique identifier representing the customer |
name | Name of the geofence |
type | Type of the geofence |
landmarkId | Unique identifier representing the landmark |
lat | Latitude of the location |
lon | Longitude of the location |
address | Address of the location |
radiusUnit | Unit of the geofence |
geofenceRadius | Radius of the geofence |
geoMarkType | This field indicates whether the fence is geofence/landmark 0 = Both Geofence & Landmark, 1= Geofence, 2 = Landmark |
alertNotification | Boolean representing the alert notification |
radius | Radius of the geofence in meters |
color | Hex color of the geofence(Eg. #eb1515 for red) |
ccAddress | List of email address as comma separated strings that needs to be added as CC in email |
mode | This 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. |
createdBy | Unique identifier of the user who created the geofence |
createdAt | Created time of the geofence in UTC milliseconds |
lastModifiedAt | Modified time of the geofence in UTC milliseconds |
groups | Object representing the meta-data of the group |
groupId | Unique identifier representing the group |
groupName | Name of the group |
trackees | Object representing the meta-data of the vehicles |
trackeeId | Unique identifier representing the vehicle |
trackeeName | Name of the vehicle |
geofenceId | For Azuga internal use |
ticketToken | For Azuga internal use |
truckStatus | For Azuga internal use |
createdBy | For Azuga internal use |
createdAt | For Azuga internal use |
users | For Azuga internal use |
category | Object representing the meta-data of the category |
categoryId | Unique identifier representing the category |
categoryName | Name of the category |
alertTypes | 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 |
customAlertHours | Time in hours to send the summary alert. Add value to this parameter only when the mode is set to 60. |
radiusInMeters | Radius of the geofence in meters |
notEntered | Value in seconds if the alert needs to be triggered when vehicle is not entered the geofence |
notExited | Integer value in seconds if the alert needs to be triggered when vehicle is not exited the geofence |
loc | Object representing the type of the geofence |
type | Type of the geofence - Polygon/Circular |
coordinates | coordinates of the polygon geofence |
deleted | Boolean representing whether the fence is deleted True - Deleted false - Active |
historicalDataProcessed | For Azuga internal use |
fenceInNotTrackIgnitionOff | This field is set to 'True' when the geofence needs to track only when the vehicle is moving INSIDE the geofence |
iconName | Name of the icon |
preValidated | For Azuga internal use |
fenceId | Unique identifier representing the geofence |
update | Object representing the update operation |
delete | Object representing the delete operation |
error | Error description - if any |
API Response explanation - Delete
Field | Description |
---|---|
generatedAtInMillis | API generation timestamp in UTC milliseconds |
data | API Message (Success/Failure) |
create | Object representing the Create operation |
update | Object representing the Update operation |
delete | Object representing the Delete operation |
id | Unique identifier of the geofence which is deleted |
error | Error description - if any |