{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","method":"get","examples":{"codes":[]},"settings":"","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"Reporting API","type":"endpoint","slug":"reporting-api","excerpt":"","body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"API Access\"\n}\n[/block]\n#1. API overview\n- The Reporting API uses HTTP API, which tries to follow a RESTful design pattern.\n- The results you get back will be in the JSON format.\n- All numbers are reported in timezone UTC (+00:00).\n- The rate limit of reporting API is 5 requests per second.\n\n#2. Account Wide Reporting API\nYou can query for the data of all apps under a single account.\n\n##2-1. Endpoint\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl https://dashboard.pubnative.net/api/reports?account_auth_token={ACCOUNT_AUTH_TOKEN}&start_date={START_DATE}&end_date={END_DATE}\",\n \"language\": \"curl\",\n \"name\": \"cURL\"\n },\n {\n \"code\": \"curl https://dashboard.pubnative.net/api/reports?account_auth_token={ACCOUNT_AUTH_TOKEN}&start_date={START_DATE}&end_date={END_DATE}&group_by=country_code\",\n \"language\": \"curl\",\n \"name\": \"by country_code\"\n },\n {\n \"code\": \"curl https://dashboard.pubnative.net/api/reports?account_auth_token={ACCOUNT_AUTH_TOKEN}&start_date={START_DATE}&end_date={END_DATE}&group_by[]=zone_id&group_by[]=country_code\",\n \"language\": \"curl\",\n \"name\": \"by multiple group_by\"\n },\n {\n \"code\": \"curl https://dashboard.pubnative.net/api/reports?account_auth_token={ACCOUNT_AUTH_TOKEN}&start_date={START_DATE}&end_date={END_DATE}&group_by=zone_id\",\n \"language\": \"curl\",\n \"name\": \"by zone_id\"\n },\n {\n \"code\": \"curl https://dashboard.pubnative.net/api/reports?account_auth_token={ACCOUNT_AUTH_TOKEN}&start_date={START_DATE}&end_date={END_DATE}&group_by=zone_name\",\n \"language\": \"curl\",\n \"name\": \"by zone_name\"\n },\n {\n \"code\": \"curl https://dashboard.pubnative.net/api/reports?account_auth_token={ACCOUNT_AUTH_TOKEN}&start_date={START_DATE}&end_date={END_DATE}&group_by=store_app_id\",\n \"language\": \"curl\",\n \"name\": \"by store_app_id\"\n }\n ]\n}\n[/block]\n##2-2. Request Parameters\n[block:callout]\n{\n \"type\": \"success\",\n \"title\": \"NEW\",\n \"body\": \"New optional parameters added:\\n- group_by=date\\n- date_format\\n- timezone\"\n}\n[/block]\n\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Parameter\",\n \"h-1\": \"Required?\",\n \"h-2\": \"Description\",\n \"h-3\": \"Example\",\n \"0-0\": \"account_auth_token\",\n \"1-0\": \"start_date\",\n \"2-0\": \"end_date\",\n \"3-0\": \"group_by\",\n \"0-1\": \"Required\",\n \"1-1\": \"Required\",\n \"2-1\": \"Required\",\n \"3-1\": \"Optional\",\n \"0-2\": \"Reporting API access token (unique per account).\\n\\nAvailable in dashboard account menu (click Reporting API Key)\",\n \"1-2\": \"Start date of the data (dd/mm/yyyy)\",\n \"2-2\": \"End date of the data (dd/mm/yyyy)\",\n \"3-2\": \"Add in case you wish to breakdown by specific dimension(s). Please note that the report is broken down by pub_app by default.\",\n \"3-3\": \"country_code\\ndate (when added, pub_app breakdown is hidden)\\nstore_app_id\\nzone_id\\nzone_name\\n\\n(static value)\",\n \"2-3\": \"30/01/2021\",\n \"1-3\": \"25/01/2021\",\n \"0-3\": \"1001a00a1234ab1111ab12a1abc\\n12312311a10000a1a123412345678abc1234\",\n \"4-0\": \"group_by[]\",\n \"4-1\": \"Optional\",\n \"4-2\": \"Use in case you want to add multiple group_by\",\n \"4-3\": \"&group_by[]=zone_id&group_by[]=country_code\",\n \"5-3\": \"‘dd/mm/yyyy’ (default), ‘yyyy-mm-dd’\",\n \"6-0\": \"timezone\",\n \"5-0\": \"date_format\",\n \"5-1\": \"Optional\",\n \"6-1\": \"Optional\",\n \"6-3\": \"+01:00, +09:00, -08:00, etc.\",\n \"6-2\": \"In case timezone is not added, then the default timezone will be used (UTC)\",\n \"5-2\": \"Change date_format to match your system’s date format\"\n },\n \"cols\": 4,\n \"rows\": 7\n}\n[/block]\n##2-3. Example Response\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"reports\\\": [\\n {\\n \\\"ctr\\\": 0.24,\\n \\\"app_name\\\": \\\"APP NAME1\\\",\\n \\\"ad_server_fill_rate\\\": 0.24,\\n \\\"ad_server_requests\\\": 862700,\\n \\\"ad_server_filled_requests\\\": 2050,\\n \\\"clicks\\\": 4,\\n \\\"impressions\\\": 1682,\\n \\\"ecpm\\\": 0.86,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.44\\n },\\n {\\n \\\"ctr\\\": 0.0,\\n \\\"app_name\\\": \\\"APP NAME2\\\",\\n \\\"ad_server_fill_rate\\\": 1.35,\\n \\\"ad_server_requests\\\": 81700,\\n \\\"ad_server_filled_requests\\\": 1100,\\n \\\"clicks\\\": 0,\\n \\\"impressions\\\": 915,\\n \\\"ecpm\\\": 1.24,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.13\\n },\",\n \"language\": \"json\",\n \"name\": \"JSON\"\n },\n {\n \"code\": \"{\\n \\\"reports\\\": [\\n {\\n \\\"ctr\\\": 0.24,\\n \\\"app_name\\\": \\\"APP NAME1\\\",\\n \\\"zone_id\\\": \\\"1\\\",\\n \\\"ad_server_fill_rate\\\": 0.24,\\n \\\"ad_server_requests\\\": 862700,\\n \\\"ad_server_filled_requests\\\": 2050,\\n \\\"clicks\\\": 4,\\n \\\"impressions\\\": 1682,\\n \\\"ecpm\\\": 0.86,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.44\\n },\\n {\\n \\\"ctr\\\": 0.0,\\n \\\"app_name\\\": \\\"APP NAME2\\\",\\n \\\"zone_id\\\": \\\"1\\\",\\n \\\"ad_server_fill_rate\\\": 1.35,\\n \\\"ad_server_requests\\\": 81700,\\n \\\"ad_server_filled_requests\\\": 1100,\\n \\\"clicks\\\": 0,\\n \\\"impressions\\\": 915,\\n \\\"ecpm\\\": 1.24,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.13\\n },\",\n \"language\": \"json\",\n \"name\": \"by zone_id\"\n },\n {\n \"code\": \"{\\n \\\"reports\\\": [\\n {\\n \\\"ctr\\\": 0.24,\\n \\\"app_name\\\": \\\"APP NAME1\\\",\\n \\\"country_code\\\": \\\"US\\\",\\n \\\"ad_server_fill_rate\\\": 0.24,\\n \\\"ad_server_requests\\\": 862700,\\n \\\"ad_server_filled_requests\\\": 2050,\\n \\\"clicks\\\": 4,\\n \\\"impressions\\\": 1682,\\n \\\"ecpm\\\": 0.86,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.44\\n },\\n {\\n \\\"ctr\\\": 0.0,\\n \\\"app_name\\\": \\\"APP NAME2\\\",\\n \\\"country_code\\\": \\\"KR\\\",\\n \\\"ad_server_fill_rate\\\": 1.35,\\n \\\"ad_server_requests\\\": 81700,\\n \\\"ad_server_filled_requests\\\": 1100,\\n \\\"clicks\\\": 0,\\n \\\"impressions\\\": 915,\\n \\\"ecpm\\\": 1.24,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.13\\n },\",\n \"language\": \"json\",\n \"name\": \"by country_code\"\n },\n {\n \"code\": \"{\\n \\\"reports\\\": [\\n {\\n \\\"ctr\\\": 0.24,\\n \\\"app_name\\\": \\\"APP NAME3\\\",\\n \\\"country_code\\\": \\\"US\\\",\\n \\\"zone_id\\\": \\\"1\\\",\\n \\\"ad_server_fill_rate\\\": 0.24,\\n \\\"ad_server_requests\\\": 862700,\\n \\\"ad_server_filled_requests\\\": 2050,\\n \\\"clicks\\\": 4,\\n \\\"impressions\\\": 1682,\\n \\\"ecpm\\\": 0.86,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.44\\n },\\n {\\n \\\"ctr\\\": 0.0,\\n \\\"app_name\\\": \\\"APP NAME2\\\",\\n \\\"country_code\\\": \\\"KR\\\",\\n \\\"zone_id\\\": \\\"1\\\",\\n \\\"ad_server_fill_rate\\\": 1.35,\\n \\\"ad_server_requests\\\": 81700,\\n \\\"ad_server_filled_requests\\\": 1100,\\n \\\"clicks\\\": 0,\\n \\\"impressions\\\": 915,\\n \\\"ecpm\\\": 1.24,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.13\\n },\",\n \"language\": \"json\",\n \"name\": \"by multiple group_by\"\n },\n {\n \"code\": \"{\\n \\\"reports\\\": [\\n {\\n \\\"ctr\\\": 0.24,\\n \\\"app_name\\\": \\\"APP NAME1\\\",\\n \\\"zone_name\\\": \\\"default\\\",\\n \\\"ad_server_fill_rate\\\": 0.24,\\n \\\"ad_server_requests\\\": 862700,\\n \\\"ad_server_filled_requests\\\": 2050,\\n \\\"clicks\\\": 4,\\n \\\"impressions\\\": 1682,\\n \\\"ecpm\\\": 0.86,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.44\\n },\\n {\\n \\\"ctr\\\": 0.0,\\n \\\"app_name\\\": \\\"APP NAME2\\\",\\n \\\"zone_name\\\": \\\"default\\\",\\n \\\"ad_server_fill_rate\\\": 1.35,\\n \\\"ad_server_requests\\\": 81700,\\n \\\"ad_server_filled_requests\\\": 1100,\\n \\\"clicks\\\": 0,\\n \\\"impressions\\\": 915,\\n \\\"ecpm\\\": 1.24,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.13\\n },\",\n \"language\": \"json\",\n \"name\": \"by zone_name\"\n },\n {\n \"code\": \"{\\n \\\"reports\\\": [\\n {\\n \\\"ctr\\\": 0.24,\\n \\\"app_name\\\": \\\"APP NAME1\\\",\\n \\\"store_app_id\\\": \\\"com.reporting.api\\\",\\n \\\"ad_server_fill_rate\\\": 0.24,\\n \\\"ad_server_requests\\\": 862700,\\n \\\"ad_server_filled_requests\\\": 2050,\\n \\\"clicks\\\": 4,\\n \\\"impressions\\\": 1682,\\n \\\"ecpm\\\": 0.86,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.44\\n },\\n {\\n \\\"ctr\\\": 0.0,\\n \\\"app_name\\\": \\\"APP NAME2\\\",\\n \\\"store_app_id\\\": \\\"com.test\\\",\\n \\\"ad_server_fill_rate\\\": 1.35,\\n \\\"ad_server_requests\\\": 81700,\\n \\\"ad_server_filled_requests\\\": 1100,\\n \\\"clicks\\\": 0,\\n \\\"impressions\\\": 915,\\n \\\"ecpm\\\": 1.24,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.13\\n },\",\n \"language\": \"json\",\n \"name\": \"by store_app_id\"\n }\n ]\n}\n[/block]\n#3. App Specific Reporting API\nYou can query for the data of specific App ID under your account.\n\n##3-1. Endpoint\nYou can request for data with or without country breakdown included.\n(add *by_country* in endpoint if you want with country breakdown)\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"https://dashboard.pubnative.net/api/v1/apps/{APP_ID}/reports?account_auth_token={ACCOUNT_AUTH_TOKEN}&start_date={START_DATE}&end_date={END_DATE}\",\n \"language\": \"curl\"\n },\n {\n \"code\": \"https://dashboard.pubnative.net/api/v1/apps/{APP_ID}/reports/by_country?account_auth_token={ACCOUNT_AUTH_TOKEN}&start_date={START_DATE}&end_date={END_DATE}\",\n \"language\": \"text\",\n \"name\": \"by country_code\"\n }\n ]\n}\n[/block]\n##3-2. Request Parameters\n[block:parameters]\n{\n \"data\": {\n \"1-0\": \"account_auth_token\",\n \"h-0\": \"Parameter\",\n \"h-1\": \"Required?\",\n \"h-2\": \"Description\",\n \"h-3\": \"Example\",\n \"3-0\": \"end_date\",\n \"4-0\": \"\",\n \"1-2\": \"Reporting API access token (unique per account).\\n\\nAvailable in dashboard account menu (click Reporting API Key)\",\n \"3-2\": \"End date of the data (dd/mm/yyyy)\",\n \"4-2\": \"\",\n \"3-3\": \"31/01/2021\",\n \"4-3\": \"\",\n \"1-3\": \"1001a00a1234ab1111abc12a1abc\\n12312311a10000a1a123412345678abc1234\",\n \"1-1\": \"Required\",\n \"3-1\": \"Required\",\n \"4-1\": \"\",\n \"0-0\": \"app_id\",\n \"0-1\": \"Required\",\n \"0-2\": \"Unique ID of your app. Check partner dashboard.\",\n \"0-3\": \"1023001\",\n \"2-0\": \"start_date\",\n \"2-1\": \"Required\",\n \"2-2\": \"Start date of the data (dd/mm/yyyy)\",\n \"2-3\": \"25/01/2021\"\n },\n \"cols\": 4,\n \"rows\": 4\n}\n[/block]\n##3-3. Example Response\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"reports\\\": [\\n {\\n \\\"ctr\\\": 0.0,\\n \\\"ad_server_fill_rate\\\": 0.62,\\n \\\"ecpm\\\": 3.25,\\n \\\"ad_server_requests\\\": 154050,\\n \\\"ad_server_filled_requests\\\": 950,\\n \\\"clicks\\\": 0,\\n \\\"impressions\\\": 422,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 1.37\\n },\\n {\\n \\\"ctr\\\": 0.62,\\n \\\"ad_server_fill_rate\\\": 0.22,\\n \\\"ecpm\\\": 3.13,\\n \\\"ad_server_requests\\\": 134750,\\n \\\"ad_server_filled_requests\\\": 300,\\n \\\"clicks\\\": 2,\\n \\\"impressions\\\": 322,\\n \\\"date\\\": \\\"26/01/2021\\\",\\n \\\"revenues\\\": 1.01\\n },\",\n \"language\": \"json\"\n },\n {\n \"code\": \"{\\n \\\"reports\\\": [\\n {\\n \\\"ctr\\\": 0.0,\\n \\\"country_code\\\": \\\"US\\\",\\n \\\"ad_server_fill_rate\\\": 0.0,\\n \\\"ecpm\\\": 0.0,\\n \\\"ad_server_requests\\\": 50,\\n \\\"ad_server_filled_requests\\\": 0,\\n \\\"clicks\\\": 0,\\n \\\"impressions\\\": 0,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 0.0\\n },\\n {\\n \\\"ctr\\\": 0.0,\\n \\\"country_code\\\": \\\"CA\\\",\\n \\\"ad_server_fill_rate\\\": 66.67,\\n \\\"ecpm\\\": 0.51,\\n \\\"ad_server_requests\\\": 150,\\n \\\"ad_server_filled_requests\\\": 100,\\n \\\"clicks\\\": 0,\\n \\\"impressions\\\": 69,\\n \\\"date\\\": \\\"25/01/2021\\\",\\n \\\"revenues\\\": 0.03\\n },\",\n \"language\": \"json\",\n \"name\": \"by country_code\"\n }\n ]\n}\n[/block]","updates":["5d8c92bf798e78001208c6d1"],"order":7,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5b43842c9bfbff0003366f6e","project":"574ff4bd3fa1870e00889ba6","version":{"version":"3.0","version_clean":"3.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["574ff4bd3fa1870e00889baa","577278ecdceb570e003a9001","577279865617b117009e643f","577279985617b117009e6440","577279bc8c48e00e00503504","5774fe18605b770e0037be8a","577ce3ad87acf617003c4187","577f8476a77c700e006a6c52","57b486ae0d2b640e00e9d3f5","57b722133d3e620e004ec74b","57bd95f00fe3a00e003e2cc5","57c8349359cd4b0e00b888ef","57c8349b5754fa1700b12242","57cedb0bad483e0e00890239","57cedbe807d7ea0e00e438cc","57d82967156ef72b007ffcd8","58ee353ad1ee2f0f0034a13d","596623221738df00298622a5","59a51730192dba000fc9ca38","59a8129f1e7b26000fa0fb1a","5a0322bf044b6f001c236e36","5a79897c5b6e430030746df6","5a79898c2b2d5f0012cbab63","5ab3b5e3d2d1e2006252a8f2","5b1a43bd678eab0003aa54a4","5b6d95e29d346300038baff3","5c77d3a1e0794000451bced2","5e902519bb65b200466e7957","5f228f5bd6a1cc0024afda30","617a64bcd70d9600121d80de","617a65249ebd96004a95678d","61bb5714ed7ed60071fa53b6"],"_id":"574ff4bd3fa1870e00889ba9","createdAt":"2016-06-02T08:56:29.492Z","project":"574ff4bd3fa1870e00889ba6","releaseDate":"2016-06-02T08:56:29.492Z","__v":32},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"[PUBLISHER] API Documentation","slug":"api-documentation","order":1,"from_sync":false,"reference":true,"_id":"5774fe18605b770e0037be8a","__v":0,"project":"574ff4bd3fa1870e00889ba6","version":"574ff4bd3fa1870e00889ba9","createdAt":"2016-06-30T11:10:16.206Z"},"user":"59aebb87fde5ab002740a01c","createdAt":"2018-07-09T15:50:04.327Z","githubsync":"","__v":1,"parentDoc":null}