All Products
Search
Document Center

Marketplace:SaveDeviceProp

Last Updated:Mar 25, 2025

Important

DISCLAIMER

Please note that all content presented on this page is provided by Tuya (HK) Limited. Alibaba Cloud makes no representations and warranties, explicit or implied, as to the authenticity or accuracy of any such content, nor makes any guarantee to the condition, quality, durability, performance, reliability, merchantability or fitness for a particular purpose, or non-infringement of any products and/or services made available by Tuya (HK) Limited. 

Call this interface to set the label for the specified device.

Instructions for use

●The total number of device tags for a single device does not exceed 100. ●The number of equipment tags modified or added at a time does not exceed 100.

Request Parameters

Name

Type

Required

Sample Values

Description

Action

String

Yes

SaveDeviceProp

System defined parameters. Value: SaveDeviceProp.

Props

String

Yes

{"color":"red"}

The device tag to be set. Multiple tags are supported. Device tags are in JSON format. The specific structure of each tag is as follows: Key:Value . Key is the label name, ValueIs the corresponding tag value. Multiple labels are separated by half-angle commas, such Props={"color":"red","shape":"round"} .

ProductKey

String

No

A1BwAGV * * * *

The ProductKey of the product to which the device belongs.

DeviceName

String

No

Light

The device name.

IoTID

String

No

**** 00100

The device ID. The ID issued by IoT platform for the device. The unique identifier of the device.

Note: When calling an API, in addition to the API-specific request parameters described in this topic, you must also pass in the common request parameters. For more information about common request parameters, see Common parameters.

Return data

Name

Type

Sample Values

Description

Code

String

Iot.system.SystemException

The error code returned when the call fails. For more information, see Error codes.

ErrorMessage

String

System Exception

Error information returned when the call fails.

RequestID

String

E55E50B7-40EE-4B6B-8BBE-D3ED55CCF565

The unique identifier generated for this request.

Success

Boolean

True

Indicates whether the call succeeded. ●True : The call succeeded. ●False : The call failed.

Example

Request Example

curl 'https://si-d6e8d812acb848958054.tuyacloud.com:8686/?Action=SaveDeviceProp&SignatureNonce=54dbd8cf9ffa4e448b87f9283499f290&AccessKeyId=xMr9wgwXQLhv5AUa65o03mcD&SignatureMethod=HMAC-SHA1&Props=%7B%22color%22%3A%22red%22%7D&Timestamp=2024-11-19T08%3A42%3A04Z&ProductKey=k1ymv1DuLfE&DeviceName=myTestDevice&Signature=8Z9ZAjG4BUAq987AilVJRVnWVh0%3D'

Normal return example

{
    "RequestId":"57b144cf-09fc-4916-a272-a62902d5b207",
    "Success": true
}