Adnium

The adnium Developer Hub

Welcome to the adnium developer hub. You'll find comprehensive guides and documentation to help you start working with adnium as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

List Site

Get a single site

 
gethttps://api.adnium.com/v1/publisher/site/:id
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/site/1?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 1,
  "rows": [
    {
      "id": "1",
      "name": "my ad zone",
      "url": "http:\/\/example.org",
      "description": "my description",
      "category_id": "1",
      "status": "Enabled",
      "date_created": "2015-03-09 15:19:53",
      "impressions": "0",
      "clicks": "0"
    }
  ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/site/[YOUR_SITE_ID]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Sites

Get all sites

 
gethttps://api.adnium.com/v1/publisher/sites/
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": [
    {
      "id": "1",
      "name": "my ad zone",
      "url": "http:\/\/example.org",
      "description": "my description",
      "category_id": "1",
      "status": "Enabled",
      "date_created": "2015-03-09 15:19:53",
      "impressions": "0",
      "clicks": "0"
    },
    {
      "id": "2",
      "name": "my ad zone",
      "url": "http:\/\/example.org",
      "description": "my description",
      "category_id": "1",
      "status": "Enabled",
      "date_created": "2015-03-09 15:19:53",
      "impressions": "0",
      "clicks": "0"
    }
  ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Sites w/ Limit

Get all sites with a limit

 
gethttps://api.adnium.com/v1/publisher/sites/:limit
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/2?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": [
    {
      "id": "1",
      "name": "my ad zone",
      "url": "http:\/\/example.org",
      "description": "my description",
      "category_id": "1",
      "status": "Enabled",
      "date_created": "2015-03-09 15:19:53",
      "impressions": "0",
      "clicks": "0"
    },
    {
      "id": "2",
      "name": "my ad zone",
      "url": "http:\/\/example.org",
      "description": "my description",
      "category_id": "1",
      "status": "Enabled",
      "date_created": "2015-03-09 15:19:53",
      "impressions": "0",
      "clicks": "0"
    }
  ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/2?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Sites w/ Limit & Sort

Retrieve sites with limit and sorting

 
gethttps://api.adnium.com/v1/publisher/sites/:limit/:order
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/2/DESC/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": [
    {
      "id": "2",
      "name": "my ad zone",
      "url": "http:\/\/example.org",
      "description": "my description",
      "category_id": "1",
      "status": "Enabled",
      "date_created": "2015-03-09 15:19:53",
      "impressions": "0",
      "clicks": "0"
    },
    {
      "id": "1",
      "name": "my ad zone",
      "url": "http:\/\/example.org",
      "description": "my description",
      "category_id": "1",
      "status": "Enabled",
      "date_created": "2015-03-09 15:19:53",
      "impressions": "0",
      "clicks": "0"
    }
  ]
}
 

This request supports limiting as well as sorting, there are two sorting methods available.

Ascending

https://api.adnium.com/v1/publisher/sites/10/ASC

Descending

https://api.adnium.com/v1/publisher/sites/10/DESC

PHP

Replace:
[LIMIT] with your result set limit (e.g. 5)
[ORDER] with your result set order (ASC/DESC)
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/sites/[LIMIT]/[ORDER]/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Site Categories

Retrieve a list of site categories

 
gethttps://api.adnium.com/v1/publisher/site/categories/
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/site/categories/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 9,
  "rows": [
    {
      "id": "1",
      "name": "Adult Games (Non-Casino)"
    },
    {
      "id": "2",
      "name": "Casino"
    },
    {
      "id": "3",
      "name": "Forum"
    },
    {
      "id": "4",
      "name": "Feeder"
    },
    {
      "id": "5",
      "name": "Tube"
    },
    {
      "id": "6",
      "name": "File Hosting"
    },
    {
      "id": "7",
      "name": "Picture"
    },
    {
      "id": "8",
      "name": "Other (manually checked)"
    },
    {
      "id": "9",
      "name": "Mixed - Tubes \/ Pictures"
    }
  ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/site/categories/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Create New Site

Create a new site

 
posthttps://api.adnium.com/v1/publisher/site/add/
<?php
  $params = array(
    'name'=>'my first site',
    'description'=>'my site description',
    'url'=>'http://example.org',
    'categoryu'=>1
  );
  $curl = curl_init('https://api.adnium.com/v1/publisher/site/add/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Site created successfully"
    }
}
{
    "error": 104,
    "message": "URL provided is already in use"
}

Form Data

name
string

The name of the site

description
string

The description of your site (optional)

url
string

The site URL

category
int32

The category ID of the site

 

PHP

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
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'name'=>[SITE_NAME],
    'description'=>[SITE_DESC],
    'url'=>[SITE_URL],
    'categoryu'=>[SITE_CATEGORY]
  );
  $curl = curl_init('https://api.adnium.com/v1/publisher/site/add/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Site

Edit a site in your account

 
puthttps://api.adnium.com/v1/publisher/site/:id/edit/
<?php
  $params = array(
    'name'=>'my new site name ',
    'description'=>'my new site description',
    'category'=>2
  );
  $curl = curl_init('https://api.adnium.com/v1/publisher/site/1/edit/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Site edited successfully"
    }
}
{
  "error": 107,
  "message": "Could not edit site"
}

Form Data

name
string

The name of the site

description
string

The description of the site

category
int32

The ID of the category

 

PHP

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
[YOUR_API_KEY] with your token

<?php
  $params = array(
    'name'=>[SITE_NAME],
    'description'=>[SITE_DESC],
    'category'=>[CATEGORY_ID]
  );
  $curl = curl_init('https://api.adnium.com/v1/publisher/site/[SITE_ID]/edit/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Zone

Retrieve a specific zone

 
gethttps://api.adnium.com/v1/publisher/zone/:id
<?php
	$curl = curl_init('https://api.adnium.com/v1/publisher/zone/[YOUR_ZONE_ID]?token=[YOUR_API_TOKEN]');
	curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($curl);
	curl_close($curl);
	var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
	"count": 1,
	"rows": [
      {
        "id": "1",
        "site_id": "1",
        "name": "NTV A",
        "description": "My NTV A",
        "type_id": "1",
        "date_created": "2014-10-21 15:10:17",
        "restrictions": null,
        "allow_gay": "0",
        "allow_straight": "0",
        "impressions": "0",
        "clicks": "0"
      }
  	]
}
{
  "error": 50,
  "message": "Could not find the zone specified."
}
 

This is where you show your users how to set it up. You can use code samples, like this:

PHP

Replace [YOUR_ZONE_ID] with the zone ID and [YOUR_API_TOKEN] with your token

<?php
	$curl = curl_init('https://api.adnium.com/v1/publisher/zone/[YOUR_ZONE_ID]?token=[YOUR_API_TOKEN]');
	curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($curl);
	curl_close($curl);
	var_dump($response);
?>
Suggest Edits

List Zones

