Set Up Enabling Status of Prepayment Feature

Last Updated on : 2023-06-21 07:12:58download

Enable or disable the prepayment feature of a specified electrical device based on the device ID.

API address

POST: /v1.0/iot-03/power-devices/{device_id}/prepayment

Request parameter

Parameter name Type IN Required Description
device_id String uri true The device ID.

Description of body

Parameter name Type IN Required Description
action Boolean true
  • true: Enable the prepayment feature.
  • false: Disable the prepayment feature.

Return parameter

Parameter name Type Description
result Boolean
  • true: Operation succeeded.
  • false: Operation failed.

Request example

POST: /v1.0/iot-03/power-devices/6c814919a3f54fb4eb****/prepayment
{ "action": true }

Return example

{ "result": true, "t": 1637834545489, "success": true }

Error code

For more information, see error code.