Help Center Manage Your Account AdSpeed API

Zone

Documentation for API methods to manage one or multiple zones.

API Version

1.4.6 (build 20240530). This page was updated on Sun, 10 Nov 24 04:26:32 -0500. 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
ParameterRequiredDescription
statusOptional
Default value is empty
Filter zones with this status. Possible value: 'active','pending','archived'
perpageOptional
Default value is "10"
The number of items per page. Maximum value is 100.
pageOptional
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
ParameterRequiredDescription
nameRequiredSet the name of this zone. Max 50 characters.
secondaryOptional
Default value is empty
Set an optional secondary zone ID
descrOptional
Default value is empty
Set an optional description
typeOptional
Default value is "display"
Set an optional zone type. Possible value: 'display','email','video'
Sample Request
Sample Response
<Zone id="888" name="SampleZone" status="active"></Zone>

AS.Zone.getInfo

Return the list of linked ads for this zone
Additional Parameters
ParameterRequiredDescription
zoneRequiredThe zone ID
tokenRequiredThe 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="6">
    <Ad id="35093" name="Sample Text Ad" status="active" weight="10"/>
    <Ad id="36943" name="Sample Image Ad" status="active" weight="10" width="468" height="60"/>
    <Ad id="40631" name="Sample Rich HTML Ad" status="pending" weight="10" width="300" height="250"/>
    <Ad id="54412" name="Sample Text Link Ad" status="pending" weight="10"/>
    <Ad id="54937" name="Sample Rich HTML Ad 2" status="active" weight="10" width="300" height="250"/>
    <Ad id="1071585" name="llc" status="pending" weight="11" width="1024" height="349"/>
  </Ads>
</Zone>

AS.Zone.getRates

Return the rates from this zone's media kit
Additional Parameters
ParameterRequiredDescription
zoneRequiredThe zone ID
tokenRequiredThe authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
Sample Request
Sample Response
<Zone id="7607" name="Homepage" status="active">
  <ZoneRates total="12">
    <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=""/>
    <ZoneRate id="6194" zone="7607" dimension="728x90" range="3,000 - 6,000 gross impressions" rate="EUR 0.06 per 1000 gross impressions" notes=""/>
    <ZoneRate id="6195" zone="7607" dimension="728x90" range="2,000 - 4,000 gross impressions" rate="EUR 0.03 per 1000 gross impressions" notes=""/>
    <ZoneRate id="6196" zone="7607" dimension="468x60" range="0 - 100,000 conversions" rate="EUR 5 per conversion" notes="test"/>
  </ZoneRates>
</Zone>

AS.Zone.edit

Edit a setting of a zone. Submit via POST.
Additional Parameters
ParameterRequiredDescription
zoneRequiredThe zone ID
tokenRequiredThe authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
nameOptional
Default value is empty
Change to a new zone name
secondaryOptional
Default value is empty
Change the secondary zone ID
optimizerOptional
Default value is "none"
Change the ad optimization type for all linked ads of this zone. Available type: "none", "click", "revenue", "conversion", "CTR"
descrOptional
Default value is empty
Change the zone description
Sample Request
Sample Response
<Zone id="7607" name="Homepage" status="active">
  <Description>Home page of a demo website</Description>
  <Ads total="6">
    <Ad id="35093" name="Sample Text Ad" status="active" weight="10"/>
    <Ad id="36943" name="Sample Image Ad" status="active" weight="10" width="468" height="60"/>
    <Ad id="40631" name="Sample Rich HTML Ad" status="pending" weight="10" width="300" height="250"/>
    <Ad id="54412" name="Sample Text Link Ad" status="pending" weight="10"/>
    <Ad id="54937" name="Sample Rich HTML Ad 2" status="active" weight="10" width="300" height="250"/>
    <Ad id="1071585" name="llc" status="pending" weight="11" width="1024" height="349"/>
  </Ads>
</Zone>

AS.Zone.setRate

