Shopping API

Posted on March 8th, 2008 in Featured

Auctionfeed Shopping API is a simple Application Programming Interface (API) for eBay Shopping Web Services (ESWS). The interface makes it easy for developers and affiliates to construct ESWS queries and retrieve data from eBay.

Download | Support

License

Free to modify and distribute under the GNU General Public License.

ESWS Version Support

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

Requirements

Use of the Auctionfeed Shopping API requires:

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

You can get an appid, access to documentation and more information about ESWS from the eBay Developers Program web site (http://developer.ebay.com/).

Examples

Example 1 provides code to make a simple GeteBayTime call which gets the official eBay system time. A null value has been set for the MessageID option to illustrate the example but in practice the line of code could have been omitted as this is an optional parameter.

Example 1. Get the official eBay system time

<?php
// include Auctionfeed Shopping API file
require_once 'Auctionfeed/Shopping.php';

// get a shopping api object
$ebay = new Auctionfeed_Shopping( 'YOUR-APPID-HERE' );

// get an api call object
$obj  = $ebay->GeteBayTime();

// set call parameters
$obj->setOption( 'MessageID', null );

// get XML response as a SimpleXMLElement object
$xml  = $obj->getSimpleXML();

// do stuff
echo 'Timestamp: ' . $xml->Timestamp . "\n";
?>

Example 1.1 shows how to specify a Shopping API version. Defined values have been used for illustration but variables could have been used. Comments have been omitted as the example builds on Example1.

Example 1.1. Specify the Shopping API version

<?php
require_once 'Auctionfeed/Shopping.php';

define( 'AFD_APPID', 'YOUR-APPID-HERE' );
define( 'AFD_VERSION', 553 );

$ebay = new Auctionfeed_Shopping( AFD_APPID, AFD_VERSION );

// .. continue
Published by admin

Comments are closed.

  • Auctionfeed Shopping API

Place your extra content here like ads, news, tags,...