Version 5.0
AdvertServe User Manual :: v5.0

Zones :: Query API Module

Query

Description

Allows you to query for a list of zones using search criteria. A complete list of all existing zones will be returned if no search criteria is specified. Multiple search criteria may be specified together in the same query.

Module URI

Hyperlink /servlet/control/api/zones/query

Parameters

Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
secretStringYesa78bf24c5a23581aceba1c5f51ac4cad Must be a String containing no more than 32 characters
outputStringNoxml Must be a String equal to either json or xml
Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
idIntegerNo123 Must be the ID# of an existing zone
nameStringNoExample.com / Home / 728x90 Must be a String containing no more than 80 characters
groupIntegerNo123 Must be the ID# of an existing group
typeIntegerNo1 Must be an Integer equal to one of the following values:
  • 1 = Banner
  • 2 = Text
  • 3 = Window
  • 4 = Dynamic
  • 5 = Page Peel
  • 7 = VAST Video (Linear)
  • 8 = VAST Overlay (Non-Linear)
  • 6 = Wallpaper
sizeIntegerNo123 Must be the ID# of an existing size
phoneIntegerNo123 Must be the ID# of an existing zone
tabletIntegerNo123 Must be the ID# of an existing zone
defaultsbooleanNotrue Must be a boolean value equal to either true or false
statusbooleanNotrue Must be a boolean value equal to either true or false
recyclebooleanNofalse Must be a boolean value equal to either true or false
notesStringNoN/A Must be a String containing no more than 65,535 characters
Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
campaignIntegerNo123 Must be the ID# of an existing campaign
Parameter NameParameter TypeRequired?Example ValueValidation Rules (If Applicable)
publisherIntegerNo123 Must be the ID# of an existing publisher

XML Response

Hyperlink /servlet/control/api/zones/query?secret=(key)&name=example


<results>
  <zone id="41" name="Example.com / Home / 728x90" group="20" type="1" size="19" desktop="true" phone="0" tablet="0" targeting="000010001" viewlimit="0" viewtimeout="1440" viewpixel="123" clickpixel="123" actionpixel="123" defaults="true" refresh="false" refreshinterval="10" refreshlimit="60" status="true" recycle="false">
    <notes/>
    <campaigns>
      <campaign id="20" size="19" default="false" chain="0" priority="2" recycle="false" status="true"/>
      <campaign id="21" size="19" default="false" chain="0" priority="5" recycle="false" status="true"/>
      <campaign id="22" size="19" default="true" chain="0" priority="1" recycle="false" status="true"/>
      <campaign id="23" size="19" default="false" chain="0" priority="2" recycle="false" status="true"/>
    </campaigns>
    <publishers/>
  </zone>
  <zone id="42" name="Example.com / Articles / 728x90" group="20" type="1" size="19" desktop="true" phone="0" tablet="0" targeting="000010001" viewlimit="0" viewtimeout="1440" viewpixel="123" clickpixel="123" actionpixel="123" defaults="true" refresh="false" refreshinterval="10" refreshlimit="60" status="true" recycle="false">
    <notes/>
    <campaigns>
      <campaign id="20" size="19" default="false" chain="0" priority="2" recycle="false" status="true"/>
      <campaign id="21" size="19" default="false" chain="0" priority="5" recycle="false" status="true"/>
      <campaign id="22" size="19" default="true" chain="0" priority="1" recycle="false" status="true"/>
      <campaign id="23" size="19" default="false" chain="0" priority="2" recycle="false" status="true"/>
    </campaigns>
    <publishers/>
  </zone>
  <zone id="43" name="Example.com / Home / 160x600" group="20" type="1" size="13" desktop="true" phone="0" tablet="0" targeting="000010001" viewlimit="0" viewtimeout="1440" viewpixel="123" clickpixel="123" actionpixel="123" defaults="true" refresh="false" refreshinterval="10" refreshlimit="60" status="true" recycle="false">
    <notes/>
    <campaigns>
      <campaign id="10" size="13" default="false" chain="0" priority="1" recycle="false" status="true"/>
      <campaign id="11" size="13" default="false" chain="0" priority="1" recycle="false" status="true"/>
      <campaign id="12" size="13" default="false" chain="0" priority="1" recycle="false" status="true"/>
    </campaigns>
    <publishers/>
  </zone>
  <zone id="44" name="Example.com / Forums / 728x90" group="20" type="1" size="19" desktop="true" phone="0" tablet="0" targeting="000010001" viewlimit="0" viewtimeout="1440" viewpixel="123" clickpixel="123" actionpixel="123" defaults="true" refresh="false" refreshinterval="10" refreshlimit="60" status="true" recycle="false">
    <notes/>
    <campaigns>
      <campaign id="10" size="19" default="false" chain="0" priority="1" recycle="false" status="true"/>
      <campaign id="11" size="19" default="false" chain="0" priority="1" recycle="false" status="true"/>
      <campaign id="12" size="19" default="false" chain="0" priority="1" recycle="false" status="true"/>
    </campaigns>
    <publishers>
      <publisher id="7"/>
      <publisher id="8"/>
      <publisher id="9"/>
    </publishers>
  </zone>
  <zone id="45" name="Example.com / Articles / 160x600" group="20" type="1" size="13" desktop="true" phone="0" tablet="0" targeting="000010001" viewlimit="0" viewtimeout="1440" viewpixel="123" clickpixel="123" actionpixel="123" defaults="true" refresh="false" refreshinterval="10" refreshlimit="60" status="true" recycle="false">
    <notes/>
    <campaigns>
    <campaigns>
      <campaign id="10" size="13" default="false" chain="0" priority="1" recycle="false" status="true"/>
      <campaign id="11" size="13" default="false" chain="0" priority="1" recycle="false" status="true"/>
      <campaign id="12" size="13" default="false" chain="0" priority="1" recycle="false" status="true"/>
    </campaigns>
    </campaigns>
    <publishers/>
  </zone>
