If you have any question left, please drop a note with the discussion link of this page.

REST V2009-07-01 Products

From Wiki.zanox.com

Jump to: navigation, search

Products
  GET: Retrieving single product item
  GET: Retrieving product items by a specified program
  GET: Contextual product search
  GET: Retrieving product categories
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: Programsearch
  GET: Returns all programs for a specified user adspace
  GET: Returns all zanox program categories
  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 products RESTful API resource offers contextual product search and retrieval of product offers from advertisers.

Contents

GET: Retrieving single product item

Returns a single product item.

Parameters

Name Necessity Parameter type Description
connectid mandatory header parameter or query parameter connectID is required for authorization. It is responsible for getting your tracking links in the result.
product mandatory path parameter ID of product item.
adspace optional query parameter constrain the returned tracking links to a specified adspace
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/2009-07-01/products/product/31f3bf210db1883e6bc3f7ab5dd096c7?connectid=580599047DF8F5311043

// REST JSON
http://api.zanox.com/json/2009-07-01/products/product/31f3bf210db1883e6bc3f7ab5dd096c7?connectid=580599047DF8F5311043
// REST JSONP
http://api.zanox.com/json/2009-07-01/products/product/31f3bf210db1883e6bc3f7ab5dd096c7?connectid=580599047DF8F5311043&callback=handleProducts

// REST XML using Header Authorization
GET /xml/2009-07-01/products/product/31f3bf210db1883e6bc3f7ab5dd096c7 HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Jun 2008 08:17:35 GMT
Authorization: ZXWS 580599047DF8F5311043

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2009-07-01/">
         <productItem id="31f3bf210db1883e6bc3f7ab5dd096c7">
            <name>Leitz Ordner 180° 1050-50 sw schmal</name>
            <modified>2009-05-18T09:08:31.000+02:00</modified>
            <description>Der Leitz Ordner in verbesserter Qualität. Die 180° Öffnung der Mechanik ......</description>
            <descriptionLong>Der Leitz Ordner in verbesserter Qualität. ..... </descriptionLong>
            <manufacturer>Leitz Esselte</manufacturer>
            <program id="49">mypaper.de</program>
            <currency>EUR</currency>
            <price>2.81</price>
            <ean>4002432359462</ean>
            <deliveryTime>H24</deliveryTime>
            <terms>inkl. gesetzl. MwSt. und zzgl. Lieferkosten 5,22 EUR brutto. Ab 58 EUR keine Versandkosten</terms>
            <image>
               <small>http://www.mypaper.de/isroot/Produktbilder/Small/847711S1.gif</small>
               <medium>http://www.mypaper.de/isroot/Produktbilder/Medium/847711S1.gif</medium>
               <large>http://www.mypaper.de/isroot/Produktbilder/Large/847711S1.gif</large>
            </image>
            <trackingLinks>
               <trackingLink adspaceId="123123">
                  <ppv>http://www.zanox-affiliate.de/ppv/?1255995C106343S123123&amp;ULP=[[000411]]&amp;zpar9=[[11163954E59A0B5DDF36]]</ppv>
                  <ppc>http://www.zanox-affiliate.de/ppc/?1255995C1005646573S123123&amp;ULP=[[000411]]&amp;zpar9=[[11163954E59A0B5DDF36]]</ppc>
               </trackingLink>
            </trackingLinks>
         </productItem>
</response>
 

→ ProductItem details productItem

GET: Retrieving product items by a specified program

Parameters

Name Necessity Parameter type Description
connectid mandatory header parameter or query parameter connectID is required for authorization. It is responsible for getting your tracking links in the result.
program mandatory path parameter Retrieve all products for a specified program → /program/{programid}
adspace optional query parameter Constrain the returned tracking links to a specified adspace
modifieddate optional query parameter Limits the query to new/updated products since a certain date. Format is "yyyy-MM-dd".
items optional query parameter Number of requested items per page. Valid values are between "1" and "50". Default value is "10". Use this for paging.
page optional query parameter Index of selected page starting by "0". items * (page + 1) has to be less or equal than total number of items. Default value is "0". Use this for paging.
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/2009-07-01/products/program/1234?modified=2009-01-01&connectid=580599047DF8F5311043

// REST JSON
http://api.zanox.com/json/2009-07-01/products/program/1234?modified=2009-01-01&connectid=580599047DF8F5311043
// REST JSONP
http://api.zanox.com/json/2009-07-01/products/program/1234?modified=2009-01-01&connectid=580599047DF8F5311043&callback=handleProducts
// REST XML using Header Authorization
GET /xml/2009-07-01/products/program/1234?modified=2007-01-04 HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Jun 2008 08:17:35 GMT
Authorization: ZXWS 580599047DF8F5311043

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2009-07-01/">
	<page>0</page>
	<items>4</items>
	<total>2376</total>
	<productItems>
 		<productItem id="31f3bf210db1883e6bc3f7ab5dd096c7"></productItem>
 		<productItem id="bab78dee32f130e5c109dd2ae3bc2153"></productItem>
 		<productItem id="b47b21faa184d8f3eab2ee0fabc84e33"></productItem>
 		<productItem id="69e214221e071aa225b46812a338a4f8"></productItem>
 	</productItems>
