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
- AS.Zones.getList
- AS.Zones.create
- AS.Zone.getInfo
- AS.Zone.getRates
- AS.Zone.edit
- AS.Zone.setRate
- AS.Zone.addRestriction
- AS.Zone.getAdTag
- AS.Zone.getStats
- AS.Zone.getBreakdownStats
- AS.Zone.getVisitorStats
AS.Zones.getCounts
Return the number of active, deleted and total zones for this publisher or ad networkAdditional 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 networkAdditional Parameters
Parameter | Required | Description |
---|---|---|
status | Optional Default value is empty | Filter zones with this status. Possible value: 'active','pending','archived' |
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
Parameter | Required | Description |
---|---|---|
name | Required | Set the name of this zone. Max 50 characters. |
secondary | Optional Default value is empty | Set an optional secondary zone ID |
descr | Optional Default value is empty | Set an optional description |
type | Optional 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 zoneAdditional Parameters
Parameter | Required | Description |
---|---|---|
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="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 kitAdditional Parameters
Parameter | Required | Description |
---|---|---|
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="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
Parameter | Required | Description |
---|---|---|
zone | Required | The zone ID |
token | Required | The authentication MD5 hash generated from concatenating [Zone ID][Zone Name] |
name | Optional Default value is empty | Change to a new zone name |
secondary | Optional Default value is empty | Change the secondary zone ID |
optimizer | Optional Default value is "none" | Change the ad optimization type for all linked ads of this zone. Available type: "none", "click", "revenue", "conversion", "CTR" |
descr | Optional 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
Parameter | Required | Description |
---|---|---|
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 |
condition | Optional 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 zoneAdditional Parameters
Parameter | Required | Description |
---|---|---|
zone | Required | The zone ID |
token | Required | The authentication MD5 hash generated from concatenating [Zone ID][Zone Name] |
logic | Optional Default value is "and" | The logical operator for this restriction. Possible value: "and", "or" |
type | Required | The type of restriction. Possible value: "continent", "country", "region", "metro", "city", "startend", "keyword", "totalimp", "monthimp" |
compare | Optional Default value is "show" | The comparison operator for this restriction. Possible value: "show", "hide" |
value | Required | The 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
Parameter | Required | Description |
---|---|---|
zone | Required | The zone ID |
token | Required | The authentication MD5 hash generated from concatenating [Zone ID][Zone Name] |
width | Optional Default value is "-1" | The ad width in pixels |
height | Optional Default value is "-1" | The ad height in pixels |
format | Optional Default value is "comprehensive" | The format of ad tag. Possible value: "comprehensive", "iframe", "javascript", "simplified" |
spot | Optional Default value is empty | The ad spot number, only 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 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&zid=7607&oid=111&wd=468&ht=60&pair=as" target="_blank"> <img style="border:0;max-width:100%;height:auto;" src="http://g.adspeed.net/ad.php?do=img&zid=7607&oid=111&wd=468&ht=60&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
Parameter | Required | Description |
---|---|---|
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", "events" |
period | Required | The time period can be "hourly", "daily", "weekly", "monthly" |
range | Optional 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
Parameter | Required | Description |
---|---|---|
zone | Required | The zone ID |
token | Required | The authentication MD5 hash generated from concatenating [Zone ID][Zone Name] |
subcategory | Required | The type of subcategory can be "ad" |
metric | Required | The type of metric can be "impressions", "clicks", "events", "impclkctr", "uniqueimpressions", "uniqueclicks", "uniqueimpclkctr" |
range | Required | The 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
Parameter | Required | Description |
---|---|---|
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
- Website
"Documentation for API methods to manage one or multiple websites. API Version1.4.6 (build 20240530). This page was updated on Mon, ..."
- Campaign
"Documentation for API methods to manage your campaigns in our ad server. API Version1.4.6 (build 20240530). This page was updated ..."
- Group
"Documentation for API methods to manage one or multiple groups. API Version1.4.6 (build 20240530). This page was updated on Mon, ..."
- Channels
"Documentation for API methods to manage one or multiple channels. API Version1.4.6 (build 20240530). This page was updated on Tue, ..."
- How do I generate breakdown reports?
"When viewing a report for an entity, you have an option to drill down into more details. You can view ..."