Open austinpgraham opened 5 years ago
If anyone stumbles upon this, findItemsByProduct is straight broken. Use findItemsAdvanced instead with keyword=UPC/MPN/ISBN/etc
@austinpgraham
The productid type is most likely the issue. From your code it requires an eBay Product ID (ePID). See Ref.
Here is a modified version of your code. I am using ebay product id, it worked.
class EbayFetcher():
def __init__(self, appid, domain):
self.appID = appid
self.domain = domain
self.api = Finding(appid=self.appID,
domain=self.domain,
config_file=None)
def fetch_product(self, identifier):
arg = '<productId type="ReferenceID">{}</productId>'.format(identifier)
response = self.api.execute('findItemsByProduct', arg)
return response.dict() if response.reply.ack == "Success" else None
if __name__ == '__main__':
ePID = '4032159822'
a = EbayFetcher(appids['production'], domains['production'])
result = a.fetch_product(ePID)
print(f'result: {result}')
Can you post an ebay product id that does not work in your case?
Ref: https://developer.ebay.com/DevZone/finding/CallRef/findItemsByProduct.html
Here is a small snippet of code:
When playing with this, I find the majority of the time I get an item not found error (invalid numeric value I believe is the exact text). Is there something obviously wrong here?