{"_id":"5568b6de6976ef0d0099c8ef","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"category":"545bdf3488ebc81c0077ad1c","hidden":false,"link_url":"","slug":"getting-started-1","user":"545bdef0e93d95100059ead2","__v":1,"excerpt":"","githubsync":"","order":0,"sync_unique":"","updates":[],"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","title":"Getting started","version":"545bdf3488ebc81c0077ad1b","body":"This document is used as a reference and guideline for integrating Adnium into your own system and allow programmatic operations.\n\nAll of our document references are given examples in PHP and list what data must be passed to successfully complete a request.","link_external":false,"type":"basic","createdAt":"2015-05-29T18:58:38.138Z","childrenPages":[]}

Getting started


This document is used as a reference and guideline for integrating Adnium into your own system and allow programmatic operations. All of our document references are given examples in PHP and list what data must be passed to successfully complete a request.
View all 89 endpoints
This document is used as a reference and guideline for integrating Adnium into your own system and allow programmatic operations. All of our document references are given examples in PHP and list what data must be passed to successfully complete a request.
{"_id":"5568b6f1952dca0d0019c7af","order":1,"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"link_external":false,"user":"545bdef0e93d95100059ead2","body":"Your API token will be a 32 character hex string which must be passed on all requests, otherwise it will be rejected.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Example: https://api.adnium.com/v1/publisher/zones/?token=664097f4cfe62b053b4e799efcefe54f\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]","category":"545bdf3488ebc81c0077ad1c","excerpt":"Each request you make to the API requires you to pass in a \"token\" generated in the Adnium dashboard.","githubsync":"","hidden":false,"link_url":"","project":"545bdf3488ebc81c0077ad18","slug":"authentication","sync_unique":"","type":"basic","__v":3,"createdAt":"2015-05-29T18:58:57.098Z","parentDoc":null,"title":"Authentication","updates":[],"version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

Authentication

Each request you make to the API requires you to pass in a "token" generated in the Adnium dashboard.

Your API token will be a 32 character hex string which must be passed on all requests, otherwise it will be rejected. [block:code] { "codes": [ { "code": "Example: https://api.adnium.com/v1/publisher/zones/?token=664097f4cfe62b053b4e799efcefe54f", "language": "http" } ] } [/block]
Your API token will be a 32 character hex string which must be passed on all requests, otherwise it will be rejected. [block:code] { "codes": [ { "code": "Example: https://api.adnium.com/v1/publisher/zones/?token=664097f4cfe62b053b4e799efcefe54f", "language": "http" } ] } [/block]
{"_id":"556dc143e24c5a0d007034d7","api":{"auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":""},"excerpt":"","updates":[],"hidden":false,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","user":"545bdef0e93d95100059ead2","__v":3,"body":"The Adnium API has the following restrictions in place:\n\n  * Each API request must be accompanied by a valid API token\n  * Each API request must be made over https\n  * Maximum 35 requests per minute per user","createdAt":"2015-06-02T14:44:19.834Z","githubsync":"","order":2,"slug":"restrictions","sync_unique":"","type":"basic","category":"545bdf3488ebc81c0077ad1c","link_external":false,"link_url":"","title":"Restrictions","version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

Restrictions


The Adnium API has the following restrictions in place: * Each API request must be accompanied by a valid API token * Each API request must be made over https * Maximum 35 requests per minute per user
The Adnium API has the following restrictions in place: * Each API request must be accompanied by a valid API token * Each API request must be made over https * Maximum 35 requests per minute per user
{"_id":"5568c23b6976ef0d0099c922","githubsync":"","order":0,"__v":7,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/site/[YOUR_SITE_ID]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","hidden":false,"link_url":"","parentDoc":null,"api":{"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 1,\n  \"rows\": [\n    {\n      \"id\": \"1\",\n      \"name\": \"my ad zone\",\n      \"url\": \"http:\\/\\/example.org\",\n      \"description\": \"my description\",\n      \"category_id\": \"1\",\n      \"status\": \"Enabled\",\n      \"date_created\": \"2015-03-09 15:19:53\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    }\n  ]\n}","name":"Success"}]},"settings":"","url":"/publisher/site/:id","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/site/1?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[]},"createdAt":"2015-05-29T19:47:07.956Z","isReference":false,"link_external":false,"slug":"publishersiteid","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","category":"5568c1fd952dca0d0019c7cf","sync_unique":"","title":"List Site","type":"get","excerpt":"Get a single site","project":"545bdf3488ebc81c0077ad18","childrenPages":[]}

getList Site

Get a single site

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/site/[YOUR_SITE_ID]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/site/[YOUR_SITE_ID]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568c27dc87afd2500e52512","excerpt":"Get all sites","isReference":false,"sync_unique":"","title":"List Sites","api":{"method":"get","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": [\n    {\n      \"id\": \"1\",\n      \"name\": \"my ad zone\",\n      \"url\": \"http:\\/\\/example.org\",\n      \"description\": \"my description\",\n      \"category_id\": \"1\",\n      \"status\": \"Enabled\",\n      \"date_created\": \"2015-03-09 15:19:53\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    },\n    {\n      \"id\": \"2\",\n      \"name\": \"my ad zone\",\n      \"url\": \"http:\\/\\/example.org\",\n      \"description\": \"my description\",\n      \"category_id\": \"1\",\n      \"status\": \"Enabled\",\n      \"date_created\": \"2015-03-09 15:19:53\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    }\n  ]\n}","name":"Success."}]},"settings":"","url":"/publisher/sites/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]}},"category":"5568c1fd952dca0d0019c7cf","__v":5,"hidden":false,"version":"545bdf3488ebc81c0077ad1b","type":"get","user":"545bdef0e93d95100059ead2","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","parentDoc":null,"slug":"publishersites","link_url":"","order":1,"project":"545bdf3488ebc81c0077ad18","updates":[],"createdAt":"2015-05-29T19:48:13.441Z","githubsync":"","link_external":false,"childrenPages":[]}

getList Sites

Get all sites

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/sites/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/sites/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568c26ac87afd2500e52510","slug":"publishersiteslimit","excerpt":"Get all sites with a limit","githubsync":"","isReference":false,"parentDoc":null,"version":"545bdf3488ebc81c0077ad1b","createdAt":"2015-05-29T19:47:54.918Z","project":"545bdf3488ebc81c0077ad18","updates":[],"user":"545bdef0e93d95100059ead2","hidden":false,"link_url":"","title":"List Sites w/ Limit","category":"5568c1fd952dca0d0019c7cf","link_external":false,"order":2,"sync_unique":"","__v":4,"api":{"examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/2?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": [\n    {\n      \"id\": \"1\",\n      \"name\": \"my ad zone\",\n      \"url\": \"http:\\/\\/example.org\",\n      \"description\": \"my description\",\n      \"category_id\": \"1\",\n      \"status\": \"Enabled\",\n      \"date_created\": \"2015-03-09 15:19:53\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    },\n    {\n      \"id\": \"2\",\n      \"name\": \"my ad zone\",\n      \"url\": \"http:\\/\\/example.org\",\n      \"description\": \"my description\",\n      \"category_id\": \"1\",\n      \"status\": \"Enabled\",\n      \"date_created\": \"2015-03-09 15:19:53\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    }\n  ]\n}","name":"Success","status":null}]},"settings":"","url":"/publisher/sites/:limit","auth":"required"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/2?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","type":"get","childrenPages":[]}

getList Sites w/ Limit

Get all sites with a limit

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/sites/2?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/sites/2?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568c2f6c87afd2500e52516","__v":4,"category":"5568c1fd952dca0d0019c7cf","createdAt":"2015-05-29T19:50:14.980Z","hidden":false,"link_external":false,"slug":"publishersiteslimitorder","type":"get","user":"545bdef0e93d95100059ead2","githubsync":"","project":"545bdf3488ebc81c0077ad18","title":"List Sites w/ Limit & Sort","version":"545bdf3488ebc81c0077ad1b","excerpt":"Retrieve sites with limit and sorting","link_url":"","parentDoc":null,"api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/2/DESC/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": [\n    {\n      \"id\": \"2\",\n      \"name\": \"my ad zone\",\n      \"url\": \"http:\\/\\/example.org\",\n      \"description\": \"my description\",\n      \"category_id\": \"1\",\n      \"status\": \"Enabled\",\n      \"date_created\": \"2015-03-09 15:19:53\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    },\n    {\n      \"id\": \"1\",\n      \"name\": \"my ad zone\",\n      \"url\": \"http:\\/\\/example.org\",\n      \"description\": \"my description\",\n      \"category_id\": \"1\",\n      \"status\": \"Enabled\",\n      \"date_created\": \"2015-03-09 15:19:53\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    }\n  ]\n}","name":"Success"}]},"settings":"","url":"/publisher/sites/:limit/:order"},"body":"This request supports limiting as well as sorting, there are two sorting methods available.\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\nAscending\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://api.adnium.com/v1/publisher/sites/10/ASC\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\nDescending\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://api.adnium.com/v1/publisher/sites/10/DESC\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[LIMIT] with your result set limit (e.g. 5)\n[ORDER] with your result set order (ASC/DESC)\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/[LIMIT]/[ORDER]/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","isReference":false,"order":3,"sync_unique":"","updates":[],"childrenPages":[]}

getList Sites w/ Limit & Sort

Retrieve sites with limit and sorting

This request supports limiting as well as sorting, there are two sorting methods available. [block:api-header] { "type": "basic" } [/block] Ascending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/publisher/sites/10/ASC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic" } [/block] Descending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/publisher/sites/10/DESC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [LIMIT] with your result set limit (e.g. 5) [ORDER] with your result set order (ASC/DESC) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/sites/[LIMIT]/[ORDER]/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This request supports limiting as well as sorting, there are two sorting methods available. [block:api-header] { "type": "basic" } [/block] Ascending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/publisher/sites/10/ASC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic" } [/block] Descending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/publisher/sites/10/DESC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [LIMIT] with your result set limit (e.g. 5) [ORDER] with your result set order (ASC/DESC) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/sites/[LIMIT]/[ORDER]/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568c3376976ef0d0099c926","__v":4,"api":{"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 9,\n  \"rows\": [\n    {\n      \"id\": \"1\",\n      \"name\": \"Adult Games (Non-Casino)\"\n    },\n    {\n      \"id\": \"2\",\n      \"name\": \"Casino\"\n    },\n    {\n      \"id\": \"3\",\n      \"name\": \"Forum\"\n    },\n    {\n      \"id\": \"4\",\n      \"name\": \"Feeder\"\n    },\n    {\n      \"id\": \"5\",\n      \"name\": \"Tube\"\n    },\n    {\n      \"id\": \"6\",\n      \"name\": \"File Hosting\"\n    },\n    {\n      \"id\": \"7\",\n      \"name\": \"Picture\"\n    },\n    {\n      \"id\": \"8\",\n      \"name\": \"Other (manually checked)\"\n    },\n    {\n      \"id\": \"9\",\n      \"name\": \"Mixed - Tubes \\/ Pictures\"\n    }\n  ]\n}","name":"Success"}]},"settings":"","url":"/publisher/site/categories/","auth":"required","examples":{"codes":[{"code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/site/categories/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]},"method":"get","params":[]},"link_external":false,"project":"545bdf3488ebc81c0077ad18","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/site/categories/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","githubsync":"","sync_unique":"","type":"get","version":"545bdf3488ebc81c0077ad1b","category":"5568c1fd952dca0d0019c7cf","createdAt":"2015-05-29T19:51:19.017Z","excerpt":"Retrieve a list of site categories","hidden":false,"isReference":false,"slug":"publishersitecategories","link_url":"","order":4,"parentDoc":null,"title":"List Site Categories","updates":[],"user":"545bdef0e93d95100059ead2","childrenPages":[]}

getList Site Categories

Retrieve a list of site categories

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/site/categories/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/site/categories/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568c930952dca0d0019c7e3","createdAt":"2015-05-29T20:16:48.889Z","excerpt":"Create a new site","hidden":false,"order":5,"link_external":false,"type":"post","user":"545bdef0e93d95100059ead2","isReference":false,"link_url":"","parentDoc":null,"__v":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[SITE_NAME] with your site name\n[SITE_DESC] with your site description\n[SITE_URL] with your site URL\n[SITE_CATEGORY] with your category - [List site categories](doc:publishersitecategories) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'name'=>[SITE_NAME],\\n    'description'=>[SITE_DESC],\\n    'url'=>[SITE_URL],\\n    'categoryu'=>[SITE_CATEGORY]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/site/add/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_POST, true);\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","editedParams":true,"editedParams2":true,"githubsync":"","project":"545bdf3488ebc81c0077ad18","title":"Create New Site","updates":[],"version":"545bdf3488ebc81c0077ad1b","api":{"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Site created successfully\"\n    }\n}","name":"Success"},{"status":null,"language":"json","code":"","name":"Error"},{"language":"text","code":"{\n    \"error\": 104,\n    \"message\": \"URL provided is already in use\"\n}","name":"Url Taken"}]},"settings":"","url":"/publisher/site/add/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'name'=>'my first site',\n    'description'=>'my site description',\n    'url'=>'http://example.org',\n    'categoryu'=>1\n  );\n  $curl = curl_init('https://api.adnium.com/v1/publisher/site/add/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_POST, true);\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"post","params":[{"desc":"The name of the site","name":"name","ref":"","required":false,"type":"string","in":"body","_id":"5568c930952dca0d0019c7e7","default":""},{"name":"description","ref":"","required":false,"type":"string","in":"body","_id":"5568c930952dca0d0019c7e6","default":"","desc":"The description of your site (optional)"},{"default":"","desc":"The site URL","name":"url","ref":"","required":false,"type":"string","in":"body","_id":"5568c930952dca0d0019c7e5"},{"required":false,"type":"int","in":"body","_id":"5568c930952dca0d0019c7e4","default":"","desc":"The category ID of the site","name":"category","ref":""}]},"category":"5568c1fd952dca0d0019c7cf","slug":"publishersiteadd","sync_unique":"","childrenPages":[]}

postCreate New Site

Create a new site

Body Params

name:
string
The name of the site
description:
string
The description of your site (optional)
url:
string
The site URL
category:
integer
The category ID of the site
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_NAME] with your site name [SITE_DESC] with your site description [SITE_URL] with your site URL [SITE_CATEGORY] with your category - [List site categories](doc:publishersitecategories) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'name'=>[SITE_NAME],\n 'description'=>[SITE_DESC],\n 'url'=>[SITE_URL],\n 'categoryu'=>[SITE_CATEGORY]\n );\n $curl = curl_init('https://api.adnium.com/v1/publisher/site/add/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_NAME] with your site name [SITE_DESC] with your site description [SITE_URL] with your site URL [SITE_CATEGORY] with your category - [List site categories](doc:publishersitecategories) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'name'=>[SITE_NAME],\n 'description'=>[SITE_DESC],\n 'url'=>[SITE_URL],\n 'categoryu'=>[SITE_CATEGORY]\n );\n $curl = curl_init('https://api.adnium.com/v1/publisher/site/add/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568c383c87afd2500e52519","excerpt":"Edit a site in your account","title":"Edit Site","version":"545bdf3488ebc81c0077ad1b","__v":0,"category":"5568c1fd952dca0d0019c7cf","createdAt":"2015-05-29T19:52:35.355Z","project":"545bdf3488ebc81c0077ad18","sync_unique":"","editedParams2":true,"hidden":false,"isReference":false,"githubsync":"","link_external":false,"order":6,"parentDoc":null,"slug":"publishersiteidedit","api":{"method":"put","params":[{"ref":"","required":false,"type":"string","in":"body","_id":"5568c383c87afd2500e5251c","default":"","desc":"The name of the site","name":"name"},{"_id":"5568c383c87afd2500e5251b","default":"","desc":"The description of the site","name":"description","ref":"","required":false,"type":"string","in":"body"},{"_id":"5568c383c87afd2500e5251a","default":"","desc":"The ID of the category","name":"category","ref":"","required":false,"type":"int","in":"body"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Site edited successfully\"\n    }\n}","name":"Success"},{"language":"text","code":"{\n  \"error\": 107,\n  \"message\": \"Could not edit site\"\n}","name":"Error"}]},"settings":"","url":"/publisher/site/:id/edit/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'name'=>'my new site name ',\n    'description'=>'my new site description',\n    'category'=>2\n  );\n  $curl = curl_init('https://api.adnium.com/v1/publisher/site/1/edit/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]}},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[SITE_ID] with the site id you want to edit\n[SITE_NAME] with your new site name\n[SITE_DESC] with your new description\n[CATEGORY_ID] with a category id - [List site categories](doc:publishersitecategories) \n[YOUR_API_KEY] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'name'=>[SITE_NAME],\\n    'description'=>[SITE_DESC],\\n    'category'=>[CATEGORY_ID]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/site/[SITE_ID]/edit/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","editedParams":true,"type":"put","user":"545bdef0e93d95100059ead2","link_url":"","updates":[],"childrenPages":[]}

putEdit Site

Edit a site in your account

Body Params

name:
string
The name of the site
description:
string
The description of the site
category:
integer
The ID of the category
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with the site id you want to edit [SITE_NAME] with your new site name [SITE_DESC] with your new description [CATEGORY_ID] with a category id - [List site categories](doc:publishersitecategories) [YOUR_API_KEY] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'name'=>[SITE_NAME],\n 'description'=>[SITE_DESC],\n 'category'=>[CATEGORY_ID]\n );\n $curl = curl_init('https://api.adnium.com/v1/publisher/site/[SITE_ID]/edit/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with the site id you want to edit [SITE_NAME] with your new site name [SITE_DESC] with your new description [CATEGORY_ID] with a category id - [List site categories](doc:publishersitecategories) [YOUR_API_KEY] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'name'=>[SITE_NAME],\n 'description'=>[SITE_DESC],\n 'category'=>[CATEGORY_ID]\n );\n $curl = curl_init('https://api.adnium.com/v1/publisher/site/[SITE_ID]/edit/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"545bdf3488ebc81c0077ad1e","api":{"auth":"never","examples":{"codes":[{"language":"php","code":"<?php\n\t$curl = curl_init('https://api.adnium.com/v1/publisher/zone/[YOUR_ZONE_ID]?token=[YOUR_API_TOKEN]');\n\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>","name":""}]},"method":"get","results":{"codes":[{"status":null,"language":"json","code":"{\n\t\"count\": 1,\n\t\"rows\": [\n      {\n        \"id\": \"1\",\n        \"site_id\": \"1\",\n        \"name\": \"NTV A\",\n        \"description\": \"My NTV A\",\n        \"type_id\": \"1\",\n        \"date_created\": \"2014-10-21 15:10:17\",\n        \"restrictions\": null,\n        \"allow_gay\": \"0\",\n        \"allow_straight\": \"0\",\n        \"impressions\": \"0\",\n        \"clicks\": \"0\"\n      }\n  \t]\n}","name":"Success"},{"status":null,"language":"json","code":"{\n  \"error\": 50,\n  \"message\": \"Could not find the zone specified.\"\n}","name":"Failure"}]},"try":true,"basic_auth":false,"params":[],"settings":"","url":"/publisher/zone/:id"},"hidden":false,"updates":[],"__v":10,"body":"This is where you show your users how to set it up. You can use code samples, like this:\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_ZONE_ID] with the zone ID and [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\t$curl = curl_init('https://api.adnium.com/v1/publisher/zone/[YOUR_ZONE_ID]?token=[YOUR_API_TOKEN]');\\n\\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n\\t$response = curl_exec($curl);\\n\\tcurl_close($curl);\\n\\tvar_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","parentDoc":null,"project":"545bdf3488ebc81c0077ad18","sync_unique":"","category":"5568b55b6976ef0d0099c8e9","githubsync":"","isReference":false,"link_url":"","slug":"getting-started","type":"get","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","createdAt":"2014-11-06T20:51:00.455Z","excerpt":"Retrieve a specific zone","is_link":false,"link_external":false,"order":0,"title":"List Zone","childrenPages":[]}

getList Zone

Retrieve a specific zone

This is where you show your users how to set it up. You can use code samples, like this: [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_ZONE_ID] with the zone ID and [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n\t$curl = curl_init('https://api.adnium.com/v1/publisher/zone/[YOUR_ZONE_ID]?token=[YOUR_API_TOKEN]');\n\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This is where you show your users how to set it up. You can use code samples, like this: [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_ZONE_ID] with the zone ID and [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n\t$curl = curl_init('https://api.adnium.com/v1/publisher/zone/[YOUR_ZONE_ID]?token=[YOUR_API_TOKEN]');\n\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568b5c1952dca0d0019c7ac","createdAt":"2015-05-29T18:53:53.633Z","excerpt":"Retrieves all zones","hidden":false,"isReference":false,"link_external":false,"api":{"results":{"codes":[{"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": [\n      {\n        \"id\": \"1\",\n        \"site_id\": \"1\",\n        \"name\": \"NTV A\",\n        \"description\": \"My NTV A\",\n        \"type_id\": \"1\",\n        \"date_created\": \"2014-10-21 15:10:17\",\n        \"restrictions\": null,\n        \"allow_gay\": \"0\",\n        \"allow_straight\": \"0\",\n        \"impressions\": \"0\",\n        \"clicks\": \"0\"\n      },\n   \t\t{\n        \"id\": \"2\",\n        \"site_id\": \"1\",\n        \"name\": \"NTV B\",\n        \"description\": \"My NTV B\",\n        \"type_id\": \"1\",\n        \"date_created\": \"2014-10-21 15:15:00\",\n        \"restrictions\": null,\n        \"allow_gay\": \"0\",\n        \"allow_straight\": \"0\",\n        \"impressions\": \"0\",\n        \"clicks\": \"0\"\n      }\n    ]\n}","name":"Success","status":null}]},"settings":"","url":"/publisher/zones/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n\t$curl = curl_init('https://api.adnium.com/v1/publisher/zones/?token=[YOUR_API_TOKEN]');\n\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>","name":""}]},"method":"get","params":[]},"githubsync":"","link_url":"","parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherzones","title":"List Zones","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\t$curl = curl_init('https://api.adnium.com/v1/publisher/zones/?token=[YOUR_API_TOKEN]');\\n\\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n\\t$response = curl_exec($curl);\\n\\tcurl_close($curl);\\n\\tvar_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"5568b55b6976ef0d0099c8e9","sync_unique":"","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","__v":14,"order":1,"type":"get","childrenPages":[]}

