{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/stats/notifications/:notification_id/events","auth":"required","results":{"codes":[{"status":200,"language":"json","code":"{\n\t\"id\": \"58c9aa0c3431340008855116\",\n\t\"audience_id\": \"58210c663963320008001767\",\n \"message_id\": \"5a0ca8c2fbf958de806ef92d\",\n \"push_text\": \"Check out this sweet deal!\",\n \"published_time\": \"2017-03-15T20:54:36.675Z\",\n \"direct_opens\": 100,\n \"indirect_opens\": 50,\n \"influenced_opens\": 150,\n \"opens\": 100,\n \"pushes_succeeded\": 200,\n \"pushes_rejected\": 0,\n \"event_conversions\": {\n \"purchase\": 4\n }\n}","name":""},{"language":"json","code":"{\n \"error\":\"unauthorized\"\n}","name":"","status":401},{"code":"{\n \"error\":\"your api client does not have the correct roles\"\n}","status":403,"language":"json"}]},"settings":"","examples":{"codes":[{"language":"curl","code":"curl -X GET -u :API_KEY https://api.carnivalmobile.com/v5/stats/notifications/:notification_id/events","name":""}]},"method":"get","params":[{"name":"notification_id","type":"string","default":"","desc":"The ID of the notification as reported from the [Notifications API](doc:notifications) response. Use the `id` inside the `notification` object.","required":true,"in":"path","ref":"","_id":"55ed121dc9d5b3350072ae9f"}],"apiSetting":null},"next":{"description":"","pages":[]},"title":"Stats / Push Notifications","type":"endpoint","slug":"push-notification-stats","excerpt":"Returns metrics for a given push notification","body":"This endpoint returns data and metrics for a given Push Notification ID. Metrics are updated in real time. Influenced opens (including direct and indirect) and events are counted using our [standard attribution windows](https://marketing.carnival.io/docs/message-analytics).\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Field\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"`id`\",\n \"0-1\": \"String\",\n \"0-2\": \"The Push Notification ID\",\n \"1-0\": \"`audience_id`\",\n \"1-1\": \"String\",\n \"1-2\": \"Audience ID of the targeted audience. Each audience (including on-the-fly audiences) will have its own ID.\",\n \"3-0\": \"`push_text`\",\n \"3-1\": \"String\",\n \"3-2\": \"The body of the push alert\",\n \"4-0\": \"`published_time`\",\n \"4-1\": \"Date\",\n \"4-2\": \"Date when the push notification was sent\",\n \"5-0\": \"`direct_opens`\",\n \"5-1\": \"Integer\",\n \"5-2\": \"How many times users opened the app as a result of tapping the push alert directly\",\n \"6-0\": \"`indirect_opens`\",\n \"6-1\": \"Integer\",\n \"6-2\": \"How many times users opened the app as a result of receiving a push notification, then opening the app without interacting with the push alert\",\n \"7-0\": \"`influenced_opens`\",\n \"7-1\": \"Integer\",\n \"7-2\": \"Sum of `direct_opens` and `indirect_opens`\",\n \"8-0\": \"`opens`\",\n \"8-1\": \"Integer\",\n \"8-2\": \"Same as `direct_opens`\",\n \"9-0\": \"`pushes_succeeded`\",\n \"9-1\": \"Integer\",\n \"9-2\": \"Number of pushes sent based on gateway status (i.e. valid push tokens)\",\n \"10-0\": \"`pushes_rejected`\",\n \"10-1\": \"Integer\",\n \"10-2\": \"Number of pushes rejected based on gateway status (i.e. invalid push tokens)\",\n \"11-0\": \"`event_conversions`\",\n \"11-1\": \"Dictionary<String, Integer>\",\n \"11-2\": \"A list of custom events where the key is a [custom event](doc:collecting-user-data) and the value is the number of occurrences of this event\",\n \"2-0\": \"`message_id`\",\n \"2-1\": \"String\",\n \"2-2\": \"Message ID of the message the notification belongs to.\"\n },\n \"cols\": 3,\n \"rows\": 12\n}\n[/block]","updates":[],"order":21,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5b1f2cbdfd653400031d8d62","editedParams2":true,"editedParams":true,"parentDoc":null,"__v":2,"category":{"sync":{"isSync":false,"url":""},"pages":["5b1f2cbdfd653400031d8d59","55ed079b0d968e2100de8339","5b1f2cbdfd653400031d8d5a","55ed0bb078319821005005cf","5b1f2cbdfd653400031d8d5b","5b1f2cbdfd653400031d8d5c","5b1f2cbdfd653400031d8d5d","5b1f2cbdfd653400031d8d5e","5b1f2cbdfd653400031d8d5f","5b1f2cbdfd653400031d8d60","5b1f2cbdfd653400031d8d61","5b1f2cbdfd653400031d8d62","5b1f2cbdfd653400031d8d63","5b1f2cbdfd653400031d8d64","5b1f2cbdfd653400031d8d65","5b1f2cbdfd653400031d8d66","5b1f2cbdfd653400031d8d67","5b1f2cbdfd653400031d8d6f","5b1f2cbdfd653400031d8d70","5b1f2cbdfd653400031d8d78"],"title":"REST API","slug":"rest-api","order":5,"from_sync":false,"reference":true,"_id":"5b1f2cbdfd653400031d8d44","__v":20,"createdAt":"2015-09-02T04:30:21.948Z","project":"55e67aaa9cc7c62b00c4a1ea","version":"5b1f2cbdfd653400031d8d9f"},"createdAt":"2015-09-07T04:30:22.478Z","project":"55e67aaa9cc7c62b00c4a1ea","githubsync":"","user":"55d2bd8e2463351700f67dd7","version":{"version":"1.3","version_clean":"1.3.0","codename":"rebrand","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5b1f2cbdfd653400031d8d42","5b1f2cbdfd653400031d8d43","5b1f2cbdfd653400031d8d44","5b1f2cbdfd653400031d8d45","5b1f2cbdfd653400031d8d46","561c61b4ad272c0d00a892df","586c014c0abf1d0f000d04d4","58991d2ad207df0f0002186b","5b1f2cbdfd653400031d8d47","5b1f2cbdfd653400031d8d48","5af0fe494ca2730003cbc98a","5af0fe55ec80af0003804ca2"],"_id":"5b1f2cbdfd653400031d8d9f","project":"55e67aaa9cc7c62b00c4a1ea","__v":0,"forked_from":"55e67aab9cc7c62b00c4a1ed","createdAt":"2015-09-02T04:27:23.612Z","releaseDate":"2015-09-02T04:27:23.612Z"}}
getStats / Push Notifications
Returns metrics for a given push notification
Definition
{{ api_url }}{{ page_api_url }}
Parameters
Path Params
notification_id:
required
string
The ID of the notification as reported from the [Notifications API](doc:notifications) response. Use the `id` inside the `notification` object.