• Increase font size
  • Default font size
  • Decrease font size
Home eBay Applications Libraries Merchandising API

Merchandising API

Auctionfeed has been upgraded (Jan 2010) to include a Merchandising API for eBay Merchandising Web Services (EMWS). Written in PHP, the interface makes it easy for developers and affiliates to construct EMWS queries and retrieve data from eBay.

Download | Support

You can get an appid, access to documentation and more information about EMWS from the eBay Developers Program web site.

Examples

Example 1.1 provides code to make a simple getMostWatchedItems call which retrieves data for items with the highest watch count.

Example 1.1 Get the official eBay system time

<?php
// include Auctionfeed Shopping API file
require_once 'Auctionfeed/Shopping.php';
 
// get a merchandising api object
$ebay = new Auctionfeed_Merchandising( 'YOUR-APPID-HERE', 'MERCHANDISING_API_VERSION' );
 
// get an api call object
$obj  = $ebay->getMostWatchedItems();
 
// set call parameters
$obj->setOption( 'maxResults', 3 );
$obj->setOption( 'categoryId', 267 );
 
// get XML response as a SimpleXMLElement object
$xml  = $obj->getSimpleXML();
 
// do stuff
if ($xml) {
        echo '<pre>';
        print_r($xml);
        echo '</pre>';
} else {
  echo 'Error. No simpleXML object.';
}
?>

EMWS Version Support

Auctionfeed APIs undergoe regular maintenance and every effort is made to maintain compliance with the latest EMWS revision. Users should check regularly for announcements at the official Auctionfeed support site: http://auctionfeed.co.uk.

Requirements

Use of Auctionfeed Libraries requires:

  • eBay Developers Program application id (appid)
  • Web server with PHP 5.2+
  • Access to EMWS documentation

Installation

  1. Download and extract the .zip file.
  2. Upload the libraries folder to your server. A location ABOVE your web root is preferred.
  3. Create test.php file using the code above.

Ensure you edit the path to the Auctionfeed/ directory.

Notes

The Auctionfeed API uses a PHP constant named AUCTIONFEED_DIR which is the full system file path to the new libraries/ directory. If your application can find the libraries/Auctionfeed/Shopping.php file, Auctionfeed will define this constant on its own. Auctionfeed also attempts to set your include_path to find all other files and directories below the libraries/ directory.

The package contains .php files that you SHOULD NOT edit. They are shared among all Auctionfeed powered applications and should only change when you upgrade to a new version of Auctionfeed. If you need to add functionality the recommended course of action is to create news classes that override and extend those within the package.

License

Free to modify and distribute under the NEW BSD License.

Support This Project

Last Updated on Tuesday, 19 January 2010 01:35