skip to Main Content

I am trying to create url request to ebay to get the item specification
like screen size, cpu, and so on.
tried to look on ebay document but didn’t find how to do that,

Hope you can help!

Thanks!

2

Answers


  1. Without looking at your code i can only suggest you this which will all active items with all details:

    $feed = <<< EOD
    <?xml version="1.0" encoding="utf-8"?>
    <GetMyeBaySellingRequest xmlns="urn:ebay:apis:eBLBaseComponents">
    <RequesterCredentials>
    <eBayAuthToken>$eBay->auth_token</eBayAuthToken>
    </RequesterCredentials>
    <ActiveList>
    <Sort>Title</Sort>
    <IncludeNotes>FALSE</IncludeNotes>
    <Pagination><EntriesPerPage>200</EntriesPerPage>
    <PageNumber>$pageNo</PageNumber>
    </Pagination>
    </ActiveList>
    <HideVariations>FALSE</HideVariations>
    <DetailLevel>ReturnAll</DetailLevel>
    <MessageID>1</MessageID>
    <Version>$eBay->api_version</Version>
    <WarningLevel>High</WarningLevel>
    </GetMyeBaySellingRequest>​
    EOD;
    
    $feed = trim($feed);
            $site_id = 3;//3 For UK
            $headers = array
                (
                'X-EBAY-API-COMPATIBILITY-LEVEL: ' . $this->api_version,
                'X-EBAY-API-DEV-NAME: ' . $this->dev_id,
                'X-EBAY-API-APP-NAME: ' . $this->app_id,
                'X-EBAY-API-CERT-NAME: ' . $this->cert_id,
                'X-EBAY-API-CALL-NAME: ' . $call_name,
                'X-EBAY-API-SITEID: ' . $site_id,
            );
    
            // Send request to eBay and load response in $response
            $connection = curl_init();
            curl_setopt($connection, CURLOPT_URL, $this->api_endpoint);
            curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
            curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
            curl_setopt($connection, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($connection, CURLOPT_POST, 1);
            curl_setopt($connection, CURLOPT_POSTFIELDS, $feed);
            curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
            $response = curl_exec($connection);
            curl_close($connection);
    
    Login or Signup to reply.
  2. GetItem is what you’re looking for, with IncludeItemSpecifics set to true.

    Or, a lighter API call using GetSingleItem from the Shopping API, with IncludeSelector set to ItemSpecifics.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search