Last Updated on : 2023-06-21 07:13:12download
Add the data of an industrial device that is connected to Tuya's IoT cloud services.
POST: /v1.1/iot-03/si/devices
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
tuya_device_id | String | true | The ID of a Tuya device. | |
device_code | String | true | The unique code of a specified device. | |
device_name | String | true | The device name. | |
device_type_code | String | true | The code of a specified device type. | |
device_model_code | String | true | The code of a specified device model. | |
customer_code | String | false | The code of a specified customer. | |
production_time | Long | false | The production time. | |
batch_number | String | false | The device batch number. | |
sale_time | Long | false | The sales time. | |
sale_address | String | false | The detailed sales address. | |
sale_longitude | String | false | The longitude of a specified sales address. | |
sale_latitude | String | false | The latitude of a specified sales address. | |
real_time_positioning | Boolean | false | Indicates whether the device can be located in real time. | |
device_properties | List | false | The special attributes of a specified device. |
Description of device_properties
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
name | String | false | The name of a specified attribute. | |
code | String | false | The code of a specified attribute. | |
value | String | false | The value of a specified attribute. |
Parameter name | Type | Description |
---|---|---|
result | Boolean | The returned result. |
POST: /v1.1/iot-03/si/devices
{
"tuya_device_id": "vdevo******",
"device_code": "C1",
"device_name": "Machine Tool",
"device_type_code": "mac",
"device_model_code": "mac001",
"customer_code": "VIP001",
"production_time": 1637204299000,
"batch_number": "1",
"sale_time": 1637204299000,
"sale_address": "Zhejiang***",
"sale_longitude": "12****",
"sale_latitude": "3*****",
"real_time_positioning": true,
"device_properties": [
{
"name": "Height",
"code": "high",
"value": "300"
}
]
}
{
"result": true,
"t": 1634648181838,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback