question

andremeneze7 avatar image
0 Likes"
andremeneze7 asked ·

How do I use findItemsBy Product with python?

Sorry if this is a repost I tried to search the forum first but I kept getting redirected to a different page for some reason. I am new to the eBay SDK and I have been trying to use findItemsByProduct, I tried to figure it out using the documentation and https://gist.github.com/davidtsadler/6993747 but I keep getting error '4' , telling me that the product id is required. I'm pretty sure its the second line of the try statement giving me trouble. from ebaysdk.exception import ConnectionError from ebaysdk.finding import Connection productId try: api = Connection(appid='appid, config_file=None) response = api.execute('findItemsByProduct', { 'productId':'3110280'}) dictstr = api.response.dict() print(dictstr) # assert (response.reply.ack == 'Success') except ConnectionError as e: print(e) print(e.response.dict()) I have also tried the following and a few other things in place of the second line of the try statement response = api.execute('findItemsAdvanced', { 'Keyword': 'the','productId.type': 'ReferenceID','ReferenceID.value':'3110280'}) response = api.execute('findItemsByProduct', { 'ePID':'3110280'}) response = api.execute('findItemsByProduct',{'productId' : { 'type': 'ReferenceID', 'text': '3110280'}}) response = api.execute('findItemsByProduct',{'productId' : { 'type': 'ReferenceID', 'value': '3110280'}}) Also if there is anywhere I could look for more Python specific information on how to use the API or whatever is needed that would be very helpful as I can only find XML, HTML and, JSON examples in the documentation and I don't really know how to convert between the two, maybe because I have primarily used Python for Data science before.
pythonfinditemsbyproduct
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
shopperchops avatar image
0 Likes"
shopperchops answered ·
I got stuck with the same thing, gave up on using JSON and reverted to using URL parameters, then just happened to read this: https://developer.ebay.com/devzone/finding/Concepts/MakingACall.html#jsonsyntax
· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.