[英]How to search for products by UPC using python bindings for Ebay's findItemsByProduct API?
我正在尝试使用EBay 的 Product Find Items by Product ID通过 UPC 查找产品,特别是使用Python bindings 。
我想:
api = Connection(
appid='my id', config_file=None)
response = api.execute('findItemsByProduct', {
'productId': 820103794923,
'itemFilter': [
{'name': 'MinQuantity', 'value': 1},
但我得到:
{'ack': 'Failure', 'errorMessage': {'error': {'errorId': '4', 'domain': 'Marketplace', 'severity': 'Error', 'category': 'Request', 'message': 'Product ID is required.', 'subdomain': 'Search'}}, 'version': '1.13.0', 'timestamp': datetime.datetime(2020, 3, 24, 21, 46, 52)}
正确的论点是什么?
api = Connection(config_file=yaml_path)
response = api.execute('findItemsByProduct',
'<productId type="ReferenceID">820103794923</productId><itemFilter><name>MinQuantity</name><value>1</value></itemFilter>')
response.reply
{'ack': '成功', 'version': '1.13.0', 'timestamp': datetime.datetime(2020, 3, 26, 10, 13, 10), 'searchResult': {'_count': ' 0'}, 'paginationOutput': {'pageNumber': '0', 'entriesPerPage': '100', 'totalPages': '0', 'totalEntries': '0'}, 'itemSearchURL': ' https:// /www.ebay.com/sch/?_samilow=1&_LH_MIL=1&_ddo=1&_ipg=100&_pgn=1&_productid=820103794923 '}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.