POST api/ExcellentSchool/AddDeviceAndUserGroup

添加设备同时建立默认家庭成员分组[手表]

Request Information

Body Parameters

AddDeviceAndUserGroupModel
NameDescriptionTypeAdditional information
DeviceId

设备Id

integer

None.

UserId

用户Id

integer

None.

RelationPhone

电话号码

string

None.

RelationName

关系名称

string

None.

Info

附加信息

string

None.

DeviceType

integer

None.

Token

登录后获取到的 Token

string

None.

Language

语言选项

string

None.

AppId

APP应用标识

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

State状态码说明:
0. 表示成功
1100. 设备不存在
1105. 设备已经属于自己
1106. 已有该设备的访问权限
1500. 设备已存在主控号,发送查看申请给主控号
1501. 已经发送过查看申请给主控号
1550. 申请查看失败

NormalResult
NameDescriptionTypeAdditional information
Message

消息 [大多数情况下可通过该消息做为提示语]

string

None.

State

状态码

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>