Help Center Manage Your Account AdSpeed API

Zone

Documentation for API methods to manage one or multiple zones.

API Version

1.3.1 (build 20170711). This page was updated on Wed, 12 Jul 17 13:54:06 -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

Returns 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

Returns 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"/>
  <Zone id="7607" name="Homepage" status="active"/>
  <Zone id="7681" name="Section Music" status="active"/>
  <Zone id="20852" name="Newsletter 468x60 Ad" status="active"/>
</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
    The name of this zone
Sample Request
Sample Response
<Zone id="888" name="SomeZone" status="active"></Zone>

AS.Zone.getInfo

Returns 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="5">
    <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="54412" name="Sample Text Link Ad" status="pending"/>
    <Ad id="54937" name="Sample Rich HTML Ad 2" status="active" width="300" height="250"/>
  </Ads>
</Zone>

AS.Zone.getRates

Returns 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" dimension="200x150" range="0 - 99 days" rate="EUR 25 per day" notes=""/>
    <ZoneRate id="234" dimension="180x150" range="0 - 1,000,000 gross impressions" rate="EUR 1 per 1000 gross impressions" notes=""/>
    <ZoneRate id="309" dimension="99x99" range="1,000 - 1,000,000 gross impressions" rate="EUR 23 per 1000 gross impressions" notes=""/>
    <ZoneRate id="377" dimension="300x250" range="30 - 60 months" rate="EUR 45 per month" notes=""/>
    <ZoneRate id="640" dimension="468x60" range="0 or more gross impressions" rate="EUR 5 per 1000 gross impressions" notes=""/>
    <ZoneRate id="1553" dimension="468x60" range="0 - 1 month" rate="EUR 10 per month" notes=""/>
    <ZoneRate id="1554" dimension="468x60" range="2 - 4 months" rate="EUR 8 per month" notes=""/>
    <ZoneRate id="1555" dimension="468x60" range="5 - 8 months" rate="EUR 7 per month" notes=""/>
    <ZoneRate id="2995" dimension="125x500" range="7 months" rate="EUR 125 per month (EUR 875 in total)" notes=""/>
  </ZoneRates>
</Zone>

AS.Zone.edit

Edits 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
    Sets the zone name
  • optimizer Optional, default value is empty
    Sets 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="5">
    <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="54412" name="Sample Text Link Ad" status="pending"/>
    <Ad id="54937" name="Sample Rich HTML Ad 2" status="active" width="300" height="250"/>
  </Ads>
</Zone>

AS.Zone.getAdTag

Returns 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

Returns 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

Returns 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"
  • 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

Returns 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", "java", "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