Modify Relationship Between Resident and House

Last Updated on : 2023-06-15 06:06:16

Modify the relationship between a resident and a house, such as the resident type and house information. A response is returned to indicate whether the operation is successful.

API address

PUT: /v1.0/iot-02/community/room-user/{room_user_id}

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
room_user_idString trueThe ID of the relationship between a resident and a house.
block_idString trueThe ID of a community.
householder_idString trueThe ID of a resident.
room_user_typeString trueThe type of resident.
  • HOUSEHOLDER: owner.
  • FAMILY: family member.
  • TENANT: tenant.
  • FRIEND: friend.
  • RELATIVES: relative
  • COLLEAGUE: colleague.
  • DECORATOR: decorator.
  • BABYSITTER: babysitter.
  • OTHER: others.
tree_idString trueThe space ID of a specified house node.
expire_dateString falseThe validity period. An empty value indicates that it is permanently valid.

Return parameter

Parameter nameTypeDescription
resultBooleanIndicates whether the operation is successful.

Request example

PUT: /v1.0/iot-02/community/room-user/136767399153950xxxx
{ "block_id": "138258104436502xxxx", "room_user_type": "FAMILY", "householder_id": "138258104436502xxxx", "expire_date": 1621587021161, "tree_id": "138258404436502xxxx", }

Return example

true

Error code

For more information, see error code.