Retrieves all zones

 
gethttps://api.adnium.com/v1/publisher/zones/
<?php
	$curl = curl_init('https://api.adnium.com/v1/publisher/zones/?token=[YOUR_API_TOKEN]');
	curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($curl);
	curl_close($curl);
	var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": [
      {
        "id": "1",
        "site_id": "1",
        "name": "NTV A",
        "description": "My NTV A",
        "type_id": "1",
        "date_created": "2014-10-21 15:10:17",
        "restrictions": null,
        "allow_gay": "0",
        "allow_straight": "0",
        "impressions": "0",
        "clicks": "0"
      },
   		{
        "id": "2",
        "site_id": "1",
        "name": "NTV B",
        "description": "My NTV B",
        "type_id": "1",
        "date_created": "2014-10-21 15:15:00",
        "restrictions": null,
        "allow_gay": "0",
        "allow_straight": "0",
        "impressions": "0",
        "clicks": "0"
      }
    ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
	$curl = curl_init('https://api.adnium.com/v1/publisher/zones/?token=[YOUR_API_TOKEN]');
	curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($curl);
	curl_close($curl);
	var_dump($response);
?>
Suggest Edits

List Zones w/ Limit

Retrieves all zones with a specified limit

 
gethttps://api.adnium.com/v1/publisher/zones/:limit
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": [
    {
      "id": "1",
      "publisher_id": "1",
      "site_id": "1",
      "name": "some name",
      "description": "some description",
      "type_id": "2",
      "date_created": "2014-09-09 15:22:06",
      "restrictions": null,
      "allow_gay": "1",
      "allow_straight": "1",
      "impressions": "0",
      "clicks": "0"
    },
    {
      "id": "2",
      "publisher_id": "1",
      "site_id": "2",
      "name": "some name",
      "description": "some description",
      "type_id": "1",
      "date_created": "2014-09-09 16:12:06",
      "restrictions": null,
      "allow_gay": "1",
      "allow_straight": "0",
      "impressions": "0",
      "clicks": "0"
    }
  ]
}
 

PHP

Replace [YOUR_LIMIT_VALUE] with a numerical value to limit results as well as [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Zones w/ Limit & Sort

Retrieve zones with limit and sorting

 
gethttps://api.adnium.com/v1/publisher/zones/:limit/:sort
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]/[YOUR_SORT_ORDER]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": [
    {
      "id": "2",
      "publisher_id": "1",
      "site_id": "2",
      "name": "some name",
      "description": "some description",
      "type_id": "1",
      "date_created": "2014-09-09 16:12:06",
      "restrictions": null,
      "allow_gay": "1",
      "allow_straight": "0",
      "impressions": "0",
      "clicks": "0"
    },
    {
      "id": "1",
      "publisher_id": "1",
      "site_id": "1",
      "name": "some name",
      "description": "some description",
      "type_id": "2",
      "date_created": "2014-09-09 15:22:06",
      "restrictions": null,
      "allow_gay": "1",
      "allow_straight": "1",
      "impressions": "0",
      "clicks": "0"
    }
  ]
}
 

This request supports limiting as well as sorting, there are two sorting methods available.

Ascending

https://api.adnium.com/v1/publisher/zones/10/ASC

Descending

https://api.adnium.com/v1/publisher/zones/10/DESC

PHP

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

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/zones/[YOUR_LIMIT_VALUE]/[YOUR_SORT_ORDER]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Zone Types

List all available ad zone types

 
gethttps://api.adnium.com/v1/publisher/zone/types/
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 6,
  "rows": {
    "1": {
    "name": "Desktop Banner - 300x250"
    },
    "2": {
    "name": "Desktop Banner - 728x90"
    },
    "4": {
    "name": "Desktop - Popunder"
    },
    "6": {
    "name": "Mobile - 300x250"
    },
    "7": {
    "name": "Mobile - 300x100"
    },
    "8": {
    "name": "Mobile - Popunder"
    }
  }
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Traffic Types

List all available traffic types

 
gethttps://api.adnium.com/v1/publisher/zone/traffic/
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/traffic/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": [
    {
      "id": 0,
      "name": "Straight"
    },
    {
      "id": 1,
      "name": "Gay"
    }
  ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/traffic/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Zone Restrictions

Lists all available ad zone restrictions

 
gethttps://api.adnium.com/v1/publisher/zone/restrictions/
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/restrictions/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 12,
  "rows": {
    "1": {
      "name": "No dating"
    },
    "2": {
    	"name": "No cams"
    },
    "3": {
    	"name": "No gambling"
    },
    "4": {
    	"name": "No pharma \/ supplements"
    },
    "5": {
    	"name": "No teen"
    },
    "6": {
    	"name": "No escort services"
    },
    "7": {
    	"name": "No hardcore"
    },
    "8": {
    	"name": "No genitals"
    },
    "9": {
    	"name": "No nudity"
    },
    "10": {
    	"name": "No bodily fluids"
    },
    "11": {
    	"name": "No sound"
    },
    "12": {
    	"name": "No softcore"
    }
  }
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/restrictions/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Create New Zone

Create a new ad zone for your site

 
posthttps://api.adnium.com/v1/publisher/zone/add/
<?php
  $params = array(
    'name'=>'my new name',
    'description'=>'my new description',
    'site'=>1,
    'restrictions'=>'1,2,3',
    'traffic_type'=>1,
    'rzone_type'=>1
  );
  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/add/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": {
  	"success": 1,
  	"message": "Ad zone created successfully"
  }
}

Form Data

name
string

The name of the zone

description
string

The description of the zone

site
int32

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
int32

The ID of the traffic type

zone_type
int32

The ID of the zone type

 

PHP

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
[RESTRICTIONS] with your restrictions - List ad zone restrictions
[TRAFFIC_TYPE] with your traffic type - List traffic types
[ZONE_TYPE] with your zone type - List ad zone types
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'name'=>'[ZONE_NAME]',
    'description'=>'[ZONE_DESC]',
    'site'=>[SITE_ID],
    'restrictions'=>'[RESTRICTIONS]',
    'traffic_type'=>[TRAFFIC_TYPE],
    'zone_type'=>[ZONE_TYPE]
  );
  $curl = curl_init('https://api.adnium.com/v1/publisher/zone/types/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Zone

Edit a zone

 
puthttps://api.adnium.com/v1/publisher/zone/:id/edit/
<?php
	$params = array(
  	'name'=>'my new name',
    'description'=>'my new description',
    'traffic_type'=>1
    'restrictions'=>'1,2,3'
  );
	$curl = curl_init('https://api.adnium.com/v1/publisher/zone/1/edit/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
	$response = curl_exec($curl);
	curl_close($curl);
	var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": {
  	"success": 1,
  	"message": "Ad zone updated successfully"
  }
}
{
  "error": 50,
  "message": "Could not find the zone specified."
}

Form Data

name
string

The name of the zone

description
string

The description of the zone

traffic_type
int32

The ID of the traffic type

restrictions
string

