PUThttps://seller-api.playerauctions.com/api/v1/offers/currency
更新已有的货币商品。
i. 请求示例
{
"offerId": 71394132,
"gameId": 3637,
"title": "Simple Title Update",
"offerDesc": "<p>Simple Description Update</p>",
"offerDuration": 30,
"price": 5,
"categoryId": 6590,
"instruction": "simple instruction",
"deliveryGuarantee": 101,
"totalUnit": 1000,
"minUnitPerOrder": 1,
"discounts": [
{
"startPrice": 10,
"discountRate": 2
},
{
"startPrice": 20,
"discountRate": 4
},
{
"startPrice": 50,
"discountRate": 8
}
],
"currencyPerUnit": 110
}
ii. 请求参数
请求体参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| offerId | int | 是 | 需编辑的商品ID。 |
| gameId | int | 是 | 游戏ID。 |
| price | decimal | 是 | 每份单价。 |
| offerDuration | int | 是 | 商品有效期天数。可选值:3, 7, 14, 或30。 |
| agreeCheck | 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": 71394133,
"navigateURL": "https://www-sandbox.playerauctions.com/lol-riot-points/71394133c!simple-title-update/",
"title": "Simple Title Update",
"productType": "currency",
"gameName": "League of Legends",
"productName": "Currency",
"screenShot": "https://cdn-image.azureedge.net/title-image/liutest6/202606090157435744.png",
"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.imageBlacklist | string | 商品图片黑名单标识。该字段为空表示未加入黑名单。 |
iv. 报错示例
响应报错
{
"code": 10002,
"message": "Invalid parameter.",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}常见报错代码
| 参数 | 类型 | 描述 |
|---|---|---|
| code | int | 报错代码。 常见值: 10002 (无效参数), 50001 (服务器内部错误)。 |
| message | string | 报错详情。 |
| requestId | string | 请求标识号,用以追溯。 |