更新产品
本地
本地
PUT
http://127.0.0.1:9999/api/v1/product
产品管理
请求参数
Header 参数
x-token
string
可选
默认值:
{{x-token}}
Body 参数application/json
description
string
产品描述
<= 255 字符
id
string
产品id
<= 36 字符
name
string
产品名称
<= 255 字符
product_model
string
产品型号(编号)
image_url
string
产品图片地址
product_key
string
产品key
product_type
string
产品类型
device_config_id
string
设备配置
示例
{
"description": "string",
"id": "string",
"name": "string",
"product_model": "string",
"image_url": "string",
"product_key": "string",
"product_type": "string",
"device_config_id": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'http://127.0.0.1:9999/api/v1/product' \
--header 'x-token: {{x-token}}' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
name
string
产品名称
description
string
必需
product_type
string
产品类型
product_key
string
产品key
product_model
string
产品型号(编号)
image_url
string
图片地址
created_at
string
必需
remark
string
必需
additional_info
null
必需
tenant_id
string
必需
device_config_id
string
必需
示例
{
"code": 200,
"message": "Update product successfully",
"data": {
"id": "2dee3c7d-f7e1-8704-53fe-599d40d85207",
"name": "光美传感器",
"description": "xxxxxxxxxxxxxxxxx",
"product_type": "23213",
"product_key": "1",
"product_model": "xxxxxxx",
"image_url": "./xxx/xx.png",
"created_at": "2024-01-12T23:38:52.095064Z",
"remark": "12312444",
"additional_info": null,
"tenant_id": "2f4306df",
"device_config_id": "a54d83e7-2858-8331-3783-f936c4198a66"
}
}
修改于 2024-08-27 05:11:35