The restriction IDs, comma delimited e.g. 1,2,3

 

PHP

Replace:
[ZONE_NAME] with your zones name
[ZONE_DESC] with your description
[ZONE_TYPE] with your traffic type - List traffic types
[ZONE_RESTRICTIONS] with your restrictions - List ad zone restrictions
[YOUR_API_TOKEN] with your token

<?php
	$params = array(
  	'name'=>[ZONE_NAME],
    'description'=>[ZONE_DESC],
    'traffic_type'=>[ZONE_TYPE]
    'restrictions'=>[ZONE_RESTRICTIONS]
  );
	$curl = curl_init('https://api.adnium.com/v1/publisher/zone/1/edit/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
	$response = curl_exec($curl);
	curl_close($curl);
	var_dump($response);
?>
Suggest Edits

Site Stats By Date

Retrieve statistics based on site/zone/date

 
gethttps://api.adnium.com/v1/publisher/stats/:site/date/
<?php
  $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');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "error": 154,
    "message": "Could not find any statistics"
}

Query Params

from
date

The start point

to
date

The end point

zone
string

The zone to look up

 

PHP

Replace:
[SITE_ID] with your site ID - List sites
[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
[YOUR_API_TOKEN] with your token

<?php
  $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]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Site Stats By Hour

Retrieve statistics based on site/zone/hour

 
gethttps://api.adnium.com/v1/publisher/stats/:site/hour/
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/hour/?token=[YOUR_API_TOKEN]&from=2015-01-24&to=2015-01-25&zone=1');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "error": 154,
    "message": "Could not find any statistics"
}

Query Params

from
date

The start point

to
date

The end point

zone
string

The zone to look up

 

PHP

Replace:
[SITE_ID] with your site ID - List sites
[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
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/hour/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Site Stats By Country

Retrieve statistics based on site/zone/country

 
gethttps://api.adnium.com/v1/publisher/stats/:site/country/
<?php
  $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');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "error": 154,
    "message": "Could not find any statistics"
}

Query Params

from
date

The start point

to
date

The end point

zone
string

The zone to look up

 

PHP

Replace:
[SITE_ID] with your site ID - List sites
[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
[YOUR_API_TOKEN] with your token

<?php
  $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]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Site Stats By Device

Retrieve statistics based on site/zone/device

 
gethttps://api.adnium.com/v1/publisher/stats/:site/device/
<?php
  $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');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "error": 154,
    "message": "Could not find any statistics"
}

Query Params

from
date

The start point

to
date

The end point

zone
string

The zone to look up

 

PHP

Replace:
[SITE_ID] with your site ID - List sites
[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
[YOUR_API_TOKEN] with your token

<?php
  $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]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Site Stats By OS

Retrieve statistics based on site/zone/os

 
gethttps://api.adnium.com/v1/publisher/stats/:site/os/
<?php
  $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');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "error": 154,
    "message": "Could not find any statistics"
}

Query Params

from
date

The start point

to
date

The end point

zone
string

The zone to look up

 

PHP

Replace:
[SITE_ID] with your site ID - List sites
[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
[YOUR_API_TOKEN] with your token

<?php
  $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]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Site Stats By Carrier

Retrieve statistics based on site/zone/carrier

 
gethttps://api.adnium.com/v1/publisher/stats/:site/carrier/
<?php
  $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');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "error": 154,
    "message": "Could not find any statistics"
}

Query Params

from
date

The start point

to
date

The end point

zone
string

The zone to look up

 

PHP

Replace:
[SITE_ID] with your site ID - List sites
[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
[YOUR_API_TOKEN] with your token

<?php
  $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]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Site Stats By Sub ID

Retrieve statistics based on site/zone/subid

 
gethttps://api.adnium.com/v1/publisher/stats/:site/subid/
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/subid/?token=[YOUR_API_TOKEN]&from=2015-01-24&to=2015-01-25&zone=1');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "error": 154,
    "message": "Could not find any statistics"
}

Query Params

from
date

The start point

to
date

The end point

zone
string

The zone to look up

 

PHP

Replace:
[SITE_ID] with your site ID - List sites
[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
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/subid/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&zone=[ZONE_ID]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Sites

Retrieve a list of all available sites

 
gethttps://api.adnium.com/v1/publisher/stats/sites/
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/sites/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": [
        {
            "id": "1",
            "name": "example.org",
            "url": "http://example.org"
        },
        {
            "id": "2",
            "name": "example.com",
            "url": "http://example.com"
        }
    ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/sites/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Zones In Site

List all available zones for a site

 
gethttps://api.adnium.com/v1/publisher/stats/:site/zones/
<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/1/zones/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": [
        {
            "id": "1",
            "name": "NTV A"
        },
        {
            "id": "2",
            "name": "NTV B"
        }
    ]
}
 

PHP

Replace:
[SITE_ID] with your site ID
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/publisher/stats/[SITE_ID]/zones/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Campaign

Retrieve a single campaign

 
gethttps://api.adnium.com/v1/advertiser/campaign/:campaign
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 22,
    "rows": {
        "id": "1",
        "status": "Enabled",
        "name": "my first campaign",
        "zone": "Desktop Banner - 300x250",
        "cpm": "0.01",
        "daily_budget": "50000",
        "allow_straight": "true",
        "allow_gay": "false",
        "page_frequency": "false",
        "user_freq": "1",
        "user_freq_hour": "18",
        "countries": [
            "124",
            "180",
            "188"
        ],
        "regions": [
            "99999"
        ],
        "cities": [
            "48468",
            "185152",
            "185155"
        ],
        "languages": [
            "5",
            "12"
        ],
        "os": [
            "1",
            "2"
        ],
        "devices": [
            "100",
            "102"
        ],
        "carriers": [
            "205",
            "211"
        ],
        "updated": "2015-05-26 15:51:59",
        "created": "2015-05-05 10:14:23",
        "impressions": "0",
        "clicks": "0"
    }
}
{
    "error": 311,
    "message": "Could not find campaign"
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID - List campaigns
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Campaigns

Retrieve all campaigns

 
gethttps://api.adnium.com/v1/advertiser/campaigns/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": [
        {
            "id": "1",
            "status": "Enabled",
            "name": "my first campaign",
            "zone": "Desktop Banner - 300x250",
            "cpm": "0.45",
            "daily_budget": "50000",
            "allow_straight": "true",
            "allow_gay": "false",
            "page_frequency": "false",
            "user_freq": "1",
            "user_freq_hour": "18",
            "countries": [
                "840",
                "124",
                "36"
            ],
            "regions": [
                "99999"
            ],
            "cities": [
                "999999"
            ],
            "languages": [
                "9999"
            ],
            "os": [
                "9999"
            ],
            "devices": [
                "9998"
            ],
            "carriers": [
                "9999"
            ],
            "updated": "2015-05-28 11:57:25",
            "created": "2015-03-24 10:50:10",
            "impressions": "0",
            "clicks": "0"
        },
        {
            "id": "2",
            "status": "Enabled",
            "name": "my second campaign",
            "zone": "Desktop Banner - 300x250",
            "cpm": "0.22",
            "daily_budget": "25000",
            "allow_straight": "false",
            "allow_gay": "true",
            "page_frequency": "false",
            "user_freq": "Unlimited",
            "user_freq_hour": "18",
            "countries": [
                "4",
                "8"
            ],
            "regions": [
                "3",
                "2",
                "1"
            ],
            "cities": [
                "999999"
            ],
            "languages": [
                "8",
                "5"
            ],
            "os": [
                "2",
                "1",
                "3"
            ],
            "devices": [
                "102",
                "100"
            ],
            "carriers": [
                "9999"
            ],
            "updated": "2015-05-29 12:06:39",
            "created": "2015-05-28 11:57:35",
            "impressions": "0",
            "clicks": "0"
        }
    ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Campaign w/ Limit

Retrieve all campaigns with a limit

 
gethttps://api.adnium.com/v1/advertiser/campaigns/:limit
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/1?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 22,
    "rows": {
        "id": "1",
        "status": "Enabled",
        "name": "my first campaign",
        "zone": "Desktop Banner - 300x250",
        "cpm": "0.01",
        "daily_budget": "50000",
        "allow_straight": "true",
        "allow_gay": "false",
        "page_frequency": "false",
        "user_freq": "1",
        "user_freq_hour": "18",
        "countries": [
            "124",
            "180",
            "188"
        ],
        "regions": [
            "99999"
        ],
        "cities": [
            "48468",
            "185152",
            "185155"
        ],
        "languages": [
            "5",
            "12"
        ],
        "os": [
            "1",
            "2"
        ],
        "devices": [
            "100",
            "102"
        ],
        "carriers": [
            "205",
            "211"
        ],
        "updated": "2015-05-26 15:51:59",
        "created": "2015-05-05 10:14:23",
        "impressions": "0",
        "clicks": "0"
    }
}
 