getList Zones

Retrieves all zones

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n\t$curl = curl_init('https://api.adnium.com/v1/publisher/zones/?token=[YOUR_API_TOKEN]');\n\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n\t$curl = curl_init('https://api.adnium.com/v1/publisher/zones/?token=[YOUR_API_TOKEN]');\n\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568bb3cc87afd2500e52500","slug":"publisherzoneslimit","title":"List Zones w/ Limit","type":"get","githubsync":"","isReference":false,"link_url":"","parentDoc":null,"project":"545bdf3488ebc81c0077ad18","order":2,"updates":[],"api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"code":"{\n  \"count\": 2,\n  \"rows\": [\n    {\n      \"id\": \"1\",\n      \"publisher_id\": \"1\",\n      \"site_id\": \"1\",\n      \"name\": \"some name\",\n      \"description\": \"some description\",\n      \"type_id\": \"2\",\n      \"date_created\": \"2014-09-09 15:22:06\",\n      \"restrictions\": null,\n      \"allow_gay\": \"1\",\n      \"allow_straight\": \"1\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    },\n    {\n      \"id\": \"2\",\n      \"publisher_id\": \"1\",\n      \"site_id\": \"2\",\n      \"name\": \"some name\",\n      \"description\": \"some description\",\n      \"type_id\": \"1\",\n      \"date_created\": \"2014-09-09 16:12:06\",\n      \"restrictions\": null,\n      \"allow_gay\": \"1\",\n      \"allow_straight\": \"0\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    }\n  ]\n}","name":"Success","language":"json"}]},"settings":"","url":"/publisher/zones/:limit"},"category":"5568b55b6976ef0d0099c8e9","createdAt":"2015-05-29T19:17:16.545Z","hidden":false,"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","__v":6,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_LIMIT_VALUE] with a numerical value to limit results as well as [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","excerpt":"Retrieves all zones with a specified limit","link_external":false,"sync_unique":"","childrenPages":[]}

getList Zones w/ Limit

Retrieves all zones with a specified limit

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_LIMIT_VALUE] with a numerical value to limit results as well as [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_LIMIT_VALUE] with a numerical value to limit results as well as [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568be356976ef0d0099c908","parentDoc":null,"body":"This request supports limiting as well as sorting, there are two sorting methods available.\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\nAscending\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://api.adnium.com/v1/publisher/zones/10/ASC\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\nDescending\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://api.adnium.com/v1/publisher/zones/10/DESC\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[YOUR_LIMIT_VALUE] with a numerical value to limit results\n[YOUR_SORT_ORDER] with ASC/DESC (our example is DESC)\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]/[YOUR_SORT_ORDER]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","githubsync":"","isReference":false,"createdAt":"2015-05-29T19:29:57.458Z","hidden":false,"order":3,"title":"List Zones w/ Limit & Sort","__v":7,"api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]/[YOUR_SORT_ORDER]?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"}]},"method":"get","params":[],"results":{"codes":[{"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": [\n    {\n      \"id\": \"2\",\n      \"publisher_id\": \"1\",\n      \"site_id\": \"2\",\n      \"name\": \"some name\",\n      \"description\": \"some description\",\n      \"type_id\": \"1\",\n      \"date_created\": \"2014-09-09 16:12:06\",\n      \"restrictions\": null,\n      \"allow_gay\": \"1\",\n      \"allow_straight\": \"0\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    },\n    {\n      \"id\": \"1\",\n      \"publisher_id\": \"1\",\n      \"site_id\": \"1\",\n      \"name\": \"some name\",\n      \"description\": \"some description\",\n      \"type_id\": \"2\",\n      \"date_created\": \"2014-09-09 15:22:06\",\n      \"restrictions\": null,\n      \"allow_gay\": \"1\",\n      \"allow_straight\": \"1\",\n      \"impressions\": \"0\",\n      \"clicks\": \"0\"\n    }\n  ]\n}","name":"Success","status":null}]},"settings":"","url":"/publisher/zones/:limit/:sort"},"user":"545bdef0e93d95100059ead2","excerpt":"Retrieve zones with limit and sorting","project":"545bdf3488ebc81c0077ad18","type":"get","slug":"publisherzoneslimitsort","sync_unique":"","updates":[],"version":"545bdf3488ebc81c0077ad1b","category":"5568b55b6976ef0d0099c8e9","link_external":false,"link_url":"","childrenPages":[]}

getList Zones w/ Limit & Sort

Retrieve zones with limit and sorting

This request supports limiting as well as sorting, there are two sorting methods available. [block:api-header] { "type": "basic" } [/block] Ascending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/publisher/zones/10/ASC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic" } [/block] Descending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/publisher/zones/10/DESC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [YOUR_LIMIT_VALUE] with a numerical value to limit results [YOUR_SORT_ORDER] with ASC/DESC (our example is DESC) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]/[YOUR_SORT_ORDER]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This request supports limiting as well as sorting, there are two sorting methods available. [block:api-header] { "type": "basic" } [/block] Ascending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/publisher/zones/10/ASC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic" } [/block] Descending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/publisher/zones/10/DESC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [YOUR_LIMIT_VALUE] with a numerical value to limit results [YOUR_SORT_ORDER] with ASC/DESC (our example is DESC) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]/[YOUR_SORT_ORDER]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568bed0952dca0d0019c7ba","user":"545bdef0e93d95100059ead2","category":"5568b55b6976ef0d0099c8e9","excerpt":"List all available ad zone types","hidden":false,"updates":[],"githubsync":"","project":"545bdf3488ebc81c0077ad18","__v":6,"api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 6,\n  \"rows\": {\n    \"1\": {\n    \"name\": \"Desktop Banner - 300x250\"\n    },\n    \"2\": {\n    \"name\": \"Desktop Banner - 728x90\"\n    },\n    \"4\": {\n    \"name\": \"Desktop - Popunder\"\n    },\n    \"6\": {\n    \"name\": \"Mobile - 300x250\"\n    },\n    \"7\": {\n    \"name\": \"Mobile - 300x100\"\n    },\n    \"8\": {\n    \"name\": \"Mobile - Popunder\"\n    }\n  }\n}","name":"Success"}]},"settings":"","url":"/publisher/zone/types/"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-05-29T19:32:32.927Z","type":"get","isReference":false,"order":4,"slug":"publisherzonetypes","title":"List Zone Types","sync_unique":"","version":"545bdf3488ebc81c0077ad1b","link_external":false,"link_url":"","parentDoc":null,"childrenPages":[]}

getList Zone Types

List all available ad zone types

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568bf60952dca0d0019c7bc","type":"get","category":"5568b55b6976ef0d0099c8e9","sync_unique":"","title":"List Traffic Types","link_url":"","parentDoc":null,"__v":5,"isReference":false,"link_external":false,"slug":"publisherzonetraffic","updates":[],"api":{"url":"/publisher/zone/traffic/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/traffic/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": [\n    {\n      \"id\": 0,\n      \"name\": \"Straight\"\n    },\n    {\n      \"id\": 1,\n      \"name\": \"Gay\"\n    }\n  ]\n}","name":"Success"}]},"settings":""},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/traffic/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","excerpt":"List all available traffic types","order":5,"project":"545bdf3488ebc81c0077ad18","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","createdAt":"2015-05-29T19:34:56.565Z","githubsync":"","hidden":false,"childrenPages":[]}

getList Traffic Types

List all available traffic types

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/zone/traffic/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/zone/traffic/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568be8a6976ef0d0099c90b","sync_unique":"","version":"545bdf3488ebc81c0077ad1b","excerpt":"Lists all available ad zone restrictions","githubsync":"","order":6,"api":{"params":[],"results":{"codes":[{"code":"{\n  \"count\": 12,\n  \"rows\": {\n    \"1\": {\n      \"name\": \"No dating\"\n    },\n    \"2\": {\n    \t\"name\": \"No cams\"\n    },\n    \"3\": {\n    \t\"name\": \"No gambling\"\n    },\n    \"4\": {\n    \t\"name\": \"No pharma \\/ supplements\"\n    },\n    \"5\": {\n    \t\"name\": \"No teen\"\n    },\n    \"6\": {\n    \t\"name\": \"No escort services\"\n    },\n    \"7\": {\n    \t\"name\": \"No hardcore\"\n    },\n    \"8\": {\n    \t\"name\": \"No genitals\"\n    },\n    \"9\": {\n    \t\"name\": \"No nudity\"\n    },\n    \"10\": {\n    \t\"name\": \"No bodily fluids\"\n    },\n    \"11\": {\n    \t\"name\": \"No sound\"\n    },\n    \"12\": {\n    \t\"name\": \"No softcore\"\n    }\n  }\n}","name":"Success","language":"json"}]},"settings":"","url":"/publisher/zone/restrictions/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/restrictions/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get"},"isReference":false,"title":"List Zone Restrictions","__v":5,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/restrictions/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-05-29T19:31:22.040Z","link_external":false,"project":"545bdf3488ebc81c0077ad18","slug":"publisherzonerestrictions","type":"get","updates":[],"category":"5568b55b6976ef0d0099c8e9","hidden":false,"link_url":"","parentDoc":null,"user":"545bdef0e93d95100059ead2","childrenPages":[]}

getList Zone Restrictions

Lists all available ad zone restrictions

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/zone/restrictions/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/zone/restrictions/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568c0be6976ef0d0099c918","api":{"examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'name'=>'my new name',\n    'description'=>'my new description',\n    'site'=>1,\n    'restrictions'=>'1,2,3',\n    'traffic_type'=>1,\n    'rzone_type'=>1\n  );\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/add/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_POST, true);\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"post","params":[{"_id":"5568c0be6976ef0d0099c91e","default":"","desc":"The name of the zone","name":"name","ref":"","required":false,"type":"string","in":"body"},{"in":"body","_id":"5568c0be6976ef0d0099c91d","default":"","desc":"The description of the zone","name":"description","ref":"","required":false,"type":"string"},{"type":"int","in":"body","_id":"5568c0be6976ef0d0099c91c","default":"","desc":"The ID of the site to create the ad zone on","name":"site","ref":"","required":false},{"ref":"","required":false,"type":"string","in":"body","_id":"5568c0be6976ef0d0099c91b","default":"","desc":"(optional) The restriction IDs, comma delimited e.g. 1,2,3","name":"restrictions"},{"in":"body","_id":"5568c0be6976ef0d0099c91a","default":"","desc":"The ID of the traffic type","name":"traffic_type","ref":"","required":false,"type":"int"},{"default":"","desc":"The ID of the zone type","name":"zone_type","ref":"","required":false,"type":"int","in":"body","_id":"5568c0be6976ef0d0099c919"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": {\n  \t\"success\": 1,\n  \t\"message\": \"Ad zone created successfully\"\n  }\n}","name":"Success"}]},"settings":"","url":"/publisher/zone/add/","auth":"required"},"category":"5568b55b6976ef0d0099c8e9","githubsync":"","link_external":false,"user":"545bdef0e93d95100059ead2","editedParams":true,"editedParams2":true,"hidden":false,"isReference":false,"order":7,"type":"post","updates":[],"__v":0,"createdAt":"2015-05-29T19:40:46.329Z","excerpt":"Create a new ad zone for your site","link_url":"","parentDoc":null,"sync_unique":"","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace the following:\n[ZONE_NAME] with your zones name\n[ZONE_DESC] with your zones description\n[SITE_ID] with one of your site IDs - [List sites](doc:publishersites) \n[RESTRICTIONS] with your restrictions - [List ad zone restrictions](doc:publisherzonerestrictions) \n[TRAFFIC_TYPE] with your traffic type - [List traffic types](doc:publisherzonetraffic) \n[ZONE_TYPE] with your zone type - [List ad zone types](doc:publisherzonetypes) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'name'=>'[ZONE_NAME]',\\n    'description'=>'[ZONE_DESC]',\\n    'site'=>[SITE_ID],\\n    'restrictions'=>'[RESTRICTIONS]',\\n    'traffic_type'=>[TRAFFIC_TYPE],\\n    'zone_type'=>[ZONE_TYPE]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_POST, true);\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","project":"545bdf3488ebc81c0077ad18","slug":"publisherzoneadd","title":"Create New Zone","version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

postCreate New Zone

Create a new ad zone for your site

Body Params

name:
string
The name of the zone
description:
string
The description of the zone
site:
integer
The ID of the site to create the ad zone on
restrictions:
string
(optional) The restriction IDs, comma delimited e.g. 1,2,3
traffic_type:
integer
The ID of the traffic type
zone_type:
integer
The ID of the zone type
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace the following: [ZONE_NAME] with your zones name [ZONE_DESC] with your zones description [SITE_ID] with one of your site IDs - [List sites](doc:publishersites) [RESTRICTIONS] with your restrictions - [List ad zone restrictions](doc:publisherzonerestrictions) [TRAFFIC_TYPE] with your traffic type - [List traffic types](doc:publisherzonetraffic) [ZONE_TYPE] with your zone type - [List ad zone types](doc:publisherzonetypes) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'name'=>'[ZONE_NAME]',\n 'description'=>'[ZONE_DESC]',\n 'site'=>[SITE_ID],\n 'restrictions'=>'[RESTRICTIONS]',\n 'traffic_type'=>[TRAFFIC_TYPE],\n 'zone_type'=>[ZONE_TYPE]\n );\n $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace the following: [ZONE_NAME] with your zones name [ZONE_DESC] with your zones description [SITE_ID] with one of your site IDs - [List sites](doc:publishersites) [RESTRICTIONS] with your restrictions - [List ad zone restrictions](doc:publisherzonerestrictions) [TRAFFIC_TYPE] with your traffic type - [List traffic types](doc:publisherzonetraffic) [ZONE_TYPE] with your zone type - [List ad zone types](doc:publisherzonetypes) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'name'=>'[ZONE_NAME]',\n 'description'=>'[ZONE_DESC]',\n 'site'=>[SITE_ID],\n 'restrictions'=>'[RESTRICTIONS]',\n 'traffic_type'=>[TRAFFIC_TYPE],\n 'zone_type'=>[ZONE_TYPE]\n );\n $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568c02a6976ef0d0099c912","__v":0,"slug":"publisherzoneidedit","sync_unique":"","title":"Edit Zone","type":"put","updates":[],"editedParams":true,"hidden":false,"link_url":"","category":"5568b55b6976ef0d0099c8e9","editedParams2":true,"excerpt":"Edit a zone","githubsync":"","isReference":false,"project":"545bdf3488ebc81c0077ad18","version":"545bdf3488ebc81c0077ad1b","api":{"url":"/publisher/zone/:id/edit/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n\t$params = array(\n  \t'name'=>'my new name',\n    'description'=>'my new description',\n    'traffic_type'=>1\n    'restrictions'=>'1,2,3'\n  );\n\t$curl = curl_init('https://api.adnium.com/v1/publisher/zone/1/edit/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>","name":""}]},"method":"put","params":[{"_id":"5568c02a6976ef0d0099c916","default":"","desc":"The name of the zone","name":"name","ref":"","required":false,"type":"string","in":"body"},{"in":"body","_id":"5568c02a6976ef0d0099c915","default":"","desc":"The description of the zone","name":"description","ref":"","required":false,"type":"string"},{"default":"","desc":"The ID of the traffic type","name":"traffic_type","ref":"","required":false,"type":"int","in":"body","_id":"5568c02a6976ef0d0099c914"},{"required":false,"type":"string","in":"body","_id":"5568c02a6976ef0d0099c913","default":"","desc":"The restriction IDs, comma delimited e.g. 1,2,3","name":"restrictions","ref":""}],"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": {\n  \t\"success\": 1,\n  \t\"message\": \"Ad zone updated successfully\"\n  }\n}","name":"Success"},{"status":null,"language":"json","code":"{\n  \"error\": 50,\n  \"message\": \"Could not find the zone specified.\"\n}","name":"Error"}]},"settings":""},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[ZONE_NAME] with your zones name\n[ZONE_DESC] with your description\n[ZONE_TYPE] with your traffic type - [List traffic types](doc:publisherzonetraffic) \n[ZONE_RESTRICTIONS] with your restrictions - [List ad zone restrictions](doc:publisherzonerestrictions) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\t$params = array(\\n  \\t'name'=>[ZONE_NAME],\\n    'description'=>[ZONE_DESC],\\n    'traffic_type'=>[ZONE_TYPE]\\n    'restrictions'=>[ZONE_RESTRICTIONS]\\n  );\\n\\t$curl = curl_init('https://api.adnium.com/v1/publisher/zone/1/edit/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n\\t$response = curl_exec($curl);\\n\\tcurl_close($curl);\\n\\tvar_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-05-29T19:38:18.669Z","link_external":false,"order":8,"parentDoc":null,"user":"545bdef0e93d95100059ead2","childrenPages":[]}

putEdit Zone

Edit a zone

Body Params

name:
string
The name of the zone
description:
string
The description of the zone
traffic_type:
integer
The ID of the traffic type
restrictions:
string
The restriction IDs, comma delimited e.g. 1,2,3
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [ZONE_NAME] with your zones name [ZONE_DESC] with your description [ZONE_TYPE] with your traffic type - [List traffic types](doc:publisherzonetraffic) [ZONE_RESTRICTIONS] with your restrictions - [List ad zone restrictions](doc:publisherzonerestrictions) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n\t$params = array(\n \t'name'=>[ZONE_NAME],\n 'description'=>[ZONE_DESC],\n 'traffic_type'=>[ZONE_TYPE]\n 'restrictions'=>[ZONE_RESTRICTIONS]\n );\n\t$curl = curl_init('https://api.adnium.com/v1/publisher/zone/1/edit/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [ZONE_NAME] with your zones name [ZONE_DESC] with your description [ZONE_TYPE] with your traffic type - [List traffic types](doc:publisherzonetraffic) [ZONE_RESTRICTIONS] with your restrictions - [List ad zone restrictions](doc:publisherzonerestrictions) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n\t$params = array(\n \t'name'=>[ZONE_NAME],\n 'description'=>[ZONE_DESC],\n 'traffic_type'=>[ZONE_TYPE]\n 'restrictions'=>[ZONE_RESTRICTIONS]\n );\n\t$curl = curl_init('https://api.adnium.com/v1/publisher/zone/1/edit/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568ca0b952dca0d0019c7e9","editedParams2":true,"hidden":false,"link_url":"","order":0,"parentDoc":null,"version":"545bdf3488ebc81c0077ad1b","__v":0,"category":"5568c9546976ef0d0099c932","createdAt":"2015-05-29T20:20:27.168Z","editedParams":true,"excerpt":"Retrieve statistics based on site/zone/date","githubsync":"","link_external":false,"title":"Site Stats By Date","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[SITE_ID] with your site ID - [List sites](doc:publisherstatssites) \n[DATE_FROM] with the start period e.g. 2015-01-24\n[DATE_TO] with the end period e.g. 2015-01-25\n[ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","updates":[],"type":"get","user":"545bdef0e93d95100059ead2","sync_unique":"","isReference":false,"project":"545bdf3488ebc81c0077ad18","slug":"publisherstatssitedate","api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/date/?token=[YOUR_API_TOKEN]&from=2015-01-24&to=2015-01-25&zone=1');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"5568ca0b952dca0d0019c7ec","default":"","desc":"The start point"},{"type":"yyyy-mm-dd","in":"query","_id":"5568ca0b952dca0d0019c7eb","default":"","desc":"The end point","name":"to","ref":"","required":false},{"name":"zone","ref":"","required":false,"type":"string","in":"query","_id":"5568ca0b952dca0d0019c7ea","default":"all","desc":"The zone to look up"}],"results":{"codes":[{"name":"Success","status":null,"language":"json","code":""},{"language":"json","code":"{\n    \"error\": 154,\n    \"message\": \"Could not find any statistics\"\n}","name":"No results","status":null},{"code":"","name":"Error","language":"json"}]},"settings":"","url":"/publisher/stats/:site/date/"},"childrenPages":[]}

getSite Stats By Date

Retrieve statistics based on site/zone/date

Query Params

from:
yyyy-mm-dd
The start point
to:
yyyy-mm-dd
The end point
zone:
stringall
The zone to look up
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5887907c61bed2190087e5dc","createdAt":"2017-01-24T17:35:56.055Z","excerpt":"Retrieve statistics based on site/zone/hour","user":"545bdef0e93d95100059ead2","__v":0,"next":{"pages":[],"description":""},"order":1,"title":"Site Stats By Hour","version":"545bdf3488ebc81c0077ad1b","api":{"settings":"","url":"/publisher/stats/:site/hour/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/hour/?token=[YOUR_API_TOKEN]&from=2015-01-24&to=2015-01-25&zone=1');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"ref":"","in":"query","required":false,"desc":"The start point","default":"","type":"yyyy-mm-dd","name":"from","_id":"5568ca0b952dca0d0019c7ec"},{"default":"","type":"yyyy-mm-dd","name":"to","_id":"5568ca0b952dca0d0019c7eb","ref":"","in":"query","required":false,"desc":"The end point"},{"in":"query","required":false,"desc":"The zone to look up","default":"all","type":"string","name":"zone","_id":"5568ca0b952dca0d0019c7ea","ref":""}],"results":{"codes":[{"status":null,"language":"json","code":"","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 154,\n    \"message\": \"Could not find any statistics\"\n}","name":"No results"},{"name":"Error","language":"json","code":""}]}},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[SITE_ID] with your site ID - [List sites](doc:publisherstatssites) \n[DATE_FROM] with the start period e.g. 2015-01-24\n[DATE_TO] with the end period e.g. 2015-01-25\n[ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/hour/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","githubsync":"","hidden":false,"link_url":"","project":"545bdf3488ebc81c0077ad18","sync_unique":"","category":"5568c9546976ef0d0099c932","isReference":false,"link_external":false,"parentDoc":null,"slug":"site-stats-by-hour","type":"get","updates":[],"childrenPages":[]}

getSite Stats By Hour

Retrieve statistics based on site/zone/hour

Query Params

from:
yyyy-mm-dd
The start point
to:
yyyy-mm-dd
The end point
zone:
stringall
The zone to look up
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/hour/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/hour/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568ca40952dca0d0019c7ed","createdAt":"2015-05-29T20:21:20.015Z","excerpt":"Retrieve statistics based on site/zone/country","isReference":false,"project":"545bdf3488ebc81c0077ad18","slug":"publisherstatssitecountry","sync_unique":"","category":"5568c9546976ef0d0099c932","title":"Site Stats By Country","link_url":"","updates":[],"githubsync":"","link_external":false,"order":2,"parentDoc":null,"version":"545bdf3488ebc81c0077ad1b","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[SITE_ID] with your site ID - [List sites](doc:publisherstatssites) \n[DATE_FROM] with the start period e.g. 2015-01-24\n[DATE_TO] with the end period e.g. 2015-01-25\n[ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","editedParams":true,"editedParams2":true,"hidden":false,"type":"get","user":"545bdef0e93d95100059ead2","__v":0,"api":{"examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/country/?token=[YOUR_API_TOKEN]&from=2015-01-24&to=2015-01-25&zone=1');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"in":"query","_id":"5568ca0b952dca0d0019c7ec","default":"","desc":"The start point","name":"from","ref":"","required":false,"type":"yyyy-mm-dd"},{"default":"","desc":"The end point","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"5568ca0b952dca0d0019c7eb"},{"required":false,"type":"string","in":"query","_id":"5568ca0b952dca0d0019c7ea","default":"all","desc":"The zone to look up","name":"zone","ref":""}],"results":{"codes":[{"status":null,"language":"json","code":"{}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 154,\n    \"message\": \"Could not find any statistics\"\n}","name":"No data"},{"code":"","name":"Error","language":"json"}]},"settings":"","url":"/publisher/stats/:site/country/","auth":"required"},"childrenPages":[]}

getSite Stats By Country

Retrieve statistics based on site/zone/country

Query Params

from:
yyyy-mm-dd
The start point
to:
yyyy-mm-dd
The end point
zone:
stringall
The zone to look up
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568ca94952dca0d0019c7ee","hidden":false,"project":"545bdf3488ebc81c0077ad18","type":"get","user":"545bdef0e93d95100059ead2","__v":0,"createdAt":"2015-05-29T20:22:44.064Z","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[SITE_ID] with your site ID - [List sites](doc:publisherstatssites) \n[DATE_FROM] with the start period e.g. 2015-01-24\n[DATE_TO] with the end period e.g. 2015-01-25\n[ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/device/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","category":"5568c9546976ef0d0099c932","excerpt":"Retrieve statistics based on site/zone/device","link_external":false,"link_url":"","parentDoc":null,"api":{"results":{"codes":[{"status":null,"language":"json","code":"{}","name":"Success"},{"language":"json","code":"{\n    \"error\": 154,\n    \"message\": \"Could not find any statistics\"\n}","name":"No data","status":null},{"name":"Error","language":"json","code":""}]},"settings":"","url":"/publisher/stats/:site/device/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/device/?token=[YOUR_API_TOKEN]&from=2015-01-24&to=2015-01-25&zone=1');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"_id":"5568ca0b952dca0d0019c7ec","default":"","desc":"The start point","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"in":"query","_id":"5568ca0b952dca0d0019c7eb","default":"","desc":"The end point","name":"to","ref":"","required":false,"type":"yyyy-mm-dd"},{"default":"all","desc":"The zone to look up","name":"zone","ref":"","required":false,"type":"string","in":"query","_id":"5568ca0b952dca0d0019c7ea"}]},"version":"545bdf3488ebc81c0077ad1b","sync_unique":"","title":"Site Stats By Device","githubsync":"","order":3,"slug":"publisherstatssitedevice","editedParams":true,"editedParams2":true,"isReference":false,"updates":[],"childrenPages":[]}

