Required API functions:

List of zones:

Request:
GET http://adnetwork.com/api/zones_list/?api_key={API_KEY}

Response (200 OK):
[
 {
  "zone_id": "zone_id",      // required, for zone info request
  "zone_name": "popunder_zone_1", // required, human readable name of zone
  "zone_adtype": "popunder", // popunder/banner/im/vast/slider/push
 },
 // ...
]

Zone info:

Request:
GET http://adnetwork.com/api/zones_list/?api_key={API_KEY}&zone_id={ZONE_ID}

Response (200 OK):
{
  "zone_id": "zone_id",                          
  "zone_code": "<iframe>...</iframe>", // html, js or php code for embedding the ad on the publishers website
  "link": "https://adnetwork.com/ad/redirect"  // direct ad link or xml link
}

// At least one of code or link fields is required.

Statistics group by date for zone:

Request:
GET http://adnetwork.com/api/stat/?api_key={API_KEY}&zone_id={ZONE_ID}&group_by=date&date_from=2019-09-01&date_to=2019-09-07

Response (200 OK):
[
 {
  "date": "2019-09-01", // required
  "impressions": 12345, // required, number of impression for zone/date
  "revenue": 12.36,     // required, money earned by zone in USD, for the date
  "bounces": 32,        // returned impressions (optional)
 },
 // ...
]

Statistic grouped by country for zone:

Request:
GET http://adnetwork.com/api/stat/?api_key={API_KEY}&zone_id={ZONE_ID}&group_by=country&date_from=2019-09-01&date_to=2019-09-07

Response (200 OK):
[
 {
  "country": "US",     // required
  "impressions": 12345,// required, number of impressions for zone/date/country
  "revenue": 12.36,    // required, money earned by zone, for the date
  "bounces": 32,       // returned impressions (optional)
 },
 // ...
]

We can detect country by Name or ISO Alpha 2, ISO Alp ha 3 codes.

Statistics group by date for sub1_id:

Request:
GET http://adnetwork.com/api/stat/?api_key={API_KEY}&zone_id={ZONE_ID}&sub1_id={CREATIVE_ID}group_by=date&date_from=2019-09-01&date_to=2019-09-07

Response (200 OK):
[
 {
  "date": "2019-09-01",   // required
  "impressions": 12345,    // required, number of impression for zone/date
  "revenue": 12.36,     // required, money earned by zone, for date
  "bounces": 32,        // optional
 },
 // ...
]

Statistic grouped by country for sub1_id:

Request:
GET http://adnetwork.com/api/stat/?api_key={API_KEY}&zone_id={ZONE_ID}&sub1_id={CREATIVE_ID}&group_by=country&date_from=2019-09-01&date_to=2019-09-07

Response (200 OK):
[
 {
  "country": "US",     // required
  "impressions": 12345,// required, number of impressions for zone/date/country
  "revenue": 12.36,    // required, money earned by zone, for the date
  "bounces": 32,       // returned impressions (optional)
 },
 // ...
]

Statistics group by date for sub2_id:

Request:
GET http://adnetwork.com/api/stat/?api_key={API_KEY}&zone_id={ZONE_ID}&sub2_id={TRAFFIC_SOURCE}group_by=date&date_from=2019-09-01&date_to=2019-09-07

Response (200 OK):
[
 {
  "date": "2019-09-01",   // required
  "impressions": 12345,    // required, number of impression for zone/date
  "revenue": 12.36,     // required, money earned by zone, for date
  "bounces": 32,        // optional
 },
 // ...
]

Statistic grouped by country for sub2_id:

Request:
GET http://adnetwork.com/api/stat/?api_key={API_KEY}&zone_id={ZONE_ID}&sub2_id={TRAFFIC_SOURCE}&group_by=country&date_from=2019-09-01&date_to=2019-09-07

Response (200 OK):
[
 {
  "country": "US",     // required
  "impressions": 12345,// required, number of impressions for zone/date/country
  "revenue": 12.36,    // required, money earned by zone, for the date
  "bounces": 32,       // returned impressions (optional)
 },
 // ...
]

We can detect country by Name or ISO Alpha 2, ISO Alp ha 3 codes.

Did this answer your question?