易趣 API 'Invalid auction currency' 错误

eBay API 'Invalid auction currency' error

我正在尝试使用 SDK (ebaysdk-python) 通过他们的 API 添加 eBay 列表。我 运行 使用交易 API 沙箱对 sandbox.ebay.co.uk 进行测试。

我在 eBay.co.uk 上销售我的产品,我想以英镑指定价格。产品从波兰发货。使用这些参数,我对英镑货币有疑问。

item = {
            "Item": {
                ...
                "Country": "PL",
                "Currency": "GBP",
                "Site": "UK",
                ...
            }
        }

api.execute('AddItem', item)

我遇到一个错误:

AddItem: Class: RequestError, Severity: Error, Code: 95, Invalid auction currency. The auction currency specified does not match the auction currency for the selected site.

eBay API 文档说: http://developer.ebay.com/DevZone/XML/docs/Reference/ebay/types/SiteCodeType.html 所以设置似乎是正确的

参见:http://developer.ebay.com/DevZone/XML/docs/Reference/ebay/types/ItemType.html#Site

尝试设置 "Country": "GB" 并查看是否有帮助 - 如果有帮助,则错误是由于上面 link 中描述的 site/country/currency 确定逻辑。

此外,尝试像在波兰境内进行交易一样拨打电话,即 "Country": "PL", "Currency: PLN", "Site": "Poland",如果可行,则问题出在跨境交易上。

解决方案很明显。我没有把siteid: 3放在ebay.yaml,现在我可以用GBP作为货币了。

# eBay SDK Defaults

name: ebay_api_config

# Trading API Sandbox - https://www.x.com/developers/ebay/products/trading-api
api.sandbox.ebay.com:
    compatability: 719
    siteid: 3
    appid: xxx
    certid: xxx
    devid: xxx
    token: xxx