View
 

Tools: Product Store API Methods


product_stores/list

List Product Stores in a Campaign.

 

  GET /product_stores.{json or xml} 

 

// Code

 product_stores_list($campaign_id) 

  

Parameters:

  • campaign_id. Required. A Campaign ID.

product_stores/show

Show Product Store details.

 

  GET /product_stores/#{product_store_id}.{json or xml}  

 

 // Code
product_store_show($product_store_id) 

 

Parameters:

  • product_store_id. Required. A Product Store ID.

product_stores/show products

Show products in a Store.

 

  GET /product_stores/#{product_store_id}/showitems.{json or xml}

 

// Code

product_store_showitems($product_store_id, $category=null, $page=1, $perpage=6) 

 

 Parameters:

  • product_store_id. Required. A Product Store ID.
  • category. Optional. A Category.
  • page. Optional. The desired page.
  • perpage. Optional. How many items per page.

product_stores/show product

Show a Product from a Store.

 

  GET /product_stores/#{product_store_id}/showitem.{json or xml} 

 

// Code
product_store_showitem($product_store_id, $product_id) 

 

Parameters:

  • product_store_id. Required. A Product Store ID.
  • product_id. Required. A Product ID.

product_stores/search products

Search for products in Stores.  Can also be used for sorting.
 
  GET /product_stores/#{product_store_id}/searchpr.{json or xml} 

 

// Code
product_store_products_search($campaign_id, $search, $product_store_id='all', $category=null, $page=1, $perpage=6, $sort='date', $uniq_products=false) 

 

Parameters:

  • campaign_id.  Required. A Campaign ID or 'approved' for searching in campaigns that has the affiliate approved.
  • search. Optional. Keywords. Use advanced searching syntax to search through all the fields of each product.
    • available fields to search by: id, title, description, brand, url, category, subcategory, image_urls, prid, caption, active, unique_code.
 
  • product_store_id. Optional. A Product Store ID or 'all'.
  • category. Optional. A Category.
  • page. Optional. The desired page.
  • perpage. Optional. How many items per page. Must be at least 1.

     

  • sort. Optional. Sort (by date, clicks, actions, abc [this is alphabetical], update_type [manual added product or imported], random)
  • uniq_products. Optional. Whether to make sure that returned products have unique product ids.

product_stores/update

Advertisers: Update a Product Store.

 

  PUT /product_stores/#{product_store_id}.{json or xml} 

 

// Code

product_store_update($product_store_id, $product_store) 

 

Parameters:

  • product_store_id. Required. A Product Store ID.
  • product_store. Required. The modified Product Store.

product_stores/destroy

Advertisers: Delete a Product Store.

 

  DELETE /product_stores/#{product_store_id}.{json or xml} 

 

// Code
product_store_destroy($product_store_id) 

 

Parameters:

  • product_store_id. Required. A Product Store ID.

product_stores/create product

Advertisers: Create a new product.

 

  POST /product_stores/#{product_store_id}/createitem.{json or xml} 

 

// Code

product_store_createitem($product_store_id, $product) 
 

Parameters:

  • product_store_id. Required. A Product Store ID.
  • product. Required. An array that contains ("title" => "title", "description" => "description of the product", "caption" => "a short message (like '25% off')", "price" => "price (integer CURRENCY)", "promoted" => "if it's a deal or promotion (0 or 1)", "category" => "category", "subcategory" => "subcategory", "url" => "url", "image_urls" => "urls to images separated by comma", "prid" => "product id", "brand" => "product brand", "active" => "active (0 or 1)" ) or XML/JSON equivalent.

product_stores/update product

Advertisers: Update a Product.

 

  PUT /product_stores/#{product_store_id}/updateitem.{json or xml} 

 

// Code
product_store_updateitem($product_store_id, $product_id, $product) 

 

Parameters:

  • product_store_id. Required. A Product Store ID.
  • product_id. Required. A Product ID.
  • product. Required. The modified Product.

product_stores/destroy product

Advertisers: Delete a Product.

 

  DELETE /product_stores/#{product_store_id}/destroyitem.{json or xml} 

 

// Code

product_store_destroyitem($product_store_id, $product_id) 

 

Parameters:

  • product_store_id. Required. A Product Store ID.
  • product_id. Required. A Product ID.