{"__v":1,"_id":"5568b6de6976ef0d0099c8ef","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"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.","category":"545bdf3488ebc81c0077ad1c","createdAt":"2015-05-29T18:58:38.138Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"getting-started-1","sync_unique":"","title":"Getting started","type":"basic","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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 83 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.
{"__v":3,"_id":"5568b6f1952dca0d0019c7af","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"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","createdAt":"2015-05-29T18:58:57.098Z","excerpt":"Each request you make to the API requires you to pass in a \"token\" generated in the Adnium dashboard.","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"authentication","sync_unique":"","title":"Authentication","type":"basic","updates":[],"user":"545bdef0e93d95100059ead2","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]
{"__v":3,"_id":"556dc143e24c5a0d007034d7","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"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","category":"545bdf3488ebc81c0077ad1c","createdAt":"2015-06-02T14:44:19.834Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":2,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"restrictions","sync_unique":"","title":"Restrictions","type":"basic","updates":[],"user":"545bdef0e93d95100059ead2","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
{"__v":7,"_id":"5568c23b6976ef0d0099c922","api":{"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":""}]},"params":[],"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"},"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]","category":"5568c1fd952dca0d0019c7cf","createdAt":"2015-05-29T19:47:07.956Z","excerpt":"Get a single site","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publishersiteid","sync_unique":"","title":"List Site","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"5568c27dc87afd2500e52512","api":{"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":""}]},"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/"},"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]","category":"5568c1fd952dca0d0019c7cf","createdAt":"2015-05-29T19:48:13.441Z","excerpt":"Get all sites","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publishersites","sync_unique":"","title":"List Sites","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"5568c26ac87afd2500e52510","api":{"auth":"required","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":""}]},"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/:limit"},"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]","category":"5568c1fd952dca0d0019c7cf","createdAt":"2015-05-29T19:47:54.918Z","excerpt":"Get all sites with a limit","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":2,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publishersiteslimit","sync_unique":"","title":"List Sites w/ Limit","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"5568c2f6c87afd2500e52516","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":""}]},"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]","category":"5568c1fd952dca0d0019c7cf","createdAt":"2015-05-29T19:50:14.980Z","excerpt":"Retrieve sites with limit and sorting","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":3,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publishersiteslimitorder","sync_unique":"","title":"List Sites w/ Limit & Sort","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"5568c3376976ef0d0099c926","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"params":[],"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/"},"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]","category":"5568c1fd952dca0d0019c7cf","createdAt":"2015-05-29T19:51:19.017Z","excerpt":"Retrieve a list of site categories","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":4,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publishersitecategories","sync_unique":"","title":"List Site Categories","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"5568c930952dca0d0019c7e3","api":{"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":""}]},"params":[{"_id":"5568c930952dca0d0019c7e7","default":"","desc":"The name of the site","name":"name","ref":"","required":false,"type":"string","in":"body"},{"_id":"5568c930952dca0d0019c7e6","default":"","desc":"The description of your site (optional)","name":"description","ref":"","required":false,"type":"string","in":"body"},{"_id":"5568c930952dca0d0019c7e5","default":"","desc":"The site URL","name":"url","ref":"","required":false,"type":"string","in":"body"},{"_id":"5568c930952dca0d0019c7e4","default":"","desc":"The category ID of the site","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 created successfully\"\n    }\n}","name":"Success"},{"status":null,"language":"json","code":"","name":"Error"},{"name":"Url Taken","language":"text","code":"{\n    \"error\": 104,\n    \"message\": \"URL provided is already in use\"\n}"}]},"settings":"","url":"/publisher/site/add/"},"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]","category":"5568c1fd952dca0d0019c7cf","createdAt":"2015-05-29T20:16:48.889Z","editedParams":true,"editedParams2":true,"excerpt":"Create a new site","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":5,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publishersiteadd","sync_unique":"","title":"Create New Site","type":"post","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"5568c383c87afd2500e52519","api":{"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":""}]},"params":[{"_id":"5568c383c87afd2500e5251c","default":"","desc":"The name of the site","name":"name","ref":"","required":false,"type":"string","in":"body"},{"_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"},{"name":"Error","language":"text","code":"{\n  \"error\": 107,\n  \"message\": \"Could not edit site\"\n}"}]},"settings":"","url":"/publisher/site/:id/edit/"},"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]","category":"5568c1fd952dca0d0019c7cf","createdAt":"2015-05-29T19:52:35.355Z","editedParams":true,"editedParams2":true,"excerpt":"Edit a site in your account","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":6,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publishersiteidedit","sync_unique":"","title":"Edit Site","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":10,"_id":"545bdf3488ebc81c0077ad1e","api":{"auth":"never","basic_auth":false,"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":""}]},"params":[],"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"}]},"settings":"","try":true,"url":"/publisher/zone/:id"},"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]","category":"5568b55b6976ef0d0099c8e9","createdAt":"2014-11-06T20:51:00.455Z","excerpt":"Retrieve a specific zone","githubsync":"","hidden":false,"isReference":false,"is_link":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"getting-started","sync_unique":"","title":"List Zone","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":14,"_id":"5568b5c1952dca0d0019c7ac","api":{"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":""}]},"params":[],"results":{"codes":[{"status":null,"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"}]},"settings":"","url":"/publisher/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","createdAt":"2015-05-29T18:53:53.633Z","excerpt":"Retrieves all zones","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherzones","sync_unique":"","title":"List Zones","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"5568bb3cc87afd2500e52500","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":""}]},"params":[],"results":{"codes":[{"name":"Success","language":"json","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}"}]},"settings":"","url":"/publisher/zones/:limit"},"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]","category":"5568b55b6976ef0d0099c8e9","createdAt":"2015-05-29T19:17:16.545Z","excerpt":"Retrieves all zones with a specified limit","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":2,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherzoneslimit","sync_unique":"","title":"List Zones w/ Limit","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":7,"_id":"5568be356976ef0d0099c908","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?>"}]},"params":[],"results":{"codes":[{"status":null,"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"}]},"settings":"","url":"/publisher/zones/:limit/:sort"},"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]","category":"5568b55b6976ef0d0099c8e9","createdAt":"2015-05-29T19:29:57.458Z","excerpt":"Retrieve zones with limit and sorting","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":3,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherzoneslimitsort","sync_unique":"","title":"List Zones w/ Limit & Sort","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"5568bed0952dca0d0019c7ba","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":""}]},"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]","category":"5568b55b6976ef0d0099c8e9","createdAt":"2015-05-29T19:32:32.927Z","excerpt":"List all available ad zone types","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":4,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherzonetypes","sync_unique":"","title":"List Zone Types","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"5568bf60952dca0d0019c7bc","api":{"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":""}]},"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":"","url":"/publisher/zone/traffic/"},"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]","category":"5568b55b6976ef0d0099c8e9","createdAt":"2015-05-29T19:34:56.565Z","excerpt":"List all available traffic types","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":5,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherzonetraffic","sync_unique":"","title":"List Traffic Types","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"5568be8a6976ef0d0099c90b","api":{"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":""}]},"params":[],"results":{"codes":[{"name":"Success","language":"json","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}"}]},"settings":"","url":"/publisher/zone/restrictions/"},"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]","category":"5568b55b6976ef0d0099c8e9","createdAt":"2015-05-29T19:31:22.040Z","excerpt":"Lists all available ad zone restrictions","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":6,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherzonerestrictions","sync_unique":"","title":"List Zone Restrictions","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"5568c0be6976ef0d0099c918","api":{"auth":"required","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":""}]},"params":[{"_id":"5568c0be6976ef0d0099c91e","default":"","desc":"The name of the zone","name":"name","ref":"","required":false,"type":"string","in":"body"},{"_id":"5568c0be6976ef0d0099c91d","default":"","desc":"The description of the zone","name":"description","ref":"","required":false,"type":"string","in":"body"},{"_id":"5568c0be6976ef0d0099c91c","default":"","desc":"The ID of the site to create the ad zone on","name":"site","ref":"","required":false,"type":"int","in":"body"},{"_id":"5568c0be6976ef0d0099c91b","default":"","desc":"(optional) The restriction IDs, comma delimited e.g. 1,2,3","name":"restrictions","ref":"","required":false,"type":"string","in":"body"},{"_id":"5568c0be6976ef0d0099c91a","default":"","desc":"The ID of the traffic type","name":"traffic_type","ref":"","required":false,"type":"int","in":"body"},{"_id":"5568c0be6976ef0d0099c919","default":"","desc":"The ID of the zone type","name":"zone_type","ref":"","required":false,"type":"int","in":"body"}],"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/"},"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]","category":"5568b55b6976ef0d0099c8e9","createdAt":"2015-05-29T19:40:46.329Z","editedParams":true,"editedParams2":true,"excerpt":"Create a new ad zone for your site","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":7,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherzoneadd","sync_unique":"","title":"Create New Zone","type":"post","updates":[],"user":"545bdef0e93d95100059ead2","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]
{"__v":0,"_id":"5568c02a6976ef0d0099c912","api":{"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":""}]},"params":[{"_id":"5568c02a6976ef0d0099c916","default":"","desc":"The name of the zone","name":"name","ref":"","required":false,"type":"string","in":"body"},{"_id":"5568c02a6976ef0d0099c915","default":"","desc":"The description of the zone","name":"description","ref":"","required":false,"type":"string","in":"body"},{"_id":"5568c02a6976ef0d0099c914","default":"","desc":"The ID of the traffic type","name":"traffic_type","ref":"","required":false,"type":"int","in":"body"},{"_id":"5568c02a6976ef0d0099c913","default":"","desc":"The restriction IDs, comma delimited e.g. 1,2,3","name":"restrictions","ref":"","required":false,"type":"string","in":"body"}],"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":"","url":"/publisher/zone/:id/edit/"},"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]","category":"5568b55b6976ef0d0099c8e9","createdAt":"2015-05-29T19:38:18.669Z","editedParams":true,"editedParams2":true,"excerpt":"Edit a zone","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":8,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherzoneidedit","sync_unique":"","title":"Edit Zone","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"5568ca0b952dca0d0019c7e9","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":""}]},"params":[{"_id":"5568ca0b952dca0d0019c7ec","default":"","desc":"The start point","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"5568ca0b952dca0d0019c7eb","default":"","desc":"The end point","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"5568ca0b952dca0d0019c7ea","default":"all","desc":"The zone to look up","name":"zone","ref":"","required":false,"type":"string","in":"query"}],"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":""}]},"settings":"","url":"/publisher/stats/:site/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]","category":"5568c9546976ef0d0099c932","createdAt":"2015-05-29T20:20:27.168Z","editedParams":true,"editedParams2":true,"excerpt":"Retrieve statistics based on site/zone/date","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherstatssitedate","sync_unique":"","title":"Site Stats By Date","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"5568ca40952dca0d0019c7ed","api":{"auth":"required","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":""}]},"params":[{"_id":"5568ca0b952dca0d0019c7ec","default":"","desc":"The start point","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"5568ca0b952dca0d0019c7eb","default":"","desc":"The end point","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"5568ca0b952dca0d0019c7ea","default":"all","desc":"The zone to look up","name":"zone","ref":"","required":false,"type":"string","in":"query"}],"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/country/"},"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]","category":"5568c9546976ef0d0099c932","createdAt":"2015-05-29T20:21:20.015Z","editedParams":true,"editedParams2":true,"excerpt":"Retrieve statistics based on site/zone/country","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherstatssitecountry","sync_unique":"","title":"Site Stats By Country","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"5568ca94952dca0d0019c7ee","api":{"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":""}]},"params":[{"_id":"5568ca0b952dca0d0019c7ec","default":"","desc":"The start point","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"5568ca0b952dca0d0019c7eb","default":"","desc":"The end point","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"5568ca0b952dca0d0019c7ea","default":"all","desc":"The zone to look up","name":"zone","ref":"","required":false,"type":"string","in":"query"}],"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/device/"},"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","createdAt":"2015-05-29T20:22:44.064Z","editedParams":true,"editedParams2":true,"excerpt":"Retrieve statistics based on site/zone/device","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":2,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherstatssitedevice","sync_unique":"","title":"Site Stats By Device","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"5568caae6976ef0d0099c941","api":{"auth":"required","examples":{"codes":[{"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?>","name":""}]},"params":[{"_id":"5568ca0b952dca0d0019c7ec","default":"","desc":"The start point","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"5568ca0b952dca0d0019c7eb","default":"","desc":"The end point","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"5568ca0b952dca0d0019c7ea","default":"all","desc":"The zone to look up","name":"zone","ref":"","required":false,"type":"string","in":"query"}],"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/"},"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]","category":"5568c9546976ef0d0099c932","createdAt":"2015-05-29T20:23:10.734Z","editedParams":true,"editedParams2":true,"excerpt":"Retrieve statistics based on site/zone/carrier","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":3,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherstatssitecarrier","sync_unique":"","title":"Site Stats By Carrier","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","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]
{"__v":0,"_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":""}]},"params":[{"_id":"5568ca0b952dca0d0019c7ec","default":"","desc":"The start point","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"5568ca0b952dca0d0019c7eb","default":"","desc":"The end point","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"5568ca0b952dca0d0019c7ea","default":"all","desc":"The zone to look up","name":"zone","ref":"","required":false,"type":"string","in":"query"}],"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":"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]","category":"5568c9546976ef0d0099c932","createdAt":"2015-05-29T20:23:29.747Z","editedParams":true,"editedParams2":true,"excerpt":"Retrieve statistics based on site/zone/os","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":4,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherstatssiteos","sync_unique":"","title":"Site Stats By OS","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"5568c988c87afd2500e52526","api":{"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":""}]},"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"}]},"settings":"","url":"/publisher/stats/sites/"},"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]","category":"5568c9546976ef0d0099c932","createdAt":"2015-05-29T20:18:16.386Z","excerpt":"Retrieve a list of all available sites","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":5,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherstatssites","sync_unique":"","title":"List Sites","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"5568c9b26976ef0d0099c934","api":{"auth":"required","examples":{"codes":[{"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?>","name":""}]},"params":[],"results":{"codes":[{"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}","name":"Success"}]},"settings":"","url":"/publisher/stats/:site/zones/"},"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]","category":"5568c9546976ef0d0099c932","createdAt":"2015-05-29T20:18:58.398Z","excerpt":"List all available zones for a site","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":6,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"publisherstatssitezones","sync_unique":"","title":"List Zones In Site","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"5568cb0e6976ef0d0099c944","api":{"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":""}]},"params":[],"results":{"codes":[{"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}","name":"Success"},{"status":null,"language":"json","code":"{\n    \"error\": 311,\n    \"message\": \"Could not find campaign\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/: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]","category":"5568bb80c87afd2500e52503","createdAt":"2015-05-29T20:24:46.236Z","excerpt":"Retrieve a single campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaign","sync_unique":"","title":"List Campaign","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"5568cb2a6976ef0d0099c946","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"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":"","url":"/advertiser/campaigns/"},"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]","category":"5568bb80c87afd2500e52503","createdAt":"2015-05-29T20:25:14.292Z","excerpt":"Retrieve all campaigns","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigns","sync_unique":"","title":"List Campaigns","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"5568cb53952dca0d0019c7f2","api":{"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":""}]},"params":[],"results":{"codes":[{"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}","name":"Success"}]},"settings":"","url":"/advertiser/campaigns/:limit"},"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]","category":"5568bb80c87afd2500e52503","createdAt":"2015-05-29T20:25:55.016Z","excerpt":"Retrieve all campaigns with a limit","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":2,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignslimit","sync_unique":"","title":"List Campaign w/ Limit","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"5568cbc4952dca0d0019c7f4","api":{"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":""}]},"params":[],"results":{"codes":[{"status":null,"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"}]},"settings":"","url":"/advertiser/campaigns/: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/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]","category":"5568bb80c87afd2500e52503","createdAt":"2015-05-29T20:27:48.642Z","excerpt":"Retrieve all campaigns with a limit and sorting","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":3,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignslimitorder","sync_unique":"","title":"List Campaign w/ Limit & Sort","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":2,"_id":"5568cdd0952dca0d0019c80a","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"params":[{"_id":"5568cdd0952dca0d0019c819","ref":"","in":"body","required":false,"desc":"The name of your campaign","default":"","type":"string","name":"name"},{"_id":"5568cdd0952dca0d0019c818","ref":"","in":"body","required":false,"desc":"The zone type ID","default":"","type":"int","name":"zone_type"},{"_id":"5568cdd0952dca0d0019c817","ref":"","in":"body","required":false,"desc":"The traffic type ID Straight - 0, Gay - 1","default":"Straight - 0","type":"int","name":"traffic_type"},{"_id":"5568cdd0952dca0d0019c816","ref":"","in":"body","required":false,"desc":"Your specified CPMv (minimum 0.01)","default":"","type":"double","name":"cpmv"},{"_id":"5568cdd0952dca0d0019c815","ref":"","in":"body","required":false,"desc":"Budget amount = 10 - 50000","default":"","type":"int","name":"daily_budget"},{"_id":"5568cdd0952dca0d0019c814","ref":"","in":"body","required":false,"desc":"Page frequency enabled","default":"1","type":"int","name":"page_freq"},{"_id":"5568cdd0952dca0d0019c813","ref":"","in":"body","required":false,"desc":"How many times per user per specified hours","default":"9999","type":"int","name":"user_freq_times"},{"_id":"5568cdd0952dca0d0019c812","ref":"","in":"body","required":false,"desc":"How many hours per cycle","default":"24","type":"int","name":"user_freq_hour"},{"_id":"5568cdd0952dca0d0019c811","ref":"","in":"body","required":false,"desc":"All targeted countries - All - 9999, otherwise command delimited e.g. 1,2,3","default":"9999","type":"string","name":"countries"},{"_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","name":"regions"},{"_id":"5568cdd0952dca0d0019c80f","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":"5568cdd0952dca0d0019c80e","ref":"","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":"5568cdd0952dca0d0019c80d","ref":"","in":"body","required":false,"desc":"All targeted os - All - 9999, otherwise command delimited e.g. 1,2,3","default":"9999","type":"string","name":"os"},{"_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"},{"_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","name":"carriers"},{"_id":"5845a78b9f6fbb1b00430850","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23","default":"9999","type":"string","name":"monday"},{"_id":"5845a78b9f6fbb1b0043084f","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23","default":"9999","type":"string","name":"tuesday"},{"_id":"5845a78b9f6fbb1b0043084e","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23","default":"9999","type":"string","name":"wednesday"},{"_id":"5845a78b9f6fbb1b0043084d","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23","default":"9999","type":"string","name":"thursday"},{"_id":"5845a78b9f6fbb1b0043084c","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23","default":"9999","type":"string","name":"friday"},{"_id":"5845a78b9f6fbb1b0043084b","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23","default":"9999","type":"string","name":"saturday"},{"_id":"5845a78b9f6fbb1b0043084a","ref":"","in":"body","required":false,"desc":"Hours of the day 0-23","default":"9999","type":"string","name":"sunday"},{"_id":"5845a78b9f6fbb1b00430849","ref":"","in":"body","required":false,"desc":"Command delimited keywords: example, words, here","default":"","type":"string","name":"keywords"},{"_id":"5845a78b9f6fbb1b00430848","ref":"","in":"body","required":false,"desc":"A retargeting ID linked to your account","default":"","type":"int","name":"retargeting"},{"_id":"5845a78b9f6fbb1b00430847","ref":"","in":"body","required":false,"desc":"0 - Normal / 2 - Flat Rate","default":"2","type":"int","name":"bid_type"},{"_id":"5845a78b9f6fbb1b00430846","ref":"","in":"body","required":false,"desc":"0 - All / 1 - Wifi / 2 - Carrier","default":"0","type":"int","name":"connection"},{"_id":"58486f2c9af7dd0f007fe19b","ref":"","in":"body","required":false,"desc":"A white/black list ID linked to your account","default":"0","type":"int","name":"white_black_list"}],"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/"},"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]","category":"5568bb80c87afd2500e52503","createdAt":"2015-05-29T20:36:32.005Z","editedParams":true,"editedParams2":true,"excerpt":"Create a new campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"order":4,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignadd","sync_unique":"","title":"Create New Campaign","type":"post","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"5568cc63952dca0d0019c7fc","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":""}]},"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/"},"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]","category":"5568bb80c87afd2500e52503","createdAt":"2015-05-29T20:30:27.681Z","excerpt":"Starts a campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":5,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignstart","sync_unique":"","title":"Start Campaign","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"5568cc47952dca0d0019c7f9","api":{"auth":"required","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":""}]},"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/pause/"},"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]","category":"5568bb80c87afd2500e52503","createdAt":"2015-05-29T20:29:59.885Z","excerpt":"Pauses a campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":6,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignpause","sync_unique":"","title":"Pause Campaign","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"5568cc286976ef0d0099c94c","api":{"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":""}]},"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/delete/"},"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]","category":"5568bb80c87afd2500e52503","createdAt":"2015-05-29T20:29:28.022Z","excerpt":"Deletes a campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":7,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaigndelete","sync_unique":"","title":"Delete Campaign","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"556c67614306d723004d03da","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":""}]},"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/"},"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]","category":"556c5437d5b7ff0d00c6f0d5","createdAt":"2015-06-01T14:08:33.264Z","excerpt":"List banners in a campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignbanners","sync_unique":"","title":"List Banners by Campaign","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"556c6787c14029190092d055","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":""}]},"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/banner/: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 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]","category":"556c5437d5b7ff0d00c6f0d5","createdAt":"2015-06-01T14:09:11.101Z","excerpt":"Retrieve a banner in a campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignbannerbanner","sync_unique":"","title":"List Banner by Campaign","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c68e575996f2d00c2b399","api":{"auth":"required","examples":{"codes":[{"name":"","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"}]},"params":[{"_id":"556c68e575996f2d00c2b39b","default":"","desc":"The URL of the banner e.g. http://example.org","name":"url","ref":"","required":false,"type":"string","in":"body"},{"_id":"556c68e575996f2d00c2b39a","default":"","desc":"The image to be uploaded","name":"banner","ref":"","required":false,"type":"file","in":"body"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 3,\n    \"rows\": {\n        \"success\": 1,\n        \"banner\": \"3\",\n        \"message\": \"Successfully uploaded banner\"\n    }\n}","name":"Success"}]},"settings":"","url":"/advertiser/campaign/:campaign/banner/add/"},"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","createdAt":"2015-06-01T14:15:01.663Z","editedParams":true,"editedParams2":true,"excerpt":"Add a new banner to a campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":2,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignbanneradd","sync_unique":"","title":"Create New Banner","type":"post","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c67d74306d723004d03dd","api":{"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":""}]},"params":[{"_id":"556c67d74306d723004d03de","default":"","desc":"The URL to change it to e.g. http://example.org","name":"url","ref":"","required":false,"type":"string","in":"body"}],"results":{"codes":[{"name":"Success","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated banner\"\n    }\n}","language":"json","status":null},{"name":"Error","code":"{\n    \"error\": 325,\n    \"message\": \"Could not edit banner\"\n}","language":"json","status":null}]},"settings":"","url":"/advertiser/campaign/:campaign/banner/:banner/edit/"},"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","createdAt":"2015-06-01T14:10:31.482Z","editedParams":true,"editedParams2":true,"excerpt":"Edit the URL of a banner in a campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":3,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignbannerbanneredit","sync_unique":"","title":"Edit Banner","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":4,"_id":"556c686675996f2d00c2b396","api":{"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":""}]},"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"}]},"settings":"","url":"/advertiser/campaign/:campaign/banner/:banner/start/"},"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]","category":"556c5437d5b7ff0d00c6f0d5","createdAt":"2015-06-01T14:12:54.054Z","excerpt":"Set a banner to the start or enabled status","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":4,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignbannerbannerstart","sync_unique":"","title":"Start Banner","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"556c68864306d723004d03e0","api":{"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":""}]},"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"}]},"settings":"","url":"/advertiser/campaign/:campaign/banner/:banner/pause/"},"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]","category":"556c5437d5b7ff0d00c6f0d5","createdAt":"2015-06-01T14:13:26.561Z","excerpt":"Set a banner to the paused status","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":5,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignbannerbannerpause","sync_unique":"","title":"Pause Banner","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"556c68994306d723004d03e2","api":{"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":""}]},"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"}]},"settings":"","url":"/advertiser/campaign/:campaign/banner/:banner/delete/"},"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]","category":"556c5437d5b7ff0d00c6f0d5","createdAt":"2015-06-01T14:13:45.401Z","excerpt":"Delete a banner","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":6,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaigncampaignbannerbannerdelete","sync_unique":"","title":"Delete Banner","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c5477d5b7ff0d00c6f0d6","api":{"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":""}]},"params":[{"_id":"556c5477d5b7ff0d00c6f0d7","default":"","desc":"The new name for your campaign","name":"value","ref":"","required":false,"type":"string","in":"body"}],"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/"},"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","editedParams":true,"editedParams2":true,"excerpt":"Edit campaigns name","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditname","sync_unique":"","title":"Edit Name","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c54e461c7f40d001ce1fa","api":{"auth":"required","examples":{"codes":[{"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?>","name":""}]},"params":[{"_id":"556c54e461c7f40d001ce1fb","default":"","desc":"Your new cpmv (greater than 0.01)","name":"value","ref":"","required":false,"type":"string","in":"body"}],"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/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T12:49:40.908Z","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign cpmv","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditcpmv","sync_unique":"","title":"Edit CPMv","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c555661c7f40d001ce1fd","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"params":[{"_id":"556c555661c7f40d001ce1fe","default":"","desc":"Campaign budget ID or amount","name":"value","ref":"","required":false,"type":"int","in":"body"}],"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":"","url":"/advertiser/campaign/:id/edit/budget/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T12:51:34.446Z","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign budget","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":2,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditbudget","sync_unique":"","title":"Edit Budget","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c5583d5b7ff0d00c6f0d9","api":{"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":""}]},"params":[{"_id":"556c555661c7f40d001ce1fe","default":"","desc":"Traffic type ID","name":"value","ref":"","required":false,"type":"int","in":"body"}],"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"},{"status":null,"language":"json","code":"{\n    \"error\": 313,\n    \"message\": \"Could not edit campaign\"\n}","name":"Error"}]},"settings":"","url":"/advertiser/campaign/:id/edit/typ\\e/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T12:52:19.509Z","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign traffic type","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":3,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignidedittype","sync_unique":"","title":"Edit Traffic Type","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","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]
{"__v":0,"_id":"556c5611f4d5a30d0066dfeb","api":{"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":""}]},"params":[{"_id":"556c555661c7f40d001ce1fe","default":"","desc":"Enabled [1] or disabled [2]","name":"value[page]","ref":"","required":false,"type":"int","in":"body"},{"_id":"556c5611f4d5a30d0066dfed","default":"","desc":"Your allowed frequency times amount","name":"value[times]","ref":"","required":false,"type":"int","in":"body"},{"_id":"556c5611f4d5a30d0066dfec","default":"","desc":"Your allowed frequency hour amount","name":"value[hour]","ref":"","required":false,"type":"int","in":"body"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully updated campaign frequency capping\"\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/frequency/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T12:54:41.924Z","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign frequency capping","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":4,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditfrequency","sync_unique":"","title":"Edit Frequency Cap","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c5648f4d5a30d0066dfee","api":{"auth":"required","examples":{"codes":[{"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?>","name":""}]},"params":[{"_id":"556c555661c7f40d001ce1fe","default":"","desc":"Comma delimited country IDs e.g. 8,4,0","name":"value","ref":"","required":false,"type":"string","in":"body"}],"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/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T12:55:36.634Z","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign country targeting","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":5,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditcountries","sync_unique":"","title":"Edit Countries","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c569ef4d5a30d0066dfef","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"params":[{"_id":"556c555661c7f40d001ce1fe","default":"","desc":"Comma delimited region IDs e.g. 8,4,0","name":"value","ref":"","required":false,"type":"string","in":"body"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully update campaign region 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/regions/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T12:57:02.288Z","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign region targeting","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":6,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditregions","sync_unique":"","title":"Edit Regions","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c56bfd5b7ff0d00c6f0da","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"params":[{"_id":"556c555661c7f40d001ce1fe","default":"","desc":"Comma delimited citiesIDs e.g. 1,2,3","name":"value","ref":"","required":false,"type":"string","in":"body"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully update campaign city 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/cities/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T12:57:35.603Z","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign city targeting","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":7,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditcities","sync_unique":"","title":"Edit Cities","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c5776f4d5a30d0066dff0","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"params":[{"_id":"556c555661c7f40d001ce1fe","default":"","desc":"Comma delimited language IDs e.g. 1,2,3","name":"value","ref":"","required":false,"type":"string","in":"body"}],"results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully update campaign language 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/languages/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T13:00:38.189Z","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign laguage targeting","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":8,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditlanguages","sync_unique":"","title":"Edit Languages","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c5f3475996f2d00c2b370","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":""}]},"params":[{"_id":"556c555661c7f40d001ce1fe","default":"","desc":"Comma delimited device IDs e.g. 100,102,103","name":"value","ref":"","required":false,"type":"string","in":"body"}],"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T13:33:40.359Z","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign device targeting","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":9,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditdevices","sync_unique":"","title":"Edit Devices","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","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]
{"__v":0,"_id":"556c5f564306d723004d03bc","api":{"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":""}]},"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":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully update campaign carrier 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/carriers/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T13:34:14.251Z","editedParams":true,"editedParams2":true,"excerpt":"Edit campaign carrier targeting","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":10,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignideditcarriers","sync_unique":"","title":"Edit Carriers","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"556c6f9ac14029190092d080","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"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/include/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T14:43:38.168Z","excerpt":"Include a site to a campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":11,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertiserstatscampaignsitesiteinclude","sync_unique":"","title":"Include Site","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"556c6f77c14029190092d07e","api":{"auth":"required","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":""}]},"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"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/site/:site/exclude/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2015-06-01T14:43:03.791Z","excerpt":"Exclude a site from a campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":12,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertiserstatscampaignsitesiteexclude","sync_unique":"","title":"Exclude Site","type":"put","updates":[],"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]
{"__v":0,"_id":"581b425a5798c01b0030d663","api":{"settings":"","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":""}]},"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":""}]},"auth":"required","params":[],"url":"/advertiser/stats/:campaign/site/:site/:zone/include/"},"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","createdAt":"2016-11-03T13:57:46.204Z","excerpt":"Include a zone to a campaign (removes an exclusion)","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":999,"project":"545bdf3488ebc81c0077ad18","slug":"include-zone","sync_unique":"","title":"Include Zone","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"581b428a3f38c52f00ca2a01","api":{"settings":"","results":{"codes":[{"status":null,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"success\": 1,\n        \"message\": \"Successfully excluded site\"\n    }\n}","name":"Success"},{"status":400,"language":"json","code":"{}","name":""}]},"examples":{"codes":[{"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?>","name":""}]},"auth":"required","params":[],"url":"/advertiser/stats/:campaign/site/:site/:zone/exclude/"},"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]","category":"556c5408d5b7ff0d00c6f0d3","createdAt":"2016-11-03T13:58:34.278Z","excerpt":"Exclude a zone from a campaign","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":999,"project":"545bdf3488ebc81c0077ad18","slug":"exclude-zone","sync_unique":"","title":"Exclude Zone","type":"put","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c6e8fc14029190092d077","api":{"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":""}]},"params":[{"_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_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":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/date/"},"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]","category":"556c6a90c14029190092d063","createdAt":"2015-06-01T14:39:11.118Z","editedParams":true,"editedParams2":true,"excerpt":"Get campaign stats by date","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertiserstatscampigndate","sync_unique":"","title":"Stats By Date","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c6ec775996f2d00c2b3b0","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":""}]},"params":[{"_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_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":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/country/"},"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]","category":"556c6a90c14029190092d063","createdAt":"2015-06-01T14:40:07.586Z","editedParams":true,"editedParams2":true,"excerpt":"Get campaign stats by country","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertiserstatscampigncountry","sync_unique":"","title":"Stats By Country","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c6f0ec14029190092d07b","api":{"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":""}]},"params":[{"_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_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":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/device/"},"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","createdAt":"2015-06-01T14:41:18.894Z","editedParams":true,"editedParams2":true,"excerpt":"Get campaign stats by device","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":2,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertiserstatscampigndevice","sync_unique":"","title":"Stats By Device","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c6f2cc14029190092d07c","api":{"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":""}]},"params":[{"_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_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":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/os/"},"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]","category":"556c6a90c14029190092d063","createdAt":"2015-06-01T14:41:48.950Z","editedParams":true,"editedParams2":true,"excerpt":"Get campaign stats by operating system","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":3,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertiserstatscampignos","sync_unique":"","title":"Stats By OS","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"556c6f44c14029190092d07d","api":{"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":""}]},"params":[{"_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_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":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/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","createdAt":"2015-06-01T14:42:12.464Z","editedParams":true,"editedParams2":true,"excerpt":"Get campaign stats by carrier","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":4,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertiserstatscampigncarrier","sync_unique":"","title":"Stats By Carrier","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"557ae4ffebf0e22f00c45a94","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":""}]},"params":[{"_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_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":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/:campaign/sites/"},"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]","category":"556c6a90c14029190092d063","createdAt":"2015-06-12T13:56:15.283Z","editedParams":true,"editedParams2":true,"excerpt":"Get campaign stats by site","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":5,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"campaign-statistics-by-sites","sync_unique":"","title":"Stats By Site","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"56e1d880bc46be0e002af29f","api":{"settings":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"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":""}]},"auth":"required","params":[{"_id":"556c6e8fc14029190092d079","ref":"","required":false,"desc":"The start period","default":"","type":"yyyy-mm-dd","name":"from","in":"query"},{"_id":"556c6e8fc14029190092d078","ref":"","required":false,"desc":"The end period","default":"","type":"yyyy-mm-dd","name":"to","in":"query"}],"url":"/advertiser/stats/:campaign/creative/"},"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]","category":"556c6a90c14029190092d063","createdAt":"2016-03-10T20:26:40.664Z","editedParams":true,"editedParams2":true,"excerpt":"Get campaign stats by creative","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":6,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"campaign-statistics-by-creative","sync_unique":"","title":"Stats By Creative","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"56461b8f83218f19006e7dae","api":{"auth":"required","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":""}]},"params":[{"_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"556c6e8fc14029190092d078","default":"","desc":"The end period","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"56461b8f83218f19006e7daf","default":"","desc":"\"all\" or a comma separated list of IDs e.g. \"1,2,3,5\"","name":"campaigns","ref":"","required":false,"type":"string","in":"query"}],"results":{"codes":[{"status":200,"language":"json","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":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/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]","category":"556c6a90c14029190092d063","createdAt":"2015-11-13T17:19:11.545Z","editedParams":true,"editedParams2":true,"excerpt":"Get all campaign stats by date","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":7,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"all-campaign-statistics-by-date","sync_unique":"","title":"ALL Stats By Date","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"56461cda83218f19006e7db2","api":{"auth":"required","examples":{"codes":[{"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?>","name":""}]},"params":[{"_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"556c6e8fc14029190092d078","default":"","desc":"The end period","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"56461b8f83218f19006e7daf","default":"","desc":"\"all\" or a comma separated list of IDs e.g. \"1,2,3,5\"","name":"campaigns","ref":"","required":false,"type":"string","in":"query"}],"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":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/advertiser/stats/country/"},"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]","category":"556c6a90c14029190092d063","createdAt":"2015-11-13T17:24:42.796Z","editedParams":true,"editedParams2":true,"excerpt":"Get all campaign stats by country","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":8,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"all-campaign-statistics-by-country","sync_unique":"","title":"ALL Stats By Country","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"56461e1dbb7ad50d00e9c596","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":""}]},"params":[{"_id":"556c6e8fc14029190092d079","default":"","desc":"The start period","name":"from","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"556c6e8fc14029190092d078","default":"","desc":"The end period","name":"to","ref":"","required":false,"type":"yyyy-mm-dd","in":"query"},{"_id":"56461b8f83218f19006e7daf","default":"","desc":"\"all\" or a comma separated list of IDs e.g. \"1,2,3,5\"","name":"campaigns","ref":"","required":false,"type":"string","in":"query"}],"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":""},{"status":400,"language":"json","code":"{}","name":""}]},"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","createdAt":"2015-11-13T17:30:05.217Z","editedParams":true,"editedParams2":true,"excerpt":"Get all campaign stats by site","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":9,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"all-campaign-statistics-by-site","sync_unique":"","title":"ALL Stats By Site","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":0,"_id":"56e1d93392bf640e00b5567d","api":{"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":""}]},"results":{"codes":[{"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}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"556c6e8fc14029190092d079","ref":"","required":false,"desc":"The start period","default":"","type":"yyyy-mm-dd","name":"from","in":"query"},{"_id":"556c6e8fc14029190092d078","ref":"","required":false,"desc":"The end period","default":"","type":"yyyy-mm-dd","name":"to","in":"query"},{"_id":"56461b8f83218f19006e7daf","ref":"","required":false,"desc":"\"all\" or a comma separated list of IDs e.g. \"1,2,3,5\"","default":"","type":"string","name":"campaigns","in":"query"}],"url":"/advertiser/stats/creative/"},"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","createdAt":"2016-03-10T20:29:39.835Z","editedParams":true,"editedParams2":true,"excerpt":"Get all campaign stats by creative","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":10,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"all-campaign-statistics-by-creative","sync_unique":"","title":"ALL Stats By Creative","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"556c5faec14029190092d037","api":{"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":""}]},"params":[],"results":{"codes":[{"status":200,"language":"json","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"}]},"settings":"","url":"/advertiser/campaign/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]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T13:35:42.109Z","excerpt":"List campaign targeting countries","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistcountries","sync_unique":"","title":"List Countries","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"556c600c4306d723004d03bf","api":{"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":""}]},"params":[],"results":{"codes":[{"status":200,"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"}]},"settings":"","url":"/advertiser/campaign/list/countries/:country"},"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]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T13:37:16.546Z","excerpt":"List campaign targeting countries with searching","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistcountriescountry","sync_unique":"","title":"Search Countries","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"556c602675996f2d00c2b379","api":{"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":""}]},"params":[],"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/"},"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","excerpt":"List campaign targeting cities","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":2,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistcities","sync_unique":"","title":"List Cities","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","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]
{"__v":6,"_id":"556c604775996f2d00c2b37b","api":{"auth":"required","examples":{"codes":[{"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?>","name":""}]},"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"},"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]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T13:38:15.595Z","excerpt":"List campaign targeting cities with searching","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":3,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistcitiescity","sync_unique":"","title":"Search Cities","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","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]
{"__v":7,"_id":"556c618d4306d723004d03c2","api":{"auth":"required","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":""}]},"params":[],"results":{"codes":[{"status":200,"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"}]},"settings":"","url":"/advertiser/campaign/list/regions/"},"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","createdAt":"2015-06-01T13:43:41.415Z","excerpt":"List campaign targeting regions","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":4,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistregions","sync_unique":"","title":"List Regions","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"556c61a5c14029190092d03d","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"params":[],"results":{"codes":[{"name":"Success","code":"{\n    \"count\": 1,\n    \"rows\": [\n        {\n            \"id\": \"63\",\n            \"name\": \"Ontario\"\n        }\n    ]\n}","language":"json","status":200}]},"settings":"","url":"/advertiser/campaign/list/regions/:region"},"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]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T13:44:05.526Z","excerpt":"List campaign targeting region with searching","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":5,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistregionsregion","sync_unique":"","title":"Search Regions","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"556c61c34306d723004d03c5","api":{"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":""}]},"params":[],"results":{"codes":[{"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}","language":"json","status":200}]},"settings":"","url":"/advertiser/campaign/list/languages/"},"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","createdAt":"2015-06-01T13:44:35.661Z","excerpt":"List campaign targeting languages","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":6,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistlanguages","sync_unique":"","title":"List Languages","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","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]
{"__v":7,"_id":"556c61db4306d723004d03c8","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"params":[],"results":{"codes":[{"name":"Success","code":"{\n    \"count\": 1,\n    \"rows\": [\n        {\n            \"id\": \"25\",\n            \"name\": \"English\"\n        }\n    ]\n}","language":"json","status":200}]},"settings":"","url":"/advertiser/campaign/list/languages/:language"},"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]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T13:44:59.074Z","excerpt":"List campaign targeting languages with searching","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":7,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistlanguageslanguage","sync_unique":"","title":"Search Languages","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":5,"_id":"556c656775996f2d00c2b389","api":{"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":""}]},"params":[],"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/"},"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","createdAt":"2015-06-01T14:00:07.715Z","excerpt":"List campaign targeting carriers","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":8,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistcarriers","sync_unique":"","title":"List Carriers","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","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]
{"__v":6,"_id":"556c659ec14029190092d047","api":{"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":""}]},"params":[],"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"},"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]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T14:01:02.474Z","excerpt":"List campaign targeting carriers with searching","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":9,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistcarrierscarrier","sync_unique":"","title":"Search Carriers","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"556c65bbc14029190092d049","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":""}]},"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/"},"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","createdAt":"2015-06-01T14:01:31.965Z","excerpt":"List campaign targeting devices","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":10,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistdevices","sync_unique":"","title":"List Devices","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"556c661975996f2d00c2b38b","api":{"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":""}]},"params":[],"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"},"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]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T14:03:05.313Z","excerpt":"List campaign targeting devices with searching","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":11,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistdevicesdevice-1","sync_unique":"","title":"Search Devices","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":7,"_id":"556c6637c14029190092d04c","api":{"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":""}]},"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/"},"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]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T14:03:35.615Z","excerpt":"List campaign targeting operating systems","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":12,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistos","sync_unique":"","title":"List OS","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":8,"_id":"556c65d34306d723004d03d4","api":{"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":""}]},"params":[],"results":{"codes":[{"name":"Success","code":"{\n    \"count\": 1,\n    \"rows\": [\n        {\n            \"id\": \"6\",\n            \"name\": \"Android\",\n            \"type\": \"Mobile\"\n        }\n    ]\n}","language":"json","status":200}]},"settings":"","url":"/advertiser/campaign/list/os/:os"},"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]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T14:01:55.735Z","excerpt":"List campaign targeting operating sytems with searching","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":13,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistdevicesdevice","sync_unique":"","title":"Search OS","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"556c66694306d723004d03d7","api":{"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":""}]},"params":[],"results":{"codes":[{"status":200,"language":"json","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"}]},"settings":"","url":"/advertiser/campaign/list/budgets/"},"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]","category":"556c5429d5b7ff0d00c6f0d4","createdAt":"2015-06-01T14:04:25.881Z","excerpt":"List allowed campaign budgets","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":14,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistbudgets","sync_unique":"","title":"List Budgets","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":7,"_id":"556c66dec14029190092d04f","api":{"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":""}]},"params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 2,\n    \"rows\": {\n        \"1\": {\n            \"description\": \"Enabled\"\n        },\n        \"2\": {\n            \"description\": \"Disabled\"\n        }\n    }\n}","name":"Success"}]},"settings":"","url":"/advertiser/campaign/list/freq/page/"},"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","createdAt":"2015-06-01T14:06:22.697Z","excerpt":"List campaign frequency page capping","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":15,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistfreqpage","sync_unique":"","title":"List Page Frequency Caps","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"556c669d75996f2d00c2b38e","api":{"auth":"required","examples":{"codes":[{"language":"php","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":""}]},"params":[],"results":{"codes":[{"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}","name":"Success"}]},"settings":"","url":"/advertiser/campaign/list/freq/hour/"},"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","createdAt":"2015-06-01T14:05:17.837Z","excerpt":"List allowed campaign frequency hour capping","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":16,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistfreqhour","sync_unique":"","title":"List Frequency Hours","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"556c66f5c14029190092d052","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":""}]},"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/"},"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","createdAt":"2015-06-01T14:06:45.526Z","excerpt":"List allowed campaign frequency times capping","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":17,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistfreqtimes","sync_unique":"","title":"List Frequency Times","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]
{"__v":6,"_id":"556c671775996f2d00c2b390","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":""}]},"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/"},"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","createdAt":"2015-06-01T14:07:19.608Z","excerpt":"List campaign zone types","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":18,"parentDoc":null,"project":"545bdf3488ebc81c0077ad18","slug":"advertisercampaignlistzones","sync_unique":"","title":"List Zone Types","type":"get","updates":[],"user":"545bdef0e93d95100059ead2","version":"545bdf3488ebc81c0077ad1b","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]