{"_id":"566c97739aa84517001b4fc9","project":"544494099be40214000dedb6","__v":0,"version":{"_id":"566c97729aa84517001b4fbb","__v":1,"project":"544494099be40214000dedb6","createdAt":"2015-12-12T21:53:54.721Z","releaseDate":"2015-12-12T21:53:54.721Z","categories":["566c97739aa84517001b4fbc","566c97739aa84517001b4fbd","566c97739aa84517001b4fbe","566c97739aa84517001b4fbf"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.1.0","version":"2.1"},"user":"54449dc49be40214000dedda","category":{"_id":"566c97739aa84517001b4fbd","pages":["566c97739aa84517001b4fc0","566c97739aa84517001b4fc1","566c97739aa84517001b4fc2","566c97739aa84517001b4fc3","566c97739aa84517001b4fc4","566c97739aa84517001b4fc5","566c97739aa84517001b4fc6","566c97739aa84517001b4fc7","566c97739aa84517001b4fc8","566c97739aa84517001b4fc9"],"project":"544494099be40214000dedb6","version":"566c97729aa84517001b4fbb","__v":1,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-20T05:03:22.419Z","from_sync":false,"order":1,"slug":"how-to","title":"How to"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-19T09:53:04.288Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":11,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Request Headers\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"X-PSH-AppKey = YOUR_APP_KEY\\nX-PSH-UA = rest\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Regions Request\"\n}\n[/block]\n\n**GET https://api.pushmote.com/rest/regions** \n\nSample regions response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"monitor\\\": [\\n        {\\n            \\\"uuid\\\": \\\"B9407F30-F5F8-466E-AFF9-25556B57FE6D\\\",\\n            \\\"identifier\\\": \\\"B9407F30-F5F8-466E-AFF9-25556B57FE6D\\\"\\n        }\\n    ],\\n    \\\"range\\\": null\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n## **Interaction Request URL** \n\n**POST https://api.pushmote.com/rest/action** \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Monitoring (Enter and Exit) Events\"\n}\n[/block]\nSample request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"uuid\\\" : \\\"B9407F30-F5F8-466E-AFF9-25556B57FE6D\\\",\\n  \\\"major\\\" : \\\"53283\\\",\\n  \\\"minor\\\" : \\\"33256\\\",\\n  \\\"state\\\": \\\"bg\\\",\\n  \\\"event\\\": \\\"ON_ENTER\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\nSample response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"id\\\": \\\"564d9a6fe4b0809422070797\\\",\\n    \\\"parentId\\\": \\\"564c3c51e4b080942207078b\\\",\\n    \\\"action\\\": \\\"OPEN_HTML_TEMPLATE\\\",\\n    \\\"showPoweredBy\\\": false,\\n    \\\"params\\\": {\\n        \\\"notification\\\": \\\"Welcome!\\\",\\n        \\\"viewType\\\": \\\"fullscreen\\\",\\n        \\\"url\\\": \\\"http://d3enj1u6u4kn20.cloudfront.net/66c71d4a-3e5f-4c37-afbc-7c27a7010370.html\\\"\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Ranging Events\"\n}\n[/block]\nSample request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"rangedBeacons\\\": [\\n    \\t\\t\\t\\t{\\n             \\\"uuid\\\":\\\"B9407F30-F5F8-466E-AFF9-25556B57FE6D\\\", \\t\\t\\t\\t\\n             \\\"major\\\":\\\"53283\\\", \\n             \\\"minor\\\":\\\"33256\\\", \\n             \\\"proximity\\\":\\\"IMMEDIATE\\\"\\n            }    \\n    \\t\\t\\t],\\n    \\\"state\\\": \\\"fg\\\",\\n    \\\"activeActionId\\\": \\\"\\\",\\n    \\\"event\\\": \\\"ON_CLOSE\\\"\\n}\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nSample response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"id\\\": \\\"564c3c51e4b0809422070788\\\",\\n    \\\"parentId\\\": \\\"564c3c51e4b080942207078b\\\",\\n    \\\"action\\\": \\\"SHOW_IMAGE\\\",\\n    \\\"showPoweredBy\\\": false,\\n    \\\"params\\\": {\\n        \\\"iosImageUrl\\\": \\\"https://d1zfk67pyphflc.cloudfront.net/452510b1-6a8b-40de-846f-773c3f45b88b.png\\\",\\n        \\\"androidImageUrl\\\": \\\"https://d1zfk67pyphflc.cloudfront.net/452510b1-6a8b-40de-846f-773c3f45b88b.png\\\",\\n        \\\"viewType\\\": \\\"fullscreen\\\"\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"pushmote-rest-api","type":"basic","title":"Pushmote REST API"}
[block:api-header] { "type": "basic", "title": "Request Headers" } [/block] [block:code] { "codes": [ { "code": "X-PSH-AppKey = YOUR_APP_KEY\nX-PSH-UA = rest", "language": "http" } ] } [/block] [block:api-header] { "type": "basic", "title": "Regions Request" } [/block] **GET https://api.pushmote.com/rest/regions** Sample regions response [block:code] { "codes": [ { "code": "{\n \"monitor\": [\n {\n \"uuid\": \"B9407F30-F5F8-466E-AFF9-25556B57FE6D\",\n \"identifier\": \"B9407F30-F5F8-466E-AFF9-25556B57FE6D\"\n }\n ],\n \"range\": null\n}", "language": "json" } ] } [/block] ## **Interaction Request URL** **POST https://api.pushmote.com/rest/action** [block:api-header] { "type": "basic", "title": "Monitoring (Enter and Exit) Events" } [/block] Sample request [block:code] { "codes": [ { "code": "{\n \"uuid\" : \"B9407F30-F5F8-466E-AFF9-25556B57FE6D\",\n \"major\" : \"53283\",\n \"minor\" : \"33256\",\n \"state\": \"bg\",\n \"event\": \"ON_ENTER\"\n}", "language": "json" } ] } [/block] Sample response [block:code] { "codes": [ { "code": "{\n \"id\": \"564d9a6fe4b0809422070797\",\n \"parentId\": \"564c3c51e4b080942207078b\",\n \"action\": \"OPEN_HTML_TEMPLATE\",\n \"showPoweredBy\": false,\n \"params\": {\n \"notification\": \"Welcome!\",\n \"viewType\": \"fullscreen\",\n \"url\": \"http://d3enj1u6u4kn20.cloudfront.net/66c71d4a-3e5f-4c37-afbc-7c27a7010370.html\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Ranging Events" } [/block] Sample request [block:code] { "codes": [ { "code": "{\n \"rangedBeacons\": [\n \t\t\t\t{\n \"uuid\":\"B9407F30-F5F8-466E-AFF9-25556B57FE6D\", \t\t\t\t\n \"major\":\"53283\", \n \"minor\":\"33256\", \n \"proximity\":\"IMMEDIATE\"\n } \n \t\t\t],\n \"state\": \"fg\",\n \"activeActionId\": \"\",\n \"event\": \"ON_CLOSE\"\n}\n", "language": "json" } ] } [/block] Sample response [block:code] { "codes": [ { "code": "{\n \"id\": \"564c3c51e4b0809422070788\",\n \"parentId\": \"564c3c51e4b080942207078b\",\n \"action\": \"SHOW_IMAGE\",\n \"showPoweredBy\": false,\n \"params\": {\n \"iosImageUrl\": \"https://d1zfk67pyphflc.cloudfront.net/452510b1-6a8b-40de-846f-773c3f45b88b.png\",\n \"androidImageUrl\": \"https://d1zfk67pyphflc.cloudfront.net/452510b1-6a8b-40de-846f-773c3f45b88b.png\",\n \"viewType\": \"fullscreen\"\n }\n}", "language": "json" } ] } [/block]