On this page
更新商品规格
接口URL
请求方式
POST
Content-Type
json
请求Header参数
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
token | 2f...5e | Text | 是 | 用户token |
路径变量
参数名 | 示例值 | 参数描述 |
---|---|---|
id | 60 | 商品ID |
请求Body参数
json5
{
"sku_type": 1,
"sku_value": {
"oprice": 20,
"pprice": 30,
"cprice": 20,
"weight": 10,
"volume": 20
},
"goodsSkus": [
{
"skus": [
{
"goods_skus_card_id": "134",
"name": "颜色",
"order": 50,
"value": "黄色",
"id": "296",
"text": "黄色"
},
// ...
],
"image": "",
"pprice": 0,
"oprice": 0,
"cprice": 0,
"stock": 0,
"volume": 0,
"weight": 0,
"code": "",
"goods_id": 26
},
// ...
]
}
参数名 | 示例值 | 参数类型 | 参数描述 |
---|---|---|---|
sku_type | 1 | Number | 规格类型:0单规格1多规格 |
sku_value | { "oprice": 20, "pprice": 30, "cprice": 20, "weight": 10, "volume": 20 } | Object | 单规格属性(sku_type=0时必填) |
goodsSkus | [ { "skus": [ { "goods_skus_card_id": "134", "name": "颜色", "order": 50, "value": "黄色", "id": "296", "text": "黄色" } ], "image": "", "pprice": 0, "oprice": 0, "cprice": 0, "stock": 0, "volume": 0, "weight": 0, "code": "", "goods_id": 26 } ] | Array | 多规格属性(sku_type=1时必填):具体参考课程 |
成功响应示例
json5
{
"msg": "ok",
"data": 2
}