Contact Us
Log In

Update Device Information

Last Updated on : 2022-09-06 03:36:32

Update the device information based on the device ID.

API address

PUT: /v1.0/iot-03/3rdcloud/devices/{device_id}

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe ID of a Tuya device.

Description of body

Parameter nameTypeINRequiredDescription
device_nameStringbodyfalseThe name of a specified device, with no more than 50 characters.
optionsObjectbodyfalseThe extension information about a specified device. Valid values:
  • installLocation: installation location.
  • outProjectId: the project ID of the device in the partner cloud.
  • mac: the MAC address.
  • extendData: in JSON format, such as: {"roomNo":"16"}, where roomNo is the hotel room number.

Return parameter

Parameter nameTypeDescription
resultBooleanThe returned result.
codeBooleanThe response code. It is empty when the operation succeeded.
msgStringThe error message if the API call fails. It is empty if the operation succeeded.
successBooleanIndicates whether the operation is successful. Valid values:
  • true: success.
  • false: failure.
tLongThe 13-digit timestamp of a response.

Request example

PUT: /v1.0/iot-03/3rdcloud/devices/6cf4171005d11e2ca7****
  "device_name": "Test Device",
  "options": {
    "mac": "48ea63fd****",
    "installLocation": "****Jiangdun Road, Xihu District, Hangzhou City",

Return example

    "result": true,
    "t": 1650004025390,
    "success": true

Error code

For more information, see error code.