Skip to content
timotheus edited this page Feb 14, 2013 · 15 revisions

The eBay Trading API offers secure, authenticated access to private eBay data. Use the eBay Trading API to build applications such as selling and post-sales management applications, manage User information, and initiate the item purchase flow on eBay.

Usage

from ebaysdk import trading
api = trading(appid="YOUR_APPID", devid="YOUR_DEVID", certid="YOUR_CERTID", token="YOUR_AUTH_TOKEN")

Sandbox Usage

from ebaysdk import trading
api = trading(domain='api.sandbox.ebay.com', 
              appid="YOUR_APPID", devid="YOUR_DEVID", certid="YOUR_CERTID", token="YOUR_AUTH_TOKEN")

Public Methods

trading(**kwargs)

Keyword arguments to trading() constructor

domain        -- API endpoint (default: svcs.ebay.com)
config_file   -- YAML defaults (default: ebay.yaml)
debug         -- debugging enabled (default: False)
warnings      -- warnings enabled (default: False)
uri           -- API endpoint uri (default: /services/search/FindingService/v1)
appid         -- eBay application id
siteid        -- eBay country site id (default: EBAY-US)
compatibility -- version number (default: 1.0.0)
https         -- execute of https (default: False)
proxy_host    -- proxy hostname
proxy_port    -- proxy port number
timeout       -- HTTP request timeout (default: 20)
parallel      -- ebaysdk parallel object
response_encoding -- API encoding (default: XML)
request_encoding  -- API encoding (default: XML)

execute(verb, data)

Execute the HTTP request.

api.execute('GetUser', {})

error()

Returns a string of the HTTP call errors

if api.error():
    print "has errors: %s" % api.error()

response_dom()

Return a DOM object (xml.dom.minidom) of the HTTP response content.

response_dict()

Return a dictionary of the HTTP response content.

response_content()

Returns the string content from HTTP response call.

Trading API Use Cases

  • Unpaid Item Disputes
  • Listing Items
  • Retrieving the Category Hierarchy for a Site
  • Retrieving the Data for One Item
  • Retrieving the Order Line Items for a Single Item
  • Retrieving the Order Line Items for a Specific Seller
  • Retrieving User Information
  • Searching for Items
  • Working with Seller Events

see more

More Examples

Clone this wiki locally