{"__v":6,"_id":"57ab9dfcdb6b2e0e003e7dd8","category":{"__v":8,"_id":"55e76b8196131b2f00bf4b72","pages":["55e8b2c13fef5017000dbd9a","55e8b365f0f1850d00d24a5b","55f88ebd5840d119004346bf","55f8ab55c449610d002daf87","5603759a8d58900d0051e9ee","560375cd90ee490d004403da","5633b5ebc49a7c19001fd091","567353ae47f7010d005bfdc9"],"project":"5429beef1163360800ed31fa","version":"5429beef1163360800ed31fd","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-02T21:34:57.232Z","from_sync":false,"order":2,"slug":"apis","title":"Integrating with APIs"},"parentDoc":null,"project":"5429beef1163360800ed31fa","user":"56157c37c41bfc0d00292b38","version":{"__v":20,"_id":"5429beef1163360800ed31fd","project":"5429beef1163360800ed31fa","createdAt":"2014-09-29T20:19:59.904Z","releaseDate":"2014-09-29T20:19:59.904Z","categories":["5429beef1163360800ed31fe","55e74e1f5d36b32b002563fa","55e7500a73169617001f2e86","55e76b8196131b2f00bf4b72","55e89569cdbb8a350096df9c","55f8935eb089b71700a8364e","55f8a67d3bb4bb0d0022d093","55f9dbefc7ef770d00d9bf6d","5601c21a22ecf60d002b27b3","5601c21ff12aee0d001bb06e","5601c2256c7b610d00280db5","5601c22c22ecf60d002b27b4","5603738d0c78b00d0039af47","5626f70bfcbbc621004ebf52","566f7a1ae144ab0d00e9732f","566f85ca7820960d00c3b93d","56708ce43a32d20d00c45cbf","56708d436995210d003aad8e","5736471abe10a9200030732c","57a82c7aff9bd30e00a6f1c1"],"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-08-10T21:34:52.169Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -H \"Authorization: Bearer aBcdeFgHiJK\" \\\nhttps://console.adsnative.com/api/v2/report/provider/?start_date=2016-01-01&end_date=2016-01-02","language":"curl"}]},"results":{"codes":[{"name":"","code":"{  \n   \"status\":{  \n      \"message\":\"Success\",\n      \"time_elapse\":154\n   },\n   \"data\":[  \n      {  \n      \t\"total\":{  \n           \"revenue\":0.13,\n           \"impression\":123\n        },\n        \"meta\":{  \n           \"status\":\"Paused\",\n           \"provider\":72,\n           \"name\":\"Provider Name 1\"         ...\n        }\n   \t\t}\n    ],\n    \"summary\":{  \n             \"series\":{  \n                \"revenue\":[...],\n                \"impression\":[...],\n                \"labels\":[string labels for each time unit],\n                \"ts\":[unix timestamps for each time unit]\n             },\n            \"total\":{  \n               \"revenue\":0.13,\n               \"impression\":123\n            },\n            \"meta\":{  \n               \"request\":{  \n                  \"render_format\":\"json\",\n                  \"data_type\":\"full\",\n                  \"end_date\":\"2016-01-02T00:00:00\",\n                  \"object_type\":\"provider\",\n                  \"object_id\":\"123\",\n                  \"group_by\":null,\n                  \"granularity\":\"days\",\n                  \"start_date\":\"2016-01-01T00:00:00\"\n               },\n               \"id\":\"summary\"\n            }\n    }\n}","language":"json","status":200},{"name":"","code":"{\n\t\"status\": {\n\t\"message\": \"Invalid request.\",\n\t\"detail\": {\n      \"start_date\": [\n        \"This field is required.\"\n      ],\n      \"end_date\": [\n        \"This field is required.\"\n      ]\n    },\n\t\"time_elapse\": 0\n\t}\n}","language":"json","status":400}]},"settings":"57aba40454fa780e006c5437","auth":"required","params":[{"_id":"57aba7b8b5e8742000e17ecb","ref":"","in":"path","required":true,"desc":"Options: campaign, advertiser, placement, site, or provider","default":"","type":"string","name":"OBJECT_TYPE"},{"_id":"57aba7b8b5e8742000e17eca","ref":"","in":"path","required":false,"desc":"If blank, top-level report data for the object_type will be returned. Multiple IDs can be concatenated using '-'.  e.g. 1-2-3","default":"","type":"string","name":"OBJECT_ID"},{"_id":"57aba7b8b5e8742000e17ec9","ref":"","in":"query","required":true,"desc":"","default":"","type":"yyyy-mm-dd","name":"start_date"},{"_id":"57aba7b8b5e8742000e17ec8","ref":"","in":"query","required":true,"desc":"","default":"","type":"yyyy-mm-dd","name":"end_date"},{"_id":"57aba7b8b5e8742000e17ec6","ref":"","in":"query","required":false,"desc":"Time-series granularity: days, months, hours","default":"days","type":"string","name":"granularity"},{"_id":"57aba7b8b5e8742000e17ec5","ref":"","in":"query","required":false,"desc":"Response format.  'json' or 'csv'.  'csv' is used for exporting as file.","default":"json","type":"string","name":"render_format"},{"_id":"57aba7b8b5e8742000e17ec4","ref":"","in":"query","required":false,"desc":"Response data fields to include.  Options are: 'total', 'series', 'full'.  'full' returns both 'total' and 'series' data","default":"full","type":"string","name":"data_type"},{"_id":"57aba7b8b5e8742000e17ec7","ref":"","in":"query","required":false,"desc":"Group by object.  Only supported for Unit report where a single object_id is defined.","default":"","type":"string","name":"group_by"},{"_id":"57abb4d0b5c9591700b879c3","ref":"","in":"header","required":true,"desc":"OAuth2 Bearer token. Follow **[authentication instructions](http://dev.adsnative.com/v1.0/docs/console-api-authentication)** to authenticate.","default":"","type":"string","name":"Authorization: Bearer"},{"_id":"58213ba5ac662027004dba1d","ref":"","in":"query","required":false,"desc":"Response includes itemized \"data\" field.","default":"True","type":"boolean","name":"itemize"}],"url":"/v2/report/OBJECT_TYPE/OBJECT_ID"},"isReference":true,"order":12,"body":"## Response Fields\n\n* **status**: status of API response\n* **data**: array of data objects based on group_by request parameter\n    - ***total***: aggregate metrics for each group_by object\n    - ***meta***: Metadata about the object\n* **summary**: summary of all data in total and time-series format\n    - ***total***:  total aggregate metrics\n    - ***series***:  total time-series metrics\n    - ***meta***: echo API request parameters\n\n\n## Available Metrics\n* **visits** - For placement and site reports only\n* **fill_rate** - For placement and site reports only\n* **impressions**\n* **viewable_impressions**\n* **viewability**  -  100 * viewable_impressions / impressions \n* **views** - Video Views\n* **clicks**\n* **ctr** - 100 * clicks / impressions\n* **revenue** - For placement and site reports \n* **expense** - For campaign and advertiser reports\n* **ecpm** - effective CPM\n* **ecpc** - effective CPC\n* **vcpm** - viewable CPM\n\n** Advanced Metrics **\n* **vv25** - 1st Quartile Video Views\n* **vv50** - 2nd Quartile Video Views\n* **vv75** - 3rd Quartile Video Views\n* **vv100** - 4th Quartile Video Views\n* **network_request** - For placement and site reports only\n* **network_timeout** - For placement and site reports only\n* **network_fallback** - For placement and site reports only\n\n##  Available Options for group_by\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"OBJECT_TYPE\",\n    \"h-1\": \"campaign\",\n    \"h-2\": \"advertiser\",\n    \"h-3\": \"placement\",\n    \"h-4\": \"site\",\n    \"h-5\": \"provider\",\n    \"0-0\": \"**group_by**\",\n    \"0-1\": \"creative (default)\",\n    \"1-1\": \"placement\",\n    \"2-1\": \"site\",\n    \"3-1\": \"\",\n    \"0-2\": \"campaign (default)\",\n    \"1-2\": \"placement\",\n    \"2-2\": \"site\",\n    \"3-2\": \"\",\n    \"1-3\": \"advertiser\",\n    \"0-3\": \"campaign (default)\",\n    \"2-3\": \"\",\n    \"3-3\": \"\",\n    \"0-4\": \"placement (default)\",\n    \"1-4\": \"campaign\",\n    \"2-4\": \"advertiser\",\n    \"3-4\": \"\",\n    \"0-5\": \"placement  (default)\",\n    \"1-5\": \"site\"\n  },\n  \"cols\": 6,\n  \"rows\": 4\n}\n[/block]","excerpt":"","slug":"reporting-api-v2","type":"get","title":"Reporting API v2"}

