创建产品
POST
/api/v1/product创建产品
请求参数
Body 参数application/json
additional_info
string
附加信息
description
string
产品描述
<= 255 字符
image_url
string
产品图片
<= 500 字符
name
string
产品名称
<= 255 字符
product_key
string
可选
产品key,为空后端自动生成
<= 255 字符
product_model
string
产品型号
<= 100 字符
product_type
string
产品类型
<= 36 字符
remark
string
备注
<= 255 字符
device_config_id
string
设备配置id
示例
{
"name": "xxxxxxxx",
"description": "xxxxxxxxxxxxx",
"product_type": "xxxxxx",
"image_url": "http://dummyimage.com/400x400",
"additional_info": "{}",
"remark": "in irure fugiat",
"product_model": "xxxxxxxx",
"product_key": "",
"device_config_id": "a54d83e7-2858-8331-3783-f936c4198a66"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
name
string
必需
description
string
必需
product_type
string
必需
product_key
string
必需
product_model
string
必需
image_url
string
必需
created_at
string
必需
remark
string
必需
additional_info
string
必需
tenant_id
string
必需
device_config_id
string
必需
示例
{
"code": 200,
"message": "Create product successfully",
"data": {
"id": "bfc5806a-e5f2-2f5e-d081-19c3d84f389e",
"name": "xxxxxxxx",
"description": "xxxxxxxxxxxxx",
"product_type": "xxxxxx",
"product_key": "bfc5806a",
"product_model": "xxxxxxxx",
"image_url": "http://dummyimage.com/400x400",
"created_at": "2024-03-05T15:10:37.1315434+08:00",
"remark": "in irure fugiat",
"additional_info": "{}",
"tenant_id": "2f4306df",
"device_config_id": "a54d83e7-2858-8331-3783-f936c4198a66"
}
}
最后修改时间: 8 个月前