</results>

JSON Response

Hyperlink /servlet/control/api/zones/query?secret=(key)&output=json&name=example


{
  "results": [
    {
      "id": 41,
      "name": "Example.com / Home / 728x90",
      "group": 20,
      "type": 1,
      "size": 19,
      "desktop": true,
      "phone": 0,
      "tablet": 0,
      "targeting": [
        4,
        8
      ],
      "view_limit": 0,
      "view_timeout": 1440,
      "view_pixel": 123,
      "click_pixel": 123,
      "action_pixel": 123,
      "status": true,
      "defaults": true,
      "refresh": false,
      "refresh_interval": 10,
      "refresh_limit": 60,
      "recycle": false,
      "notes": "",
      "campaigns": [
        {
          "id": 20,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 2,
          "recycle": false,
          "status": true
        },
        {
          "id": 21,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 5,
          "recycle": false,
          "status": true
        },
        {
          "id": 22,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        },
        {
          "id": 23,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 2,
          "recycle": false,
          "status": true
        }
      ]
    },
    {
      "id": 42,
      "name": "Example.com / Articles / 728x90",
      "group": 20,
      "type": 1,
      "size": 19,
      "desktop": true,
      "phone": 0,
      "tablet": 0,
      "targeting": [
        4,
        8
      ],
      "view_limit": 0,
      "view_timeout": 1440,
      "view_pixel": 123,
      "click_pixel": 123,
      "action_pixel": 123,
      "status": true,
      "defaults": true,
      "refresh": false,
      "refresh_interval": 10,
      "refresh_limit": 60,
      "recycle": false,
      "notes": "",
      "campaigns": [
        {
          "id": 20,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 2,
          "recycle": false,
          "status": true
        },
        {
          "id": 21,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 5,
          "recycle": false,
          "status": true
        },
        {
          "id": 22,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        },
        {
          "id": 23,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 2,
          "recycle": false,
          "status": true
        }
      ],
      "publishers": [
        7,
        8,
        9
      ]
    },
    {
      "id": 43,
      "name": "Example.com / Home / 160x600",
      "group": 20,
      "type": 1,
      "size": 13,
      "desktop": true,
      "phone": 0,
      "tablet": 0,
      "targeting": [
        4,
        8
      ],
      "view_limit": 0,
      "view_timeout": 1440,
      "view_pixel": 123,
      "click_pixel": 123,
      "action_pixel": 123,
      "status": true,
      "defaults": true,
      "refresh": false,
      "refresh_interval": 10,
      "refresh_limit": 60,
      "recycle": false,
      "notes": "",
      "campaigns": [
        {
          "id": 10,
          "size": 13,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        },
        {
          "id": 11,
          "size": 13,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        },
        {
          "id": 12,
          "size": 13,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        }
      ]
    },
    {
      "id": 44,
      "name": "Example.com / Forums / 728x90",
      "group": 20,
      "type": 1,
      "size": 19,
      "desktop": true,
      "phone": 0,
      "tablet": 0,
      "targeting": [
        4,
        8
      ],
      "view_limit": 0,
      "view_timeout": 1440,
      "view_pixel": 123,
      "click_pixel": 123,
      "action_pixel": 123,
      "status": true,
      "defaults": true,
      "refresh": false,
      "refresh_interval": 10,
      "refresh_limit": 60,
      "recycle": false,
      "notes": "",
      "campaigns": [
        {
          "id": 10,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        },
        {
          "id": 11,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        },
        {
          "id": 12,
          "size": 19,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        }
      ],
      "publishers": [
        7,
        8,
        9
      ]
    },
    {
      "id": 45,
      "name": "Example.com / Articles / 160x600",
      "group": 20,
      "type": 1,
      "size": 13,
      "desktop": true,
      "phone": 0,
      "tablet": 0,
      "targeting": [
        4,
        8
      ],
      "view_limit": 0,
      "view_timeout": 1440,
      "view_pixel": 123,
      "click_pixel": 123,
      "action_pixel": 123,
      "status": true,
      "defaults": true,
      "refresh": false,
      "refresh_interval": 10,
      "refresh_limit": 60,
      "recycle": false,
      "notes": "",
      "campaigns": [
        {
          "id": 10,
          "size": 13,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        },
        {
          "id": 11,
          "size": 13,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        },
        {
          "id": 12,
          "size": 13,
          "default": false,
          "chain": 0,
          "priority": 1,
          "recycle": false,
          "status": true
        }
      ]
    }
  ]
}