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

REST V2009-02-01 Products

From Wiki.zanox.com

(Redirected from Products Resource)
Jump to: navigation, search

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
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

applicationId mandatory header parameter or query parameter applicationId 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 path parameter or query parameter constrain the returned tracking links to a specified adspace → /adspace/{adspaceid}
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/products/product/76485b5f7021f7bc03b853fbf5debb53?applicationid=CE665464E0186EA44282
 
// REST JSON
http://api.zanox.com/json/products/product/76485b5f7021f7bc03b853fbf5debb53?applicationid=CE665464E0186EA44282

// REST JSONP
http://api.zanox.com/json/products/product/76485b5f7021f7bc03b853fbf5debb53?applicationid=CE665464E0186EA44282&callback=handleProducts

// REST XML using Header Authorization
GET /xml/products/product/76485b5f7021f7bc03b853fbf5debb53 HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Jun 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/2009-02-01/">
	<productsResult>
 		<productItem id="76485b5f7021f7bc03b853fbf5debb53">
			<name>Example product</name>
			<modified>2008-06-01T17:00:00Z</modified>
			<description>Description of the example product item</description>
			<manufacturer>Example Inc.</manufacturer>
			<program id="333">Example Inc. advertising program</program>
			<currency>EUR</currency>
			<price>39.90</price>
			<category id="10000"></category>
			<ean>3817610347</ean>
			<image>
				<small>http://www.example.com/productimage/71/BTP/4X_20425_3028.jpg</small>
				<medium>http://www.example.com/productimage/71/bp/4X_20425_3028.jpg</medium>
				<large>http://www.example.com/productimage/71/BM/4X_20425_3028.jpg</large>
			</image>
			<url>
				<adspace id="1">http://www.zanox-affiliate.de/ppc/77171C831740488ULP=[[000697]]</adspace>
				<adspace id="2">http://www.zanox-affiliate.de/ppc/77172C832740488ULP=[[000697]]</adspace>
				<adspace id="3">http://www.zanox-affiliate.de/ppc/77173C833740488ULP=[[000697]]</adspace>
			</url>
 		</productItem>
 	</productsResult>
</response>
 


GET: Retrieving product items by advertiser program

Parameters

applicationId mandatory header parameter or query parameter applicationId is required for authorization. It is responsible for getting your tracking links in the result.
adspace optional path parameter or query parameter Constrain the returned tracking links to a specified adspace → /adspace/{adspaceid}
modified 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/products/program/1234?applicationid=CE665464E0186EA44282&modified=2009-01-01

// REST JSON
http://api.zanox.com/json/products/program/1234?applicationid=CE665464E0186EA44282&modified=2009-01-01

// REST JSONP
http://api.zanox.com/json/products/program/1234?applicationid=CE665464E0186EA44282&modified=2009-01-01&callback=handleProducts

// REST XML using Header Authorization
GET /xml/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 CE665464E0186EA44282

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2009-02-01/">
	<page>0</page>
	<items>4</items>
	<total>2376</total>
	<productsResult>
 		<productItem id="76485b5f7021f7bc03b853fbf5debb53"></productItem>
 		<productItem id="76485b5f7021f7bc03b853fbf5debb53"></productItem>
 		<productItem id="76485b5f7021f7bc03b853fbf5debb53"></productItem>
 		<productItem id="76485b5f7021f7bc03b853fbf5debb53"></productItem>
 	</productsResult>
</response>
 

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

applicationId mandatory header parameter or URL parameter applicationId is required for authorization. It is responsible for getting your tracking links in the result.
q mandatory query parameter Search string. If length exceeds 25 characters, contextual product search is applied.
region optional query parameter Filter by a specified sales region. ISO 3166 a2 codes, e.g. "de", "gb", "fr", "es", "nl", "at", "ch".
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.

Values for the zanox product category filters: ProductCategories
adspace optional path parameter or URL parameter constrain the returned tracking links to a specified adspace → /adspace/{adspaceid}
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/products?applicationid=CE665464E0186EA44282&programs=660,10,20,30&q=searchstring

// REST JSON
http://api.zanox.com/json/products?applicationid=CE665464E0186EA44282&programs=660,10,20,30&q=searchstring

// REST JSONP
http://api.zanox.com/json/products?applicationid=CE665464E0186EA44282&programs=660,10,20,30&q=searchstring&callback=handleProducts

// REST XML using Header Authorization
GET /xml/products?q=searchString HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Jun 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/2009-02-01/">
	<page>0</page>
	<items>4</items>
	<total>2376</total>
	<query>searchforsometext</query>
	<productsResult>
 		<productItem id="76485b5f7021f7bc03b853fbf5debb51"></productItem>
 		<productItem id="76485b5f7021f7bc03b853fbf5debb52"></productItem>
 		<productItem id="76485b5f7021f7bc03b853fbf5debb53"></productItem>
 		<productItem id="76485b5f7021f7bc03b853fbf5debb54"></productItem>
 	</productsResult>
</response>
 

Explanation of Response Item

Response Item and Fields

Personal tools