Modify Home

Last Updated on : 2024-04-02 08:54:43download

Based on the home ID, query the basic information about the specified home.

API address

PUT: /v1.0/homes/{home_id}

Request parameter

Parameter nameTypeINRequiredDescription
home_idLonguritrueThe home ID.

Description of body

Parameter nameTypeINRequiredDescription
nameStringbodytrueThe name of the specified home.
geo_nameStringbodyfalseThe geographical location of the specified home.
lonDoublebodyfalseThe longitude.
latDoublebodyfalseThe latitude.

Return parameter

Parameter nameTypeDescription
resultBooleanThe returned result. Valid values:
  • true: The home information is modified successfully.
  • false: Failed to modify the home information.

Request example

PUT: /v1.0/homes/319****
{
  "geo_name": "Hangzhou, Tuya Smart",
  "name": "My Home",
  "lat": 30.16,
  "lon": 120.5
}

Return example

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

Error code

For more information, see error code.