Admedia Resource
From Wiki.zanox.com
The admedia RESTFul API resource enables the retrieval of advertising media. Advertising media are part of an advertiser program.
Admedia can only be retrieved via this API.
[edit] GET
A GET request using an admedia URI returns the properties of an admedia based on various optional parameters. Parameter can be used for manipulating results for targeting purposes.
[edit] Example 1: Retrieving single advertising item
[edit] Example Request
GET /xml/admedia/admedium/1 HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://webservices.zanox.com/namespace/2008-02-20/"> <admediaResult> <admediumItem id="http://webservices.zanox.com/xml/2008-02-20/admedia/admedium/399185"> <name>11y Flash Skyscraper 120x600</name> <height>100</height> <width>200</width> <image>http://www.cyrillus.fr/productimage/71/BTP/4X_20425_3028.jpg</image> <code>language=javascript; ....</code><!--Might be either image or code--> <type id="179">Bild mit Text</type> <program id="http://webservices.zanox.com/programs/program/1">Otto</program> <category id="6">Logobanner</category> <url> <adspace id="http://webservices.zanox.com/xml/2008-02-20/adspaces/adspace/22">http://www.zanox-affiliate.de/ppc/77172C834740488</adspace> <adspace id="http://webservices.zanox.com/xml/2008-02-20/adspaces/adspace/34">http://www.zanox-affiliate.de/ppc/77172C834740488</adspace> </url> </admediumItem> </admediaResult> </response>
[edit] Explanation of Response Items
See: Explanation of Response Items Retrieving a list of advertising media items for an advertiser program
[edit] Example 2: Retrieving a list of advertising media items for an advertiser program
[edit] Example Request
GET /xml/admedia/program/3277 HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Jun 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <page>0</page> <items>10</items> <total>2376</total> <admediaResult> <admediumItem id="399185">...</admediumItem> <admediumItem id="399185">...</admediumItem> <admediumItem id="399185">...</admediumItem> </admediaResult> </response>
[edit] Explanation of Response Items
See: Explanation of Response Items Retrieving a list of advertising media items for an advertiser program
[edit] Example 3: Retrieving a list of advertising media items for an advertiser program by a given category
[edit] Example Request
GET /xml/admedia/program/3277/category/1 HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Jun 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <page>0</page> <items>10</items> <total>2376</total> <admediaResult> <admediumItem id="399185">...</admediumItem> <admediumItem id="399185">...</admediumItem> <admediumItem id="399185">...</admediumItem> </admediaResult> </response>
[edit] Explanation of Response Items
[edit] Example 4: Retrieving a list of advertising media items for an advertiser program by a given admedia type
Currently those types are supported: List of AdMedia Types
[edit] Example Request
GET /xml/admedia/program/3277/type/801 HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Jun 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <page>0</page> <items>10</items> <total>2376</total> <admediaResult> <admediumItem id="399185">...</admediumItem> <admediumItem id="399185">...</admediumItem> <admediumItem id="399185">...</admediumItem> </admediaResult> </response>
[edit] Explanation of Response Items
Explanation of the response items for this request
[edit] Example 5: Retrieving a list of all advertising media categories for an advertiser program
[edit] Example Request
GET /xml/admedia/program/3277/categories HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Jun 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <admediumResult> <categories xml:lang="en"> <category id="1">Example Category 1</category> <category id="2">Example Category 2</category> <category id="3">Example Category 3</category> <category id="4">Example Category 4</category> </categories> </admediumResult> </response>
[edit] Explanation of Response Items
Explanation of the response items for this request
[edit] Example 6: Retrieving a list of all admedia for an advertiser program, an ipaddress, an admedia category and a linkformat
- The format parameter is equivalent to the linkFormatIds (Id), described under the following link
Possible link formats (All possible link formats)
- All parameters have to be set, otherwise you will get an error!
[edit] Example Request
GET /xml/admedia/program/324?ip=192.11.22.33&category=106&format=8 HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Jun 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
[edit] Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://api.zanox.com/namespace/2008-05-21/"> <admediaResult> <admediumItem id="399185">...</admediumItem> <admediumItem id="399185">...</admediumItem> <admediumItem id="399185">...</admediumItem> </admediaResult> </response>