POST api/ExcellentSchool/AddDeviceAndUserGroup

Add equipment at the same time set up the default member of the family 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. device already belonged to itself
1106. Access to the equipment already
1500. The equipment has been in existence master, send a check to master
1501. The number has been sent to check the application to the master
1550. apply to 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>