PHP

Replace:
[LIMIT] with how many results you want to return
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/[LIMIT]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Campaign w/ Limit & Sort

Retrieve all campaigns with a limit and sorting

 
gethttps://api.adnium.com/v1/advertiser/campaigns/:limit/:order
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/2/DESC?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": [
        {
            "id": "2",
            "status": "Enabled",
            "name": "my first campaign",
            "zone": "Desktop Banner - 300x250",
            "cpm": "0.45",
            "daily_budget": "50000",
            "allow_straight": "true",
            "allow_gay": "false",
            "page_frequency": "false",
            "user_freq": "1",
            "user_freq_hour": "18",
            "countries": [
                "840",
                "124",
                "36"
            ],
            "regions": [
                "99999"
            ],
            "cities": [
                "999999"
            ],
            "languages": [
                "9999"
            ],
            "os": [
                "9999"
            ],
            "devices": [
                "9998"
            ],
            "carriers": [
                "9999"
            ],
            "updated": "2015-05-28 11:57:25",
            "created": "2015-03-24 10:50:10",
            "impressions": "0",
            "clicks": "0"
        },
        {
            "id": "1",
            "status": "Enabled",
            "name": "my second campaign",
            "zone": "Desktop Banner - 300x250",
            "cpm": "0.22",
            "daily_budget": "25000",
            "allow_straight": "false",
            "allow_gay": "true",
            "page_frequency": "false",
            "user_freq": "Unlimited",
            "user_freq_hour": "18",
            "countries": [
                "4",
                "8"
            ],
            "regions": [
                "3",
                "2",
                "1"
            ],
            "cities": [
                "999999"
            ],
            "languages": [
                "8",
                "5"
            ],
            "os": [
                "2",
                "1",
                "3"
            ],
            "devices": [
                "102",
                "100"
            ],
            "carriers": [
                "9999"
            ],
            "updated": "2015-05-29 12:06:39",
            "created": "2015-05-28 11:57:35",
            "impressions": "0",
            "clicks": "0"
        }
    ]
}
 

This request supports limiting as well as sorting, there are two sorting methods available.

Ascending

https://api.adnium.com/v1/advertiser/campaigns/10/ASC

Descending

https://api.adnium.com/v1/advertiser/campaigns/10/DESC

PHP

Replace:
[LIMIT] with how many results you want to return
[ORDER] with the order (ASC/DESC)
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaigns/[LIMIT]/[ORDER]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Create New Campaign

Create a new campaign

 
posthttps://api.adnium.com/v1/advertiser/campaign/add/
<?php
  $params = array(
    'name'=>'my first campaign',
    'zone_type'=>1,
    'traffic_type'=>1,
    'cpmv'=>0.111,
    'daily_budget'=>50000,
    'page_freq'=>2,
    'user_freq_times'=>9999,
    'user_freq_hour'=>18,
    'countries'=>'8,4',
    'regions'=>'1,2,3',
    'cities'=>'1,2,3',
    'languages'=>'5,8',
    'os'=>'1,2,3',
    'devices'=>'100,102',
    'carriers'=>'1,2,3'
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/add/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 3,
    "rows": {
        "success": 1,
        "id": "1",
        "message": "Successfully created campaign"
    }
}

Form Data

name
string

The name of your campaign

zone_type
int32

The zone type ID

traffic_type
int32

The traffic type ID Straight - 0, Gay - 1

cpmv
double

Your specified CPMv (minimum 0.01)

daily_budget
int32

Budget amount = 10 - 50000

page_freq
int32

Page frequency enabled

user_freq_times
int32

How many times per user per specified hours

user_freq_hour
int32

How many hours per cycle

countries
string

All targeted countries - All - 9999, otherwise command delimited e.g. 1,2,3

regions
string

All targeted regions - All - 99999, otherwise comma delimited e.,g. 1,2,3

cities
string

All targeted cities - All - 999999, otherwise comma delimited e.g. 1,2,3

languages
string

All targeted languages - All - 9999, otherwise command delimited e.g. 1,2,3

os
string

All targeted os - All - 9999, otherwise command delimited e.g. 1,2,3

devices
string

All targeted devices - All - 9999, otherwise command delimited e.g. 1,2,3

carriers
string

All targeted carriers - All - 9999, otherwise command delimited e.g. 1,2,3

monday
string

Hours of the day 0-23

tuesday
string

Hours of the day 0-23

wednesday
string

Hours of the day 0-23

thursday
string

Hours of the day 0-23

friday
string

Hours of the day 0-23

saturday
string

Hours of the day 0-23

sunday
string

Hours of the day 0-23

keywords
string

Command delimited keywords: example, words, here

retargeting
int32

A retargeting ID linked to your account

bid_type
int32

0 - Normal / 2 - Flat Rate

connection
int32

0 - All / 1 - Wifi / 2 - Carrier

white_black_list
int32

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

PHP