getSite Stats By Device

Retrieve statistics based on site/zone/device

Query Params

from:
yyyy-mm-dd
The start point
to:
yyyy-mm-dd
The end point
zone:
stringall
The zone to look up
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/device/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "json" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/device/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "json" } ] } [/block]
{"_id":"5568cac16976ef0d0099c942","api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/os/?token=[YOUR_API_TOKEN]&from=2015-01-24&to=2015-01-25&zone=1');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"in":"query","_id":"5568ca0b952dca0d0019c7ec","default":"","desc":"The start point","name":"from","ref":"","required":false,"type":"yyyy-mm-dd"},{"type":"yyyy-mm-dd","in":"query","_id":"5568ca0b952dca0d0019c7eb","default":"","desc":"The end point","name":"to","ref":"","required":false},{"name":"zone","ref":"","required":false,"type":"string","in":"query","_id":"5568ca0b952dca0d0019c7ea","default":"all","desc":"The zone to look up"}],"results":{"codes":[{"status":null,"language":"json","code":"{}","name":"Success"},{"code":"{\n    \"error\": 154,\n    \"message\": \"Could not find any statistics\"\n}","name":"No data","status":null,"language":"json"},{"name":"Error","language":"text","code":""}]},"settings":"","url":"/publisher/stats/:site/os/"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[SITE_ID] with your site ID - [List sites](doc:publisherstatssites) \n[DATE_FROM] with the start period e.g. 2015-01-24\n[DATE_TO] with the end period e.g. 2015-01-25\n[ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/os/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","version":"545bdf3488ebc81c0077ad1b","__v":0,"editedParams":true,"githubsync":"","isReference":false,"link_url":"","order":4,"project":"545bdf3488ebc81c0077ad18","sync_unique":"","category":"5568c9546976ef0d0099c932","title":"Site Stats By OS","editedParams2":true,"hidden":false,"parentDoc":null,"slug":"publisherstatssiteos","type":"get","createdAt":"2015-05-29T20:23:29.747Z","excerpt":"Retrieve statistics based on site/zone/os","link_external":false,"updates":[],"user":"545bdef0e93d95100059ead2","childrenPages":[]}

getSite Stats By OS

Retrieve statistics based on site/zone/os

Query Params

from:
yyyy-mm-dd
The start point
to:
yyyy-mm-dd
The end point
zone:
stringall
The zone to look up
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/os/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/os/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568caae6976ef0d0099c941","api":{"params":[{"default":"","desc":"The start point","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"5568ca0b952dca0d0019c7ec"},{"required":false,"type":"yyyy-mm-dd","in":"query","_id":"5568ca0b952dca0d0019c7eb","default":"","desc":"The end point","name":"to","ref":""},{"desc":"The zone to look up","name":"zone","ref":"","required":false,"type":"string","in":"query","_id":"5568ca0b952dca0d0019c7ea","default":"all"}],"results":{"codes":[{"status":null,"language":"json","code":"{}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 154,\n    \"message\": \"Could not find any statistics\"\n}","name":"No data"},{"name":"Error","language":"json","code":""}]},"settings":"","url":"/publisher/stats/:site/carrier/","auth":"required","examples":{"codes":[{"name":"","language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/carrier/?token=[YOUR_API_TOKEN]&from=2015-01-24&to=2015-01-25&zone=1');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"}]},"method":"get"},"createdAt":"2015-05-29T20:23:10.734Z","editedParams":true,"isReference":false,"title":"Site Stats By Carrier","updates":[],"link_url":"","parentDoc":null,"project":"545bdf3488ebc81c0077ad18","type":"get","__v":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[SITE_ID] with your site ID - [List sites](doc:publisherstatssites) \n[DATE_FROM] with the start period e.g. 2015-01-24\n[DATE_TO] with the end period e.g. 2015-01-25\n[ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/carrier/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","editedParams2":true,"excerpt":"Retrieve statistics based on site/zone/carrier","hidden":false,"link_external":false,"order":5,"slug":"publisherstatssitecarrier","sync_unique":"","user":"545bdef0e93d95100059ead2","category":"5568c9546976ef0d0099c932","githubsync":"","version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

getSite Stats By Carrier

Retrieve statistics based on site/zone/carrier

Query Params

from:
yyyy-mm-dd
The start point
to:
yyyy-mm-dd
The end point
zone:
stringall
The zone to look up
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/carrier/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/carrier/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5887911161bed2190087e5df","createdAt":"2017-01-24T17:38:25.401Z","hidden":false,"user":"545bdef0e93d95100059ead2","title":"Site Stats By Sub ID","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[SITE_ID] with your site ID - [List sites](doc:publisherstatssites) \n[DATE_FROM] with the start period e.g. 2015-01-24\n[DATE_TO] with the end period e.g. 2015-01-25\n[ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/subid/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"5568c9546976ef0d0099c932","link_url":"","project":"545bdf3488ebc81c0077ad18","slug":"site-stats-by-sub-id","sync_unique":"","type":"get","version":"545bdf3488ebc81c0077ad1b","__v":0,"githubsync":"","parentDoc":null,"api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/subid/?token=[YOUR_API_TOKEN]&from=2015-01-24&to=2015-01-25&zone=1');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"type":"yyyy-mm-dd","name":"from","_id":"5568ca0b952dca0d0019c7ec","ref":"","in":"query","required":false,"desc":"The start point","default":""},{"desc":"The end point","default":"","type":"yyyy-mm-dd","name":"to","_id":"5568ca0b952dca0d0019c7eb","ref":"","in":"query","required":false},{"name":"zone","_id":"5568ca0b952dca0d0019c7ea","ref":"","in":"query","required":false,"desc":"The zone to look up","default":"all","type":"string"}],"results":{"codes":[{"status":null,"language":"json","code":"{}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 154,\n    \"message\": \"Could not find any statistics\"\n}","name":"No data"},{"language":"json","code":"","name":"Error"}]},"settings":"","url":"/publisher/stats/:site/subid/"},"excerpt":"Retrieve statistics based on site/zone/subid","isReference":false,"link_external":false,"next":{"pages":[],"description":""},"order":6,"updates":[],"childrenPages":[]}

getSite Stats By Sub ID

Retrieve statistics based on site/zone/subid

Query Params

from:
yyyy-mm-dd
The start point
to:
yyyy-mm-dd
The end point
zone:
stringall
The zone to look up
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/subid/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID - [List sites](doc:publisherstatssites) [DATE_FROM] with the start period e.g. 2015-01-24 [DATE_TO] with the end period e.g. 2015-01-25 [ZONE_ID] with your zone ID - [List zones in a site](doc:publisherstatssitezones) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/subid/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568c988c87afd2500e52526","category":"5568c9546976ef0d0099c932","link_external":false,"type":"get","updates":[],"user":"545bdef0e93d95100059ead2","api":{"settings":"","url":"/publisher/stats/sites/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/sites/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": [\n        {\n            \"id\": \"1\",\n            \"name\": \"example.org\",\n            \"url\": \"http://example.org\"\n        },\n        {\n            \"id\": \"2\",\n            \"name\": \"example.com\",\n            \"url\": \"http://example.com\"\n        }\n    ]\n}","name":"Success"},{"status":null,"language":"json","code":"{}","name":"Error"}]}},"order":7,"parentDoc":null,"slug":"publisherstatssites","sync_unique":"","title":"List Sites","createdAt":"2015-05-29T20:18:16.386Z","excerpt":"Retrieve a list of all available sites","hidden":false,"isReference":false,"project":"545bdf3488ebc81c0077ad18","version":"545bdf3488ebc81c0077ad1b","__v":4,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/sites/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","githubsync":"","link_url":"","childrenPages":[]}

getList Sites

Retrieve a list of all available sites

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/sites/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/sites/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568c9b26976ef0d0099c934","category":"5568c9546976ef0d0099c932","createdAt":"2015-05-29T20:18:58.398Z","updates":[],"api":{"params":[],"results":{"codes":[{"name":"Success","status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": [\n        {\n            \"id\": \"1\",\n            \"name\": \"NTV A\"\n        },\n        {\n            \"id\": \"2\",\n            \"name\": \"NTV B\"\n        }\n    ]\n}"}]},"settings":"","url":"/publisher/stats/:site/zones/","auth":"required","examples":{"codes":[{"name":"","language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/zones/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"}]},"method":"get"},"githubsync":"","hidden":false,"link_url":"","project":"545bdf3488ebc81c0077ad18","sync_unique":"","version":"545bdf3488ebc81c0077ad1b","__v":4,"excerpt":"List all available zones for a site","slug":"publisherstatssitezones","link_external":false,"order":8,"parentDoc":null,"title":"List Zones In Site","type":"get","user":"545bdef0e93d95100059ead2","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[SITE_ID] with your site ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/zones/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","isReference":false,"childrenPages":[]}

getList Zones In Site

List all available zones for a site

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/zones/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [SITE_ID] with your site ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/zones/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568cb0e6976ef0d0099c944","githubsync":"","isReference":false,"link_url":"","order":0,"project":"545bdf3488ebc81c0077ad18","version":"545bdf3488ebc81c0077ad1b","createdAt":"2015-05-29T20:24:46.236Z","excerpt":"Retrieve a single campaign","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","api":{"url":"/advertiser/campaign/:campaign","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"language":"json","code":"{\n    \"count\": 22,\n    \"rows\": {\n        \"id\": \"1\",\n        \"status\": \"Enabled\",\n        \"name\": \"my first campaign\",\n        \"zone\": \"Desktop Banner - 300x250\",\n        \"cpm\": \"0.01\",\n        \"daily_budget\": \"50000\",\n        \"allow_straight\": \"true\",\n        \"allow_gay\": \"false\",\n        \"page_frequency\": \"false\",\n        \"user_freq\": \"1\",\n        \"user_freq_hour\": \"18\",\n        \"countries\": [\n            \"124\",\n            \"180\",\n            \"188\"\n        ],\n        \"regions\": [\n            \"99999\"\n        ],\n        \"cities\": [\n            \"48468\",\n            \"185152\",\n            \"185155\"\n        ],\n        \"languages\": [\n            \"5\",\n            \"12\"\n        ],\n        \"os\": [\n            \"1\",\n            \"2\"\n        ],\n        \"devices\": [\n            \"100\",\n            \"102\"\n        ],\n        \"carriers\": [\n            \"205\",\n            \"211\"\n        ],\n        \"updated\": \"2015-05-26 15:51:59\",\n        \"created\": \"2015-05-05 10:14:23\",\n        \"impressions\": \"0\",\n        \"clicks\": \"0\"\n    }\n}","name":"Success","status":null},{"code":"{\n    \"error\": 311,\n    \"message\": \"Could not find campaign\"\n}","name":"Error","status":null,"language":"json"}]},"settings":""},"hidden":false,"link_external":false,"slug":"advertisercampaigncampaign","title":"List Campaign","type":"get","user":"545bdef0e93d95100059ead2","__v":5,"category":"5568bb80c87afd2500e52503","parentDoc":null,"sync_unique":"","updates":[],"childrenPages":[]}

getList Campaign

Retrieve a single campaign

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568cb2a6976ef0d0099c946","excerpt":"Retrieve all campaigns","order":1,"updates":[],"__v":4,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","type":"get","githubsync":"","hidden":false,"link_external":false,"link_url":"","parentDoc":null,"sync_unique":"","title":"List Campaigns","user":"545bdef0e93d95100059ead2","category":"5568bb80c87afd2500e52503","createdAt":"2015-05-29T20:25:14.292Z","version":"545bdf3488ebc81c0077ad1b","isReference":false,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigns","api":{"url":"/advertiser/campaigns/","auth":"required","examples":{"codes":[{"code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]},"method":"get","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": [\n        {\n            \"id\": \"1\",\n            \"status\": \"Enabled\",\n            \"name\": \"my first campaign\",\n            \"zone\": \"Desktop Banner - 300x250\",\n            \"cpm\": \"0.45\",\n            \"daily_budget\": \"50000\",\n            \"allow_straight\": \"true\",\n            \"allow_gay\": \"false\",\n            \"page_frequency\": \"false\",\n            \"user_freq\": \"1\",\n            \"user_freq_hour\": \"18\",\n            \"countries\": [\n                \"840\",\n                \"124\",\n                \"36\"\n            ],\n            \"regions\": [\n                \"99999\"\n            ],\n            \"cities\": [\n                \"999999\"\n            ],\n            \"languages\": [\n                \"9999\"\n            ],\n            \"os\": [\n                \"9999\"\n            ],\n            \"devices\": [\n                \"9998\"\n            ],\n            \"carriers\": [\n                \"9999\"\n            ],\n            \"updated\": \"2015-05-28 11:57:25\",\n            \"created\": \"2015-03-24 10:50:10\",\n            \"impressions\": \"0\",\n            \"clicks\": \"0\"\n        },\n        {\n            \"id\": \"2\",\n            \"status\": \"Enabled\",\n            \"name\": \"my second campaign\",\n            \"zone\": \"Desktop Banner - 300x250\",\n            \"cpm\": \"0.22\",\n            \"daily_budget\": \"25000\",\n            \"allow_straight\": \"false\",\n            \"allow_gay\": \"true\",\n            \"page_frequency\": \"false\",\n            \"user_freq\": \"Unlimited\",\n            \"user_freq_hour\": \"18\",\n            \"countries\": [\n                \"4\",\n                \"8\"\n            ],\n            \"regions\": [\n                \"3\",\n                \"2\",\n                \"1\"\n            ],\n            \"cities\": [\n                \"999999\"\n            ],\n            \"languages\": [\n                \"8\",\n                \"5\"\n            ],\n            \"os\": [\n                \"2\",\n                \"1\",\n                \"3\"\n            ],\n            \"devices\": [\n                \"102\",\n                \"100\"\n            ],\n            \"carriers\": [\n                \"9999\"\n            ],\n            \"updated\": \"2015-05-29 12:06:39\",\n            \"created\": \"2015-05-28 11:57:35\",\n            \"impressions\": \"0\",\n            \"clicks\": \"0\"\n        }\n    ]\n}","name":"Success"},{"status":null,"language":"json","code":"{}","name":"Error"}]},"settings":""},"childrenPages":[]}

getList Campaigns

