添加-商品
POST
/goods添加-商品
请求参数
Header 参数
Authorization
string
必需
token字符串 例如: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE2NTc5Nzg4MjAsImV4cCI6MTY1ODA2NTIyMH0.Pr_IVEw-H4gXY8fNjJpG6YpUlRqCmlEgvfepkUYa3nk
示例值:
{{Pin_ACCESS_TOKEN}}
Body 参数application/json
goods_name
string
必需
goods_price
string
必需
goods_weight
string
必需
goods_number
string
必需
goods_cat
string
必需
pics
array[string]
必需
goods_introduce
string
必需
attrs
array [object {2}]
必需
attr_id
integer
必需
attr_value
string
必需
示例
{
"goods_name": "123",
"goods_price": "12",
"goods_weight": "12",
"goods_number": "12",
"goods_cat": "1,3,6",
"pics": [],
"goods_introduce": "<p>123123</p>",
"attrs": [
{
"attr_id": 3077,
"attr_value": "49吋4K超薄曲面 人工智能,55吋4K观影曲面 30核HDR,55吋4K超薄曲面 人工智能,65吋4K超薄曲面 人工智能"
},
{
"attr_id": 3068,
"attr_value": "TCL电视 55A950C"
},
{
"attr_id": 3069,
"attr_value": "是"
},
{
"attr_id": 3070,
"attr_value": "智能电视"
},
{
"attr_id": 3071,
"attr_value": "支持"
},
{
"attr_id": 3072,
"attr_value": "120瓦特"
},
{
"attr_id": 3073,
"attr_value": "有"
},
{
"attr_id": 3074,
"attr_value": "2个"
},
{
"attr_id": 3075,
"attr_value": "支持"
},
{
"attr_id": 3076,
"attr_value": "支持"
}
]
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
data
object
必需
goods_id
integer
商品id
cat_id
string
商品分类id
goods_name
string
商品名字
goods_price
integer
商品价格
goods_number
integer
商品数量
goods_weight
integer
商品重量
goods_introduce
string
商品介绍
goods_big_logo
string
商品大图地址
goods_small_logo
string
商品小图地址
goods_state
null
商品状态
is_del
string
商品是否被删除
add_time
integer
商品创建时间
upd_time
integer
商品更新时间
delete_time
null
商品删除时间
hot_mumber
integer
商品热销数量
is_promote
boolean
商品是否促销
cat_one_id
string
商品一级分类id
cat_two_id
string
商品二级分类id
cat_three_id
string
商品三级分类
goods_cat
string
商品分类集合标记
pics
array[string]
必需
attrs
array [object {8}]
商品属性
meta
object
响应提示
msg
string
响应消息
status
integer
业务状态码
200成功, 其他失败
示例
成功示例
{
"data": {
"goods_id": 941,
"cat_id": "6",
"goods_name": "1231",
"goods_price": 12,
"goods_number": 12,
"goods_weight": 12,
"goods_introduce": "<p>123123</p>",
"goods_big_logo": "",
"goods_small_logo": "",
"goods_state": null,
"is_del": "0",
"add_time": 1658588711,
"upd_time": 1658588711,
"delete_time": null,
"hot_mumber": 0,
"is_promote": false,
"cat_one_id": "1",
"cat_two_id": "3",
"cat_three_id": "6",
"goods_cat": "1,3,6",
"pics": [],
"attrs": [
{
"goods_id": 941,
"attr_id": 3068,
"attr_value": "TCL电视 55A950C",
"add_price": null,
"attr_name": "主体-商品名称",
"attr_sel": "only",
"attr_write": "manual",
"attr_vals": "TCL电视 55A950C"
},
{
"goods_id": 941,
"attr_id": 3073,
"attr_value": "有",
"add_price": null,
"attr_name": "端口-模拟RF接口",
"attr_sel": "only",
"attr_write": "manual",
"attr_vals": "有"
},
{
"goods_id": 941,
"attr_id": 3074,
"attr_value": "2个",
"add_price": null,
"attr_name": "音频-扬声器数量",
"attr_sel": "only",
"attr_write": "manual",
"attr_vals": "2个"
},
{
"goods_id": 941,
"attr_id": 3075,
"attr_value": "支持",
"add_price": null,
"attr_name": "交互设备-无线键鼠",
"attr_sel": "only",
"attr_write": "manual",
"attr_vals": "支持"
},
{
"goods_id": 941,
"attr_id": 3070,
"attr_value": "智能电视",
"add_price": null,
"attr_name": "系统-智能电视",
"attr_sel": "only",
"attr_write": "manual",
"attr_vals": "智能电视"
},
{
"goods_id": 941,
"attr_id": 3071,
"attr_value": "支持",
"add_price": null,
"attr_name": "外观-壁挂安装",
"attr_sel": "only",
"attr_write": "manual",
"attr_vals": "支持"
},
{
"goods_id": 941,
"attr_id": 3072,
"attr_value": "120瓦特",
"add_price": null,
"attr_name": "功耗-整机功率(W)",
"attr_sel": "only",
"attr_write": "manual",
"attr_vals": "120瓦特"
},
{
"goods_id": 941,
"attr_id": 3077,
"attr_value": "49吋4K超薄曲面 人工智能,55吋4K观影曲面 30核HDR,55吋4K超薄曲面 人工智能,65吋4K超薄曲面 人工智能",
"add_price": null,
"attr_name": "版式",
"attr_sel": "many",
"attr_write": "list",
"attr_vals": "49吋4K超薄曲面 人工智能,55吋4K观影曲面 30核HDR,55吋4K超薄曲面 人工智能,65吋4K超薄曲面 人工智能"
},
{
"goods_id": 941,
"attr_id": 3069,
"attr_value": "是",
"add_price": null,
"attr_name": "显示-曲面",
"attr_sel": "only",
"attr_write": "manual",
"attr_vals": "是"
},
{
"goods_id": 941,
"attr_id": 3076,
"attr_value": "支持",
"add_price": null,
"attr_name": "互联互通-多屏互动",
"attr_sel": "only",
"attr_write": "manual",
"attr_vals": "支持"
}
]
},
"meta": {
"msg": "创建商品成功",
"status": 201
}
}
最后修改时间: 2 年前