Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ebay API with description

Tags:

ebay-api

How do I get the Ebay API to return a description?

I have some code that makes an API call as follows:

http://svcs.ebay.com/services/search/FindingService/v1?
callname=findItemsAdvanced&
responseencoding=XML&
appid=appid&
siteid=0&
version=525&
QueryKeywords=keywords;

It returns items, but it's missing the full description text. I'm not seeing the next step to ask for the detailed descriptions.

like image 821
daviesgeek Avatar asked Aug 09 '11 20:08

daviesgeek


2 Answers

You have to use Shopping API, for instance: http://developer.ebay.com/DevZone/shopping/docs/CallRef/GetSingleItem.html#sampledescriptionitemspecifics

like image 117
Nazin Avatar answered Sep 18 '22 16:09

Nazin


I use following (very simple function to get Item detail from ebay):

function eBayGetSingle($ItemID){
   $URL = 'http://open.api.ebay.com/shopping';

   //change these two lines
   $compatabilityLevel = 967; 
   $appID = 'YOUR_APP_ID_HERE';

   //you can also play with these selectors
   $includeSelector = "Details,Description,TextDescription,ShippingCosts,ItemSpecifics,Variations,Compatibility";


   // Construct the GetSingleItem REST call         
   $apicall = "$URL?callname=GetSingleItem&version=$compatabilityLevel"
            . "&appid=$appID&ItemID=$ItemID"
            . "&responseencoding=XML"
            . "&IncludeSelector=$includeSelector"; 
   $xml = simplexml_load_file($apicall);

   if ($xml) {
     $json = json_encode($xml);
     $array = json_decode($json,TRUE);
     return $array;
   }
   return false;
}
like image 29
Akam Avatar answered Sep 22 '22 16:09

Akam