Retrieve all campaigns

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568cb53952dca0d0019c7f2","createdAt":"2015-05-29T20:25:55.016Z","excerpt":"Retrieve all campaigns with a limit","project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignslimit","sync_unique":"","title":"List Campaign w/ Limit","__v":4,"isReference":false,"link_url":"","order":2,"updates":[],"user":"545bdef0e93d95100059ead2","api":{"params":[],"results":{"codes":[{"name":"Success","status":null,"language":"json","code":"{\n    \"count\": 22,\n    \"rows\": {\n        \"id\": \"1\",\n        \"status\": \"Enabled\",\n        \"name\": \"my first campaign\",\n        \"zone\": \"Desktop Banner - 300x250\",\n        \"cpm\": \"0.01\",\n        \"daily_budget\": \"50000\",\n        \"allow_straight\": \"true\",\n        \"allow_gay\": \"false\",\n        \"page_frequency\": \"false\",\n        \"user_freq\": \"1\",\n        \"user_freq_hour\": \"18\",\n        \"countries\": [\n            \"124\",\n            \"180\",\n            \"188\"\n        ],\n        \"regions\": [\n            \"99999\"\n        ],\n        \"cities\": [\n            \"48468\",\n            \"185152\",\n            \"185155\"\n        ],\n        \"languages\": [\n            \"5\",\n            \"12\"\n        ],\n        \"os\": [\n            \"1\",\n            \"2\"\n        ],\n        \"devices\": [\n            \"100\",\n            \"102\"\n        ],\n        \"carriers\": [\n            \"205\",\n            \"211\"\n        ],\n        \"updated\": \"2015-05-26 15:51:59\",\n        \"created\": \"2015-05-05 10:14:23\",\n        \"impressions\": \"0\",\n        \"clicks\": \"0\"\n    }\n}"}]},"settings":"","url":"/advertiser/campaigns/:limit","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/1?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get"},"category":"5568bb80c87afd2500e52503","link_external":false,"version":"545bdf3488ebc81c0077ad1b","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[LIMIT] with how many results you want to return\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/[LIMIT]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","hidden":false,"type":"get","githubsync":"","parentDoc":null,"childrenPages":[]}

getList Campaign w/ Limit

Retrieve all campaigns with a limit

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [LIMIT] with how many results you want to return [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/[LIMIT]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [LIMIT] with how many results you want to return [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/[LIMIT]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568cbc4952dca0d0019c7f4","body":"This request supports limiting as well as sorting, there are two sorting methods available.\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\nAscending\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://api.adnium.com/v1/advertiser/campaigns/10/ASC\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\"\n}\n[/block]\nDescending\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://api.adnium.com/v1/advertiser/campaigns/10/DESC\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[LIMIT] with how many results you want to return\n[ORDER] with the order (ASC/DESC)\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/[LIMIT]/[ORDER]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-05-29T20:27:48.642Z","__v":4,"hidden":false,"slug":"advertisercampaignslimitorder","sync_unique":"","title":"List Campaign w/ Limit & Sort","updates":[],"user":"545bdef0e93d95100059ead2","githubsync":"","parentDoc":null,"project":"545bdf3488ebc81c0077ad18","version":"545bdf3488ebc81c0077ad1b","excerpt":"Retrieve all campaigns with a limit and sorting","api":{"results":{"codes":[{"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": [\n        {\n            \"id\": \"2\",\n            \"status\": \"Enabled\",\n            \"name\": \"my first campaign\",\n            \"zone\": \"Desktop Banner - 300x250\",\n            \"cpm\": \"0.45\",\n            \"daily_budget\": \"50000\",\n            \"allow_straight\": \"true\",\n            \"allow_gay\": \"false\",\n            \"page_frequency\": \"false\",\n            \"user_freq\": \"1\",\n            \"user_freq_hour\": \"18\",\n            \"countries\": [\n                \"840\",\n                \"124\",\n                \"36\"\n            ],\n            \"regions\": [\n                \"99999\"\n            ],\n            \"cities\": [\n                \"999999\"\n            ],\n            \"languages\": [\n                \"9999\"\n            ],\n            \"os\": [\n                \"9999\"\n            ],\n            \"devices\": [\n                \"9998\"\n            ],\n            \"carriers\": [\n                \"9999\"\n            ],\n            \"updated\": \"2015-05-28 11:57:25\",\n            \"created\": \"2015-03-24 10:50:10\",\n            \"impressions\": \"0\",\n            \"clicks\": \"0\"\n        },\n        {\n            \"id\": \"1\",\n            \"status\": \"Enabled\",\n            \"name\": \"my second campaign\",\n            \"zone\": \"Desktop Banner - 300x250\",\n            \"cpm\": \"0.22\",\n            \"daily_budget\": \"25000\",\n            \"allow_straight\": \"false\",\n            \"allow_gay\": \"true\",\n            \"page_frequency\": \"false\",\n            \"user_freq\": \"Unlimited\",\n            \"user_freq_hour\": \"18\",\n            \"countries\": [\n                \"4\",\n                \"8\"\n            ],\n            \"regions\": [\n                \"3\",\n                \"2\",\n                \"1\"\n            ],\n            \"cities\": [\n                \"999999\"\n            ],\n            \"languages\": [\n                \"8\",\n                \"5\"\n            ],\n            \"os\": [\n                \"2\",\n                \"1\",\n                \"3\"\n            ],\n            \"devices\": [\n                \"102\",\n                \"100\"\n            ],\n            \"carriers\": [\n                \"9999\"\n            ],\n            \"updated\": \"2015-05-29 12:06:39\",\n            \"created\": \"2015-05-28 11:57:35\",\n            \"impressions\": \"0\",\n            \"clicks\": \"0\"\n        }\n    ]\n}","name":"Success","status":null}]},"settings":"","url":"/advertiser/campaigns/:limit/:order","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/2/DESC?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[]},"category":"5568bb80c87afd2500e52503","isReference":false,"link_external":false,"link_url":"","order":3,"type":"get","childrenPages":[]}

getList Campaign w/ Limit & Sort

Retrieve all campaigns with a limit and sorting

This request supports limiting as well as sorting, there are two sorting methods available. [block:api-header] { "type": "basic" } [/block] Ascending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/advertiser/campaigns/10/ASC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic" } [/block] Descending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/advertiser/campaigns/10/DESC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [LIMIT] with how many results you want to return [ORDER] with the order (ASC/DESC) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/[LIMIT]/[ORDER]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This request supports limiting as well as sorting, there are two sorting methods available. [block:api-header] { "type": "basic" } [/block] Ascending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/advertiser/campaigns/10/ASC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic" } [/block] Descending [block:code] { "codes": [ { "code": "https://api.adnium.com/v1/advertiser/campaigns/10/DESC", "language": "http" } ] } [/block] [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [LIMIT] with how many results you want to return [ORDER] with the order (ASC/DESC) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/[LIMIT]/[ORDER]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568cdd0952dca0d0019c80a","link_url":"","next":{"pages":[],"description":""},"order":4,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignadd","editedParams":true,"body":"You are only required to submit the following parameters to create a campaign:\n - name\n - zone_type\n - cpmv\n - daily_budget\n\nThe rest will be filled in via. defaults\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\n\n\nReplace: \n[CAMPAIGN_NAME] with your campaigns name\n[ZONE_TYPE] with your campaigns zone - [List campaign zone types](doc:advertisercampaignlistzones) \n[TRAFFIC_TYPE] with your traffic type - [List traffic types](doc:publisherzonetraffic) \n[CPMV] with your cpmv (lowest 0.01)\n[DAILY_BUDGET] with your daily budget - [List campaign budgets](doc:advertisercampaignlistbudgets) \n[PAGE_FREQ] with your page freq capping - [List campaign page frequency capping](doc:advertisercampaignlistfreqpage) \n[USER_TIMES] with your uses frequency times - [List campaign frequency times](doc:advertisercampaignlistfreqtimes) \n[USER_HOUR] with your user frequency hour - [List campaign frequency hour](doc:advertisercampaignlistfreqhour) \n[COUNTRIES] with your country targeting - [List countries](doc:advertisercampaignlistcountries) \n[REGIONS] with your region targeting - [List regions](doc:advertisercampaignlistregions) \n[CITIES] with your city targeting - [List cities](doc:advertisercampaignlistcities) \n[LANGUAGES] with your language targeting - [List languages](doc:advertisercampaignlistlanguages) \n[OS] with your os targeting - [List operating systems](doc:advertisercampaignlistos) \n[DEVICES] with your device targeting - [List devices](doc:advertisercampaignlistdevices) \n[CARRIERS] with your carrier targeting - [List carriers](doc:advertisercampaignlistcarriers) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'name'=>[CAMPAIGN_NAME],\\n    'zone_type'=>[ZONE_TYPE],\\n    'traffic_type'=>[TRAFFIC_TYPE],\\n    'cpmv'=>[CPMV],\\n    'daily_budget'=>[DAILY_BUDGET],\\n    'page_freq'=>[PAGE_FREQ],\\n    'user_freq_times'=>[USER_TIMES],\\n    'user_freq_hour'=>[USER_HOUR],\\n    'countries'=>[COUNTRIES],\\n    'regions'=>[REGIONS],\\n    'cities'=>[CITIES],\\n    'languages'=>[LANGUAGES],\\n    'os'=>[OS],\\n    'devices'=>[DEVICES],\\n    'carriers'=>[CARRIERS]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/add/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_POST, true);\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-05-29T20:36:32.005Z","excerpt":"Create a new campaign","githubsync":"","hidden":false,"sync_unique":"","title":"Create New Campaign","updates":[],"version":"545bdf3488ebc81c0077ad1b","type":"post","category":"5568bb80c87afd2500e52503","link_external":false,"user":"545bdef0e93d95100059ead2","api":{"method":"post","params":[{"desc":"The name of your campaign","default":"","type":"string","name":"name","_id":"5568cdd0952dca0d0019c819","ref":"","in":"body","required":false},{"name":"zone_type","_id":"5568cdd0952dca0d0019c818","ref":"","in":"body","required":false,"desc":"The zone type ID","default":"","type":"int"},{"ref":"","in":"body","required":false,"desc":"The traffic type ID Straight - 0, Gay - 1","default":"Straight - 0","type":"int","name":"traffic_type","_id":"5568cdd0952dca0d0019c817"},{"in":"body","required":false,"desc":"Your specified CPMv (minimum 0.01)","default":"","type":"double","name":"cpmv","_id":"5568cdd0952dca0d0019c816","ref":""},{"required":false,"desc":"Budget amount = 10 - 50000","default":"","type":"int","name":"daily_budget","_id":"5568cdd0952dca0d0019c815","ref":"","in":"body"},{"type":"int","name":"page_freq","_id":"5568cdd0952dca0d0019c814","ref":"","in":"body","required":false,"desc":"Page frequency enabled","default":"1"},{"required":false,"desc":"How many times per user per specified hours","default":"9999","type":"int","name":"user_freq_times","_id":"5568cdd0952dca0d0019c813","ref":"","in":"body"},{"type":"int","name":"user_freq_hour","_id":"5568cdd0952dca0d0019c812","ref":"","in":"body","required":false,"desc":"How many hours per cycle","default":"24"},{"desc":"All targeted countries - All - 9999, otherwise command delimited e.g. 1,2,3","default":"9999","type":"string","name":"countries","_id":"5568cdd0952dca0d0019c811","ref":"","in":"body","required":false},{"name":"regions","_id":"5568cdd0952dca0d0019c810","ref":"","in":"body","required":false,"desc":"All targeted regions - All - 99999, otherwise comma delimited e.,g. 1,2,3","default":"99999","type":"string"},{"ref":"","in":"body","required":false,"desc":"All targeted cities - All - 999999, otherwise comma delimited e.g. 1,2,3","default":"999999","type":"string","name":"cities","_id":"5568cdd0952dca0d0019c80f"},{"in":"body","required":false,"desc":"All targeted languages - All - 9999, otherwise command delimited e.g. 1,2,3","default":"9999","type":"string","name":"languages","_id":"5568cdd0952dca0d0019c80e","ref":""},{"desc":"All targeted os - All - 9999, otherwise command delimited e.g. 1,2,3","default":"9999","type":"string","name":"os","_id":"5568cdd0952dca0d0019c80d","ref":"","in":"body","required":false},{"_id":"5568cdd0952dca0d0019c80c","ref":"","in":"body","required":false,"desc":"All targeted devices - All - 9999, otherwise command delimited e.g. 1,2,3","default":"9999","type":"string","name":"devices"},{"name":"carriers","_id":"5568cdd0952dca0d0019c80b","ref":"","in":"body","required":false,"desc":"All targeted carriers - All - 9999, otherwise command delimited e.g. 1,2,3","default":"9999","type":"string"},{"ref":"","in":"body","required":false,"desc":"Hours of the day 0-23","default":"9999","type":"string","name":"monday","_id":"5845a78b9f6fbb1b00430850"},{"default":"9999","type":"string","name":"tuesday","_id":"5845a78b9f6fbb1b0043084f","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23"},{"default":"9999","type":"string","name":"wednesday","_id":"5845a78b9f6fbb1b0043084e","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23"},{"default":"9999","type":"string","name":"thursday","_id":"5845a78b9f6fbb1b0043084d","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23"},{"default":"9999","type":"string","name":"friday","_id":"5845a78b9f6fbb1b0043084c","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23"},{"default":"9999","type":"string","name":"saturday","_id":"5845a78b9f6fbb1b0043084b","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23"},{"default":"9999","type":"string","name":"sunday","_id":"5845a78b9f6fbb1b0043084a","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23"},{"default":"","type":"string","name":"keywords","_id":"5845a78b9f6fbb1b00430849","ref":"","in":"body","required":false,"desc":"Command delimited keywords: example, words, here"},{"in":"body","required":false,"desc":"A retargeting ID linked to your account","default":"","type":"int","name":"retargeting","_id":"5845a78b9f6fbb1b00430848","ref":""},{"required":false,"desc":"0 - Normal / 2 - Flat Rate","default":"2","type":"int","name":"bid_type","_id":"5845a78b9f6fbb1b00430847","ref":"","in":"body"},{"ref":"","in":"body","required":false,"desc":"0 - All / 1 - Wifi / 2 - Carrier","default":"0","type":"int","name":"connection","_id":"5845a78b9f6fbb1b00430846"},{"in":"body","required":false,"desc":"A white/black list ID linked to your account","default":"0","type":"int","name":"white_black_list","_id":"58486f2c9af7dd0f007fe19b","ref":""}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 3,\n    \"rows\": {\n        \"success\": 1,\n        \"id\": \"1\",\n        \"message\": \"Successfully created campaign\"\n    }\n}","name":"Success"}]},"settings":"","url":"/advertiser/campaign/add/","auth":"required","examples":{"codes":[{"code":"<?php\n  $params = array(\n    'name'=>'my first campaign',\n    'zone_type'=>1,\n    'traffic_type'=>1,\n    'cpmv'=>0.111,\n    'daily_budget'=>50000,\n    'page_freq'=>2,\n    'user_freq_times'=>9999,\n    'user_freq_hour'=>18,\n    'countries'=>'8,4',\n    'regions'=>'1,2,3',\n    'cities'=>'1,2,3',\n    'languages'=>'5,8',\n    'os'=>'1,2,3',\n    'devices'=>'100,102',\n    'carriers'=>'1,2,3'\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/add/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_POST, true);\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]}},"editedParams2":true,"isReference":false,"__v":2,"childrenPages":[]}

postCreate New Campaign

Create a new campaign

Body Params

name:
string
The name of your campaign
zone_type:
integer
The zone type ID
traffic_type:
integerStraight - 0
The traffic type ID Straight - 0, Gay - 1
cpmv:
double
Your specified CPMv (minimum 0.01)
daily_budget:
integer
Budget amount = 10 - 50000
page_freq:
integer1
Page frequency enabled
user_freq_times:
integer9999
How many times per user per specified hours
user_freq_hour:
integer24
How many hours per cycle
countries:
string9999
All targeted countries - All - 9999, otherwise command delimited e.g. 1,2,3
regions:
string99999
All targeted regions - All - 99999, otherwise comma delimited e.,g. 1,2,3
cities:
string999999
All targeted cities - All - 999999, otherwise comma delimited e.g. 1,2,3
languages:
string9999
All targeted languages - All - 9999, otherwise command delimited e.g. 1,2,3
os:
string9999
All targeted os - All - 9999, otherwise command delimited e.g. 1,2,3
devices:
string9999
All targeted devices - All - 9999, otherwise command delimited e.g. 1,2,3
carriers:
string9999
All targeted carriers - All - 9999, otherwise command delimited e.g. 1,2,3
monday:
string9999
Hours of the day 0-23
tuesday:
string9999
Hours of the day 0-23
wednesday:
string9999
Hours of the day 0-23
thursday:
string9999
Hours of the day 0-23
friday:
string9999
Hours of the day 0-23
saturday:
string9999
Hours of the day 0-23
sunday:
string9999
Hours of the day 0-23
keywords:
string
Command delimited keywords: example, words, here
retargeting:
integer
A retargeting ID linked to your account
bid_type:
integer2
0 - Normal / 2 - Flat Rate
connection:
integer0
0 - All / 1 - Wifi / 2 - Carrier
white_black_list:
integer0
A white/black list ID linked to your account
You are only required to submit the following parameters to create a campaign: - name - zone_type - cpmv - daily_budget The rest will be filled in via. defaults [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN_NAME] with your campaigns name [ZONE_TYPE] with your campaigns zone - [List campaign zone types](doc:advertisercampaignlistzones) [TRAFFIC_TYPE] with your traffic type - [List traffic types](doc:publisherzonetraffic) [CPMV] with your cpmv (lowest 0.01) [DAILY_BUDGET] with your daily budget - [List campaign budgets](doc:advertisercampaignlistbudgets) [PAGE_FREQ] with your page freq capping - [List campaign page frequency capping](doc:advertisercampaignlistfreqpage) [USER_TIMES] with your uses frequency times - [List campaign frequency times](doc:advertisercampaignlistfreqtimes) [USER_HOUR] with your user frequency hour - [List campaign frequency hour](doc:advertisercampaignlistfreqhour) [COUNTRIES] with your country targeting - [List countries](doc:advertisercampaignlistcountries) [REGIONS] with your region targeting - [List regions](doc:advertisercampaignlistregions) [CITIES] with your city targeting - [List cities](doc:advertisercampaignlistcities) [LANGUAGES] with your language targeting - [List languages](doc:advertisercampaignlistlanguages) [OS] with your os targeting - [List operating systems](doc:advertisercampaignlistos) [DEVICES] with your device targeting - [List devices](doc:advertisercampaignlistdevices) [CARRIERS] with your carrier targeting - [List carriers](doc:advertisercampaignlistcarriers) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'name'=>[CAMPAIGN_NAME],\n 'zone_type'=>[ZONE_TYPE],\n 'traffic_type'=>[TRAFFIC_TYPE],\n 'cpmv'=>[CPMV],\n 'daily_budget'=>[DAILY_BUDGET],\n 'page_freq'=>[PAGE_FREQ],\n 'user_freq_times'=>[USER_TIMES],\n 'user_freq_hour'=>[USER_HOUR],\n 'countries'=>[COUNTRIES],\n 'regions'=>[REGIONS],\n 'cities'=>[CITIES],\n 'languages'=>[LANGUAGES],\n 'os'=>[OS],\n 'devices'=>[DEVICES],\n 'carriers'=>[CARRIERS]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/add/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



You are only required to submit the following parameters to create a campaign: - name - zone_type - cpmv - daily_budget The rest will be filled in via. defaults [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN_NAME] with your campaigns name [ZONE_TYPE] with your campaigns zone - [List campaign zone types](doc:advertisercampaignlistzones) [TRAFFIC_TYPE] with your traffic type - [List traffic types](doc:publisherzonetraffic) [CPMV] with your cpmv (lowest 0.01) [DAILY_BUDGET] with your daily budget - [List campaign budgets](doc:advertisercampaignlistbudgets) [PAGE_FREQ] with your page freq capping - [List campaign page frequency capping](doc:advertisercampaignlistfreqpage) [USER_TIMES] with your uses frequency times - [List campaign frequency times](doc:advertisercampaignlistfreqtimes) [USER_HOUR] with your user frequency hour - [List campaign frequency hour](doc:advertisercampaignlistfreqhour) [COUNTRIES] with your country targeting - [List countries](doc:advertisercampaignlistcountries) [REGIONS] with your region targeting - [List regions](doc:advertisercampaignlistregions) [CITIES] with your city targeting - [List cities](doc:advertisercampaignlistcities) [LANGUAGES] with your language targeting - [List languages](doc:advertisercampaignlistlanguages) [OS] with your os targeting - [List operating systems](doc:advertisercampaignlistos) [DEVICES] with your device targeting - [List devices](doc:advertisercampaignlistdevices) [CARRIERS] with your carrier targeting - [List carriers](doc:advertisercampaignlistcarriers) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'name'=>[CAMPAIGN_NAME],\n 'zone_type'=>[ZONE_TYPE],\n 'traffic_type'=>[TRAFFIC_TYPE],\n 'cpmv'=>[CPMV],\n 'daily_budget'=>[DAILY_BUDGET],\n 'page_freq'=>[PAGE_FREQ],\n 'user_freq_times'=>[USER_TIMES],\n 'user_freq_hour'=>[USER_HOUR],\n 'countries'=>[COUNTRIES],\n 'regions'=>[REGIONS],\n 'cities'=>[CITIES],\n 'languages'=>[LANGUAGES],\n 'os'=>[OS],\n 'devices'=>[DEVICES],\n 'carriers'=>[CARRIERS]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/add/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568cc63952dca0d0019c7fc","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php \\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/start/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","link_external":false,"order":5,"project":"545bdf3488ebc81c0077ad18","version":"545bdf3488ebc81c0077ad1b","__v":4,"createdAt":"2015-05-29T20:30:27.681Z","parentDoc":null,"slug":"advertisercampaigncampaignstart","type":"put","user":"545bdef0e93d95100059ead2","api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php  \n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/start/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": {\n    \"success\": 1,\n    \"message\": \"Successfully updated campaign status\"\n  }\n}","name":"Success"},{"status":null,"language":"json","code":"{\n  \"error\": 310,\n  \"message\": \"Could not update campaign status\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/:campaign/start/"},"category":"5568bb80c87afd2500e52503","link_url":"","title":"Start Campaign","excerpt":"Starts a campaign","hidden":false,"sync_unique":"","updates":[],"githubsync":"","isReference":false,"childrenPages":[]}

putStart Campaign

Starts a campaign

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php \n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/start/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php \n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/start/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568cc47952dca0d0019c7f9","type":"put","api":{"examples":{"codes":[{"language":"php","code":"<?php  \n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/pause/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[],"results":{"codes":[{"code":"{\n  \"count\": 2,\n  \"rows\": {\n    \"success\": 1,\n    \"message\": \"Successfully updated campaign status\"\n  }\n}","name":"Success","status":null,"language":"json"},{"status":null,"language":"json","code":"{\n  \"error\": 310,\n  \"message\": \"Could not update campaign status\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/:campaign/pause/","auth":"required"},"parentDoc":null,"slug":"advertisercampaigncampaignpause","title":"Pause Campaign","__v":4,"link_external":false,"sync_unique":"","user":"545bdef0e93d95100059ead2","order":6,"category":"5568bb80c87afd2500e52503","createdAt":"2015-05-29T20:29:59.885Z","excerpt":"Pauses a campaign","githubsync":"","link_url":"","project":"545bdf3488ebc81c0077ad18","updates":[],"version":"545bdf3488ebc81c0077ad1b","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php \\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/pause/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","hidden":false,"isReference":false,"childrenPages":[]}

putPause Campaign

Pauses a campaign

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php \n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/pause/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php \n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/pause/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5568cc286976ef0d0099c94c","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","createdAt":"2015-05-29T20:29:28.022Z","isReference":false,"link_external":false,"order":7,"project":"545bdf3488ebc81c0077ad18","title":"Delete Campaign","type":"put","githubsync":"","parentDoc":null,"__v":6,"api":{"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": {\n    \"success\": 1,\n    \"message\": \"Successfully updated campaign status\"\n  }\n}","name":"Success"},{"status":null,"language":"json","code":"{\n  \"error\": 310,\n  \"message\": \"Could not update campaign status\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/:campaign/delete/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php  \n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/delete/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[]},"category":"5568bb80c87afd2500e52503","excerpt":"Deletes a campaign","body":"Note that this action cannot be reverted.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php \\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/delete/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","hidden":false,"link_url":"","slug":"advertisercampaigncampaigndelete","sync_unique":"","childrenPages":[]}

putDelete Campaign

Deletes a campaign

Note that this action cannot be reverted. [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php \n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/delete/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Note that this action cannot be reverted. [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID - [List campaigns](doc:advertisercampaigns) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php \n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/delete/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c67614306d723004d03da","order":0,"parentDoc":null,"slug":"advertisercampaigncampaignbanners","sync_unique":"","api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banners/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 1,\n    \"rows\": [\n        {\n            \"id\": \"1\",\n            \"banner_status\": \"3\",\n            \"camp_id\": \"1\",\n            \"user_id\": \"1\",\n            \"url\": \"http://someurl.org\",\n            \"updated\": \"2015-05-28 16:13:21\",\n            \"created\": \"2015-05-28 16:13:21\"\n        }\n    ]\n}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 331,\n    \"message\": \"Could not find any banners\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/:campaign/banners/"},"category":"556c5437d5b7ff0d00c6f0d5","createdAt":"2015-06-01T14:08:33.264Z","hidden":false,"version":"545bdf3488ebc81c0077ad1b","githubsync":"","link_external":false,"title":"List Banners by Campaign","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banners/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","isReference":false,"type":"get","project":"545bdf3488ebc81c0077ad18","updates":[],"user":"545bdef0e93d95100059ead2","__v":5,"excerpt":"List banners in a campaign","link_url":"","childrenPages":[]}

getList Banners by Campaign

List banners in a campaign

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banners/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banners/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c6787c14029190092d055","__v":5,"api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/1?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 1,\n    \"rows\": [\n        {\n            \"id\": \"1\",\n            \"banner_status\": \"3\",\n            \"camp_id\": \"1\",\n            \"user_id\": \"1\",\n            \"url\": \"http://someurl.org\",\n            \"updated\": \"2015-05-28 16:13:21\",\n            \"created\": \"2015-05-28 16:13:21\"\n        }\n    ]\n}","name":"Success"},{"language":"json","code":"{\n    \"error\": 331,\n    \"message\": \"Could not find any banners\"\n}","name":"Error","status":null}]},"settings":"","url":"/advertiser/campaign/:campaign/banner/:banner"},"createdAt":"2015-06-01T14:09:11.101Z","isReference":false,"project":"545bdf3488ebc81c0077ad18","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","excerpt":"Retrieve a banner in a campaign","link_external":false,"link_url":"","order":1,"slug":"advertisercampaigncampaignbannerbanner","type":"get","updates":[],"category":"556c5437d5b7ff0d00c6f0d5","hidden":false,"sync_unique":"","title":"List Banner by Campaign","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[BANNER] with the banner ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","githubsync":"","parentDoc":null,"childrenPages":[]}

