Open NathanZorndorf opened 7 years ago
Okay, so I figured out the problem.
The problem is that the header field X-EBAY-SOA-SERVICE-VERSION
was set to 1.0.0.
If I use 1.13.0, I get the correct response with a sellingState value of 'EndedWithSales'. I think you can set the version used in the ebay.yaml file, but when I set the version in there, the header value was still 1.0.0. So I went to the source code, into the connection.py
file and in the execute_request
function definition, and hardcoded the version in like so:
self.request.headers["X-EBAY-SOA-SERVICE-VERSION"] = '1.13.0'
You can view the correct response here: https://snag.gy/WH1GD4.jpg
So I think it's important to make a note in the README to change that version number to 1.13.0 (the latest version as of writing this), or just change that version number in the source code so that future users will start off with a more recent version.
Hello, I have discovered what I believe to be a bug within the ebay SDK. The root of the problem is that all calls using findCompletedItems return the value 'Ended' in the sellingState field, even when the value should be something else, like 'EndedWithSales'.
For example, when I use the SDK to make a call with findCompletedItems and the itemID 222461424089 as the 'keyword' field like so:
I get the following response: https://snag.gy/njieTa.jpg As you can see, the sellingState is 'Ended'.
If you check the item on ebay, you can see that the item has the sellingState 'Sold' (check the listing image), so the sellingState should be 'EndedWithSales'.
I can confirm that the sellingState should be 'EndedWithSales' because when I send a findCompletedItems request without the python ebaySDK, the response has sellingState 'EndedWithSales'. Here's the XML from the response.
The query I use to get that response is:
http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findCompletedItems&SERVICE-VERSION=1.7.0&SECURITY-APPNAME=APPID&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&keywords=222461424089
(with APPID replaced with my APP ID).Is anyone able to replicate this behavior?
Here are the header, body, method, and url attributes of the of the self.request attribute of the BaseConnection class in connection.py, when I run
api.execute('findCompletedItems', api_request)
withapi_request={'keywords': 222461424089
}:This behavior - returning incorrect sellingState - is not only happening for this particular item. Every responses I get using 'findCompletedItems' returns 'Ended' as the sellingState, never 'EndedWithSales'. The same thing happens when i use getSingleItem.
I'm wondering if I'm doing something wrong? Any input is greatly appreciated. Other than this issue the SDK works well.
Thanks, Nathan
p.s. I made a thread about the issue on the ebay dev forums [here].(https://forums.developer.ebay.com/questions/20154/how-to-find-sellingstate-when-using-findcompletedi.html).