{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/geofence/create.json","auth":"required","settings":"559288b86bf22f170075b794","examples":{"codes":[{"language":"text","code":""}]},"method":"post","params":[{"name":"name","type":"string","default":"","desc":"Name of the geofence","required":true,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d5f"},{"name":"landmarkName","type":"string","default":"","desc":"Name of an existing landmark (One of the following parameters is mandatory - landmarkName, latitude and longitude coordinates, address)","required":false,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d5e"},{"name":"latitude","type":"double","default":"","desc":"Latitude coordinate of the geofence (One of the following parameters is mandatory - landmarkName, latitude and longitude coordinates, address)","required":false,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d5d"},{"name":"longitude","type":"double","default":"","desc":"Longitude coordinate of the geofence (One of the following parameters is mandatory - landmarkName, latitude and longitude coordinates, address)","required":false,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d5c"},{"name":"address","type":"string","default":"","desc":"Address of the geofence location (One of the following parameters is mandatory - landmarkName, latitude and longitude coordinates, address)","required":false,"in":"body","ref":"","_id":"571de0b12063800e0041a2bf"},{"name":"fenceType","type":"string","default":"Circular","desc":"Shape of the geofence, circular or polygonal","required":false,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d5b"},{"name":"radius","type":"int","default":"","desc":"Radius of the geofence if the fenceType is circular","required":true,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d5a"},{"name":"radiusUnit","type":"string","default":"","desc":"Unit of radius (miles, metres, or kilometres) of the geofence, if the fenceType is circular","required":true,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d59"},{"name":"landmarkCategory","type":"string","default":"","desc":"Category that the geofence belongs to. Eg: Home, Office, Customer.","required":true,"in":"body","ref":"","_id":"6059e74cf6329c007afe1452"},{"name":"geometry","type":"string","default":"","desc":"Geometry of the geofence specifying the vertices(latitude,longitude), if the fenceType is polygonal","required":false,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d58"},{"name":"color","type":"string","default":"","desc":"Color of the geofence","required":false,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d57"},{"name":"groupNames","type":"string","default":"","desc":"Name of the group(s) with which the geofence is associated (Either groupNames or vehicleNames is required for the API call)","required":true,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d56"},{"name":"vehicleNames","type":"string","default":"","desc":"Name of the vehicle(s) with which the geofence is associated (Either vehicleNames or groupNames is required for the API call)","required":true,"in":"body","ref":"","_id":"606f70dfd4dd8d00f3d54dcc"},{"name":"email","type":"string","default":"","desc":"List of email ids of the users who are associated with the administrator","required":true,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d55"},{"name":"ccAddress","type":"string","default":"","desc":"Email addresses to which alert mails have to be sent apart from the primary email address","required":false,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d54"},{"name":"mode","type":"string","default":"","desc":"Mode of alert specifying whether the email should be sent as soon as an event occurs or once in an hour","required":true,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d53"},{"name":"alertType","type":"string","default":"","desc":"Specifies the event (vehicle entry and/or exit) for which an alert needs to be sent","required":true,"in":"body","ref":"","_id":"56308ae7eae7ef0d00270d52"}],"results":{"codes":[{"status":200,"language":"json","code":"{ \n \"restResponseVO\":{ \n \"code\":200,\n \"message\":\"Success\",\n \"reason\":\"\",\n \"generatedAt\":\"Dec-07-2015, 09:08 AM UTC\",\n \"currentPage\":null,\n \"totalPages\":null\n }\n}","name":""}]}},"next":{"description":"","pages":[]},"title":"Create","type":"endpoint","slug":"create-geofence","excerpt":"Use this API to create a geofence. 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.","body":"[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Sample Request\",\n \"body\": \"https://api.azuga.com/azuga-ws/v1/geofence/create.json\"\n}\n[/block]\n\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"For Circular Geofence:\\n{ \\n \\\"name\\\":\\\"Office Building\\\",\\n \\\"latitude\\\":39.288815,\\n \\\"longitude\\\":-77.860099,\\n \\\"radiusUnit\\\":\\\"metres\\\",\\n \\\"radius\\\":4.1234,\\n \\\"address\\\":\\\"101 West Washington Street, Charles Town, WV, United States\\\",\\n \\\"color\\\":\\\"#15eb15\\\",\\n \\\"alertType\\\":\\\"BOTH\\\",\\n \\\"ccAddress\\\":\\\"melony:::at:::azuga.com\\\",\\n \\\"mode\\\":\\\"0\\\",\\n \\\"landmarkCategory\\\": {\\\"name\\\": \\\"Home\\\"},\\n \\\"groupNames\\\":[ \\n \\\"USA-1\\\"\\n ],\\n \\\"email\\\":[ \\n \\\"[email protected]\\\"\\n ]\\n}\\n\\nFor Polygon Geofence:\\n{ \\n \\\"name\\\":\\\"Office Building\\\",\\n \\\"latitude\\\":\\\"39.288815\\\",\\n \\\"longitude\\\":\\\"-77.860099\\\",\\n \\\"fenceType\\\":\\\"Polygon\\\",\\n \\\"geometry\\\":[ \\n [ \\n [ \\n -77.86007488891755,\\n 39.28885426493847\\n ],\\n [ \\n -77.86009098217164,\\n 39.28876240490376\\n ],\\n [ \\n -77.85992468521272,\\n 39.28875462014952\\n ],\\n [ \\n -77.86000716313993,\\n 39.288873467303375\\n ]\\n ]\\n ],\\n \\\"address\\\":\\\"101 West Washington Street, Charles Town, WV, United States\\\",\\n \\\"color\\\":\\\"#15eb15\\\",\\n \\\"alertType\\\":\\\"BOTH\\\",\\n \\\"ccAddress\\\":\\\"[email protected]\\\",\\n \\\"mode\\\":\\\"0\\\",\\n \\\"landmarkCategory\\\": {\\\"name\\\": \\\"Office\\\"},\\n \\\"vehicleNames\\\":[ \\n \\\"Range Rover\\\"\\n ],\\n \\\"email\\\":[ \\n \\\"[email protected]\\\"\\n ]\\n}\",\n \"language\": \"json\",\n \"name\": \"Sample Payload\"\n }\n ]\n}\n[/block]\n##API Response explanation\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"code\",\n \"0-1\": \"API Status Code\",\n \"1-0\": \"message\",\n \"1-1\": \"API Message (Success/Failure)\",\n \"2-0\": \"generatedAt\",\n \"2-1\": \"API generation timestamp in UTC\",\n \"3-0\": \"reason\",\n \"4-0\": \"currentPage\",\n \"5-0\": \"totalPages\",\n \"3-1\": \"The reason for failure\",\n \"4-1\": \"The current page\",\n \"5-1\": \"The total number of pages in the result\",\n \"h-0\": \"Field\",\n \"h-1\": \"Description\"\n },\n \"cols\": 2,\n \"rows\": 6\n}\n[/block]","updates":[],"order":0,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"563081bf7581b80d00c51c62","__v":8,"category":{"sync":{"isSync":false,"url":""},"pages":["563081bf7581b80d00c51c62","56308b0b3998420d00a509e9","563090133998420d00a509f0","5630936a3998420d00a509f5"],"title":"GEOFENCE","slug":"geofence","order":8,"from_sync":false,"reference":true,"_id":"563081713998420d00a509e4","__v":4,"createdAt":"2015-10-28T08:04:01.613Z","project":"55926c913735880d005f7c65","version":"559286c6c39c4b2d00127a71"},"createdAt":"2015-10-28T08:05:19.614Z","githubsync":"","user":"55926c39cf9cdb2100b57022","parentDoc":null,"project":"55926c913735880d005f7c65","editedParams":true,"editedParams2":true,"version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["559286c7c39c4b2d00127a72","55928a98c39c4b2d00127a83","5592bd7b9a68220d00f1c3db","5593dcaf0e82e81700334e25","5594342f0c33bd0d000595a3","563081713998420d00a509e4","5630941c7581b80d00c51c86","56309f4ff1c0580d00fac666","567923b8239fac0d00c7df25","573306dea6a9c40e00e13875","577a288fd051530e00f65563","579af3982b865e17005a4357","57ee06aa1e42900e0014a374","5951f49a63f39000159e7ef1","5951f4c563f39000159e7ef2","598951542a9dfc000fcacd40","5b3375cc98cb500003e4b363","5bbcd4e29667280003084100"],"_id":"559286c6c39c4b2d00127a71","createdAt":"2015-06-30T12:08:38.768Z","project":"55926c913735880d005f7c65","releaseDate":"2015-06-30T12:08:38.768Z","__v":18,"forked_from":"559286b6c39c4b2d00127a6e"}}
postCreate
Use this API to create a geofence. 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.
Definition
{{ api_url }}{{ page_api_url }}
Parameters
Body Params
name:
required
string
Name of the geofence
landmarkName:
string
Name of an existing landmark (One of the following parameters is mandatory - landmarkName, latitude and longitude coordinates, address)
latitude:
double
Latitude coordinate of the geofence (One of the following parameters is mandatory - landmarkName, latitude and longitude coordinates, address)
longitude:
double
Longitude coordinate of the geofence (One of the following parameters is mandatory - landmarkName, latitude and longitude coordinates, address)
address:
string
Address of the geofence location (One of the following parameters is mandatory - landmarkName, latitude and longitude coordinates, address)
fenceType:
stringCircular
Shape of the geofence, circular or polygonal
radius:
required
integer
Radius of the geofence if the fenceType is circular
radiusUnit:
required
string
Unit of radius (miles, metres, or kilometres) of the geofence, if the fenceType is circular
landmarkCategory:
required
string
Category that the geofence belongs to. Eg: Home, Office, Customer.
geometry:
string
Geometry of the geofence specifying the vertices(latitude,longitude), if the fenceType is polygonal
color:
string
Color of the geofence
groupNames:
required
string
Name of the group(s) with which the geofence is associated (Either groupNames or vehicleNames is required for the API call)
vehicleNames:
required
string
Name of the vehicle(s) with which the geofence is associated (Either vehicleNames or groupNames is required for the API call)
email:
required
string
List of email ids of the users who are associated with the administrator
ccAddress:
string
Email addresses to which alert mails have to be sent apart from the primary email address
mode:
required
string
Mode of alert specifying whether the email should be sent as soon as an event occurs or once in an hour
alertType:
required
string
Specifies the event (vehicle entry and/or exit) for which an alert needs to be sent