getList Banner by Campaign

Retrieve a banner in a campaign

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [BANNER] with the banner ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [BANNER] with the banner ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c68e575996f2d00c2b399","editedParams2":true,"excerpt":"Add a new banner to a campaign","link_url":"","user":"545bdef0e93d95100059ead2","__v":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[PATH_TO_BANNER] with the full path to the file you wish to upload ('/my/full/path/image.jpg')\n[URL] with a valid url\n[CAMPAIGN] with your campaign ID \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\t$myfile = [PATH_TO_BANNER];\\n  $finfo = finfo_open(FILEINFO_MIME_TYPE);\\n  $params = array(\\n      'url'=>[URL],\\n      'banner'=> new CURLFile($myfile, finfo_file($finfo, $myfile))\\n  );\\n  finfo_close($finfo);\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/add/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_POST, true);\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5437d5b7ff0d00c6f0d5","githubsync":"","order":2,"parentDoc":null,"version":"545bdf3488ebc81c0077ad1b","api":{"auth":"required","examples":{"codes":[{"code":"<?php\n\t$myfile = '/path/to/banner/banner.png';\n  $finfo = finfo_open(FILEINFO_MIME_TYPE);\n  $params = array(\n      'url'=>'http://example.org',\n      'banner'=> new CURLFile($myfile, finfo_file($finfo, $myfile))\n  );\n  finfo_close($finfo);\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banner/add/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_POST, true);\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","language":"php","name":""}]},"method":"post","params":[{"desc":"The URL of the banner e.g. http://example.org","name":"url","ref":"","required":false,"type":"string","in":"body","_id":"556c68e575996f2d00c2b39b","default":""},{"name":"banner","ref":"","required":false,"type":"file","in":"body","_id":"556c68e575996f2d00c2b39a","default":"","desc":"The image to be uploaded"}],"results":{"codes":[{"code":"{\n    \"count\": 3,\n    \"rows\": {\n        \"success\": 1,\n        \"banner\": \"3\",\n        \"message\": \"Successfully uploaded banner\"\n    }\n}","name":"Success","status":null,"language":"json"}]},"settings":"","url":"/advertiser/campaign/:campaign/banner/add/"},"hidden":false,"isReference":false,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignbanneradd","sync_unique":"","title":"Create New Banner","createdAt":"2015-06-01T14:15:01.663Z","editedParams":true,"updates":[],"link_external":false,"type":"post","childrenPages":[]}

postCreate New Banner

Add a new banner to a campaign

Body Params

url:
string
The URL of the banner e.g. http://example.org
banner:
file
The image to be uploaded
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [PATH_TO_BANNER] with the full path to the file you wish to upload ('/my/full/path/image.jpg') [URL] with a valid url [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n\t$myfile = [PATH_TO_BANNER];\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $params = array(\n 'url'=>[URL],\n 'banner'=> new CURLFile($myfile, finfo_file($finfo, $myfile))\n );\n finfo_close($finfo);\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/add/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [PATH_TO_BANNER] with the full path to the file you wish to upload ('/my/full/path/image.jpg') [URL] with a valid url [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n\t$myfile = [PATH_TO_BANNER];\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $params = array(\n 'url'=>[URL],\n 'banner'=> new CURLFile($myfile, finfo_file($finfo, $myfile))\n );\n finfo_close($finfo);\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/add/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c67d74306d723004d03dd","__v":0,"createdAt":"2015-06-01T14:10:31.482Z","excerpt":"Edit the URL of a banner in a campaign","githubsync":"","editedParams":true,"editedParams2":true,"link_url":"","order":3,"parentDoc":null,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[NEW_BANNER_URL] with the new url for the banner\n[CAMPAIGN] with the campaign ID\n[BANNER] with the banner ID of the banner you want to edit - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'url'=>[NEW_BANNER_URL]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/edit/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5437d5b7ff0d00c6f0d5","hidden":false,"isReference":false,"link_external":false,"slug":"advertisercampaigncampaignbannerbanneredit","sync_unique":"","version":"545bdf3488ebc81c0077ad1b","api":{"results":{"codes":[{"code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated banner\"\n    }\n}","language":"json","status":null,"name":"Success"},{"language":"json","status":null,"name":"Error","code":"{\n    \"error\": 325,\n    \"message\": \"Could not edit banner\"\n}"}]},"settings":"","url":"/advertiser/campaign/:campaign/banner/:banner/edit/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'url'=>'http://example.org'\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banner/1/edit/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[{"name":"url","ref":"","required":false,"type":"string","in":"body","_id":"556c67d74306d723004d03de","default":"","desc":"The URL to change it to e.g. http://example.org"}]},"project":"545bdf3488ebc81c0077ad18","title":"Edit Banner","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","childrenPages":[]}

putEdit Banner

Edit the URL of a banner in a campaign

Body Params

url:
string
The URL to change it to e.g. http://example.org
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [NEW_BANNER_URL] with the new url for the banner [CAMPAIGN] with the campaign ID [BANNER] with the banner ID of the banner you want to edit - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'url'=>[NEW_BANNER_URL]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/edit/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [NEW_BANNER_URL] with the new url for the banner [CAMPAIGN] with the campaign ID [BANNER] with the banner ID of the banner you want to edit - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'url'=>[NEW_BANNER_URL]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/edit/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c686675996f2d00c2b396","parentDoc":null,"version":"545bdf3488ebc81c0077ad1b","createdAt":"2015-06-01T14:12:54.054Z","link_external":false,"order":4,"project":"545bdf3488ebc81c0077ad18","sync_unique":"","title":"Start Banner","api":{"settings":"","url":"/advertiser/campaign/:campaign/banner/:banner/start/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banner/1/start/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated banner status\"\n    }\n}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 328,\n    \"message\": \"Could not update banner status\"\n}","name":"Error"}]}},"hidden":false,"type":"put","updates":[],"user":"545bdef0e93d95100059ead2","__v":4,"link_url":"","category":"556c5437d5b7ff0d00c6f0d5","excerpt":"Set a banner to the start or enabled status","githubsync":"","isReference":false,"slug":"advertisercampaigncampaignbannerbannerstart","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[BANNER] with your banner ID - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/start/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","childrenPages":[]}

putStart Banner

Set a banner to the start or enabled status

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [BANNER] with your banner ID - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/start/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [BANNER] with your banner ID - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/start/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c68864306d723004d03e0","link_external":false,"link_url":"","order":5,"parentDoc":null,"user":"545bdef0e93d95100059ead2","api":{"params":[],"results":{"codes":[{"code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated banner status\"\n    }\n}","name":"Success","status":null,"language":"json"},{"name":"Error","status":null,"language":"json","code":"{\n    \"error\": 328,\n    \"message\": \"Could not update banner status\"\n}"}]},"settings":"","url":"/advertiser/campaign/:campaign/banner/:banner/pause/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banner/1/pause/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[BANNER] with your banner ID - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/pause/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","isReference":false,"updates":[],"githubsync":"","title":"Pause Banner","slug":"advertisercampaigncampaignbannerbannerpause","sync_unique":"","type":"put","version":"545bdf3488ebc81c0077ad1b","createdAt":"2015-06-01T14:13:26.561Z","excerpt":"Set a banner to the paused status","project":"545bdf3488ebc81c0077ad18","__v":5,"category":"556c5437d5b7ff0d00c6f0d5","hidden":false,"childrenPages":[]}

putPause Banner

Set a banner to the paused status

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [BANNER] with your banner ID - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/pause/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [BANNER] with your banner ID - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/pause/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c68994306d723004d03e2","updates":[],"api":{"method":"put","params":[],"results":{"codes":[{"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated banner status\"\n    }\n}","name":"Success","status":null},{"status":null,"language":"json","code":"{\n    \"error\": 328,\n    \"message\": \"Could not update banner status\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/:campaign/banner/:banner/delete/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banner/1/delete/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]}},"excerpt":"Delete a banner","category":"556c5437d5b7ff0d00c6f0d5","isReference":false,"link_external":false,"order":6,"type":"put","version":"545bdf3488ebc81c0077ad1b","__v":5,"parentDoc":null,"sync_unique":"","githubsync":"","hidden":false,"link_url":"","project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignbannerbannerdelete","title":"Delete Banner","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[BANNER] with your banner ID - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) \n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/delete/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-06-01T14:13:45.401Z","user":"545bdef0e93d95100059ead2","childrenPages":[]}

putDelete Banner

Delete a banner

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [BANNER] with your banner ID - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/delete/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [BANNER] with your banner ID - [List all banners in a campaign](doc:advertisercampaigncampaignbanners) [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/delete/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c5477d5b7ff0d00c6f0d6","editedParams2":true,"link_url":"","title":"Edit Name","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","updates":[],"__v":0,"editedParams":true,"hidden":false,"order":0,"slug":"advertisercampaignideditname","isReference":false,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN_NAME] with your new campaign name\n[CAMPAIGN] with your campaign id\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value'=>[CAMPAIGN_NAME],\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/name/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T12:47:51.691Z","githubsync":"","sync_unique":"","api":{"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated campaign name\"\n    }\n}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/:id/edit/name/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'value'=>'my edited campaign name',\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/name/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[{"type":"string","in":"body","_id":"556c5477d5b7ff0d00c6f0d7","default":"","desc":"The new name for your campaign","name":"value","ref":"","required":false}]},"excerpt":"Edit campaigns name","link_external":false,"type":"put","childrenPages":[]}

putEdit Name

Edit campaigns name

Body Params

value:
string
The new name for your campaign
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN_NAME] with your new campaign name [CAMPAIGN] with your campaign id [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[CAMPAIGN_NAME],\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/name/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN_NAME] with your new campaign name [CAMPAIGN] with your campaign id [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[CAMPAIGN_NAME],\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/name/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c54e461c7f40d001ce1fa","createdAt":"2015-06-01T12:49:40.908Z","updates":[],"excerpt":"Edit campaign cpmv","githubsync":"","link_url":"","slug":"advertisercampaignideditcpmv","__v":0,"api":{"examples":{"codes":[{"name":"","language":"php","code":"<?php\n  $params = array(\n    'value'=>0.11,\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/cpmv/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"}]},"method":"put","params":[{"ref":"","required":false,"type":"string","in":"body","_id":"556c54e461c7f40d001ce1fb","default":"","desc":"Your new cpmv (greater than 0.01)","name":"value"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated campaign CPMV\"\n    }\n}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/:id/edit/cpmv/","auth":"required"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CPMV] with your new cpmv\n[CAMPAIGN] with your campaign\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value'=>[CPMV],\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/cpmv/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","editedParams":true,"version":"545bdf3488ebc81c0077ad1b","sync_unique":"","title":"Edit CPMv","type":"put","user":"545bdef0e93d95100059ead2","project":"545bdf3488ebc81c0077ad18","category":"556c5408d5b7ff0d00c6f0d3","hidden":false,"isReference":false,"order":1,"editedParams2":true,"link_external":false,"parentDoc":null,"childrenPages":[]}

putEdit CPMv

Edit campaign cpmv

Body Params

value:
string
Your new cpmv (greater than 0.01)
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CPMV] with your new cpmv [CAMPAIGN] with your campaign [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[CPMV],\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/cpmv/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CPMV] with your new cpmv [CAMPAIGN] with your campaign [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[CPMV],\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/cpmv/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c555661c7f40d001ce1fd","version":"545bdf3488ebc81c0077ad1b","__v":0,"excerpt":"Edit campaign budget","hidden":false,"project":"545bdf3488ebc81c0077ad18","category":"556c5408d5b7ff0d00c6f0d3","editedParams":true,"order":2,"slug":"advertisercampaignideditbudget","sync_unique":"","title":"Edit Budget","api":{"url":"/advertiser/campaign/:id/edit/budget/","auth":"required","examples":{"codes":[{"code":"<?php\n  $params = array(\n    'value'=>50000,\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/budget/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]},"method":"put","params":[{"required":false,"type":"int","in":"body","_id":"556c555661c7f40d001ce1fe","default":"","desc":"Campaign budget ID or amount","name":"value","ref":""}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated campaign budget\"\n    }\n}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error"}]},"settings":""},"createdAt":"2015-06-01T12:51:34.446Z","githubsync":"","link_url":"","user":"545bdef0e93d95100059ead2","parentDoc":null,"type":"put","updates":[],"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[BUDGET] with your new budget - [List campaign budgets](doc:advertisercampaignlistbudgets) \n[CAMPAIGN] with your campaign ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value'=>[BUDGET],\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/budget/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","editedParams2":true,"isReference":false,"link_external":false,"childrenPages":[]}

putEdit Budget

Edit campaign budget

Body Params

value:
integer
Campaign budget ID or amount
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [BUDGET] with your new budget - [List campaign budgets](doc:advertisercampaignlistbudgets) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[BUDGET],\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/budget/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [BUDGET] with your new budget - [List campaign budgets](doc:advertisercampaignlistbudgets) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[BUDGET],\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/budget/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c5583d5b7ff0d00c6f0d9","category":"556c5408d5b7ff0d00c6f0d3","editedParams":true,"isReference":false,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignidedittype","title":"Edit Traffic Type","__v":0,"createdAt":"2015-06-01T12:52:19.509Z","githubsync":"","hidden":false,"link_url":"","updates":[],"editedParams2":true,"excerpt":"Edit campaign traffic type","link_external":false,"sync_unique":"","user":"545bdef0e93d95100059ead2","api":{"method":"put","params":[{"ref":"","required":false,"type":"int","in":"body","_id":"556c555661c7f40d001ce1fe","default":"","desc":"Traffic type ID","name":"value"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated campaign traffic type\"\n    }\n}","name":"Success"},{"language":"json","code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error","status":null}]},"settings":"","url":"/advertiser/campaign/:id/edit/typ\\e/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'value'=>0,\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/type/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]}},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[TRAFFIC_TYPE] with yyour traffic type - [List traffic types](doc:publisherzonetraffic) \n[CAMPAIGN] with your campaign ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value'=>[TRAFFIC_TYPE],\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/type/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","order":3,"type":"put","version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

putEdit Traffic Type

Edit campaign traffic type

Body Params

