{"_id":"56c41dbbc0c4630d004e86c5","parentDoc":null,"user":"56b98db7bb36440d0001f492","project":"56bc8e679afb8b0d00d62dcf","__v":4,"category":{"_id":"56c4184c28bd680d005e7ac7","__v":5,"project":"56bc8e679afb8b0d00d62dcf","pages":["56c41d876063071700500d06","56c41d92bb64720d00552b94","56c41d9e4f0aed1700afabac","56c41dafc0c4630d004e86c3","56c41dbbc0c4630d004e86c5"],"version":"56bc8e689afb8b0d00d62dd2","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-02-17T06:50:52.926Z","from_sync":false,"order":6,"slug":"push","title":"Push"},"githubsync":"","version":{"_id":"56bc8e689afb8b0d00d62dd2","project":"56bc8e679afb8b0d00d62dcf","__v":18,"createdAt":"2016-02-11T13:36:40.146Z","releaseDate":"2016-02-11T13:36:40.146Z","categories":["56bc8e689afb8b0d00d62dd3","56c3c837bc41330d009f25ed","56c3c83e521f350d00d348eb","56c3c8452d97560d00e23cd8","56c3c85234df460d00c2beb8","56c4180d70187b17005f43b4","56c418162d97560d00e23cf6","56c4181cc4796b0d007ef039","56c4182370187b17005f43b5","56c418292e75e01700986052","56c4183328bd680d005e7ac6","56c4183bbb64720d00552b88","56c418414040602b0064cea0","56c4184754b6030d00ec29a1","56c4184c28bd680d005e7ac7","56c4185370187b17005f43b6","56c4185b6063071700500cfc","582a98b6f8c0a0190053d7a5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-17T07:14:03.663Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"/notifications/received/{id}\"\n}\n[/block]\nUnder normal circumstances a push notification sender is only able determine that the notification was successfully sent to the service provider (APNS, GCM, WNS, etc.).  The providers are not able to confirm whether a push was actually delivered to a device or whether an application was activated in response to the push notification.\n\nBoth of these metrics are important for determining user response to a push notification and for analyzing which groups of users respond to which push notifications.\n\nBuddy provides this capability with the Record Push Received operation. This option allows client devices to tell the Buddy service that an application has been activated in response to a received push notification.\n\nWhen Buddy sends a push notification it embeds an identifier into the push payload.  This identifier must be sent back to Buddy to confirm push receipt.  \n\nThe Buddy Dashboard displays push notification receipt statistics.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Buddy.post('/notifications/received/my_id',\\n\\t\\tfunction(err, result) {\\n\\t\\t\\t \\n\\t\\t\\tif (result.success) {\\n\\t\\t\\t\\t// Do something with the result!\\n\\t\\t\\t} else { \\n\\t\\t\\t\\t// Otherwise log the error\\n\\t\\t\\t\\tconsole.log(err); \\n\\t\\t\\t} \\n\\t\\t}\\n\\t);\",\n      \"language\": \"javascript\"\n    },\n    {\n      \"code\": \"[Buddy POST::::at:::\\\"/notifications/received/my_id\\\" parameters:nil class:[NSDictionary class] callback:^(id obj, NSError *error) {\\n\\t// Your callback code here\\n}];\",\n      \"language\": \"objectivec\",\n      \"name\": \"iOS\"\n    },\n    {\n      \"code\": \"Buddy.<JsonObject>post(\\\"/notifications/received/my_id\\\", null, new BuddyCallback<JsonObject>(JsonObject.class) {\\n\\[email protected]\\n\\tpublic void completed(BuddyResult<JsonObject> result) {\\n\\t\\t// Your callback code here\\n\\t}\\n});\",\n      \"language\": \"java\",\n      \"name\": \"Android\"\n    },\n    {\n      \"code\": \"var result = await Buddy.PostAsync<Notification>(\\\"/notifications/received/my_id\\\");\",\n      \"language\": \"csharp\",\n      \"name\": \".NET\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n###Path Parameters\n\nThese parameters should be specified as part of the HTTP path.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"id\",\n    \"0-1\": \"The push batch ID. This is encoded in the push payload as _bId.\",\n    \"0-2\": \"buddyId\",\n    \"0-3\": \"Required\"\n  },\n  \"cols\": 4,\n  \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": 200,\\n  \\\"request_id\\\": \\\"0877f303-1177-48eb-8e61-e6414b728fb3\\\",\\n  \\\"success\\\": true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Response\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"record-push-received","type":"basic","title":"Record Push Received"}

Record Push Received


[block:api-header] { "type": "post", "title": "/notifications/received/{id}" } [/block] Under normal circumstances a push notification sender is only able determine that the notification was successfully sent to the service provider (APNS, GCM, WNS, etc.). The providers are not able to confirm whether a push was actually delivered to a device or whether an application was activated in response to the push notification. Both of these metrics are important for determining user response to a push notification and for analyzing which groups of users respond to which push notifications. Buddy provides this capability with the Record Push Received operation. This option allows client devices to tell the Buddy service that an application has been activated in response to a received push notification. When Buddy sends a push notification it embeds an identifier into the push payload. This identifier must be sent back to Buddy to confirm push receipt. The Buddy Dashboard displays push notification receipt statistics. [block:code] { "codes": [ { "code": "Buddy.post('/notifications/received/my_id',\n\t\tfunction(err, result) {\n\t\t\t \n\t\t\tif (result.success) {\n\t\t\t\t// Do something with the result!\n\t\t\t} else { \n\t\t\t\t// Otherwise log the error\n\t\t\t\tconsole.log(err); \n\t\t\t} \n\t\t}\n\t);", "language": "javascript" }, { "code": "[Buddy POST:@\"/notifications/received/my_id\" parameters:nil class:[NSDictionary class] callback:^(id obj, NSError *error) {\n\t// Your callback code here\n}];", "language": "objectivec", "name": "iOS" }, { "code": "Buddy.<JsonObject>post(\"/notifications/received/my_id\", null, new BuddyCallback<JsonObject>(JsonObject.class) {\n\[email protected]\n\tpublic void completed(BuddyResult<JsonObject> result) {\n\t\t// Your callback code here\n\t}\n});", "language": "java", "name": "Android" }, { "code": "var result = await Buddy.PostAsync<Notification>(\"/notifications/received/my_id\");", "language": "csharp", "name": ".NET" } ], "sidebar": true } [/block] ###Path Parameters These parameters should be specified as part of the HTTP path. [block:parameters] { "data": { "0-0": "id", "0-1": "The push batch ID. This is encoded in the push payload as _bId.", "0-2": "buddyId", "0-3": "Required" }, "cols": 4, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "{\n \"status\": 200,\n \"request_id\": \"0877f303-1177-48eb-8e61-e6414b728fb3\",\n \"success\": true\n}", "language": "json", "name": "Response" } ], "sidebar": true } [/block]