{"_id":"59e70ba0e027ae002e7d2f3e","category":{"_id":"59e70b9ee027ae002e7d2ed7","version":"59e70b9ee027ae002e7d2ed2","project":"5496d393f52a630b00519cdd","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-01T08:45:54.712Z","from_sync":false,"order":4,"slug":"geofencing-triggers","title":"Geofencing Triggers"},"project":"5496d393f52a630b00519cdd","parentDoc":null,"user":"5496d353f52a630b00519cdc","version":{"_id":"59e70b9ee027ae002e7d2ed2","project":"5496d393f52a630b00519cdd","__v":2,"createdAt":"2017-10-18T08:06:54.462Z","releaseDate":"2017-10-18T08:06:54.462Z","categories":["59e70b9ee027ae002e7d2ed3","59e70b9ee027ae002e7d2ed4","59e70b9ee027ae002e7d2ed5","59e70b9ee027ae002e7d2ed6","59e70b9ee027ae002e7d2ed7","59e70b9ee027ae002e7d2ed8","59e70b9ee027ae002e7d2ed9","59e70b9ee027ae002e7d2eda","59e70b9ee027ae002e7d2edb","59e70b9ee027ae002e7d2edc","59e70b9ee027ae002e7d2edd","59e70b9ee027ae002e7d2ede","59e70b9ee027ae002e7d2edf","5b8661ccdd19310003a3fa0b"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.0.10","version":"2.0.10"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-06-01T09:02:38.369Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","method":"post","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Request Body\"\n}\n[/block]\nThe request payload should be a JSON format with the following attributes.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Example\",\n    \"0-0\": \"tag\\n*(optional)*\",\n    \"0-3\": \"Starbucks coffe\",\n    \"0-1\": \"Custom geofence description or tag. The tag is not used as a  unique identifier.\",\n    \"0-2\": \"String\",\n    \"1-0\": \"location\\n*(required)*\",\n    \"1-1\": \"The geofence location parameters.\",\n    \"1-2\": \"[Geofence Location Structure](doc:geofence-location)\",\n    \"2-0\": \"ttl\\n*(required)*\",\n    \"2-1\": \"\\\"Time to Live\\\": number of seconds until the geofence will be disabled. When set to \\\"0\\\" geofence will never be deleted.\",\n    \"2-2\": \"int\",\n    \"2-3\": \"604800\",\n    \"3-0\": \"push_text\",\n    \"3-1\": \"Custom push notification text to be shown in the client\",\n    \"3-2\": \"string\",\n    \"3-3\": \"\\\"Welcome to Starbucks\\\"\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response\"\n}\n[/block]\nWhen a geofence is created successfully, the new geofence ID is returned as a string.","excerpt":"HTTPS api.placer.io/v2/apps/**APP_KEY**/geofences/create\n\n\nCreate a new geofence.","slug":"create","type":"endpoint","title":"Geofences/create"}

postGeofences/create

HTTPS api.placer.io/v2/apps/**APP_KEY**/geofences/create Create a new geofence.

[block:api-header] { "type": "basic", "title": "Request Body" } [/block] The request payload should be a JSON format with the following attributes. [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "h-2": "Type", "h-3": "Example", "0-0": "tag\n*(optional)*", "0-3": "Starbucks coffe", "0-1": "Custom geofence description or tag. The tag is not used as a unique identifier.", "0-2": "String", "1-0": "location\n*(required)*", "1-1": "The geofence location parameters.", "1-2": "[Geofence Location Structure](doc:geofence-location)", "2-0": "ttl\n*(required)*", "2-1": "\"Time to Live\": number of seconds until the geofence will be disabled. When set to \"0\" geofence will never be deleted.", "2-2": "int", "2-3": "604800", "3-0": "push_text", "3-1": "Custom push notification text to be shown in the client", "3-2": "string", "3-3": "\"Welcome to Starbucks\"" }, "cols": 4, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Response" } [/block] When a geofence is created successfully, the new geofence ID is returned as a string.