value:
integer
Traffic type ID
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [TRAFFIC_TYPE] with yyour traffic type - [List traffic types](doc:publisherzonetraffic) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[TRAFFIC_TYPE],\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/type/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [TRAFFIC_TYPE] with yyour traffic type - [List traffic types](doc:publisherzonetraffic) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[TRAFFIC_TYPE],\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/type/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c5611f4d5a30d0066dfeb","link_external":false,"slug":"advertisercampaignideditfrequency","title":"Edit Frequency Cap","type":"put","createdAt":"2015-06-01T12:54:41.924Z","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[FREQ_PAGE] with your page frequency(on/off) - [List campaign page frequency capping](doc:advertisercampaignlistfreqpage) \n[FREQ_TIMES] with your frequency times - [List campaign frequency times](doc:advertisercampaignlistfreqtimes) \n[FREQ_HOUR] with your frequency hour - [List campaign frequency hour](doc:advertisercampaignlistfreqhour) \n[CAMPAIGN] with your campaign ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value[page]'=>[FREQ_PAGE],\\n    'value[times]'=>[FREQ_TIMES],\\n    'value[hour]'=>[FREQ_HOUR]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/frequency/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","editedParams2":true,"excerpt":"Edit campaign frequency capping","isReference":false,"sync_unique":"","__v":0,"category":"556c5408d5b7ff0d00c6f0d3","editedParams":true,"link_url":"","order":4,"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","githubsync":"","hidden":false,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","updates":[],"api":{"settings":"","url":"/advertiser/campaign/:id/edit/frequency/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'value[page]'=>1,\n    'value[times]'=>9999,\n    'value[hour]'=>18\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/frequency/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[{"required":false,"type":"int","in":"body","_id":"556c555661c7f40d001ce1fe","default":"","desc":"Enabled [1] or disabled [2]","name":"value[page]","ref":""},{"desc":"Your allowed frequency times amount","name":"value[times]","ref":"","required":false,"type":"int","in":"body","_id":"556c5611f4d5a30d0066dfed","default":""},{"ref":"","required":false,"type":"int","in":"body","_id":"556c5611f4d5a30d0066dfec","default":"","desc":"Your allowed frequency hour amount","name":"value[hour]"}],"results":{"codes":[{"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated campaign frequency capping\"\n    }\n}","name":"Success","status":null},{"code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error","status":null,"language":"json"}]}},"childrenPages":[]}

putEdit Frequency Cap

Edit campaign frequency capping

Body Params

value[page]:
integer
Enabled [1] or disabled [2]
value[times]:
integer
Your allowed frequency times amount
value[hour]:
integer
Your allowed frequency hour amount
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [FREQ_PAGE] with your page frequency(on/off) - [List campaign page frequency capping](doc:advertisercampaignlistfreqpage) [FREQ_TIMES] with your frequency times - [List campaign frequency times](doc:advertisercampaignlistfreqtimes) [FREQ_HOUR] with your frequency hour - [List campaign frequency hour](doc:advertisercampaignlistfreqhour) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value[page]'=>[FREQ_PAGE],\n 'value[times]'=>[FREQ_TIMES],\n 'value[hour]'=>[FREQ_HOUR]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/frequency/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [FREQ_PAGE] with your page frequency(on/off) - [List campaign page frequency capping](doc:advertisercampaignlistfreqpage) [FREQ_TIMES] with your frequency times - [List campaign frequency times](doc:advertisercampaignlistfreqtimes) [FREQ_HOUR] with your frequency hour - [List campaign frequency hour](doc:advertisercampaignlistfreqhour) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value[page]'=>[FREQ_PAGE],\n 'value[times]'=>[FREQ_TIMES],\n 'value[hour]'=>[FREQ_HOUR]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/frequency/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c5648f4d5a30d0066dfee","category":"556c5408d5b7ff0d00c6f0d3","hidden":false,"order":5,"sync_unique":"","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[COUNTRIES] with your comma delimited countries - [List countries](doc:advertisercampaignlistcountries) \n[CAMPAIGN] with your campaign ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value'=>[COUNTRIES]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/countries/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-06-01T12:55:36.634Z","editedParams2":true,"excerpt":"Edit campaign country targeting","link_external":false,"project":"545bdf3488ebc81c0077ad18","api":{"auth":"required","examples":{"codes":[{"name":"","language":"php","code":"<?php\n  $params = array(\n    'value'=>'4,8,124'\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/countries/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"}]},"method":"put","params":[{"ref":"","required":false,"type":"string","in":"body","_id":"556c555661c7f40d001ce1fe","default":"","desc":"Comma delimited country IDs e.g. 8,4,0","name":"value"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully update campaign country targeting\"\n    }\n}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/:id/edit/countries/"},"editedParams":true,"githubsync":"","title":"Edit Countries","type":"put","__v":0,"link_url":"","parentDoc":null,"slug":"advertisercampaignideditcountries","updates":[],"isReference":false,"childrenPages":[]}

putEdit Countries

Edit campaign country targeting

Body Params

value:
string
Comma delimited country IDs e.g. 8,4,0
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [COUNTRIES] with your comma delimited countries - [List countries](doc:advertisercampaignlistcountries) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[COUNTRIES]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/countries/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [COUNTRIES] with your comma delimited countries - [List countries](doc:advertisercampaignlistcountries) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[COUNTRIES]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/countries/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c569ef4d5a30d0066dfef","parentDoc":null,"slug":"advertisercampaignideditregions","api":{"url":"/advertiser/campaign/:id/edit/regions/","auth":"required","examples":{"codes":[{"code":"<?php\n  $params = array(\n    'value'=>'4,8'\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/regions/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]},"method":"put","params":[{"required":false,"type":"string","in":"body","_id":"556c555661c7f40d001ce1fe","default":"","desc":"Comma delimited region IDs e.g. 8,4,0","name":"value","ref":""}],"results":{"codes":[{"code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully update campaign region targeting\"\n    }\n}","name":"Success","status":null,"language":"json"},{"status":null,"language":"json","code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error"}]},"settings":""},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[REGIONS] with your comma delimited regions - [List regions](doc:advertisercampaignlistregions) \n[CAMPAIGN] with your campaign ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value'=>[REGIONS]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/regions/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","sync_unique":"","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","__v":0,"githubsync":"","hidden":false,"link_external":false,"link_url":"","project":"545bdf3488ebc81c0077ad18","editedParams2":true,"excerpt":"Edit campaign region targeting","isReference":false,"order":6,"title":"Edit Regions","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T12:57:02.288Z","editedParams":true,"type":"put","childrenPages":[]}

putEdit Regions

Edit campaign region targeting

Body Params

value:
string
Comma delimited region IDs e.g. 8,4,0
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [REGIONS] with your comma delimited regions - [List regions](doc:advertisercampaignlistregions) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[REGIONS]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/regions/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [REGIONS] with your comma delimited regions - [List regions](doc:advertisercampaignlistregions) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[REGIONS]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/regions/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c56bfd5b7ff0d00c6f0da","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T12:57:35.603Z","githubsync":"","order":7,"parentDoc":null,"title":"Edit Cities","__v":0,"hidden":false,"link_external":false,"project":"545bdf3488ebc81c0077ad18","sync_unique":"","version":"545bdf3488ebc81c0077ad1b","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign city targeting","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CITIES] with your comma delimited cities - [List cities](doc:advertisercampaignlistcities) s\n[CAMPAIGN] with your campaign ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value'=>[CITIES]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/cities/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","isReference":false,"link_url":"","slug":"advertisercampaignideditcities","api":{"url":"/advertiser/campaign/:id/edit/cities/","auth":"required","examples":{"codes":[{"code":"<?php\n  $params = array(\n    'value'=>'1,2,3'\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/cities/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]},"method":"put","params":[{"required":false,"type":"string","in":"body","_id":"556c555661c7f40d001ce1fe","default":"","desc":"Comma delimited citiesIDs e.g. 1,2,3","name":"value","ref":""}],"results":{"codes":[{"code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully update campaign city targeting\"\n    }\n}","name":"Success","status":null,"language":"json"},{"name":"Error","status":null,"language":"json","code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}"}]},"settings":""},"childrenPages":[]}

putEdit Cities

Edit campaign city targeting

Body Params

value:
string
Comma delimited citiesIDs e.g. 1,2,3
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CITIES] with your comma delimited cities - [List cities](doc:advertisercampaignlistcities) s [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[CITIES]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/cities/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CITIES] with your comma delimited cities - [List cities](doc:advertisercampaignlistcities) s [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[CITIES]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/cities/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c5776f4d5a30d0066dff0","parentDoc":null,"updates":[],"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[LANGUAGES] with your comma delimited languages - [List languages](doc:advertisercampaignlistlanguages) \n[CAMPAIGN] with your campaign ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value'=>[LANGUAGES]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/languages/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-06-01T13:00:38.189Z","excerpt":"Edit campaign laguage targeting","link_external":false,"link_url":"","githubsync":"","sync_unique":"","title":"Edit Languages","type":"put","project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditlanguages","version":"545bdf3488ebc81c0077ad1b","__v":0,"api":{"params":[{"type":"string","in":"body","_id":"556c555661c7f40d001ce1fe","default":"","desc":"Comma delimited language IDs e.g. 1,2,3","name":"value","ref":"","required":false}],"results":{"codes":[{"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully update campaign language targeting\"\n    }\n}","name":"Success","status":null},{"code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error","status":null,"language":"json"}]},"settings":"","url":"/advertiser/campaign/:id/edit/languages/","auth":"required","examples":{"codes":[{"code":"<?php\n  $params = array(\n    'value'=>'8,11'\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/languages/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]},"method":"put"},"category":"556c5408d5b7ff0d00c6f0d3","editedParams":true,"order":8,"editedParams2":true,"hidden":false,"isReference":false,"user":"545bdef0e93d95100059ead2","childrenPages":[]}

putEdit Languages

Edit campaign laguage targeting

Body Params

value:
string
Comma delimited language IDs e.g. 1,2,3
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [LANGUAGES] with your comma delimited languages - [List languages](doc:advertisercampaignlistlanguages) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[LANGUAGES]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/languages/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [LANGUAGES] with your comma delimited languages - [List languages](doc:advertisercampaignlistlanguages) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[LANGUAGES]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/languages/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c5f3475996f2d00c2b370","category":"556c5408d5b7ff0d00c6f0d3","link_url":"","user":"545bdef0e93d95100059ead2","parentDoc":null,"sync_unique":"","__v":0,"createdAt":"2015-06-01T13:33:40.359Z","editedParams":true,"githubsync":"","isReference":false,"link_external":false,"title":"Edit Devices","api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'value'=>'100, 102'\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/devices/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[{"default":"","desc":"Comma delimited device IDs e.g. 100,102,103","name":"value","ref":"","required":false,"type":"string","in":"body","_id":"556c555661c7f40d001ce1fe"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully update campaign device targeting\"\n    }\n}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/:id/edit/devices/"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[DEVICES] with your comma delimited devices - [List devices](doc:advertisercampaignlistdevices) \n[CAMPAIGN] with your campaign ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value'=>[DEVICES]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/devices/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","editedParams2":true,"hidden":false,"project":"545bdf3488ebc81c0077ad18","updates":[],"excerpt":"Edit campaign device targeting","order":9,"slug":"advertisercampaignideditdevices","type":"put","version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

putEdit Devices

Edit campaign device targeting

Body Params

value:
string
Comma delimited device IDs e.g. 100,102,103
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [DEVICES] with your comma delimited devices - [List devices](doc:advertisercampaignlistdevices) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[DEVICES]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/devices/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [DEVICES] with your comma delimited devices - [List devices](doc:advertisercampaignlistdevices) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[DEVICES]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/devices/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c5f564306d723004d03bc","api":{"url":"/advertiser/campaign/:id/edit/carriers/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'value'=>'1,2,3,4'\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/carriers/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[{"_id":"556c555661c7f40d001ce1fe","default":"","desc":"Comma delimited carrier IDs e.g. 1,2,3,4,5","name":"value","ref":"","required":false,"type":"string","in":"body"}],"results":{"codes":[{"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully update campaign carrier targeting\"\n    }\n}","name":"Success","status":null},{"status":null,"language":"json","code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error"}]},"settings":""},"category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T13:34:14.251Z","parentDoc":null,"project":"545bdf3488ebc81c0077ad18","updates":[],"__v":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CARRIERS] with your comma delimited carriers - [List carriers](doc:advertisercampaignlistcarriers) \n[CAMPAIGN] with your campaign ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'value'=>[CARRIERS]\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/carriers/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","excerpt":"Edit campaign carrier targeting","githubsync":"","type":"put","editedParams2":true,"isReference":false,"order":10,"slug":"advertisercampaignideditcarriers","title":"Edit Carriers","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","editedParams":true,"hidden":false,"link_external":false,"link_url":"","sync_unique":"","childrenPages":[]}

putEdit Carriers

Edit campaign carrier targeting

Body Params

value:
string
Comma delimited carrier IDs e.g. 1,2,3,4,5
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CARRIERS] with your comma delimited carriers - [List carriers](doc:advertisercampaignlistcarriers) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[CARRIERS]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/carriers/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CARRIERS] with your comma delimited carriers - [List carriers](doc:advertisercampaignlistcarriers) [CAMPAIGN] with your campaign ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'value'=>[CARRIERS]\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/carriers/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c6f9ac14029190092d080","createdAt":"2015-06-01T14:43:38.168Z","excerpt":"Include a site to a campaign","hidden":false,"project":"545bdf3488ebc81c0077ad18","title":"Include Site","user":"545bdef0e93d95100059ead2","__v":5,"api":{"url":"/advertiser/stats/:campaign/site/:site/include/","auth":"required","examples":{"codes":[{"code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/site/2/include/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]},"method":"put","params":[],"results":{"codes":[{"name":"Success","status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully included site\"\n    }\n}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":""},"slug":"advertiserstatscampaignsitesiteinclude","sync_unique":"","isReference":false,"link_external":false,"order":11,"parentDoc":null,"updates":[],"category":"556c5408d5b7ff0d00c6f0d3","githubsync":"","link_url":"","type":"put","version":"545bdf3488ebc81c0077ad1b","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[SITE] with the site ID you wish to include\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/include/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","childrenPages":[]}

putInclude Site

Include a site to a campaign

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [SITE] with the site ID you wish to include [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/include/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [SITE] with the site ID you wish to include [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/include/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c6f77c14029190092d07e","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[SITE] with the site ID you wish to exclude\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/exclude/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","excerpt":"Exclude a site from a campaign","link_external":false,"order":12,"category":"556c5408d5b7ff0d00c6f0d3","hidden":false,"isReference":false,"project":"545bdf3488ebc81c0077ad18","slug":"advertiserstatscampaignsitesiteexclude","type":"put","api":{"examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/site/2/exclude/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[],"results":{"codes":[{"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully excluded site\"\n    }\n}","name":"Success","status":null},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/advertiser/stats/:campaign/site/:site/exclude/","auth":"required"},"updates":[],"__v":5,"createdAt":"2015-06-01T14:43:03.791Z","githubsync":"","link_url":"","parentDoc":null,"sync_unique":"","title":"Exclude Site","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

putExclude Site

Exclude a site from a campaign

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [SITE] with the site ID you wish to exclude [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/exclude/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [SITE] with the site ID you wish to exclude [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/exclude/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"581b425a5798c01b0030d663","parentDoc":null,"project":"545bdf3488ebc81c0077ad18","type":"put","user":"545bdef0e93d95100059ead2","api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/site/2/3/include/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"put","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully included site\"\n    }\n}","name":"Success"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/site/:site/:zone/include/"},"createdAt":"2016-11-03T13:57:46.204Z","excerpt":"Include a zone to a campaign (removes an exclusion)","link_external":false,"hidden":false,"updates":[],"githubsync":"","isReference":false,"title":"Include Zone","version":"545bdf3488ebc81c0077ad1b","next":{"pages":[],"description":""},"order":13,"slug":"include-zone","sync_unique":"","__v":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[SITE] with the site ID you wish to include\n[ZONE] with the zone ID you wish to include\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/[ZONE]/include/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5408d5b7ff0d00c6f0d3","link_url":"","childrenPages":[]}

putInclude Zone

Include a zone to a campaign (removes an exclusion)

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [SITE] with the site ID you wish to include [ZONE] with the zone ID you wish to include [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/[ZONE]/include/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [SITE] with the site ID you wish to include [ZONE] with the zone ID you wish to include [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/[ZONE]/include/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"581b428a3f38c52f00ca2a01","category":"556c5408d5b7ff0d00c6f0d3","parentDoc":null,"title":"Exclude Zone","version":"545bdf3488ebc81c0077ad1b","__v":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[SITE] with the site ID you wish to exclude\n[ZONE] with the zone ID you wish to exclude\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/[ZONE]/exclude/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","slug":"exclude-zone","user":"545bdef0e93d95100059ead2","hidden":false,"isReference":false,"excerpt":"Exclude a zone from a campaign","githubsync":"","link_external":false,"next":{"pages":[],"description":""},"order":14,"project":"545bdf3488ebc81c0077ad18","api":{"method":"put","params":[],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully excluded site\"\n    }\n}","name":"Success"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/advertiser/stats/:campaign/site/:site/:zone/exclude/","auth":"required","examples":{"codes":[{"name":"","language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/site/2/3/exclude/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"}]}},"createdAt":"2016-11-03T13:58:34.278Z","updates":[],"sync_unique":"","type":"put","link_url":"","childrenPages":[]}

putExclude Zone

Exclude a zone from a campaign

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [SITE] with the site ID you wish to exclude [ZONE] with the zone ID you wish to exclude [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/[ZONE]/exclude/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [SITE] with the site ID you wish to exclude [ZONE] with the zone ID you wish to exclude [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/[ZONE]/exclude/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c5faec14029190092d037","type":"get","updates":[],"createdAt":"2015-06-01T13:35:42.109Z","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"version":"545bdf3488ebc81c0077ad1b","__v":6,"excerpt":"List campaign targeting countries","slug":"advertisercampaignlistcountries","sync_unique":"","title":"List Countries","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\t$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/?token=[YOUR_API_TOKEN]');\\n\\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n\\t$response = curl_exec($curl);\\n\\tcurl_close($curl);\\n\\tvar_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","githubsync":"","project":"545bdf3488ebc81c0077ad18","user":"545bdef0e93d95100059ead2","api":{"params":[],"results":{"codes":[{"code":"{\n   \"count\":3,\n   \"rows\":[\n      {\n         \"id\":\"0\",\n         \"name\":\"Unknown\"\n      },\n      {\n         \"id\":\"4\",\n         \"name\":\"Afghanistan\"\n      },\n      {\n         \"id\":\"8\",\n         \"name\":\"Albania\"\n      }\n   ]\n}","name":"Success","status":200,"language":"json"}]},"settings":"","url":"/advertiser/campaign/list/countries/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n\t$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/?token=[YOUR_API_TOKEN]');\n\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>","name":""}]},"method":"get"},"category":"556c5429d5b7ff0d00c6f0d4","parentDoc":null,"childrenPages":[]}

getList Countries

List campaign targeting countries

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n\t$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/?token=[YOUR_API_TOKEN]');\n\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n\t$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/?token=[YOUR_API_TOKEN]');\n\tcurl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($curl);\n\tcurl_close($curl);\n\tvar_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c600c4306d723004d03bf","api":{"url":"/advertiser/campaign/list/countries/:country","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/alba?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": [\n        {\n            \"id\": \"8\",\n            \"name\": \"Albania\"\n        },\n        {\n            \"id\": \"744\",\n            \"name\": \"Svalbard & Jan Mayen Islands\"\n        }\n    ]\n}","name":"Success","status":200}]},"settings":""},"isReference":false,"version":"545bdf3488ebc81c0077ad1b","body":"You are able to search by both names and IDs\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[COUNTRY] with the country's name or ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/[COUNTRY]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","link_url":"","parentDoc":null,"sync_unique":"","title":"Search Countries","__v":5,"category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T13:37:16.546Z","excerpt":"List campaign targeting countries with searching","githubsync":"","hidden":false,"link_external":false,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistcountriescountry","updates":[],"user":"545bdef0e93d95100059ead2","order":1,"type":"get","childrenPages":[]}

getSearch Countries

List campaign targeting countries with searching

You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [COUNTRY] with the country's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/[COUNTRY]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [COUNTRY] with the country's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/[COUNTRY]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c602675996f2d00c2b379","type":"get","updates":[],"isReference":false,"link_url":"","order":2,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","hidden":false,"link_external":false,"user":"545bdef0e93d95100059ead2","api":{"results":{"codes":[{"name":"Success","code":"{\n  \"count\": 4,\n  \"rows\": [\n    {\n      \"id\": \"2\",\n      \"name\": \"Private\"\n    },\n    {\n      \"id\": \"3\",\n      \"name\": \"Atlanta\"\n    },\n    {\n      \"id\": \"4\",\n      \"name\": \"Duluth\"\n    },\n    {\n      \"id\": \"5\",\n      \"name\": \"Smyrna\"\n    }\n  ]\n}","language":"json","status":200}]},"settings":"","url":"/advertiser/campaign/list/cities/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[]},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T13:37:42.558Z","title":"List Cities","__v":6,"excerpt":"List campaign targeting cities","githubsync":"","slug":"advertisercampaignlistcities","sync_unique":"","version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

getList Cities

List campaign targeting cities

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c604775996f2d00c2b37b","slug":"advertisercampaignlistcitiescity","user":"545bdef0e93d95100059ead2","__v":6,"body":"You are able to search by both names and IDs\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CITY] with the city's name or ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/[CITY]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","link_external":false,"excerpt":"List campaign targeting cities with searching","parentDoc":null,"type":"get","category":"556c5429d5b7ff0d00c6f0d4","link_url":"","order":3,"githubsync":"","hidden":false,"isReference":false,"project":"545bdf3488ebc81c0077ad18","sync_unique":"","api":{"examples":{"codes":[{"name":"","language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/brampton?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"}]},"method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": [\n        {\n            \"id\": \"3107\",\n            \"name\": \"Brampton\"\n        },\n        {\n            \"id\": \"254125\",\n            \"name\": \"Church Brampton\"\n        }\n    ]\n}","name":"Success"}]},"settings":"","url":"/advertiser/campaign/list/cities/:city","auth":"required"},"createdAt":"2015-06-01T13:38:15.595Z","title":"Search Cities","updates":[],"version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

getSearch Cities

List campaign targeting cities with searching

You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CITY] with the city's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/[CITY]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CITY] with the city's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/[CITY]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c618d4306d723004d03c2","slug":"advertisercampaignlistregions","title":"List Regions","createdAt":"2015-06-01T13:43:41.415Z","link_url":"","project":"545bdf3488ebc81c0077ad18","excerpt":"List campaign targeting regions","hidden":false,"isReference":false,"order":4,"sync_unique":"","api":{"examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"language":"json","code":"{\n  \t\"count\": 3,\n  \t\"rows\": [\n    \t\t{\n      \t\t\"id\": \"0\",\n      \t\t\"name\": \"Unknown\"\n    \t\t},\n    \t\t{\n      \t\t\"id\": \"1\",\n      \t\t\"name\": \"Alabama\"\n    \t\t},\n    \t\t{\n      \t\t\"id\": \"2\",\n      \t\t\"name\": \"Alaska\"\n    \t\t}\n  \t]\n}","name":"Success","status":200}]},"settings":"","url":"/advertiser/campaign/list/regions/","auth":"required"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5429d5b7ff0d00c6f0d4","type":"get","parentDoc":null,"updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","__v":7,"githubsync":"","link_external":false,"childrenPages":[]}

