POST https://seller-api.playerauctions.com/api/v1/offers/bulk-upload
用Excel文件批量上传
i. 请求参数
表单参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| file | file | 是 | 载有商品数据的Excel格式上传文件。文件模板可从 api/v1/offers/bulk-template 接口下载. |
| productType | string | 是 | 产品类别: "currency"(货币), "items"(装备), 或 "accounts"(账号). |
ii. 响应示例
成功响应
{
"code": 10000,
"message": "",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"data": {
"offerTotalCount": 3,
"offers": [
{
"offerId": 71394128,
"serverName": "WoW - Aegwynn - Alliance",
"offerTitle": "Selling 1000G-50000G cheap! In stock; Buy Now!",
"offerTitleUrl": "https://www-sandbox.playerauctions.com/wow-gold/71394128c!selling-1000g50000g-cheap-in-stock-buy-now/",
"offerPrice": "$16.99",
"offerPriceUnit": "per 500 K Gold"
},
{
"offerId": 71394129,
"serverName": "WoW - Aegwynn - Horde",
"offerTitle": "Selling 1000G-50000G cheap! In stock; Buy Now!",
"offerTitleUrl": "https://www-sandbox.playerauctions.com/wow-gold/71394129c!selling-1000g50000g-cheap-in-stock-buy-now/",
"offerPrice": "$16.99",
"offerPriceUnit": "per 500 K Gold"
},
{
"offerId": 71394130,
"serverName": "WoW - Aerie Peak - Alliance",
"offerTitle": "Selling 1000G-50000G cheap! In stock; Buy Now!",
"offerTitleUrl": "https://www-sandbox.playerauctions.com/wow-gold/71394130c!selling-1000g50000g-cheap-in-stock-buy-now/",
"offerPrice": "$16.99",
"offerPriceUnit": "per 500 K Gold"
}
]
}
}
响应参数
| 参数 | 类型 | 描述 |
|---|---|---|
| code | int | 响应代码。10000 表示成功, 其它值为报错。 |
| message | string | 响应信息及报错详情。 |
| requestId | string | 请求标识号, 用以追溯。 |
| data.offerTotalCount | int | 上传商品总数。 |
| data.offers | array | 成功创建的商品列表。 |
| data.offers[].offerId | int | 商品编号。 |
| data.offers[].serverName | string | 服务器。 |
| data.offers[].offerTitle | string | 标题。 |
| data.offers[].offerTitleUrl | string | 链接。 |
| data.offers[].offerPrice | string | 总价。 |
| data.offers[].offerPriceUnit | string | 每份单价。 |
iii. 报错示例
响应报错
{
"code": 10002,
"message": "Invalid parameter.",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}常见报错代码
| 参数 | 类型 | 描述 |
|---|---|---|
| code | int | 报错代码。 常见值: 10002 (无效参数), 50001 (服务器内部错误)。 |
| message | string | 报错详情。 |
| requestId | string | 请求标识号,用以追溯。 |