{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/apps/:app_id/geofences/batch","auth":"required","params":[{"name":"geofences","type":"array_object","default":"[{}]","desc":"Geofences to be inserted","required":true,"in":"body","ref":"","_id":"564c387b9baa330d00faa623"},{"name":"app_id","type":"string","default":"","desc":"App ID. It can be fetched by using \"Apps: Get All (Index)\" or \"Apps: Get One (Show)\" endpoints.","required":true,"in":"path","ref":"","_id":"57ff824e8e087d0e000303f7"},{"name":"geofence.name","type":"string","default":"","desc":"Name of geofence","required":false,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcad0"},{"name":"geofence.location","type":"string","default":"","desc":"Location of the geofence as [latitude, longitude]","required":false,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcacf"},{"name":"geofence.type","type":"string","default":"","desc":"Type of the geofence, can be one of: [\"enter\", \"exit\"]","required":false,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcace"},{"name":"geofence.shape","type":"string","default":"","desc":"Type of geofence, can be one of [\"circle\", \"polygon\"]","required":false,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcacd"},{"name":"geofence.radius","type":"string","default":"","desc":"Radius of the circle geofence in meters","required":false,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcacc"},{"name":"geofence.path","type":"string","default":"","desc":"Path of the polygon geofence, as array of [latitude, longitude]","required":false,"in":"body","ref":"","_id":"5b5b16b1faf2c40003dbcacb"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"[\n  {\n    \"guid\": \"QrqsYSC4\",\n    \"name\": \"sample_name_1\",\n    \"path\": null,\n    \"radius\": 101,\n    \"shape\": null,\n    \"type\": \"enter\",\n    \"location\": [\n      50.042754135466986,\n      20.207290649414062\n    ],\n    \"id\": \"587646fc636f6e3a0cbd0400\"\n  },\n  {\n    \"guid\": \"AwitIBjO\",\n    \"name\": \"sample_name_2\",\n    \"path\": null,\n    \"radius\": 101,\n    \"shape\": null,\n    \"type\": \"enter\",\n    \"location\": [\n      50.042754135466986,\n      20.207290649414062\n    ],\n    \"id\": \"587646fc636f6e3a0cbe0400\"\n  }\n]"}]},"settings":"564bbbf80cbcc91700b8171c","examples":{"codes":[{"name":"","language":"shell","code":"curl -X POST \"https://control.pulsatehq.com/api/v1/apps/$APP_ID/geofences/batch\" \\\n-H \"Authorization: Token token=$MY_ADMIN_API_TOKEN\" \\\n-d '{\n  \"geofences\": [\n\t  {\n\t    \"name\": \"sample_name_1\",\n\t    \"location\": [50.042754135466986, 20.207290649414062],\n\t    \"type\": \"enter\",\n\t    \"shape\": \"polygon\",\n\t    \"radius\": 101,\n\t    \"path\": [\n\t      [50.042754135466986, 20.207290649414062],\n\t      [50.02334733167384, 20.200166702270508],\n\t      [50.02433991532921, 20.235872268676758],\n\t      [50.03988771499381, 20.235872268676758]\n\t    ]\n\t  },\n\t  {\n\t    \"name\": \"sample_name_2\",\n\t    \"location\": [50.042754135466986, 20.207290649414062],\n\t    \"type\": \"enter\",\n\t    \"shape\": \"circle\",\n\t    \"radius\": 101,\n\t    \"path\": null\n\t\t}\n\t]\n}'"}]},"method":"post"},"next":{"description":"","pages":[]},"title":"Geofences: Create Batch","type":"endpoint","slug":"geofences-create-many","excerpt":"","body":"","updates":[],"order":42,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5e4fced159815700262d28ca","parentDoc":null,"user":"54aa7f3f9bb00c0b00cb899b","createdAt":"2015-11-18T09:00:48.213Z","editedParams2":true,"__v":5,"category":{"sync":{"isSync":false,"url":""},"pages":["5e4fced159815700262d28c6","5e4fced159815700262d28c7","5e4fced159815700262d28c8","5e4fced159815700262d28c9","5e4fced159815700262d28ca","5e4fced159815700262d28cb","5e4fced159815700262d28cc","5e4fced159815700262d28cd","5e4fced159815700262d28ce","564c68a93eb8f81700838a25"],"title":"Pulsate CMS API","slug":"pulsate-cms-api","order":1,"from_sync":false,"reference":true,"_id":"5e4fced159815700262d289e","__v":10,"createdAt":"2015-11-17T23:47:10.058Z","project":"54aa7f773b56130b0056c86e","version":"5e4fced159815700262d2930"},"editedParams":true,"version":{"version":"2.2","version_clean":"2.2.0","codename":"CMS API","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e4fced159815700262d2899","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","5e4fced159815700262d289a","5e4fced159815700262d289b","5e4fced159815700262d289c","5e4fced159815700262d289d","5e4fced159815700262d289e","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","5e4fced159815700262d289f","5e4fced159815700262d28a0","5c73dd27e8fdc000572a206a","5e4fced159815700262d28a1","5e53c04c1d11110018b56e12"],"_id":"5e4fced159815700262d2930","project":"54aa7f773b56130b0056c86e","forked_from":"55781fe25129590d003ff4f7","__v":1,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z"},"githubsync":"","project":"54aa7f773b56130b0056c86e"}

postGeofences: Create Batch


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

app_id:
required
string
App ID. It can be fetched by using "Apps: Get All (Index)" or "Apps: Get One (Show)" endpoints.

Body Params

geofences:
required
array of objects[{}]
Geofences to be inserted
geofence.name:
string
Name of geofence
geofence.location:
string
Location of the geofence as [latitude, longitude]
geofence.type:
string
Type of the geofence, can be one of: ["enter", "exit"]
geofence.shape:
string
Type of geofence, can be one of ["circle", "polygon"]
geofence.radius:
string
Radius of the circle geofence in meters
geofence.path:
string
Path of the polygon geofence, as array of [latitude, longitude]

Examples


Result Format


User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}