If you have any question left, please drop a note with the discussion link of this page.
RESTful API V2009-05-01
From Wiki.zanox.com
Products
GET: Retrieving a single product item
GET: Retrieving all product items by advertiser program
GET: Contextual Product Search
Admedia
GET: Retrieving a single admedium item
GET: Retrieving a list of admedia items
GET: Retrieving admedia categories
Programs
GET: Retrieving a single program item
GET: Retrieving all program items
GET: Programsearch
GET: Retrieving programs for a given category
GET: Returns the last 20 advertiser program news
GET: Returns all available program categories
GET: Returns all programs for a specified user adspace
POST: Creating a new program application
DELETE: Deleting an existing program application
Reports
GET: Retrieving a single sale item
GET: Retrieving a single lead item
GET: Retrieving all sale items
GET: Retrieving all lead items
GET: Retrieving aggregated report
Payments
GET: Retrieving all payment items
GET: Retrieving a single payment item
GET: Retrieving all balance items
GET: Retrieving a single balance item
GET: Retrieving all account items
GET: Retrieving a single account item
Adspaces
GET: Retrieving a single adspace item
GET: Retrieving all adspace items related to the user
POST: Creating a new advertising space
PUT: Updating properties of an advertising space
DELETE: Removing an advertising space
Profiles
GET: Retrieve the user profile
PUT: Update the user profile
Contents |
API Location
Two different RESTful interfaces are available: XML and JSON. Both are available via http or https. The API can be used without a version parameter in the URL. If used without the version parameter the latest API version is always taken. In order to stick to a certain version the release date of the API has to be provided as a parameter.
API with version support
http(s)://api.zanox.com/json/2009-05-01 http(s)://api.zanox.com/xml/2009-05-01
To see the differences between versions, please check Version History
API Authentication
Two different types of authentication are necessary to use the RESTful API. The implementation details can be found in the
RESTful API authentication process section.
If you don't have coded a signature-calculating-routine yet, you may use our SigntureTool [1].
Callback Handler
zanox Web Services Version 2009-02-01_RC01 introduced support of the Dynamic Script Tag Pattern. Here you can learn what it is, how to do cross domain requests to the zanox Web Services.
Usage of 'callback=function' with static script tag
Example: A product search against the product feeds of the programme with the ID 12345.
<script src="http://api.zanox.com/json/2009-02-01/products?applicationid=abc..&programs=12345&q=searchString&callback=myCallbackHandler"> </script> <script> function myCallbackHandler(jsonData){ //do something with jsonData, which is the result of the API query } </script>
Usage of 'callback=function' with dynamic script tag
<script> function callAPI(url){ var script = document.createElement('script'); script.src = url; // sets the scripts source to the Rest/JSON API query script.type = "text/javascript"; document.getElementsByTagName('head')[0].appendChild(script); // the browser performs a request to the zanox API. // as soon as the script tags source is loaded, the callback function is called } function myCallbackHandler(jsonData){ //do something with jsonData, which is the result of the API query } } var url = 'http://api.zanox.com/json/2009-02-01/products?applicationid=abc&programs=12345&q=searchString&callback=myCallbackHandler'; callAPI(url); </script>
API RESTful Resources
The RESTful API contains RESOURCES that can be accessed for various actions. Actions refers to the HTTP commands GET/POST/PUT and DELETE. The GET command means retrieving a resource, POST means creating a resource, PUT means updating a resouce and DELETE means removing a resource.
Resources are advertising spaces, product offerings, advertising media, advertiser programs, transaction reports and user profiles. Be aware that not all of these resources can be modified.
Products Resource
Using the REST V2009-05-01 Products you can access 70 mio product offer items using contextual product search, product download, incremental product download
- GET: Retrieving a single product item
- GET: Retrieving all product items by advertiser program
- GET: Contextual Product Search
Admedia Resource
With the REST V2009-05-01 Admedia you can access 300.000 advertising media (banners, text links, etc.)
- GET: Retrieving a single admedium item
- GET: Retrieving a list of admedia items
- GET: Retrieving admedia categories
Programs Resource
With the REST V2009-05-01 Programs you can search for affiliate programmes, retrieve affiliate programmes, and apply to affiliate programmes
- GET: Retrieving a single program item
- GET: Retrieving all program items
- GET: Programsearch
- GET: Retrieving programs for a given category
- GET: Returns the last 20 advertiser program news
- GET: Returns all available program categories
- GET: Returns all programs for a specified user adspace
- POST: Creating a new program application
- DELETE: Deleting an existing program application
Reports Resource
With the REST V2009-05-01 Reports you can retrieve Leads and Sales
- GET: Retrieving a single sale item
- GET: Retrieving a single lead item
- GET: Retrieving all sale items
- GET: Retrieving all lead items
- GET: Retrieving aggregated report
Payments Resource
With the REST V2009-05-01 Payments you can do operations on payments
- GET: Retrieving all payment items
- GET: Retrieving a single payment item
- GET: Retrieving all balance items
- GET: Retrieving a single balance item
- GET: Retrieving all account items
- GET: Retrieving a single account item
Adspaces Resource
With the REST V2009-05-01 Adspaces you can do operations on advertising spaces.
- GET: Retrieving a single adspace item
- GET: Retrieving all adspace items related to the user
- POST: Creating a new advertising space
- PUT: Updating properties of an advertising space
- DELETE: Removing an advertising space
Profiles Resource
With the REST V2009-05-01 Profiles you can do operations on profiles