getList Regions

List campaign targeting regions

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c61a5c14029190092d03d","__v":6,"link_url":"","type":"get","version":"545bdf3488ebc81c0077ad1b","api":{"params":[],"results":{"codes":[{"language":"json","status":200,"name":"Success","code":"{\n    \"count\": 1,\n    \"rows\": [\n        {\n            \"id\": \"63\",\n            \"name\": \"Ontario\"\n        }\n    ]\n}"}]},"settings":"","url":"/advertiser/campaign/list/regions/:region","auth":"required","examples":{"codes":[{"code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/ontario?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]},"method":"get"},"category":"556c5429d5b7ff0d00c6f0d4","hidden":false,"isReference":false,"parentDoc":null,"createdAt":"2015-06-01T13:44:05.526Z","excerpt":"List campaign targeting region with searching","githubsync":"","order":5,"project":"545bdf3488ebc81c0077ad18","body":"You are able to search by both names and IDs\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[REGION] with the region's name or ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/[REGION]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","link_external":false,"slug":"advertisercampaignlistregionsregion","sync_unique":"","title":"Search Regions","updates":[],"user":"545bdef0e93d95100059ead2","childrenPages":[]}

getSearch Regions

List campaign targeting region with searching

You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [REGION] with the region's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/[REGION]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [REGION] with the region's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/[REGION]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c61c34306d723004d03c5","parentDoc":null,"title":"List Languages","updates":[],"createdAt":"2015-06-01T13:44:35.661Z","hidden":false,"order":6,"sync_unique":"","user":"545bdef0e93d95100059ead2","api":{"params":[],"results":{"codes":[{"language":"json","status":200,"name":"Success","code":"{\n    \"count\": 2,\n    \"rows\": [\n        {\n            \"id\": \"5\",\n            \"name\": \"Arabic\"\n        },\n        {\n            \"id\": \"8\",\n            \"name\": \"Azerbaijani\"\n        }\n    ]\n}"}]},"settings":"","url":"/advertiser/campaign/list/languages/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get"},"excerpt":"List campaign targeting languages","link_external":false,"link_url":"","project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistlanguages","type":"get","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5429d5b7ff0d00c6f0d4","githubsync":"","isReference":false,"__v":5,"version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

getList Languages

List campaign targeting languages

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c61db4306d723004d03c8","link_url":"","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","api":{"auth":"required","examples":{"codes":[{"code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/english?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]},"method":"get","params":[],"results":{"codes":[{"language":"json","status":200,"name":"Success","code":"{\n    \"count\": 1,\n    \"rows\": [\n        {\n            \"id\": \"25\",\n            \"name\": \"English\"\n        }\n    ]\n}"}]},"settings":"","url":"/advertiser/campaign/list/languages/:language"},"createdAt":"2015-06-01T13:44:59.074Z","hidden":false,"isReference":false,"__v":7,"category":"556c5429d5b7ff0d00c6f0d4","githubsync":"","type":"get","project":"545bdf3488ebc81c0077ad18","sync_unique":"","title":"Search Languages","excerpt":"List campaign targeting languages with searching","order":7,"parentDoc":null,"body":"You are able to search by both names and IDs\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[LANGUAGE] with the language's name or ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/[LANGUAGE]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","link_external":false,"slug":"advertisercampaignlistlanguageslanguage","updates":[],"childrenPages":[]}

getSearch Languages

List campaign targeting languages with searching

You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [LANGUAGE] with the language's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/[LANGUAGE]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [LANGUAGE] with the language's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/[LANGUAGE]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c656775996f2d00c2b389","link_url":"","parentDoc":null,"excerpt":"List campaign targeting carriers","hidden":false,"order":8,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistcarriers","updates":[],"__v":5,"createdAt":"2015-06-01T14:00:07.715Z","link_external":false,"sync_unique":"","user":"545bdef0e93d95100059ead2","api":{"results":{"codes":[{"name":"Success","code":"{\n  \"count\": 2,\n  \"rows\": [\n    {\n      \"id\": \"202001\",\n      \"name\": \"Cosmote\"\n    },\n    {\n      \"id\": \"202005\",\n      \"name\": \"Vodafone\"\n    }\n  ]\n}","language":"json","status":200}]},"settings":"","url":"/advertiser/campaign/list/carriers/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[]},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5429d5b7ff0d00c6f0d4","githubsync":"","isReference":false,"title":"List Carriers","type":"get","version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

getList Carriers

List campaign targeting carriers

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c659ec14029190092d047","category":"556c5429d5b7ff0d00c6f0d4","excerpt":"List campaign targeting carriers with searching","order":9,"project":"545bdf3488ebc81c0077ad18","type":"get","githubsync":"","hidden":false,"parentDoc":null,"user":"545bdef0e93d95100059ead2","createdAt":"2015-06-01T14:01:02.474Z","link_external":false,"link_url":"","slug":"advertisercampaignlistcarrierscarrier","title":"Search Carriers","version":"545bdf3488ebc81c0077ad1b","__v":6,"api":{"results":{"codes":[{"name":"Success","code":"{\n    \"count\": 1,\n    \"rows\": [\n        {\n            \"id\": \"302720\",\n            \"name\": \"Rogers Wireless\"\n        }\n    ]\n}","language":"json","status":200}]},"settings":"","url":"/advertiser/campaign/list/carriers/:carrier","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/rogers?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[]},"body":"You are able to search by both names and IDs\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CARRIER] with the carrier's name or ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/[CARRIER]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","isReference":false,"sync_unique":"","updates":[],"childrenPages":[]}

getSearch Carriers

List campaign targeting carriers with searching

You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CARRIER] with the carrier's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/[CARRIER]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CARRIER] with the carrier's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/[CARRIER]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c65bbc14029190092d049","createdAt":"2015-06-01T14:01:31.965Z","link_external":false,"order":10,"parentDoc":null,"sync_unique":"","api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": [\n        {\n            \"id\": \"102\",\n            \"name\": \"Alcatel\",\n            \"type\": \"Mobile\"\n        },\n        {\n            \"id\": \"103\",\n            \"name\": \"BenQ\",\n            \"type\": \"Mobile\"\n        }\n    ]\n}","name":"Success"}]},"settings":"","url":"/advertiser/campaign/list/devices/"},"excerpt":"List campaign targeting devices","isReference":false,"link_url":"","project":"545bdf3488ebc81c0077ad18","title":"List Devices","type":"get","updates":[],"__v":6,"githubsync":"","hidden":false,"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5429d5b7ff0d00c6f0d4","slug":"advertisercampaignlistdevices","childrenPages":[]}

getList Devices

List campaign targeting devices

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c661975996f2d00c2b38b","isReference":false,"link_external":false,"__v":6,"githubsync":"","type":"get","link_url":"","order":11,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","title":"Search Devices","updates":[],"category":"556c5429d5b7ff0d00c6f0d4","excerpt":"List campaign targeting devices with searching","hidden":false,"slug":"advertisercampaignlistdevicesdevice-1","sync_unique":"","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","api":{"results":{"codes":[{"name":"Success","code":"{\n    \"count\": 1,\n    \"rows\": [\n        {\n            \"id\": \"602\",\n            \"name\": \"Apple TV\",\n            \"type\": \"Set Top Box\"\n        }\n    ]\n}","language":"json","status":200}]},"settings":"","url":"/advertiser/campaign/list/devices/:device","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/apple?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[]},"body":"You are able to search by both names and IDs\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[DEVICE] with the device's name or ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/[DEVICE]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-06-01T14:03:05.313Z","childrenPages":[]}

getSearch Devices

List campaign targeting devices with searching

You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [DEVICE] with the device's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/[DEVICE]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [DEVICE] with the device's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/[DEVICE]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c6637c14029190092d04c","type":"get","updates":[],"__v":7,"api":{"method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": [\n        {\n            \"id\": \"1\",\n            \"name\": \"Windows\",\n            \"type\": \"Desktop\"\n        },\n        {\n            \"id\": \"2\",\n            \"name\": \"Linux\",\n            \"type\": \"Desktop\"\n        }\n    ]\n}","name":"Success"}]},"settings":"","url":"/advertiser/campaign/list/os/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]}},"project":"545bdf3488ebc81c0077ad18","sync_unique":"","user":"545bdef0e93d95100059ead2","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T14:03:35.615Z","link_url":"","parentDoc":null,"version":"545bdf3488ebc81c0077ad1b","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","excerpt":"List campaign targeting operating systems","hidden":false,"order":12,"slug":"advertisercampaignlistos","title":"List OS","githubsync":"","isReference":false,"link_external":false,"childrenPages":[]}

getList OS

List campaign targeting operating systems

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c65d34306d723004d03d4","body":"You are able to search by both names and IDs\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[OS] with the operating system's name or ID\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/[OS]?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","link_url":"","type":"get","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","__v":8,"createdAt":"2015-06-01T14:01:55.735Z","parentDoc":null,"sync_unique":"","updates":[],"category":"556c5429d5b7ff0d00c6f0d4","link_external":false,"order":13,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistdevicesdevice","api":{"params":[],"results":{"codes":[{"language":"json","status":200,"name":"Success","code":"{\n    \"count\": 1,\n    \"rows\": [\n        {\n            \"id\": \"6\",\n            \"name\": \"Android\",\n            \"type\": \"Mobile\"\n        }\n    ]\n}"}]},"settings":"","url":"/advertiser/campaign/list/os/:os","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/android?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get"},"excerpt":"List campaign targeting operating sytems with searching","githubsync":"","hidden":false,"isReference":false,"title":"Search OS","childrenPages":[]}

getSearch OS

List campaign targeting operating sytems with searching

You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [OS] with the operating system's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/[OS]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



You are able to search by both names and IDs [block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [OS] with the operating system's name or ID [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/[OS]?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c66694306d723004d03d7","user":"545bdef0e93d95100059ead2","__v":6,"link_external":false,"project":"545bdf3488ebc81c0077ad18","sync_unique":"","title":"List Budgets","type":"get","version":"545bdf3488ebc81c0077ad1b","excerpt":"List allowed campaign budgets","hidden":false,"order":14,"parentDoc":null,"slug":"advertisercampaignlistbudgets","api":{"params":[],"results":{"codes":[{"code":"{\n    \"count\": 12,\n    \"rows\": {\n        \"1\": 50000,\n        \"2\": 25000,\n        \"3\": 10000,\n        \"4\": 5000,\n        \"5\": 2000,\n        \"6\": 1000,\n        \"7\": 750,\n        \"8\": 500,\n        \"9\": 200,\n        \"10\": 100,\n        \"11\": 50,\n        \"12\": 20\n    }\n}","name":"Success","status":200,"language":"json"}]},"settings":"","url":"/advertiser/campaign/list/budgets/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/budgets/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/budgets/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-06-01T14:04:25.881Z","category":"556c5429d5b7ff0d00c6f0d4","githubsync":"","isReference":false,"link_url":"","updates":[],"childrenPages":[]}

getList Budgets

List allowed campaign budgets

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/budgets/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/budgets/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c66dec14029190092d04f","title":"List Page Frequency Caps","__v":7,"hidden":false,"project":"545bdf3488ebc81c0077ad18","sync_unique":"","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/page/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5429d5b7ff0d00c6f0d4","excerpt":"List campaign frequency page capping","link_url":"","version":"545bdf3488ebc81c0077ad1b","updates":[],"createdAt":"2015-06-01T14:06:22.697Z","isReference":false,"order":15,"parentDoc":null,"type":"get","api":{"params":[],"results":{"codes":[{"code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"1\": {\n            \"description\": \"Enabled\"\n        },\n        \"2\": {\n            \"description\": \"Disabled\"\n        }\n    }\n}","name":"Success","status":200,"language":"json"}]},"settings":"","url":"/advertiser/campaign/list/freq/page/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/page/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get"},"githubsync":"","link_external":false,"slug":"advertisercampaignlistfreqpage","user":"545bdef0e93d95100059ead2","childrenPages":[]}

getList Page Frequency Caps

List campaign frequency page capping

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/page/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/page/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c669d75996f2d00c2b38e","api":{"url":"/advertiser/campaign/list/freq/hour/","auth":"required","examples":{"codes":[{"code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/hour/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":"","language":"php"}]},"method":"get","params":[],"results":{"codes":[{"name":"Success","status":200,"language":"json","code":"{\n    \"count\": 3,\n    \"rows\": {\n        \"1\": {\n            \"description\": \"hours\"\n        },\n        \"2\": {\n            \"description\": \"hours\"\n        },\n        \"3\": {\n            \"description\": \"hours\"\n        }\n    }\n}"}]},"settings":""},"githubsync":"","sync_unique":"","user":"545bdef0e93d95100059ead2","createdAt":"2015-06-01T14:05:17.837Z","hidden":false,"link_url":"","order":16,"title":"List Frequency Hours","version":"545bdf3488ebc81c0077ad1b","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/hour/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5429d5b7ff0d00c6f0d4","link_external":false,"slug":"advertisercampaignlistfreqhour","__v":6,"excerpt":"List allowed campaign frequency hour capping","isReference":false,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","type":"get","updates":[],"childrenPages":[]}

getList Frequency Hours

List allowed campaign frequency hour capping

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/hour/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/hour/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c66f5c14029190092d052","link_external":false,"parentDoc":null,"title":"List Frequency Times","type":"get","__v":6,"api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/times/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 4,\n    \"rows\": {\n        \"1\": {\n            \"description\": \"1 time per x hours\"\n        },\n        \"2\": {\n            \"description\": \"2 times per x hours\"\n        },\n        \"5\": {\n            \"description\": \"5 times per x hours\"\n        }\n    }\n}","name":"Success"}]},"settings":"","url":"/advertiser/campaign/list/freq/times/"},"createdAt":"2015-06-01T14:06:45.526Z","githubsync":"","version":"545bdf3488ebc81c0077ad1b","user":"545bdef0e93d95100059ead2","excerpt":"List allowed campaign frequency times capping","hidden":false,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistfreqtimes","isReference":false,"link_url":"","sync_unique":"","updates":[],"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/times/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5429d5b7ff0d00c6f0d4","order":17,"childrenPages":[]}

getList Frequency Times

List allowed campaign frequency times capping

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/times/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/times/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c671775996f2d00c2b390","user":"545bdef0e93d95100059ead2","__v":6,"createdAt":"2015-06-01T14:07:19.608Z","order":18,"slug":"advertisercampaignlistzones","type":"get","version":"545bdf3488ebc81c0077ad1b","api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/zones/?token=[YOUR_API_TOKEN]');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 3,\n    \"rows\": {\n        \"1\": {\n            \"name\": \"Desktop Banner - 300x250\"\n        },\n        \"2\": {\n            \"name\": \"Desktop Banner - 728x90\"\n        },\n        \"4\": {\n            \"name\": \"Desktop - Popunder\"\n        }\n    }\n}","name":"Success"}]},"settings":"","url":"/advertiser/campaign/list/zones/"},"isReference":false,"sync_unique":"","title":"List Zone Types","hidden":false,"link_url":"","parentDoc":null,"updates":[],"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace [YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/zones/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c5429d5b7ff0d00c6f0d4","excerpt":"List campaign zone types","githubsync":"","link_external":false,"project":"545bdf3488ebc81c0077ad18","childrenPages":[]}

getList Zone Types

List campaign zone types