Set a rate for this zone (BETA). Submit via POST.
Additional Parameters
ParameterRequiredDescription
zoneRequiredThe zone ID
tokenRequiredThe authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
existingOptional
Default value is empty
The existing zone rate ID. If provided, edit the existing zone rate. Otherwise, add a new zone rate.
widthRequiredThe width in pixels
heightRequiredThe height in pixels
typeRequiredThe rate type. Available type: "grosscpm", "uniquecpm", "grosscpc", "uniquecpc", "perday", "perweek", "permonth", "peryear"
fromRequiredApply this rate when the quantity is at least this amount
toRequiredApply this rate when the quantity is at most this amount
rateRequiredThe zone rate
notesOptional
Default value is empty
An optional description or note for this zone rate
conditionOptional
Default value is empty
Advanced/required condition 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.addRestriction

Add a restriction to this zone
Additional Parameters
ParameterRequiredDescription
zoneRequiredThe zone ID
tokenRequiredThe authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
logicOptional
Default value is "and"
The logical operator for this restriction. Possible value: "and", "or"
typeRequiredThe type of restriction. Possible value: "continent", "country", "region", "metro", "city", "startend", "keyword", "totalimp", "monthimp"
compareOptional
Default value is "show"
The comparison operator for this restriction. Possible value: "show", "hide"
valueRequiredThe value of this restriction. Please contact us for syntax/format.
Sample Request
Sample Response
<Restrictions entity="[Zone] Sample Placement"># Conditions
---------------------------------------------------------
1. Show if visitor is from United States, Canada, AND
2. Show during the hours of 08:xx, 09:xx, 10:xx, 11:xx
</Restrictions>

AS.Zone.getAdTag

Return the ad tag for this zone. The result is static so do NOT call this method on every ad served.
Additional Parameters
ParameterRequiredDescription
zoneRequiredThe zone ID
tokenRequiredThe authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
widthOptional
Default value is "-1"
The ad width in pixels
heightOptional
Default value is "-1"
The ad height in pixels
formatOptional
Default value is "comprehensive"
The format of ad tag. Possible value: "comprehensive", "iframe", "javascript", "simplified"
spotOptional
Default value is empty
The ad spot number, only for competitive or companion positioning
numOptional
Default value is empty
The number of ads to display together
customOptional
Default value is empty
Custom parameter(s). Must be encoded properly. For example: & is %26
Sample Request
Sample Response
<Zone id="7607" name="Homepage" status="active">
  <ServingCode type="regular" format="simplified">
    <!-- AdSpeed.com  Tag 8.1 for [Zone] Homepage 468x60 -->
    <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:0;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>
    <!-- AdSpeed.com End -->
  </ServingCode>
</Zone>

AS.Zone.getStats

Return the stats for this zone. Limit 50 calls/day.
Additional Parameters
ParameterRequiredDescription
zoneRequiredThe zone ID
tokenRequiredThe authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
metricRequiredThe type of metric can be "impressions", "clicks", "revenue", "expense", "events"
periodRequiredThe time period can be "hourly", "daily", "weekly", "monthly"
rangeOptional
Default value is empty
The time range can be specified as Start|End using syntax YYYY.MM.DD|YYYY.MM.DD
Sample Request
Sample Response
<StatRows generated="[Time Stamp]" title="[Entity Name]">
  <StatRow>
    <Monthly>January 2024</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
ParameterRequiredDescription
zoneRequiredThe zone ID
tokenRequiredThe authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
subcategoryRequiredThe type of subcategory can be "ad"
metricRequiredThe type of metric can be "impressions", "clicks", "events", "impclkctr", "uniqueimpressions", "uniqueclicks", "uniqueimpclkctr"
rangeRequiredThe time range can be "today", "yesterday", "last7days", "lastmonsun", "lastmonfri", "last31days", "thismo", "lastmo"
Sample Request
Sample Response
<StatRows generated="Mon, 01 Jan 24 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
ParameterRequiredDescription
zoneRequiredThe zone ID
tokenRequiredThe authentication MD5 hash generated from concatenating [Zone ID][Zone Name]
metricRequiredThe type of metric can be "countries", "continents", "areas", "timezones", "regions", "languages", "browsermajor", "browserminor", "platform", "ua", "screen", "cookie"
rangeRequiredThe 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