Search code examples
pythonebay-api

eBay API returning errorID 2000, Service operation GetItem is unknown


I am trying to send a request to the eBay API using the GetItem call, but I keep getting errorID 2000,

ebaysdk.exception.ConnectionError: 'GetItem: Internal Server Error, Domain: CoreRuntime, Severity: Error, errorId: 2000, Service operation GetItem is unknown'

which does not exist when looking on the API page that has the list of possible errors by number

I am trying to use the GetItem call, but it seems that the eBay API can not recognise it. After some reasearch I found that there is another call I could try, which is the GetSingleItem, but that does not seem to be recognised by the API either.

This is the code that I am using:

api_requests = {"ItemID": item_id}
response_get_item = api.execute("GetItem", api_requests)

Where the variable item_id is a normal 12 character string of numbers that do actually correspond to an item on eBay.


Solution

  • It turns out that I had forgot to import the "Connection" from ebaysdk.shopping and I was using the "Connection" from ebaysdk.finding from the previous bit of code.

    Old import statement:

    from ebaysdk.finding import Connection as finding
    

    New import statements:

    from ebaysdk.finding import Connection as finding
    from ebaysdk.shopping import Connection as shopping