Replace:
[CAMPAIGN_NAME] with your campaigns name
[ZONE_TYPE] with your campaigns zone - List campaign zone types
[TRAFFIC_TYPE] with your traffic type - List traffic types
[CPMV] with your cpmv (lowest 0.01)
[DAILY_BUDGET] with your daily budget - List campaign budgets
[PAGE_FREQ] with your page freq capping - List campaign page frequency capping
[USER_TIMES] with your uses frequency times - List campaign frequency times
[USER_HOUR] with your user frequency hour - List campaign frequency hour
[COUNTRIES] with your country targeting - List countries
[REGIONS] with your region targeting - List regions
[CITIES] with your city targeting - List cities
[LANGUAGES] with your language targeting - List languages
[OS] with your os targeting - List operating systems
[DEVICES] with your device targeting - List devices
[CARRIERS] with your carrier targeting - List carriers
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'name'=>[CAMPAIGN_NAME],
    'zone_type'=>[ZONE_TYPE],
    'traffic_type'=>[TRAFFIC_TYPE],
    'cpmv'=>[CPMV],
    'daily_budget'=>[DAILY_BUDGET],
    'page_freq'=>[PAGE_FREQ],
    'user_freq_times'=>[USER_TIMES],
    'user_freq_hour'=>[USER_HOUR],
    'countries'=>[COUNTRIES],
    'regions'=>[REGIONS],
    'cities'=>[CITIES],
    'languages'=>[LANGUAGES],
    'os'=>[OS],
    'devices'=>[DEVICES],
    'carriers'=>[CARRIERS]
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/add/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Start Campaign

Starts a campaign

 
puthttps://api.adnium.com/v1/advertiser/campaign/:campaign/start/
<?php  
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/start/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": {
    "success": 1,
    "message": "Successfully updated campaign status"
  }
}
{
  "error": 310,
  "message": "Could not update campaign status"
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID - List campaigns
[YOUR_API_TOKEN] with your token

<?php 
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/start/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Pause Campaign

Pauses a campaign

 
puthttps://api.adnium.com/v1/advertiser/campaign/:campaign/pause/
<?php  
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/pause/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": {
    "success": 1,
    "message": "Successfully updated campaign status"
  }
}
{
  "error": 310,
  "message": "Could not update campaign status"
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID - List campaigns
[YOUR_API_TOKEN] with your token

<?php 
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/pause/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Delete Campaign

Deletes a campaign

 
puthttps://api.adnium.com/v1/advertiser/campaign/:campaign/delete/
<?php  
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/delete/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": {
    "success": 1,
    "message": "Successfully updated campaign status"
  }
}
{
  "error": 310,
  "message": "Could not update campaign status"
}
 

Note that this action cannot be reverted.

PHP

Replace:
[CAMPAIGN] with your campaign ID - List campaigns
[YOUR_API_TOKEN] with your token

<?php 
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/delete/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Banners by Campaign

List banners in a campaign

 
gethttps://api.adnium.com/v1/advertiser/campaign/:campaign/banners/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banners/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 1,
    "rows": [
        {
            "id": "1",
            "banner_status": "3",
            "camp_id": "1",
            "user_id": "1",
            "url": "http://someurl.org",
            "updated": "2015-05-28 16:13:21",
            "created": "2015-05-28 16:13:21"
        }
    ]
}
{
    "error": 331,
    "message": "Could not find any banners"
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banners/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Banner by Campaign

Retrieve a banner in a campaign

 
gethttps://api.adnium.com/v1/advertiser/campaign/:campaign/banner/:banner
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/1?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 1,
    "rows": [
        {
            "id": "1",
            "banner_status": "3",
            "camp_id": "1",
            "user_id": "1",
            "url": "http://someurl.org",
            "updated": "2015-05-28 16:13:21",
            "created": "2015-05-28 16:13:21"
        }
    ]
}
{
    "error": 331,
    "message": "Could not find any banners"
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[BANNER] with the banner ID
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Create New Banner

Add a new banner to a campaign

 
posthttps://api.adnium.com/v1/advertiser/campaign/:campaign/banner/add/
<?php
	$myfile = '/path/to/banner/banner.png';
  $finfo = finfo_open(FILEINFO_MIME_TYPE);
  $params = array(
      'url'=>'http://example.org',
      'banner'=> new CURLFile($myfile, finfo_file($finfo, $myfile))
  );
  finfo_close($finfo);
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banner/add/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 3,
    "rows": {
        "success": 1,
        "banner": "3",
        "message": "Successfully uploaded banner"
    }
}

Form Data

url
string

The URL of the banner e.g. http://example.org

banner
file

The image to be uploaded

 

PHP

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

<?php
	$myfile = [PATH_TO_BANNER];
  $finfo = finfo_open(FILEINFO_MIME_TYPE);
  $params = array(
      'url'=>[URL],
      'banner'=> new CURLFile($myfile, finfo_file($finfo, $myfile))
  );
  finfo_close($finfo);
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/add/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Banner

Edit the URL of a banner in a campaign

 
puthttps://api.adnium.com/v1/advertiser/campaign/:campaign/banner/:banner/edit/
<?php
  $params = array(
    'url'=>'http://example.org'
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banner/1/edit/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully updated banner"
    }
}
{
    "error": 325,
    "message": "Could not edit banner"
}

Form Data

url
string

The URL to change it to e.g. http://example.org

 

PHP

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
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'url'=>[NEW_BANNER_URL]
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/edit/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Start Banner

