Help Center Manage Your Account AdSpeed API

Zone

Documentation for API methods to manage one or multiple zones.

API Version

1.3.3 (build 20180309). This page was updated on Wed, 30 May 18 20:13:13 -0400. Since the API method and response format can change from one version to another, you should check this page for updates.

API Methods - Zone

AS.Zones.getCounts

Return the number of active, deleted and total zones for this publisher or ad network
Additional Parameters
  • None
Sample Request
Sample Response
<Zones total="4" active="4" pending="0" archived="0" deleted="0"/>

AS.Zones.getList

Return the list of zones for this publisher or ad network
Additional Parameters
  • perpage Optional, default value is "10"
    The number of items per page. Maximum value is 100.
  • page Optional, default value is "1"
    The page number
Sample Request
Sample Response
<Zones total="4" page="1" numpage="1" perpage="4">
  <Zone id="7549" name="Section Travel" status="active" secondary="7607"/>
  <Zone id="7607" name="Homepage" status="active"/>
  <Zone id="7681" name="Section Music" status="active" secondary="7607"/>
  <Zone id="20852" name="Newsletter 468x60 Ad" status="active" secondary="7607"/>
</Zones>

AS.Zones.create

Create a new zone for this publisher or ad network. Submit via POST. Limit 50 calls/day.
Additional Parameters
  • name Required
    Set the name of this zone
  • secondary Optional, default value is empty
    Set the secondary zone ID
Sample Request
Sample Response
<Zone id="888" name="SomeZone" status="active"></Zone>

AS.Zone.getInfo

Return the list of linked ads for this zone
Additional Parameters
  • zone Required
    The zone ID
  • token Required
    The authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
Sample Request
Sample Response
<Zone id="7607" name="Homepage" status="active">
  <Description>Home page of a demo website</Description>
  <Ads total="7">
    <Ad id="35093" name="Sample Text Ad" status="pending"/>
    <Ad id="36943" name="Sample Image Ad" status="active" width="468" height="60"/>
    <Ad id="40631" name="Sample Rich HTML Ad" status="pending" width="300" height="250"/>
    <Ad id="46102" name="test" status="archived"/>
    <Ad id="54412" name="Sample Text Link Ad" status="pending"/>
    <Ad id="54937" name="Sample Rich HTML Ad 2" status="active" width="300" height="250"/>
    <Ad id="56782" name="Sample Image Ad 2" status="active" width="468" height="60"/>
  </Ads>
</Zone>

AS.Zone.getRates

Return the rates from this zone's media kit
Additional Parameters
  • zone Required
    The zone ID
  • token Required
    The authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
Sample Request
Sample Response
<Zone id="7607" name="Homepage" status="active">
  <ZoneRates total="9">
    <ZoneRate id="225" zone="7607" dimension="200x150" range="0 - 99 days" rate="EUR 25 per day" notes=""/>
    <ZoneRate id="234" zone="7607" dimension="180x150" range="0 - 1,000,000 gross impressions" rate="EUR 1 per 1000 gross impressions" notes=""/>
    <ZoneRate id="309" zone="7607" dimension="99x99" range="1,000 - 1,000,000 gross impressions" rate="EUR 23 per 1000 gross impressions" notes=""/>
    <ZoneRate id="377" zone="7607" dimension="300x250" range="1 unique click" rate="EUR 0.05 per unique click (EUR 0.05 in total)" notes=""/>
    <ZoneRate id="640" zone="7607" dimension="468x60" range="0 or more gross impressions" rate="EUR 5 per 1000 gross impressions" notes=""/>
    <ZoneRate id="1553" zone="7607" dimension="468x60" range="0 - 1 month" rate="EUR 10 per month" notes=""/>
    <ZoneRate id="1554" zone="7607" dimension="468x60" range="2 - 4 months" rate="EUR 8 per month" notes=""/>
    <ZoneRate id="1555" zone="7607" dimension="468x60" range="5 - 8 months" rate="EUR 7 per month" notes=""/>
    <ZoneRate id="2995" zone="7607" dimension="125x500" range="7 months" rate="EUR 125 per month (EUR 875 in total)" notes=""/>
  </ZoneRates>
