POST api/Device/AddDeviceAndUserGroup

Add the device and establish the default family member group [watch]

Request Information

Body Parameters

AddDeviceAndUserGroupModel
NameDescriptionTypeAdditional information
DeviceId

Device Id

integer

None.

UserId

User Id

integer

None.

RelationPhone

Telephone number

string

None.

RelationName

Relationship name

string

None.

Info

overhead information

string

None.

DeviceType

integer

None.

Token

Get it after logging in Token

string

None.

Language

Language Option

string

None.

AppId

APP Application Identifier

string

None.

Request Formats

application/json, text/json

Sample:
{
  "DeviceId": 1,
  "UserId": 2,
  "RelationPhone": "sample string 3",
  "RelationName": "sample string 4",
  "Info": "sample string 5",
  "DeviceType": 6,
  "Token": "sample string 7",
  "Language": "sample string 8",
  "AppId": "sample string 9"
}

application/xml, text/xml

Sample:
<AddDeviceAndUserGroupModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 9</AppId>
  <Language>sample string 8</Language>
  <Token>sample string 7</Token>
  <DeviceId>1</DeviceId>
  <DeviceType>6</DeviceType>
  <Info>sample string 5</Info>
  <RelationName>sample string 4</RelationName>
  <RelationPhone>sample string 3</RelationPhone>
  <UserId>2</UserId>
</AddDeviceAndUserGroupModel>

Response Information

Resource Description

Statestatus codeillustrate:
0. Indicates success
1100. device does not exist
1105. The device already belongs to itself
1106. Access to the device is available
1500. The device has the main control number, which sends the viewer to the main control number
1501. The application has been sent to the master control number
1550. Apply for check failure

NormalResult
NameDescriptionTypeAdditional information
Message

Message [in most cases, the message can be used as a prompt]

string

None.

State

status code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Message": "sample string 1",
  "State": 2
}

application/xml, text/xml

Sample:
<NormalResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>2</State>
  <Message>sample string 1</Message>
</NormalResult>