Set a banner to the start or enabled status

 
puthttps://api.adnium.com/v1/advertiser/campaign/:campaign/banner/:banner/start/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banner/1/start/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully updated banner status"
    }
}
{
    "error": 328,
    "message": "Could not update banner status"
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[BANNER] with your banner ID - List all banners in a campaign
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/start/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Pause Banner

Set a banner to the paused status

 
puthttps://api.adnium.com/v1/advertiser/campaign/:campaign/banner/:banner/pause/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banner/1/pause/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully updated banner status"
    }
}
{
    "error": 328,
    "message": "Could not update banner status"
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[BANNER] with your banner ID - List all banners in a campaign
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/pause/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Delete Banner

Delete a banner

 
puthttps://api.adnium.com/v1/advertiser/campaign/:campaign/banner/:banner/delete/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/banner/1/delete/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully updated banner status"
    }
}
{
    "error": 328,
    "message": "Could not update banner status"
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[BANNER] with your banner ID - List all banners in a campaign
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/banner/[BANNER]/delete/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Name

Edit campaigns name

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/name/
<?php
  $params = array(
    'value'=>'my edited campaign name',
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/name/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully updated campaign name"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value
string

The new name for your campaign

 

PHP

Replace:
[CAMPAIGN_NAME] with your new campaign name
[CAMPAIGN] with your campaign id
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value'=>[CAMPAIGN_NAME],
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/name/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit CPM

Edit campaign cpmv

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/cpm/
<?php
  $params = array(
    'value'=>0.11,
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/cpm/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully updated campaign CPM"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value
string

Your new cpm (greater than 0.01)

 

PHP

Replace:
[CPM] with your new cpm
[CAMPAIGN] with your campaign
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value'=>[CPM],
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/cpm/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Budget

Edit campaign budget

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/budget/
<?php
  $params = array(
    'value'=>50000,
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/budget/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully updated campaign budget"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value
int32

Campaign budget ID or amount

 

PHP

Replace:
[BUDGET] with your new budget - List campaign budgets
[CAMPAIGN] with your campaign ID
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value'=>[BUDGET],
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/budget/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Traffic Type

Edit campaign traffic type

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/typ\e/
<?php
  $params = array(
    'value'=>0,
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/type/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully updated campaign traffic type"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value
int32

Traffic type ID

 

PHP

Replace:
[TRAFFIC_TYPE] with yyour traffic type - List traffic types
[CAMPAIGN] with your campaign ID
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value'=>[TRAFFIC_TYPE],
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/type/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Frequency Cap

Edit campaign frequency capping

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/frequency/
<?php
  $params = array(
    'value[page]'=>1,
    'value[times]'=>9999,
    'value[hour]'=>18
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/frequency/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully updated campaign frequency capping"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value[page]
int32

Enabled [1] or disabled [2]

value[times]
int32

Your allowed frequency times amount

value[hour]
int32

Your allowed frequency hour amount

 

PHP

Replace:
[FREQ_PAGE] with your page frequency(on/off) - List campaign page frequency capping
[FREQ_TIMES] with your frequency times - List campaign frequency times
[FREQ_HOUR] with your frequency hour - List campaign frequency hour
[CAMPAIGN] with your campaign ID
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value[page]'=>[FREQ_PAGE],
    'value[times]'=>[FREQ_TIMES],
    'value[hour]'=>[FREQ_HOUR]
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/frequency/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Countries

Edit campaign country targeting

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/countries/
<?php
  $params = array(
    'value'=>'4,8,124'
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/countries/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully update campaign country targeting"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value
string

Comma delimited country IDs e.g. 8,4,0

 

PHP

Replace:
[COUNTRIES] with your comma delimited countries - List countries
[CAMPAIGN] with your campaign ID
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value'=>[COUNTRIES]
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/countries/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Regions

Edit campaign region targeting

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/regions/
<?php
  $params = array(
    'value'=>'4,8'
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/regions/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully update campaign region targeting"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value
string

Comma delimited region IDs e.g. 8,4,0

 

PHP

Replace:
[REGIONS] with your comma delimited regions - List regions
[CAMPAIGN] with your campaign ID
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value'=>[REGIONS]
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/regions/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Cities

Edit campaign city targeting

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/cities/
<?php
  $params = array(
    'value'=>'1,2,3'
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/cities/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully update campaign city targeting"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value
string

Comma delimited citiesIDs e.g. 1,2,3

 

PHP

Replace:
[CITIES] with your comma delimited cities - List cities s
[CAMPAIGN] with your campaign ID
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value'=>[CITIES]
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/cities/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Languages

Edit campaign laguage targeting

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/languages/
<?php
  $params = array(
    'value'=>'8,11'
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/languages/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully update campaign language targeting"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value
string

Comma delimited language IDs e.g. 1,2,3

 

PHP

Replace:
[LANGUAGES] with your comma delimited languages - List languages
[CAMPAIGN] with your campaign ID
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value'=>[LANGUAGES]
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/languages/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Devices

Edit campaign device targeting

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/devices/
<?php
  $params = array(
    'value'=>'100, 102'
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/devices/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully update campaign device targeting"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value
string

Comma delimited device IDs e.g. 100,102,103

 

PHP

Replace:
[DEVICES] with your comma delimited devices - List devices
[CAMPAIGN] with your campaign ID
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value'=>[DEVICES]
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/devices/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Edit Carriers

Edit campaign carrier targeting

 
puthttps://api.adnium.com/v1/advertiser/campaign/:id/edit/carriers/
<?php
  $params = array(
    'value'=>'1,2,3,4'
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/1/edit/carriers/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully update campaign carrier targeting"
    }
}
{
    "error": 313,
    "message": "Could not edit campaign"
}

Form Data

value
string

Comma delimited carrier IDs e.g. 1,2,3,4,5

 

PHP

Replace:
[CARRIERS] with your comma delimited carriers - List carriers
[CAMPAIGN] with your campaign ID
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'value'=>[CARRIERS]
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/[CAMPAIGN]/edit/carriers/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($params));
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Include Site

Include a site to a campaign

 
puthttps://api.adnium.com/v1/advertiser/stats/:campaign/site/:site/include/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/site/2/include/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully included site"
    }
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[SITE] with the site ID you wish to include
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/include/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Exclude Site

Exclude a site from a campaign

 
puthttps://api.adnium.com/v1/advertiser/stats/:campaign/site/:site/exclude/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/site/2/exclude/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully excluded site"
    }
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[SITE] with the site ID you wish to exclude
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/site/[SITE]/exclude/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Include Zone

Include a zone to a campaign (removes an exclusion)

 
puthttps://api.adnium.com/v1/advertiser/stats/:campaign/zones/:zone/include/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/zones/2/include/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully included zone"
    }
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[ZONE] with the zone ID you wish to include
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/zones/[ZONE]/include/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Exclude Zone

Exclude a zone from a campaign

 
puthttps://api.adnium.com/v1/advertiser/stats/:campaign/zones/:zone/exclude/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/zones/2/exclude/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "success": 1,
        "message": "Successfully excluded zone"
    }
}
 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[ZONE] with the zone ID you wish to exclude
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/zones/[ZONE]/exclude/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Countries

List campaign targeting countries

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/countries/
<?php
	$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/?token=[YOUR_API_TOKEN]');
	curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($curl);
	curl_close($curl);
	var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
   "count":3,
   "rows":[
      {
         "id":"0",
         "name":"Unknown"
      },
      {
         "id":"4",
         "name":"Afghanistan"
      },
      {
         "id":"8",
         "name":"Albania"
      }
   ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
	$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/?token=[YOUR_API_TOKEN]');
	curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($curl);
	curl_close($curl);
	var_dump($response);
?>
Suggest Edits

Search Countries

List campaign targeting countries with searching

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/countries/:country
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/alba?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": [
        {
            "id": "8",
            "name": "Albania"
        },
        {
            "id": "744",
            "name": "Svalbard & Jan Mayen Islands"
        }
    ]
}
 

You are able to search by both names and IDs

PHP

Replace:
[COUNTRY] with the country's name or ID
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/countries/[COUNTRY]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Cities

List campaign targeting cities

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/cities/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 4,
  "rows": [
    {
      "id": "2",
      "name": "Private"
    },
    {
      "id": "3",
      "name": "Atlanta"
    },
    {
      "id": "4",
      "name": "Duluth"
    },
    {
      "id": "5",
      "name": "Smyrna"
    }
  ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Search Cities

List campaign targeting cities with searching

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/cities/:city
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/brampton?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": [
        {
            "id": "3107",
            "name": "Brampton"
        },
        {
            "id": "254125",
            "name": "Church Brampton"
        }
    ]
}
 

You are able to search by both names and IDs

PHP

Replace:
[CITY] with the city's name or ID
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/cities/[CITY]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Regions

List campaign targeting regions

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/regions/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  	"count": 3,
  	"rows": [
    		{
      		"id": "0",
      		"name": "Unknown"
    		},
    		{
      		"id": "1",
      		"name": "Alabama"
    		},
    		{
      		"id": "2",
      		"name": "Alaska"
    		}
  	]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Search Regions

List campaign targeting region with searching

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/regions/:region
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/ontario?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 1,
    "rows": [
        {
            "id": "63",
            "name": "Ontario"
        }
    ]
}
 

You are able to search by both names and IDs

PHP

Replace:
[REGION] with the region's name or ID
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/regions/[REGION]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Languages

List campaign targeting languages

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/languages/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": [
        {
            "id": "5",
            "name": "Arabic"
        },
        {
            "id": "8",
            "name": "Azerbaijani"
        }
    ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Search Languages

List campaign targeting languages with searching

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/languages/:language
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/english?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 1,
    "rows": [
        {
            "id": "25",
            "name": "English"
        }
    ]
}
 