</Zone>

AS.Zone.edit

Edit a setting of a zone
Additional Parameters
  • zone Required
    The zone ID
  • token Required
    The authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
  • name Optional, default value is empty
    Set the new zone name
  • secondary Optional, default value is empty
    Set the secondary zone ID
  • optimizer Optional, default value is empty
    Set the ad optimization type for all linked ads of this zone. Available type: "none", "click", "revenue", "conversion", "CTR"
Sample Request
Sample Response
<Zone id="7607" name="Homepage" status="active">
  <Description>Home page of a demo website</Description>
  <Ads total="7">
    <Ad id="35093" name="Sample Text Ad" status="pending"/>
    <Ad id="36943" name="Sample Image Ad" status="active" width="468" height="60"/>
    <Ad id="40631" name="Sample Rich HTML Ad" status="pending" width="300" height="250"/>
    <Ad id="46102" name="test" status="archived"/>
    <Ad id="54412" name="Sample Text Link Ad" status="pending"/>
    <Ad id="54937" name="Sample Rich HTML Ad 2" status="active" width="300" height="250"/>
    <Ad id="56782" name="Sample Image Ad 2" status="active" width="468" height="60"/>
  </Ads>
</Zone>

AS.Zone.setRate

Set a rate for this zone (BETA) Submit via POST.
Additional Parameters
  • zone Required
    The zone ID
  • token Required
    The authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
  • existing Optional, default value is empty
    The existing zone rate ID. If provided, edit the existing zone rate. Otherwise, add a new zone rate.
  • width Required
    The width in pixels
  • height Required
    The height in pixels
  • type Required
    The rate type. Available type: "grosscpm", "uniquecpm", "grosscpc", "uniquecpc", "perday", "perweek", "permonth", "peryear"
  • from Required
    Apply this rate when the quantity is at least this amount
  • to Required
    Apply this rate when the quantity is at most this amount
  • rate Required
    The zone rate
  • notes Optional, default value is empty
    An optional description or note for this zone rate
Sample Request
Sample Response
<ZoneRate id="" zone="7607" dimension="728x90" range="1 - 10 months" rate="USD 400 per month" notes="Flat 400 per month for the sample zone"></ZoneRate>

AS.Zone.getAdTag

Return the ad tag for this zone
Additional Parameters
  • zone Required
    The zone ID to get ad tag
  • token Required
    The authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
  • width Required
    The ad width in pixels
  • height Required
    The ad height in pixels
  • format Optional, default value is empty
    The format of ad tag (comprehensive, iframe, javascript, or simplified)
  • spot Optional, default value is empty
    The ad spot number (for competitive or companion positioning)
  • num Optional, default value is empty
    The number of ads to display together
  • custom Optional, default value is empty
    Custom parameters (should be encoded properly, eg: & is %26)
Sample Request
Sample Response
<Zone id="7607" name="Homepage" status="active">
  <ServingCode type="regular" format="lite">
    <!-- AdSpeed.com  Tag 8.0.2 for [Zone] Homepage 468x60 -->
    <script type="text/javascript"><![CDATA[
	var asdate=new Date();var q='&amp;tz='+asdate.getTimezoneOffset()/60 +'&amp;ck='+(navigator.cookieEnabled?'Y':'N') +'&amp;jv='+(navigator.javaEnabled()?'Y':'N') +'&amp;scr='+screen.width+'x'+screen.height+'x'+screen.colorDepth +'&amp;z='+Math.random() +'&amp;ref='+escape(document.referrer.substr(0,255)) +'&amp;uri='+escape(document.URL.substr(0,255));document.write('<ifr'+'ame width="468" height="60" src="http://g.adspeed.net/ad.php?do=html&amp;zid=7607&amp;oid=111&amp;wd=468&amp;ht=60&amp;target=_blank'+q+'" frameborder="0" scrolling="no" allowtransparency="true" hspace="0" vspace="0"></ifr'+'ame>');
	]]></script>
    <noscript>
      <iframe width="468" height="60" src="http://g.adspeed.net/ad.php?do=html&amp;zid=7607&amp;oid=111&amp;wd=468&amp;ht=60&amp;target=_blank" frameborder="0" scrolling="no" allowtransparency="true" hspace="0" vspace="0">
        <a href="http://g.adspeed.net/ad.php?do=clk&amp;zid=7607&amp;oid=111&amp;wd=468&amp;ht=60&amp;pair=as" target="_blank">
          <img style="border:0px;max-width:100%;height:auto;" src="http://g.adspeed.net/ad.php?do=img&amp;zid=7607&amp;oid=111&amp;wd=468&amp;ht=60&amp;pair=as" alt="i" width="468" height="60"/>
        </a>
      </iframe>
    </noscript>
    <!-- AdSpeed.com End -->
  </ServingCode>
