{"_id":"564c3e4083b72c2b00b36fb6","parentDoc":null,"user":"54aa7f3f9bb00c0b00cb899b","editedParams2":true,"__v":5,"category":{"_id":"564bbc7e8841060d00abb2ee","__v":10,"pages":["564bbf454bf5c80d0020901e","564bc1b08b1c5521002bb914","564c387b9baa330d00faa622","564c3a7b61008d17006ffa3a","564c3e4083b72c2b00b36fb6","564c431b61008d17006ffa46","564c4bc9b9cdb41700a0eae7","564c4e955f9d102b00fc3b4a","564c5f32c241881700d85981","564c68a93eb8f81700838a25"],"project":"54aa7f773b56130b0056c86e","version":"55781fe25129590d003ff4f7","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-11-17T23:47:10.058Z","from_sync":false,"order":1,"slug":"pulsate-cms-api","title":"Pulsate CMS API"},"editedParams":true,"version":{"_id":"55781fe25129590d003ff4f7","project":"54aa7f773b56130b0056c86e","forked_from":"54aa7f773b56130b0056c871","__v":6,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z","categories":["55781fe35129590d003ff4f8","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","55781fe35129590d003ff4fb","55781fe35129590d003ff4fc","55781fe35129590d003ff4fd","55781fe35129590d003ff4fe","564bbc7e8841060d00abb2ee","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","582318b23b961a0f009516a1","594a848c9f4771001a43c959"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Developers","version_clean":"2.0.0","version":"2.0"},"githubsync":"","project":"54aa7f773b56130b0056c86e","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-18T09:00:48.213Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"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]","language":"json","status":200,"name":""}]},"settings":"564bbbf80cbcc91700b8171c","examples":{"codes":[{"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}'","language":"shell","name":""}]},"method":"post","auth":"required","params":[{"_id":"564c387b9baa330d00faa623","ref":"","in":"body","required":true,"desc":"Geofences to be inserted","default":"[{}]","type":"array_object","name":"geofences"},{"_id":"57ff824e8e087d0e000303f7","ref":"","in":"path","required":true,"desc":"App ID. It can be fetched by using \"Apps: Get All (Index)\" or \"Apps: Get One (Show)\" endpoints.","default":"","type":"string","name":"app_id"},{"_id":"5b5b16b1faf2c40003dbcad0","ref":"","in":"body","required":false,"desc":"Name of geofence","default":"","type":"string","name":"geofence.name"},{"_id":"5b5b16b1faf2c40003dbcacf","ref":"","in":"body","required":false,"desc":"Location of the geofence as [latitude, longitude]","default":"","type":"string","name":"geofence.location"},{"_id":"5b5b16b1faf2c40003dbcace","ref":"","in":"body","required":false,"desc":"Type of the geofence, can be one of: [\"enter\", \"exit\"]","default":"","type":"string","name":"geofence.type"},{"_id":"5b5b16b1faf2c40003dbcacd","ref":"","in":"body","required":false,"desc":"Type of geofence, can be one of [\"circle\", \"polygon\"]","default":"","type":"string","name":"geofence.shape"},{"_id":"5b5b16b1faf2c40003dbcacc","ref":"","in":"body","required":false,"desc":"Radius of the circle geofence in meters","default":"","type":"string","name":"geofence.radius"},{"_id":"5b5b16b1faf2c40003dbcacb","ref":"","in":"body","required":false,"desc":"Path of the polygon geofence, as array of [latitude, longitude]","default":"","type":"string","name":"geofence.path"}],"url":"/apps/:app_id/geofences/batch"},"isReference":true,"order":38,"body":"","excerpt":"","slug":"geofences-create-many","type":"endpoint","title":"Geofences: Create Batch"}

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 }}