skip to Main Content

I’m reading a little bit about the eBay API,
but I can’t find anything about getting a list with all “open and finished articles” that I am selling.

Is it in the buying API or trading? Could someone help me a little bit where to look?
Or some lines of code?

I logged in with

$request = "<?xml version='1.0' encoding='iso-8859-1'?><request>"
   . "<RequestUserId>" . $EBAY_UID . "</RequestUserId>"
   . "<RequestPassword>" . $EBAY_PWD . "</RequestPassword>"
   . "<ErrorLevel>0</ErrorLevel>"
   . "<DetailLevel>0</DetailLevel>"
   . "<SiteId>0</SiteId>"
   . "<Verb>GeteBayOfficialTime</Verb></request>";

$headers[] = "X-EBAY-API-COMPATIBILITY-LEVEL: 305";
$headers[] = "X-EBAY-API-SESSION-CERTIFICATE: ".DEVID.";".APPID.";".CERTID;
$headers[] = "X-EBAY-API-DEV-NAME: ".DEVID;
$headers[] = "X-EBAY-API-APP-NAME: ".APPID;
$headers[] = "X-EBAY-API-CERT-NAME: ".CERTID;
$headers[] = "X-EBAY-API-CALL-NAME: GeteBayOfficialTime";
$headers[] = "X-EBAY-API-SITEID: 0";
$headers[] = "X-EBAY-API-DETAIL-LEVEL: 0";
$headers[] = "Content-Type: text/xml";
$headers[] = "Content-Length: " . strlen($request);

var_dump($header);

$curl = curl_init("https://api.sandbox.ebay.com/ws/api.dll");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
$result = curl_exec($curl);

to get the eBay time but now I want to get a list with details like
my product x was paid on the xx and I received the money on the xx and the price is xx and the person who got the article is called…

2

Answers


  1. To get details about your item sold on eBay:

    You need to get the Trading API and specifically getOrders() operation.

    Login or Signup to reply.
  2. it’s took a lot of reading…and finaly.

    Yes I use Trading API.
    If you use eBay Acellerator Toolkit for PHP, in documentation there was an example for GetSellerTransactions – which returns a list of all items for selling with additional info for statuses and etc.

    echo "<pre>";
    print_r("begin");
    
    
    require_once '../EbatNs/EbatNs_ServiceProxy.php';
    require_once '../EbatNs/EbatNs_Logger.php';
    require_once '../EbatNs/GetSellerTransactionsRequestType.php';
    require_once '../EbatNs/GetSellerTransactionsResponseType.php';
    $session = new EbatNs_Session('config/ebay.config.php');
    $cs = new EbatNs_ServiceProxy($session);
    
    //$cs->attachLogger(new EbatNs_Logger(true));
    $req = new GetSellerTransactionsRequestType();
    $now = time();
    $start = $now - (3600 * 24 * 30);
    $end = $start + (3600 * 24 * 30);
    // period 60 days
    $req->ModTimeFrom = gmdate('Y-m-d H:i:s', $start);
    $req->ModTimeTo = gmdate('Y-m-d H:i:s', $end);
    $req->DetailLevel = $Facet_DetailLevelCodeType->ReturnAll;
    
    //#type $res GetSellerTransactionsResponseType
    $res = $cs->GetSellerTransactions($req);
    if ($res->Ack == $Facet_AckCodeType->Success)
    {
    echo "<pre>";
    print_r($res);
    } else
    {
    echo "<pre>failure:";
    print_r($res);
    
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search