You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

调用eBay Merchandising SDK的getTopSellingProducts接口报错求助

eBay Merchandising API getTopSellingProducts 接口404问题

我运行以下代码可正常获取响应:

from ebaysdk.merchandising import Connection as Merchandising
try:
    api = Merchandising(appid="YOUR_APPID", config_file=None)
    response = api.execute('getMostWatchedItems', {'maxResults': 10})
    print(response.dict())
    print(response.reply)
except ConnectionError as e:
    print(e)
    print(e.response.dict())

但将接口调用改为getTopSellingProducts后:

response = api.execute('getTopSellingProducts', {'maxResults': 10})

出现错误:

ebaysdk.exception.ConnectionError: 'getTopSellingProducts: Not Found'

我已确认密钥配置正确,且SDK文档显示该接口应被支持。作为API新手,我试过ChatGPT但未解决问题。

5月26日更新:
我尝试直接调用API,以下代码能正常响应:

url = "https://svcs.ebay.com/MerchandisingService?OPERATION-NAME=getMostWatchedItems&REST-PAYLOAD"
headers = {
'SERVICE-NAME':'MerchandisingService', 
"SERVICE-VERSION": "1.1.0",
"CONSUMER-ID": "<my APP ID>",
"RESPONSE-DATA-FORMAT":"XML",
"maxResults": "3"}

但将OPERATION-NAME替换为getTopSellingProducts后返回404。对比eBay官方提供的两个接口示例格式几乎一致,无法定位问题,请求帮助。

内容的提问来源于stack exchange,提问作者JohnRees77

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 16:08:19