.netebay-apiebay-sdk

eBay Shopping API for .NET?


I've been looking around trying to find a .NET release of the eBay Shopping API. Is there any?


Solution

  • The link you provided states:

    Supported Features

    Formats: XML, SOAP, Name Value, JSON

    Protocols: HTTP GET (REST) and POST"

    It's a web service. You don't need a particular ".Net API". Just make a call to the webpage and handle the return value.

    Example using information on this page

    var xml = http://open.api.ebay.com/shopping?callname=FindProducts&responseencoding=XML&appid=YourAppId&siteid=0&QueryKeywords=harry%20potter&AvailableItemsOnly=true&MaxEntries=2&version=787
    //parse the xml...
    

    Of course you would need to use valid data. If you try using this as is you'll get an error xml response:

    <FindProductsResponse xmlns="urn:ebay:apis:eBLBaseComponents">
            <Timestamp>2012-09-09T07:03:43.405Z</Timestamp>
            <Ack>Failure</Ack>
        <Errors>
            <ShortMessage>Application ID invalid.</ShortMessage>
            <LongMessage>Application ID invalid.</LongMessage>
            <ErrorCode>1.20</ErrorCode>
            <SeverityCode>Error</SeverityCode>
            <ErrorClassification>RequestError</ErrorClassification>
        </Errors>
        <Build>E789_CORE_BUNDLED_15285085_R1</Build>
        <Version>789</Version>
    </FindProductsResponse>
    

    However the whole point of this is that you send eBay some data via a query string and they return you xml.

    This is the url used in the example above.