[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/zones/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/zones/?token=[YOUR_API_TOKEN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c6e8fc14029190092d077","slug":"advertiserstatscampigndate","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","link_external":false,"hidden":false,"link_url":"","project":"545bdf3488ebc81c0077ad18","sync_unique":"","version":"545bdf3488ebc81c0077ad1b","category":"556c6a90c14029190092d063","createdAt":"2015-06-01T14:39:11.118Z","editedParams2":true,"isReference":false,"parentDoc":null,"title":"Stats By Date","type":"get","user":"545bdef0e93d95100059ead2","__v":0,"api":{"params":[{"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false},{"ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d078","default":"","desc":"The end period","name":"to"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/advertiser/stats/:campaign/date/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/date/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get"},"excerpt":"Get campaign stats by date","updates":[],"editedParams":true,"githubsync":"","order":0,"childrenPages":[]}

getStats By Date

Get campaign stats by date

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c6ec775996f2d00c2b3b0","link_external":false,"link_url":"","order":1,"parentDoc":null,"sync_unique":"","type":"get","createdAt":"2015-06-01T14:40:07.586Z","editedParams2":true,"title":"Stats By Country","api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/country/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from"},{"_id":"556c6e8fc14029190092d078","default":"","desc":"The end period","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/advertiser/stats/:campaign/country/"},"category":"556c6a90c14029190092d063","hidden":false,"isReference":false,"project":"545bdf3488ebc81c0077ad18","slug":"advertiserstatscampigncountry","updates":[],"editedParams":true,"excerpt":"Get campaign stats by country","githubsync":"","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","__v":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","childrenPages":[]}

getStats By Country

Get campaign stats by country

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c6f0ec14029190092d07b","createdAt":"2015-06-01T14:41:18.894Z","editedParams2":true,"excerpt":"Get campaign stats by device","link_external":false,"project":"545bdf3488ebc81c0077ad18","hidden":false,"isReference":false,"order":2,"sync_unique":"","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/device/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c6a90c14029190092d063","editedParams":true,"githubsync":"","parentDoc":null,"slug":"advertiserstatscampigndevice","type":"get","__v":0,"api":{"params":[{"default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d079"},{"desc":"The end period","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d078","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/device/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/device/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get"},"link_url":"","title":"Stats By Device","updates":[],"childrenPages":[]}

getStats By Device

Get campaign stats by device

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/device/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/device/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c6f2cc14029190092d07c","hidden":false,"link_external":false,"link_url":"","updates":[],"__v":0,"createdAt":"2015-06-01T14:41:48.950Z","editedParams":true,"editedParams2":true,"order":3,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","type":"get","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/os/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","excerpt":"Get campaign stats by operating system","isReference":false,"api":{"method":"get","params":[{"ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from"},{"_id":"556c6e8fc14029190092d078","default":"","desc":"The end period","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/advertiser/stats/:campaign/os/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/os/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]}},"githubsync":"","user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","category":"556c6a90c14029190092d063","slug":"advertiserstatscampignos","sync_unique":"","title":"Stats By OS","childrenPages":[]}

getStats By OS

Get campaign stats by operating system

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/os/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/os/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"556c6f44c14029190092d07d","slug":"advertiserstatscampigncarrier","sync_unique":"","title":"Stats By Carrier","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/carrier/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c6a90c14029190092d063","excerpt":"Get campaign stats by carrier","isReference":false,"version":"545bdf3488ebc81c0077ad1b","githubsync":"","order":4,"type":"get","updates":[],"user":"545bdef0e93d95100059ead2","__v":0,"api":{"params":[{"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false},{"name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d078","default":"","desc":"The end period"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/advertiser/stats/:campaign/carrier/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/carrier/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get"},"createdAt":"2015-06-01T14:42:12.464Z","link_external":false,"parentDoc":null,"editedParams":true,"editedParams2":true,"hidden":false,"link_url":"","project":"545bdf3488ebc81c0077ad18","childrenPages":[]}

getStats By Carrier

Get campaign stats by carrier

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/carrier/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/carrier/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"557ae4ffebf0e22f00c45a94","updates":[],"user":"545bdef0e93d95100059ead2","__v":0,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/sites/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-06-12T13:56:15.283Z","excerpt":"Get campaign stats by site","githubsync":"","editedParams":true,"editedParams2":true,"hidden":false,"link_external":false,"version":"545bdf3488ebc81c0077ad1b","slug":"campaign-statistics-by-sites","sync_unique":"","title":"Stats By Site","category":"556c6a90c14029190092d063","isReference":false,"order":5,"parentDoc":null,"api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/sites/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":""},{"desc":"The end period","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d078","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/sites/"},"link_url":"","project":"545bdf3488ebc81c0077ad18","type":"get","childrenPages":[]}

getStats By Site

Get campaign stats by site

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/sites/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/sites/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"58ee2b1315b2d13b00f1cdc6","link_external":false,"project":"545bdf3488ebc81c0077ad18","api":{"params":[{"default":"","type":"yyyy-mm-dd","name":"from","_id":"556c6e8fc14029190092d079","ref":"","in":"query","required":false,"desc":"The start period"},{"default":"","type":"yyyy-mm-dd","name":"to","_id":"556c6e8fc14029190092d078","ref":"","in":"query","required":false,"desc":"The end period"}],"url":"/advertiser/stats/:campaign/zones/","settings":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"method":"get","examples":{"codes":[{"name":"","language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/zones/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"}]},"auth":"required"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/zones/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","sync_unique":"","user":"545bdef0e93d95100059ead2","githubsync":"","next":{"pages":[],"description":""},"slug":"stats-by-zone","parentDoc":null,"excerpt":"Get campaign stats by zone","hidden":false,"isReference":false,"link_url":"","order":6,"__v":0,"category":"556c6a90c14029190092d063","createdAt":"2017-04-12T13:26:43.100Z","version":"545bdf3488ebc81c0077ad1b","title":"Stats By Zone","type":"get","updates":[],"childrenPages":[]}

getStats By Zone

Get campaign stats by zone

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/zones/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/zones/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"56e1d880bc46be0e002af29f","link_external":false,"sync_unique":"","type":"get","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with your campaign ID\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/creative/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","createdAt":"2016-03-10T20:26:40.664Z","editedParams2":true,"githubsync":"","title":"Stats By Creative","user":"545bdef0e93d95100059ead2","__v":0,"hidden":false,"link_url":"","order":7,"slug":"campaign-statistics-by-creative","updates":[],"version":"545bdf3488ebc81c0077ad1b","category":"556c6a90c14029190092d063","excerpt":"Get campaign stats by creative","project":"545bdf3488ebc81c0077ad18","api":{"method":"get","params":[{"desc":"The start period","default":"","type":"yyyy-mm-dd","name":"from","in":"query","_id":"556c6e8fc14029190092d079","ref":"","required":false},{"ref":"","required":false,"desc":"The end period","default":"","type":"yyyy-mm-dd","name":"to","in":"query","_id":"556c6e8fc14029190092d078"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/creative/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/creative/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]}},"editedParams":true,"isReference":false,"parentDoc":null,"childrenPages":[]}

getStats By Creative

Get campaign stats by creative

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/creative/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with your campaign ID [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/creative/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"56461b8f83218f19006e7dae","api":{"examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/date/?token=[YOUR_API_TOKEN]&from=2015-11-04&to=2015-11-06&campaigns=all');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"in":"query","_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd"},{"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d078","default":"","desc":"The end period","name":"to","ref":"","required":false},{"name":"campaigns","ref":"","required":false,"type":"string","in":"query","_id":"56461b8f83218f19006e7daf","default":"","desc":"\"all\" or a comma separated list of IDs e.g. \"1,2,3,5\""}],"results":{"codes":[{"code":"{\n  \"count\": 1,\n  \"rows\": {\n    \"1\": {\n      \"2015-11-04\": {\n        \"created\": \"2015-11-04\",\n        \"campaign_id\": \"1\",\n        \"impressions\": \"1\",\n        \"clicks\": \"0\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\"\n      },\n      \"2015-11-05\": {\n        \"created\": \"2015-11-05\",\n        \"campaign_id\": \"1\",\n        \"impressions\": \"1\",\n        \"clicks\": \"0\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\"\n      },\n      \"2015-11-06\": {\n        \"created\": \"2015-11-06\",\n        \"campaign_id\": \"1\",\n        \"impressions\": \"1\",\n        \"clicks\": \"0\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\"\n      }\n    }\n  }","name":"","status":200,"language":"json"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/date/","auth":"required"},"editedParams2":true,"hidden":false,"link_url":"","project":"545bdf3488ebc81c0077ad18","slug":"all-campaign-statistics-by-date","title":"ALL Stats By Date","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with \"all\" or a comma separated list of campaign IDs\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","githubsync":"","__v":0,"createdAt":"2015-11-13T17:19:11.545Z","isReference":false,"category":"556c6a90c14029190092d063","excerpt":"Get all campaign stats by date","link_external":false,"order":8,"parentDoc":null,"sync_unique":"","type":"get","updates":[],"editedParams":true,"version":"545bdf3488ebc81c0077ad1b","user":"545bdef0e93d95100059ead2","childrenPages":[]}

getALL Stats By Date

Get all campaign stats by date

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
campaigns:
string
"all" or a comma separated list of IDs e.g. "1,2,3,5"
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with "all" or a comma separated list of campaign IDs [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with "all" or a comma separated list of campaign IDs [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"56461cda83218f19006e7db2","githubsync":"","link_external":false,"project":"545bdf3488ebc81c0077ad18","title":"ALL Stats By Country","user":"545bdef0e93d95100059ead2","category":"556c6a90c14029190092d063","editedParams2":true,"slug":"all-campaign-statistics-by-country","updates":[],"api":{"settings":"","url":"/advertiser/stats/country/","auth":"required","examples":{"codes":[{"name":"","language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/country/?token=[YOUR_API_TOKEN]&from=2015-11-04&to=2015-11-06&campaigns=all');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"}]},"method":"get","params":[{"name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d079","default":"","desc":"The start period"},{"default":"","desc":"The end period","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d078"},{"desc":"\"all\" or a comma separated list of IDs e.g. \"1,2,3,5\"","name":"campaigns","ref":"","required":false,"type":"string","in":"query","_id":"56461b8f83218f19006e7daf","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": {\n    \"1\": {\n      \"123\": {\n        \"geo\": \"123\",\n        \"campaign_id\": \"1\",\n        \"impressions\": \"1234\",\n        \"clicks\": \"0\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\"\n      }\n    },\n    \"1\": {\n      \"123\": {\n        \"geo\": \"123\",\n        \"campaign_id\": \"2\",\n        \"impressions\": \"1234\",\n        \"clicks\": \"12\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\"\n      }\n    }\n  }\n}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]}},"excerpt":"Get all campaign stats by country","order":9,"sync_unique":"","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with \"all\" or a comma separated list of campaign IDs\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","editedParams":true,"link_url":"","isReference":false,"parentDoc":null,"type":"get","version":"545bdf3488ebc81c0077ad1b","__v":0,"createdAt":"2015-11-13T17:24:42.796Z","hidden":false,"childrenPages":[]}

getALL Stats By Country

Get all campaign stats by country

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
campaigns:
string
"all" or a comma separated list of IDs e.g. "1,2,3,5"
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with "all" or a comma separated list of campaign IDs [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with "all" or a comma separated list of campaign IDs [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"56461e1dbb7ad50d00e9c596","isReference":false,"link_url":"","__v":0,"createdAt":"2015-11-13T17:30:05.217Z","editedParams":true,"hidden":false,"slug":"all-campaign-statistics-by-site","title":"ALL Stats By Site","updates":[],"version":"545bdf3488ebc81c0077ad1b","api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/sites/?token=[YOUR_API_TOKEN]&from=2015-11-04&to=2015-11-06&campaigns=all');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"in":"query","_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd"},{"default":"","desc":"The end period","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query","_id":"556c6e8fc14029190092d078"},{"desc":"\"all\" or a comma separated list of IDs e.g. \"1,2,3,5\"","name":"campaigns","ref":"","required":false,"type":"string","in":"query","_id":"56461b8f83218f19006e7daf","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": {\n    \"1\": {\n      \"1\": {\n        \"site_id\": \"1\",\n        \"campaign_id\": \"1\",\n        \"impressions\": \"123\",\n        \"clicks\": \"0\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\",\n        \"site_name\": \"http://www.somesite.com/\",\n        \"is_excluded\": false\n      },\n      \"2\": {\n        \"site_id\": \"2\",\n        \"campaign_id\": \"1\",\n        \"impressions\": \"123\",\n        \"clicks\": \"0\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\",\n        \"site_name\": \"http://www.somesite.org/\",\n        \"is_excluded\": false\n      }\n    }\n  }\n}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/advertiser/stats/sites/"},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with \"all\" or a comma separated list of campaign IDs\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/sites/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c6a90c14029190092d063","link_external":false,"order":10,"project":"545bdf3488ebc81c0077ad18","sync_unique":"","type":"get","user":"545bdef0e93d95100059ead2","editedParams2":true,"excerpt":"Get all campaign stats by site","githubsync":"","parentDoc":null,"childrenPages":[]}

getALL Stats By Site

Get all campaign stats by site

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
campaigns:
string
"all" or a comma separated list of IDs e.g. "1,2,3,5"
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with "all" or a comma separated list of campaign IDs [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/sites/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with "all" or a comma separated list of campaign IDs [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/sites/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"58ee2b46cfa8af3b000bb362","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with \"all\" or a comma separated list of campaign IDs\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/zones/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","order":11,"parentDoc":null,"type":"get","updates":[],"project":"545bdf3488ebc81c0077ad18","title":"ALL Stats By Zone","__v":0,"api":{"examples":{"codes":[{"name":"","language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/zones/?token=[YOUR_API_TOKEN]&from=2015-11-04&to=2015-11-06&campaigns=all');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>"}]},"auth":"required","params":[{"desc":"The start period","default":"","type":"yyyy-mm-dd","name":"from","_id":"556c6e8fc14029190092d079","ref":"","in":"query","required":false},{"_id":"556c6e8fc14029190092d078","ref":"","in":"query","required":false,"desc":"The end period","default":"","type":"yyyy-mm-dd","name":"to"},{"name":"campaigns","_id":"56461b8f83218f19006e7daf","ref":"","in":"query","required":false,"desc":"\"all\" or a comma separated list of IDs e.g. \"1,2,3,5\"","default":"","type":"string"}],"url":"/advertiser/stats/zones/","settings":"","results":{"codes":[{"code":"{\n  \"count\": 2,\n  \"rows\": {\n    \"1\": {\n      \"1\": {\n        \"site_id\": \"1\",\n        \"campaign_id\": \"1\",\n        \"impressions\": \"123\",\n        \"clicks\": \"0\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\",\n        \"site_name\": \"http://www.somesite.com/\",\n        \"is_excluded\": false\n      },\n      \"2\": {\n        \"site_id\": \"2\",\n        \"campaign_id\": \"1\",\n        \"impressions\": \"123\",\n        \"clicks\": \"0\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\",\n        \"site_name\": \"http://www.somesite.org/\",\n        \"is_excluded\": false\n      }\n    }\n  }\n}","name":"","status":200,"language":"json"},{"status":400,"language":"json","code":"{}","name":""}]},"method":"get"},"githubsync":"","next":{"pages":[],"description":""},"link_external":false,"user":"545bdef0e93d95100059ead2","link_url":"","slug":"all-stats-by-zone","sync_unique":"","category":"556c6a90c14029190092d063","createdAt":"2017-04-12T13:27:34.328Z","excerpt":"Get all campaign stats by zone","hidden":false,"isReference":false,"version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

getALL Stats By Zone

Get all campaign stats by zone

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
campaigns:
string
"all" or a comma separated list of IDs e.g. "1,2,3,5"
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with "all" or a comma separated list of campaign IDs [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/zones/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with "all" or a comma separated list of campaign IDs [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/zones/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"56e1d93392bf640e00b5567d","link_external":false,"link_url":"","slug":"all-campaign-statistics-by-creative","type":"get","version":"545bdf3488ebc81c0077ad1b","createdAt":"2016-03-10T20:29:39.835Z","hidden":false,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace:\n[CAMPAIGN] with \"all\" or a comma separated list of campaign IDs\n[DATE_FROM] with your start period\n[DATE_TO] with your end period\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/creative/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","category":"556c6a90c14029190092d063","excerpt":"Get all campaign stats by creative","__v":0,"api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/creative/?token=[YOUR_API_TOKEN]&from=2015-11-04&to=2015-11-06&campaigns=all');\n  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"desc":"The start period","default":"","type":"yyyy-mm-dd","name":"from","in":"query","_id":"556c6e8fc14029190092d079","ref":"","required":false},{"ref":"","required":false,"desc":"The end period","default":"","type":"yyyy-mm-dd","name":"to","in":"query","_id":"556c6e8fc14029190092d078"},{"type":"string","name":"campaigns","in":"query","_id":"56461b8f83218f19006e7daf","ref":"","required":false,"desc":"\"all\" or a comma separated list of IDs e.g. \"1,2,3,5\"","default":""}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n  \"count\": 2,\n  \"rows\": {\n    \"1\": {\n      \"1\": {\n        \"creative\": \"1\",\n        \"campaign_id\": \"1\",\n        \"impressions\": \"123\",\n        \"clicks\": \"0\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\",\n        \"site_name\": \"http://www.somesite.com/\",\n        \"is_excluded\": false\n      },\n      \"2\": {\n        \"creative\": \"2\",\n        \"campaign_id\": \"1\",\n        \"impressions\": \"123\",\n        \"clicks\": \"0\",\n        \"cpmv\": \"1\",\n        \"spend\": \"1\",\n        \"site_name\": \"http://www.somesite.org/\",\n        \"is_excluded\": false\n      }\n    }\n  }\n}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/advertiser/stats/creative/"},"order":12,"parentDoc":null,"sync_unique":"","updates":[],"user":"545bdef0e93d95100059ead2","isReference":false,"githubsync":"","project":"545bdf3488ebc81c0077ad18","title":"ALL Stats By Creative","editedParams":true,"editedParams2":true,"childrenPages":[]}

getALL Stats By Creative

Get all campaign stats by creative

Query Params

from:
yyyy-mm-dd
The start period
to:
yyyy-mm-dd
The end period
campaigns:
string
"all" or a comma separated list of IDs e.g. "1,2,3,5"
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with "all" or a comma separated list of campaign IDs [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/creative/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace: [CAMPAIGN] with "all" or a comma separated list of campaign IDs [DATE_FROM] with your start period [DATE_TO] with your end period [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/creative/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');\n curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"588798d8d9d79c3b00c402b1","createdAt":"2017-01-24T18:11:36.739Z","next":{"pages":[],"description":""},"user":"545bdef0e93d95100059ead2","slug":"add-conversion","updates":[],"api":{"auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'atrack' => '',\n    'amount' => 0.00\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  curl_setopt($this->curl, CURLOPT_POST, true);\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"post","params":[{"ref":"","in":"body","required":false,"desc":"The conversion ID from Adnium","default":"","type":"string","name":"atrack","_id":"5568c0be6976ef0d0099c91e"},{"default":"","type":"float","name":"amount","_id":"5568c0be6976ef0d0099c91d","ref":"","in":"body","required":false,"desc":"The amount from the conversion"}],"results":{"codes":[{"code":"{\n  \"count\": 1,\n  \"rows\": {\n  \t\"success\": 1,\n  \t\"message\": \"Successfully submitted conversion\"\n  }\n}","name":"Success","status":null,"language":"json"}]},"settings":"","url":"/advertiser/conversion/add/"},"githubsync":"","hidden":false,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","link_url":"","sync_unique":"","type":"post","__v":0,"category":"588795cfe33f0723005d0249","isReference":false,"link_external":false,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace the following:\n[ATRACK] with the generated conversion ID you got from Adnium\n[AMOUNT] with the amount from the conversion\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $params = array(\\n    'atrack'=>'[ATRACK]',\\n    'amount'=>'[AMOUNT]',\\n  );\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  curl_setopt($this->curl, CURLOPT_POST, true);\\n  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","excerpt":"Sends conversion data to Adnium","order":0,"title":"Add Conversion","version":"545bdf3488ebc81c0077ad1b","childrenPages":[]}

postAdd Conversion

Sends conversion data to Adnium

Body Params

atrack:
string
The conversion ID from Adnium
amount:
float
The amount from the conversion
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace the following: [ATRACK] with the generated conversion ID you got from Adnium [AMOUNT] with the amount from the conversion [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'atrack'=>'[ATRACK]',\n 'amount'=>'[AMOUNT]',\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace the following: [ATRACK] with the generated conversion ID you got from Adnium [AMOUNT] with the amount from the conversion [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $params = array(\n 'atrack'=>'[ATRACK]',\n 'amount'=>'[AMOUNT]',\n );\n $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLOPT_POST, true);\n curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]
{"_id":"5887c41776c21a19002709ef","category":"588795cfe33f0723005d0249","hidden":false,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"add-conversion-1","type":"get","version":"545bdf3488ebc81c0077ad1b","githubsync":"","link_external":false,"next":{"pages":[],"description":""},"order":1,"sync_unique":"","updates":[],"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"PHP\"\n}\n[/block]\nReplace the following:\n[ATRACK] with the generated conversion ID you got from Adnium\n[AMOUNT] with the amount from the conversion\n[YOUR_API_TOKEN] with your token\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]&atrack=[ATRACK]&amount=[AMOUNT]');\\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\\n  $response = curl_exec($curl);\\n  curl_close($curl);\\n  var_dump($response);\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]","excerpt":"Sends conversion data to Adnium","title":"Add Conversion","user":"545bdef0e93d95100059ead2","__v":0,"api":{"results":{"codes":[{"status":null,"language":"json","code":"{\n  \"count\": 1,\n  \"rows\": {\n  \t\"success\": 1,\n  \t\"message\": \"Successfully submitted conversion\"\n  }\n}","name":"Success"}]},"settings":"","url":"/advertiser/conversion/add/","auth":"required","examples":{"codes":[{"language":"php","code":"<?php\n  $params = array(\n    'atrack' => '',\n    'amount' => 0.00\n  );\n  $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]&atrack=[ATRACK]&amount=[AMOUNT]');\n  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n  $response = curl_exec($curl);\n  curl_close($curl);\n  var_dump($response);\n?>","name":""}]},"method":"get","params":[{"ref":"","in":"body","required":false,"desc":"The conversion ID from Adnium","default":"","type":"string","name":"atrack","_id":"5568c0be6976ef0d0099c91e"},{"default":"","type":"float","name":"amount","_id":"5568c0be6976ef0d0099c91d","ref":"","in":"body","required":false,"desc":"The amount from the conversion"}]},"createdAt":"2017-01-24T21:16:07.127Z","isReference":false,"link_url":"","childrenPages":[]}

getAdd Conversion

Sends conversion data to Adnium

Body Params

atrack:
string
The conversion ID from Adnium
amount:
float
The amount from the conversion
[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace the following: [ATRACK] with the generated conversion ID you got from Adnium [AMOUNT] with the amount from the conversion [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]&atrack=[ATRACK]&amount=[AMOUNT]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "PHP" } [/block] Replace the following: [ATRACK] with the generated conversion ID you got from Adnium [AMOUNT] with the amount from the conversion [YOUR_API_TOKEN] with your token [block:code] { "codes": [ { "code": "<?php\n $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]&atrack=[ATRACK]&amount=[AMOUNT]');\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n var_dump($response);\n?>", "language": "php" } ] } [/block]