Posthttps://seller-api.playerauctions.com/api/v1/offers/currency
为货币商品创建报价单。
i. 请求示例
{
"gameId": 3637,
"title": "Good Price Title",
"offerDesc": "<p>Good Price Description</p>",
"offerDuration": 30,
"isAgree": true,
"price": 5,
"categoryId": 3638,
"instruction": "simple instruction",
"deliveryGuarantee": 5,
"totalUnit": 100,
"minUnitPerOrder": 1,
"discounts": [
{
"startPrice": 10,
"discountRate": 2
},
{
"startPrice": 20,
"discountRate": 4
},
{
"startPrice": 50,
"discountRate": 8
}
],
"currencyPerUnit": 100
}ii. 请求参数
请求体参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| gameId | int | 是 | 游戏ID。 |
| price | decimal | 是 | 每份单价。 |
| offerDuration | int | 是 | 商品有效期天数。可选值: 3, 7, 14, 或30. |
| isAgree | boolean | 是 | 已同意 [Secure Seller Delivery Agreement] (用户发货安全协议)。必须为true(真). |
| title | string | 是 | 商品标题。 |
| offerDesc | string | 否 | 商品描述。 |
| minUnitPerOrder | int | 是 | 每单最少购买份数。 |
| totalUnit | int | 是 | 总份数。 |
| currencyPerUnit | int | 是 | 每份货币数量。 |
| instruction | string | 否 | 发货说明。 |
| deliveryGuarantee | int | 是 | 发货期限。通过 customId 设置赋值。选项列表可通过(api/v1/games/{id}/{type}/deliveryTimes)接口获取。 |
| categoryId | int | 是 | 叶子节点 ID。服务器树形结构数据可通过 (api/v1/games/{id}/{type}/servers) 接口获取。 |
| discounts | array | 否 | 折扣规则。 |
| discounts[0].startPrice | int | 是 | 折扣起始价格。 |
| discounts[0].discountRate | int | 是 | 折扣率。 |
iii. 响应示例
成功响应
{
"code": 10000,
"message": "",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"data": {
"offerId": 71394132,
"navigateURL": "https://www.playerauctions.com/lol-riot-points/71394132c!simple-title/",
"title": "Simple Title",
"productType": "currency",
"gameName": "League of Legends",
"productName": "Currency",
"screenShot": "https://cdn-image.azureedge.net/title-image/liutest6/202606090157435744.png",
"recentLable": "LOL Riot Points",
"recentURL": "/offerCreation/?gameid=3637&type=currency",
"imageBlacklist": ""
}
}
响应参数
| 参数 | 类型 | 描述 |
|---|---|---|
| code | int | 响应状态码。 10000表示成功,其他值表示发生错误。 |
| message | string | 响应消息。 当请求失败时,该字段会包含具体的错误详情。 |
| requestId | string | 请求标识号,用以追溯。 |
| data.offerId | int | 新创建的商品 ID。 |
| data.navigateURL | string | 新创建的商品链接。 |
| data.title | string | 商品标题。 |
| data.productType | string | 商品类型。 |
| data.gameName | string | 游戏名称。 |
| data.productName | string | 商品名称。 |
| data.screenShot | string | 商品截图链接。 |
| data.recentLable | string | 商品最新标签。 |
| data.recentURL | string | 商品最新链接。 |
| data.imageBlacklist | string | 商品图片黑名单。 |
iv. 报错示例
响应报错
{
"code": 10002,
"message": "Invalid parameter.",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}常见报错代码
| 参数 | 类型 | 描述 |
|---|---|---|
| code | int | 报错代码。 常见值: 10002 (无效参数), 50001 (服务器内部错误). |
| message | string | 报错详情。 |
| requestId | string | 请求标识号,用以追溯。 |