文档
测试

编辑商品-V2

POST
/admin/products/products/api/updateitem

接口描述

根据主键prdid编辑

请求头

参数名
类型
描述
必填
Cookie
String
必填
Content-Type
application/json
application/json
必填

请求参数

参数名
类型
描述
必填
prdid
string
主键id
必填
prdname
string
商品名称,示例:test
可选
prdno
string
商品编号,示例:210100200300015
必填
catid
string
商品分类编号示例:1003
必填
brand
string
品牌,示例:123
可选
promot_title
string
促销标题
必填
delivery_time
string
发货时间说明
可选
specification
string
规格
可选
mallid
string
店铺ID,平台为null
可选
introduction
string
商品介绍
可选
audit
string
审核状态,0:未审,1:已审
必填
saletime1
int
作假数据,商城看到的销量加这个数
可选
stockTotal
int
商品所有库存的汇总
必填
stockSafe
int
安全库存
可选
cost
BigDecimal
成本价
可选
price_money
BigDecimal
购买所需单价(钱,单位:元)
必填
price_point
BigDecimal
'购买所需积分
必填
marking_price
BigDecimal
划线价
必填
mainimage
string
主图片url,示例:https://fdl-oss.oss-cn-hangzhou.aliyuncs.com/tmp/products/2021/07/18/products_2021-07-18_11-22-05_80136.jpg
必填
file
string
示例:
可选
ship_type
string
0:无需运送, 1:快递,2:自提, 3:快递+自提,默认1
必填
ship_fee
int
邮费,0为免邮
必填
images
string
图片素材,多个间用;分隔,示例:https://fdl-oss.oss-cn-hangzhou.aliyuncs.com/tmp/products/2021/07/18/products_2021-07-18_11-22-16_87905.jpg;https://fdl-oss.oss-cn-hangzhou.aliyuncs.com/tmp/products/2021/07/19/product
必填
description
string
详情介绍描述,示例:<p>1231<img style="max-width: 100%;" src="https://fdl-oss.oss-cn-hangzhou.aliyuncs.com/tmp/att/2021/07/19/att_2021-07-19_06-27-03_44785.png" />1</p><p><img style="max-width: 100%;" src="http
必填
status
int
0,未上架 1, 已上架
必填
catname
string
最后一级的分类名称,示例:美妆个护
必填
supplier_name
string
供应商名称
必填
supplier_code
string
供应商编号
必填
merchantInfoId
Integer
商家唯一标识
可选
discountType
Integer
折扣方式,1:固定折扣率、2:随机折扣率
可选
discount
String
折扣,如果是范围时,用;隔开
可选
isvirtual
Integer
是否虚拟商品,选择分类时带过来.0-实物商品,1-虚拟商品
可选
productSkuList
array
商品sku数据
可选
skuCode
String
SKU编码
可选
cost
BigDecimal
成本价
可选
priceMoney
BigDecimal
购买所需单价(钱),单位元
可选
markingPrice
BigDecimal
划线价
可选
skuImg
String
sku 图片素材
可选
stock
Integer
库存
可选
prdSpeId
String
关联商品规格prdSpeId字段,多个用英文逗号隔开
可选

响应参数

参数名
类型
描述
必填
result
int
0--成功,其他--失败。示例:0
必填
data
object
示例:null
必填
msg
string
提示信息,示例:OK
必填

说明 / 示例

请求参数示例: ``` { "prdno": "210100200300016", "prdname": "测试", "supplier_code": "002", "placeOfOrigin": "01", "catid": "1003", "brand": "", "promot_title": "", "delivery_time": "", "specification": "", "mallid": "", "introduction": "", "audit": "0", "saletime1": 0, "stockTotal": 0, "stockSafe": 0, "price_point": 0, "mainimage": "https://fdl-oss.oss-cn-hangzhou.aliyuncs.com/tmp/products/2021/07/22/products_2021-07-22_10-52-36_45863.png", "file": "", "ship_type": "1", "ship_fee": 0, "images": "https://fdl-oss.oss-cn-hangzhou.aliyuncs.com/tmp/products/2021/07/22/products_2021-07-22_10-52-41_27762.png", "description": "<p><img style=\"max-width: 100%;\" src=\"https://fdl-oss.oss-cn-hangzhou.aliyuncs.com/tmp/att/2021/07/22/att_2021-07-22_10-52-48_99991.png\" /></p>", "status": 0, "catname": "美妆个护", "supplier_name": "002", "merchantInfoId":1, "discountType":1, "discount":"0.05", "isvirtual":1, "productSkuList": [ { "skuCode":"SK0001129207552", "cost":12, "priceMoney":12, "markingPrice":12, "skuImg":"https://fdl-oss.oss-cn-hangzhou.aliyuncs.com/tmp/products/2021/07/22/products_2021-07-22_10-52-36_45863.png", "stock":100, "prdSpeId": "4" }, { "cost":12, "priceMoney":12, "markingPrice":12, "skuImg":"https://fdl-oss.oss-cn-hangzhou.aliyuncs.com/tmp/products/2021/07/22/products_2021-07-22_10-52-36_45863.png", "stock":100, "prdSpeId": "5" } ] } ```