</Zone>

AS.Zone.getStats

Return the stats for this zone. Limit 50 calls/day.
Additional Parameters
  • zone Required
    The zone ID
  • token Required
    The authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
  • metric Required
    The type of metric can be "impressions", "clicks", "revenue", "expense"
  • period Required
    The time period can be "hourly", "daily", "weekly", "monthly"
Sample Request
Sample Response
<StatRows generated="[Time Stamp]" title="[Entity Name]">
  <StatRow>
    <Monthly>January 2014</Monthly>
    <Unique_Impression>3,156</Unique_Impression>
    <Gross_Impression>6,565</Gross_Impression>
    <Unique_over_Gross_Impression>48.07%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>More Rows...</StatRow>
  <StatRow>
    <Monthly>Total</Monthly>
    <Unique_Impression>57,417</Unique_Impression>
    <Gross_Impression>114,979</Gross_Impression>
    <Unique_over_Gross_Impression>49.94%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>Average</Monthly>
    <Unique_Impression>4,785</Unique_Impression>
    <Gross_Impression>9,582</Gross_Impression>
    <Unique_over_Gross_Impression>49.94%</Unique_over_Gross_Impression>
  </StatRow>
</StatRows>

AS.Zone.getBreakdownStats

Return the breakdown stats of linked entities for this zone. Limit 50 calls/day.
Additional Parameters
  • subcategory Required
    The type of subcategory can be "ad"
  • metric Required
    The type of metric can be "impressions", "clicks", "impclkctr", "uniqueimpressions", "uniqueclicks", "uniqueimpclkctr"
  • range Required
    The time range can be "today", "yesterday", "last7days", "lastmonsun", "lastmonfri", "last31days", "thismo", "lastmo"
  • zone Required
    The zone ID
  • token Required
    The authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
Sample Request
Sample Response
<StatRows generated="Mon, 01 Jan 16 11:11:11 -0400">
  <StatRow>
    <Name>Ad-ABC</Name>
    <Impressions>7,443</Impressions>
    <Clicks>0</Clicks>
    <CTR>0.0000</CTR>
  </StatRow>
  <StatRow>
    <Name>Ad-DEF</Name>
    <Impressions>4,843</Impressions>
    <Clicks>0</Clicks>
    <CTR>0.0000</CTR>
  </StatRow>
  <StatRow>More Rows...</StatRow>
</StatRows>

AS.Zone.getVisitorStats

Return the visitor report for this zone. Limit 50 calls/day.
Additional Parameters
  • zone Required
    The zone ID
  • token Required
    The authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
  • metric Required
    The type of metric can be "countries", "continents", "areas", "timezones", "regions", "languages", "browsermajor", "browserminor", "platform", "ua", "screen", "cookie"
  • range Required
    The time range can be "last7days", "last31days", "thismo", "lastmo", "alltime"
Sample Request
Sample Response
<StatRows generated="[Time Stamp]" title="[Entity Name]" range="Alltime" metric="countries">
  <StatRow>
    <Rank>1</Rank>
    <Country>United States</Country>
    <Flag/>
    <Percentage>95%</Percentage>
  </StatRow>
  <StatRow>
    <Rank>2</Rank>
    <Country>Canada</Country>
    <Flag/>
    <Percentage>5%</Percentage>
  </StatRow>
</StatRows>

Other Articles in AdSpeed API

Documentation to use AdSpeed API to integrate AdSpeed AdServer into your own platform.

Cannot find an answer for your question? Ask our Customer Care team

Related