Skip to content

Create Home

API Address:/v2/family/enduserapi/addFamily

Request Method:POST

Request Data Type:application/json

Response Data Type:*/*

API Description:Create home

Request Example:

javascript
{
  "familyCoordinates": "",
  "familyLocation": "",
  "familyName": "",
  "familyRoomList": []
}

Request Parameters:

Parameter NameDescriptionRequest TypeRequiredData TypeSchema
addFamilyDtoaddFamilyDtobodytrueCreate homeCreate home
  familyCoordinatesHome coordinatesfalsestring
  familyLocationHome locationfalsestring
  familyNameHome nametruestring
  familyRoomListRoom listfalsearraystring

Response Status:

Status CodeDescriptionSchema
200Home created successfullyReturn registration code response«Create home return info»
5613Please enter home name
5616Home name already exists
5619Failed to create home
5620Failed to create room
5632Failed to initialize frequently used device list
5633Coordinates format error
5635Home mode not enabled
5641Room name too long, please enter within 30 characters
5659Home name too long, please enter within 256 characters
5660Home address too long, please enter within 256 characters
5673Duplicate room name
5676Product service exception

Response Parameters:

Parameter NameDescriptionTypeSchema
codeResponse codeinteger(int32)integer(int32)
dataResponse dataCreate home return infoCreate home return info
  addTimeAdd timeinteger(int64)
  addTimeTsAdd time timestampinteger(int64)
  familyCoordinatesHome coordinatesstring
  familyLocationHome locationstring
  familyNameHome namestring
  fidHome IDstring
  memberRoleUser role 1: Creator 2: Admin 3: Regular userinteger(int32)
extMsgExtended messagestring
msgResponse messagestring

Response Example:

javascript
{
	"code": 0,
	"data": {
		"addTime": 0,
		"addTimeTs": 0,
		"familyCoordinates": "",
		"familyLocation": "",
		"familyName": "",
		"fid": "",
		"memberRole": 0
	},
	"extMsg": "",
	"msg": ""
}