If you have any question left, please drop a note with the discussion link of this page.
REST V2009-05-01 Reports
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
The reports RESTFul API resource enables the retrieval of clicks, leads and sales. Please note that all report functions currently work with CEST (GMT+2) or CET (GMT+1).
Various types of reports can be retrieved via this API resource.
Contents |
GET: Retrieving a single sale item
Parameters
| applicationId | mandatory | only header parameter! | applicationId is required for authorization to eliminate any possibility of data abuse. |
| timestamp | mandatory | only header parameter! | timestamp is required for authorization to eliminate any possibility of data abuse. |
| signature | mandatory | only header parameter! | signature is required for authorization to eliminate any possibility of data abuse. |
| saleid | mandatory | path parameter | ID of the sale item. |
| callback | optional | query parameter | Supported if format is JSON. Name of the JS function the result is wrapped in. |
Example Request
// REST XML http://api.zanox.com/xml/reports/sales/sale/10421-234prp-23fo3of-235m3n // REST JSON http://api.zanox.com/json/reports/sales/sale/10421-234prp-23fo3of-235m3n // REST XML using Header Authorization GET /xml/reports/sales/sale/1 HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
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>1</items> <total>1</total> <reportsResult> <saleItem id="http://api.zanox.com/xml/2008-05-21/reports/leads/lead/{id}"> <reviewState>open</reviewState> <trackingdate>2008-01-02T00:00:00.000Z</trackingdate> <modifieddate>2008-01-03T00:00:00.000Z</modifieddate> <clickdate>2008-01-02T00:00:00.000Z</clickdate> <adspace id=""></adspace> <admedia id=""></adspace> <program id=""></program> <amount>476.8</amount> <category id="123">cid</category> <commission>50.00</commission> <currency>EUR</currency> <subpublisher id="numeric, alphanumeric if available"> <!-- also called Sub-ID --> <commission>0.00</commission> </subpublisher> <gpp> <zpar id="0"></gpp> <gpp> </saleItem> </reportResult> </response>
GET: Retrieving a single lead item
Parameters
| applicationId | mandatory | only header parameter! | applicationId is required for authorization to eliminate any possibility of data abuse. |
| timestamp | mandatory | only header parameter! | timestamp is required for authorization to eliminate any possibility of data abuse. |
| signature | mandatory | only header parameter! | signature is required for authorization to eliminate any possibility of data abuse. |
| leadid | mandatory | path parameter | ID of the lead item. |
| callback | optional | query parameter | Supported if format is JSON. Name of the JS function the result is wrapped in. |
Example Request
// REST XML http://api.zanox.com/xml/reports/leads/lead/10421-234prp-23fo3of-235m3n // REST JSON http://api.zanox.com/json/reports/leads/lead/10421-234prp-23fo3of-235m3n // REST XML using Header Authorization GET /xml/reports/leads/lead/1 HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
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>1</items> <total>1</total> <reportsResult> <leadItem id="http://api.zanox.com/xml/2008-05-21/reports/leads/lead/{id}"> <status>open</status> <trackingdate>2008-01-02T00:00:00.000Z</trackingdate> <modifieddate>2008-01-03T00:00:00.000Z</modifieddate> <clickdate>2008-01-02T00:00:00.000Z</clickdate> <adspace id=""></adspace> <admedia id=""></adspace> <program id=""></program> <category id="123">cid</category > <commission>50.00</commission> <currency>EUR</currency> <subpublisher id="numeric, alphanumeric if available"> // also called Sub-ID <commission>0.00</commission> </subpublisher> <gpp> <zpar id="0"></gpp> <gpp> </leadItem> </reportResult> </response>
GET: Retrieving all sale items
Parameters
| applicationId | mandatory | only header parameter! | applicationId is required for authorization to eliminate any possibility of data abuse. |
| timestamp | mandatory | only header parameter! | timestamp is required for authorization to eliminate any possibility of data abuse. |
| signature | mandatory | only header parameter! | signature is required for authorization to eliminate any possibility of data abuse. |
| trackingdate | mandatory | query parameter | trackingdate returns all sales of given day (default = today) |
| modifieddate | optional | query parameter | modifieddate returns all sales modified at given day |
| clickdate | optional | query parameter | clickdate returns all sales where the corresponding click was at the given day |
| items | optional | query parameter | number of items in the result set [1..n] (default = 10; maximum = 50) |
| page | optional | query parameter | page position [0..n] (default: 0) |
Example Request
// REST XML http://api.zanox.com/xml/reports/sales?trackingdate=2008-10-03 // REST JSON http://api.zanox.com/json/reports/sales?trackingdate=2008-10-03 // REST XML using Header Authorization GET /xml/reports/sales HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
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>23</total> <reportsResult> <saleItem id=""> ...</saleItem> <saleItem id=""> ...</saleItem> <saleItem id=""> ...</saleItem> </reportResult> </response>
GET: Retrieving all lead items
Parameters
| applicationId | mandatory | only header parameter! | applicationId is required for authorization to eliminate any possibility of data abuse. |
| timestamp | mandatory | only header parameter! | timestamp is required for authorization to eliminate any possibility of data abuse. |
| signature | mandatory | only header parameter! | signature is required for authorization to eliminate any possibility of data abuse. |
| trackingdate | mandatory | query parameter | trackingdate returns all leads of given day (default = today) |
| modifieddate | optional | query parameter | modifieddate returns all leads modified at given day |
| clickdate | optional | query parameter | clickdate returns all leads where the corresponding click was at the given day |
| items | optional | query parameter | number of items in the result set [1..n] (default = 10; maximum = 50) |
| page | optional | query parameter | page position [0..n] (default: 0) |
Example Request
// REST XML http://api.zanox.com/xml/reports/leads?date=2008-10-03 // REST JSON http://api.zanox.com/json/reports/leads?date=2008-10-03 // REST XML using Header Authorization GET /xml/reports/leads HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282
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>4</items> <total>4</total> <reportsResult> <leadItem id="">...</leadItem> <leadItem id="">...</leadItem> <leadItem id="">...</leadItem> <leadItem id="">...</leadItem> </reportResult> </response>
GET: Retrieving aggregated Report
..todo..