You are able to search by both names and IDs

PHP

Replace:
[LANGUAGE] with the language's name or ID
[YOUR_API_TOKEN] with your token

<?php
$curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/languages/[LANGUAGE]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Carriers

List campaign targeting carriers

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/carriers/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": [
    {
      "id": "202001",
      "name": "Cosmote"
    },
    {
      "id": "202005",
      "name": "Vodafone"
    }
  ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Search Carriers

List campaign targeting carriers with searching

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/carriers/:carrier
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/rogers?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 1,
    "rows": [
        {
            "id": "302720",
            "name": "Rogers Wireless"
        }
    ]
}
 

You are able to search by both names and IDs

PHP

Replace:
[CARRIER] with the carrier's name or ID
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/carriers/[CARRIER]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Devices

List campaign targeting devices

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/devices/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": [
        {
            "id": "102",
            "name": "Alcatel",
            "type": "Mobile"
        },
        {
            "id": "103",
            "name": "BenQ",
            "type": "Mobile"
        }
    ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Search Devices

List campaign targeting devices with searching

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/devices/:device
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/apple?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 1,
    "rows": [
        {
            "id": "602",
            "name": "Apple TV",
            "type": "Set Top Box"
        }
    ]
}
 

You are able to search by both names and IDs

PHP

Replace:
[DEVICE] with the device's name or ID
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/devices/[DEVICE]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List OS

List campaign targeting operating systems

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/os/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": [
        {
            "id": "1",
            "name": "Windows",
            "type": "Desktop"
        },
        {
            "id": "2",
            "name": "Linux",
            "type": "Desktop"
        }
    ]
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Search OS

List campaign targeting operating sytems with searching

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/os/:os
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/android?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 1,
    "rows": [
        {
            "id": "6",
            "name": "Android",
            "type": "Mobile"
        }
    ]
}
 

You are able to search by both names and IDs

PHP

Replace:
[OS] with the operating system's name or ID
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/os/[OS]?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Budgets

List allowed campaign budgets

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/budgets/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/budgets/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 12,
    "rows": {
        "1": 50000,
        "2": 25000,
        "3": 10000,
        "4": 5000,
        "5": 2000,
        "6": 1000,
        "7": 750,
        "8": 500,
        "9": 200,
        "10": 100,
        "11": 50,
        "12": 20
    }
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/budgets/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Page Frequency Caps

List campaign frequency page capping

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/freq/page/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/page/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 2,
    "rows": {
        "1": {
            "description": "Enabled"
        },
        "2": {
            "description": "Disabled"
        }
    }
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/page/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Frequency Hours

List allowed campaign frequency hour capping

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/freq/hour/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/hour/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 3,
    "rows": {
        "1": {
            "description": "hours"
        },
        "2": {
            "description": "hours"
        },
        "3": {
            "description": "hours"
        }
    }
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/hour/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Frequency Times

List allowed campaign frequency times capping

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/freq/times/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/times/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 4,
    "rows": {
        "1": {
            "description": "1 time per x hours"
        },
        "2": {
            "description": "2 times per x hours"
        },
        "5": {
            "description": "5 times per x hours"
        }
    }
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/freq/times/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

List Zone Types

List campaign zone types

 
gethttps://api.adnium.com/v1/advertiser/campaign/list/zones/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/zones/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
    "count": 3,
    "rows": {
        "1": {
            "name": "Desktop Banner - 300x250"
        },
        "2": {
            "name": "Desktop Banner - 728x90"
        },
        "4": {
            "name": "Desktop - Popunder"
        }
    }
}
 

PHP