getReporting API v2


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

OBJECT_TYPE:
required
string
Options: campaign, advertiser, placement, site, or provider
OBJECT_ID:
string
If blank, top-level report data for the object_type will be returned. Multiple IDs can be concatenated using '-'. e.g. 1-2-3

Query Params

start_date:
required
yyyy-mm-dd
end_date:
required
yyyy-mm-dd
granularity:
stringdays
Time-series granularity: days, months, hours
render_format:
stringjson
Response format. 'json' or 'csv'. 'csv' is used for exporting as file.
data_type:
stringfull
Response data fields to include. Options are: 'total', 'series', 'full'. 'full' returns both 'total' and 'series' data
group_by:
string
Group by object. Only supported for Unit report where a single object_id is defined.
itemize:
booleanTrue
Response includes itemized "data" field.

Headers

Authorization:
required
string
OAuth2 Bearer token. Follow **[authentication instructions](http://dev.adsnative.com/v1.0/docs/console-api-authentication)** to authenticate.

Examples


Result Format


Documentation

## Response Fields * **status**: status of API response * **data**: array of data objects based on group_by request parameter - ***total***: aggregate metrics for each group_by object - ***meta***: Metadata about the object * **summary**: summary of all data in total and time-series format - ***total***: total aggregate metrics - ***series***: total time-series metrics - ***meta***: echo API request parameters ## Available Metrics * **visits** - For placement and site reports only * **fill_rate** - For placement and site reports only * **impressions** * **viewable_impressions** * **viewability** - 100 * viewable_impressions / impressions * **views** - Video Views * **clicks** * **ctr** - 100 * clicks / impressions * **revenue** - For placement and site reports * **expense** - For campaign and advertiser reports * **ecpm** - effective CPM * **ecpc** - effective CPC * **vcpm** - viewable CPM ** Advanced Metrics ** * **vv25** - 1st Quartile Video Views * **vv50** - 2nd Quartile Video Views * **vv75** - 3rd Quartile Video Views * **vv100** - 4th Quartile Video Views * **network_request** - For placement and site reports only * **network_timeout** - For placement and site reports only * **network_fallback** - For placement and site reports only ## Available Options for group_by [block:parameters] { "data": { "h-0": "OBJECT_TYPE", "h-1": "campaign", "h-2": "advertiser", "h-3": "placement", "h-4": "site", "h-5": "provider", "0-0": "**group_by**", "0-1": "creative (default)", "1-1": "placement", "2-1": "site", "3-1": "", "0-2": "campaign (default)", "1-2": "placement", "2-2": "site", "3-2": "", "1-3": "advertiser", "0-3": "campaign (default)", "2-3": "", "3-3": "", "0-4": "placement (default)", "1-4": "campaign", "2-4": "advertiser", "3-4": "", "0-5": "placement (default)", "1-5": "site" }, "cols": 6, "rows": 4 } [/block]