</response>
 

→ ProductItem details productItem

GET: Retrieve products by category

To retrieve products by category from one or more advertisers, please use Contextual_product_search and leave the "q"-Parameter empty.
Please note that the number of total items is limited by 500 in this case.

GET: Contextual product search

Match a text against product offers from various advertiser programs. Feel free to use keywords for the search as well as e.g. a headline or paragraph of your blog.

Parameters

Name Necessity Parameter type Description
connectid mandatory header parameter or query parameter connectID is required for authorization. It is responsible for getting your tracking links in the result.
q optional query parameter Search string. If length exceeds 25 characters and the searchType is not set, contextual product search is applied.
If empty, number of total items is limited by 500.
searchtype optional query parameter Specifies kind of search.
Use "contextual" for contextual search
Use "phrase" for keyword based search
region optional query parameter Filter by a specified sales region (country). ISO 3166 a2 codes, e.g. "de", "gb", "fr", "es", "nl", "at", "ch".
ip optional query parameter Retrieves region (country) automatically based on users ipAddress.
minprice optional query parameter Returns products with a given minimum price. Currency-independent.
maxprice optional query parameter Returns products with a given maximum price. Currency-independent.
programs optional query parameter Specifies a comma-separated list of up to 20 programs which limits the product search. Defaultvalue is "660". "660" is a pool of pre-selected, international programs which gives you access to various advertiser programs.

e.g. limit the search to one program: "&programs=11"
e.g. limit the search to multiple programs: "&programs=11,22,33,44"
e.g. use predefined programs: "&programs=660"
e.g. use predefined programs plus some specific: "&programs=660,22,33"

category optional query parameter Limits the search to a certain zanox product category. Must be used if q is empty.

Values for the zanox product category filters: ProductCategories
hasimages optional query parameter Filter products without any images
adspace optional query parameter constrain the returned tracking links to a specified adspace
items optional query parameter Number of requested items per page. Valid values are between "1" and "50". Default value is "10". Use this for paging.
page optional query parameter Index of selected page starting by "0". items * (page + 1) has to be less or equal than total number of items. Default value is "0". Use this for paging.
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/2009-07-01/products?q=auto&programs=660,10,20,30&connectid=580599047DF8F5311043

// REST JSON
http://api.zanox.com/json/2009-07-01/products?q=auto&programs=660,10,20,30&connectid=580599047DF8F5311043

// REST JSONP
http://api.zanox.com/json/2009-07-01/products?q=auto&programs=660,10,20,30&connectid=580599047DF8F5311043&callback=handleProducts

// REST XML using Header Authorization
GET /xml/2009-07-01/products?q=autoHTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Jun 2008 08:17:35 GMT
Authorization: ZXWS 580599047DF8F5311043

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2009-07-01/">
         <page>0</page>
         <items>5</items>
         <total>86999</total>
         <query>auto</query>
         <productItems>
            <productItem id="b41ef4142dd453af3ecec7536d106000">...</productItem>
            <productItem id="e812451eaef9c300652e6ac02d04a611">...</productItem>
            <productItem id="fded6e2f02c74c0acae48f6ec4b7c711">...</productItem>
            <productItem id="d50523c267e0cb3ccd7767c989eb49ea">...</productItem>
            <productItem id="659e30d5a8b40dc08cf83ab8659b17a4">...</productItem>
 	</productItems>
</response>
 

→ ProductItem details productItem

GET: Retrieving product categories

Returns all or a specified part of the zanox product categories

Parameters

Name Necessity Parameter type Description
connectid mandatory header parameter or query parameter connectID is required for authorization.
parent optional query parameter
includechilds optional query parameter
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/2009-07-01/products/categories?connectid=580599047DF8F5311043
 
// REST JSON
http://api.zanox.com/json/2009-07-01/products/categories?connectid=580599047DF8F5311043

// REST JSONP
http://api.zanox.com/json/2009-07-01/products/categories?connectid=580599047DF8F5311043&callback=handleProducts

// REST XML using Header Authorization
GET /xml/2009-07-01/products/categories/6121e5ef967ae811cbe561259aa7f534 HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Jun 2008 08:17:35 GMT
Authorization: ZXWS 580599047DF8F5311043

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2009-07-01/">
       <categories>
            <category>
               <id>10000</id>
               <name>Cars &amp; Motorcycles</name>
               <category>
                  <id>10100</id>
                  <name>New Vehicles</name>
                  <category>
                     <id>10103</id>
                     <name>Motorcycles</name>
                  </category>
                  <category>
                     <id>10105</id>
                     <name>Miscellaneous Vehicles</name>
                  </category>
                  <category>
                     <id>10101</id>
                     <name>Cars</name>
                  </category>
                  <category>
                     <id>10104</id>
                     <name>Caravans &amp; Motor Homes</name>
                  </category>
                  <category>
                     <id>10102</id>
                     <name>Commercial Vehicles</name>
                  </category>
               </category>
...
...
</response>
 

Explanation of the Response objects

  1. productItem
  2. productCategoryItem
Personal tools