Replace [YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/campaign/list/zones/?token=[YOUR_API_TOKEN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Stats By Date

Get campaign stats by date

 
gethttps://api.adnium.com/v1/advertiser/stats/:campaign/date/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/date/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

from
date

The start period

to
date

The end period

 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[DATE_FROM] with your start period
[DATE_TO] with your end period
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Stats By Country

Get campaign stats by country

 
gethttps://api.adnium.com/v1/advertiser/stats/:campaign/country/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/country/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

from
date

The start period

to
date

The end period

 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[DATE_FROM] with your start period
[DATE_TO] with your end period
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Stats By Device

Get campaign stats by device

 
gethttps://api.adnium.com/v1/advertiser/stats/:campaign/device/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/device/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

from
date

The start period

to
date

The end period

 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[DATE_FROM] with your start period
[DATE_TO] with your end period
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/device/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Stats By OS

Get campaign stats by operating system

 
gethttps://api.adnium.com/v1/advertiser/stats/:campaign/os/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/os/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

from
date

The start period

to
date

The end period

 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[DATE_FROM] with your start period
[DATE_TO] with your end period
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/os/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Stats By Carrier

Get campaign stats by carrier

 
gethttps://api.adnium.com/v1/advertiser/stats/:campaign/carrier/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/carrier/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

from
date

The start period

to
date

The end period

 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[DATE_FROM] with your start period
[DATE_TO] with your end period
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/carrier/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Stats By Site

Get campaign stats by site

 
gethttps://api.adnium.com/v1/advertiser/stats/:campaign/sites/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/sites/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

from
date

The start period

to
date

The end period

 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[DATE_FROM] with your start period
[DATE_TO] with your end period
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/sites/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Stats By Zone

Get campaign stats by zone

 
gethttps://api.adnium.com/v1/advertiser/stats/:campaign/zones/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/zones/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

from
date

The start period

to
date

The end period

 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[DATE_FROM] with your start period
[DATE_TO] with your end period
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/zones/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Stats By Creative

Get campaign stats by creative

 
gethttps://api.adnium.com/v1/advertiser/stats/:campaign/creative/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/1/creative/?token=[YOUR_API_TOKEN]&from=2015-05-25&to=2015-05-26');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

No response examples available

Query Params

from
date

The start period

to
date

The end period

 

PHP

Replace:
[CAMPAIGN] with your campaign ID
[DATE_FROM] with your start period
[DATE_TO] with your end period
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/[CAMPAIGN]/creative/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

ALL Stats By Date

Get all campaign stats by date

 
gethttps://api.adnium.com/v1/advertiser/stats/date/
<?php
  $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');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 1,
  "rows": {
    "1": {
      "2015-11-04": {
        "created": "2015-11-04",
        "campaign_id": "1",
        "impressions": "1",
        "clicks": "0",
        "cpmv": "1",
        "spend": "1"
      },
      "2015-11-05": {
        "created": "2015-11-05",
        "campaign_id": "1",
        "impressions": "1",
        "clicks": "0",
        "cpmv": "1",
        "spend": "1"
      },
      "2015-11-06": {
        "created": "2015-11-06",
        "campaign_id": "1",
        "impressions": "1",
        "clicks": "0",
        "cpmv": "1",
        "spend": "1"
      }
    }
  }

Query Params

from
date

The start period

to
date

The end period

campaigns
string

"all" or a comma separated list of IDs e.g. "1,2,3,5"

 

PHP

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

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/date/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

ALL Stats By Country

Get all campaign stats by country

 
gethttps://api.adnium.com/v1/advertiser/stats/country/
<?php
  $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');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": {
    "1": {
      "123": {
        "geo": "123",
        "campaign_id": "1",
        "impressions": "1234",
        "clicks": "0",
        "cpmv": "1",
        "spend": "1"
      }
    },
    "1": {
      "123": {
        "geo": "123",
        "campaign_id": "2",
        "impressions": "1234",
        "clicks": "12",
        "cpmv": "1",
        "spend": "1"
      }
    }
  }
}

Query Params

from
date

The start period

to
date

The end period

campaigns
string

"all" or a comma separated list of IDs e.g. "1,2,3,5"

 

PHP

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

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/country/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

ALL Stats By Site

Get all campaign stats by site

 
gethttps://api.adnium.com/v1/advertiser/stats/sites/
<?php
  $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');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": {
    "1": {
      "1": {
        "site_id": "1",
        "campaign_id": "1",
        "impressions": "123",
        "clicks": "0",
        "cpmv": "1",
        "spend": "1",
        "site_name": "http://www.somesite.com/",
        "is_excluded": false
      },
      "2": {
        "site_id": "2",
        "campaign_id": "1",
        "impressions": "123",
        "clicks": "0",
        "cpmv": "1",
        "spend": "1",
        "site_name": "http://www.somesite.org/",
        "is_excluded": false
      }
    }
  }
}

Query Params

from
date

The start period

to
date

The end period

campaigns
string

"all" or a comma separated list of IDs e.g. "1,2,3,5"

 

PHP

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

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/sites/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

ALL Stats By Zone

Get all campaign stats by zone

 
gethttps://api.adnium.com/v1/advertiser/stats/zones/
<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/zones/?token=[YOUR_API_TOKEN]&from=2015-11-04&to=2015-11-06&campaigns=all');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": {
    "1": {
      "1": {
        "site_id": "1",
        "campaign_id": "1",
        "impressions": "123",
        "clicks": "0",
        "cpmv": "1",
        "spend": "1",
        "site_name": "http://www.somesite.com/",
        "is_excluded": false
      },
      "2": {
        "site_id": "2",
        "campaign_id": "1",
        "impressions": "123",
        "clicks": "0",
        "cpmv": "1",
        "spend": "1",
        "site_name": "http://www.somesite.org/",
        "is_excluded": false
      }
    }
  }
}

Query Params

from
date

The start period

to
date

The end period

campaigns
string

"all" or a comma separated list of IDs e.g. "1,2,3,5"

 

PHP

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

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/zones/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

ALL Stats By Creative

Get all campaign stats by creative

 
gethttps://api.adnium.com/v1/advertiser/stats/creative/
<?php
  $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');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "rows": [
  	{
      "campaign_id": 1,
      "impressions": 123,
      "clicks": 12,
      "cpmv": 1.00,
      "spend": 5.00,
      "conversion_count": 1,
      "conversion_value": 2,
      "creative": 1
    },
    {
      "campaign_id": 1,
      "impressions": 123,
      "clicks": 12,
      "cpmv": 1.00,
      "spend": 5.00,
      "conversion_count": 1,
      "conversion_value": 2,
      "creative": 2
    }
  ]
}

Query Params

from
date

The start period

to
date

The end period

campaigns
string

"all" or a comma separated list of IDs e.g. "1,2,3,5"

 

PHP

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

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/stats/creative/?token=[YOUR_API_TOKEN]&from=[DATE_FROM]&to=[DATE_TO]&campaigns=[CAMPAIGN]');
  curl_setopt($tcurl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Add Conversion

Sends conversion data to Adnium

 
posthttps://api.adnium.com/v1/advertiser/conversion/add/
<?php
  $params = array(
    'atrack' => '',
    'amount' => 0.00
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 1,
  "rows": {
  	"success": 1,
  	"message": "Successfully submitted conversion"
  }
}

Form Data

atrack
string

The conversion ID from Adnium

amount
float

The amount from the conversion

 

PHP

Replace the following:
[ATRACK] with the generated conversion ID you got from Adnium
[AMOUNT] with the amount from the conversion
[YOUR_API_TOKEN] with your token

<?php
  $params = array(
    'atrack'=>'[ATRACK]',
    'amount'=>'[AMOUNT]',
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($this->curl, CURLOPT_POST, true);
  curl_setopt($this->curl, CURLOPT_POSTFIELDS, $params);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
Suggest Edits

Add Conversion

Sends conversion data to Adnium

 
gethttps://api.adnium.com/v1/advertiser/conversion/add/
<?php
  $params = array(
    'atrack' => '',
    'amount' => 0.00
  );
  $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]&atrack=[ATRACK]&amount=[AMOUNT]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>
A binary file was returned

You couldn't be authenticated

{
  "count": 1,
  "rows": {
  	"success": 1,
  	"message": "Successfully submitted conversion"
  }
}

Form Data

atrack
string

The conversion ID from Adnium

amount
float

The amount from the conversion

 

PHP

Replace the following:
[ATRACK] with the generated conversion ID you got from Adnium
[AMOUNT] with the amount from the conversion
[YOUR_API_TOKEN] with your token

<?php
  $curl = curl_init('https://api.adnium.com/v1/advertiser/conversion/add/?token=[YOUR_API_TOKEN]&atrack=[ATRACK]&amount=[AMOUNT]');
  curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($curl);
  curl_close($curl);
  var_dump($response);
?>