English
English
简体中文
Contact Us
Register
Log In

Add a device in the room

Last Updated on : 2022-04-29 05:36:02download

You can add devices in the specified family room through this API.

API address

POST: /v1.0/homes/{home_id}/rooms/{room_id}/devices

Request parameter

Parameter nameTypeINRequiredDescription
home_idLonguritrueFamily ID
room_idLonguritrueRoom ID

Description of body

Parameter nameTypeINRequiredDescription
device_idsList trueDevice ID list

Description of device_ids

Parameter nameTypeINRequiredDescription
device_idsString falseSpecific parameter ID

Return parameter

Parameter nameTypeDescription
resultBooleanExecution result:
  • true: Successful execution
  • false: Execution failed

Request example

POST: /v1.0/homes/312321/rooms/2341231/devices
{
  "device_ids": [
    "ve23u9****",
    "ve23u92****"
  ]
}

Return example

true

Error code

For more information, see error code.