Report Device DPs

Last Updated on : 2023-05-23 08:00:25

The partner cloud reports device data points (DPs). That is, the function properties of the specified device.

API address

POST: /v1.0/cloud/thing/devices/{device_id}/datapoint/report

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe ID of the specified Tuya-enabled device.

Description of body

Parameter nameTypeINRequiredDescription
dataObjectbodytrueThe reported content of the specified DP. One or more DP data can be passed in a data field. In the sample request:
  • 101 and 119: the ID of the specified product DP.
  • value: the value of the specified DP.
  • time: the time when the DP value changes.

Return parameter

Parameter nameTypeDescription
resultFusionResultThe response result.

Description of result

Parameter nameTypeDescription
resultObjectThe returned result.
codeStringThe response code. It is empty when the request succeeded.
msgStringThe message that is returned if the request fails. It is empty if the request is successful.
successBooleanIndicates whether the request is successful. Valid values:
  • true: success.
  • false: failure.
tLongThe 13-digit timestamp of a response.

Request example

POST: /v1.0/cloud/thing/devices/6cf4171005d11e2ca7****/datapoint/report
  "data": {
    "101": {
      "value": "online",
      "time": 1682392142000
    "119": {
      "value": 80,
      "time": 1682392142000

Return example

    "result": true,
    "t": 1561456817168,
    "success": true

Error code

For more information, see error code.