POST api/Device/BindDeviceForUser

将设备绑定给用户,使用简化关系[手表]

Request Information

Body Parameters

BindDeviceForUserModel
NameDescriptionTypeAdditional information
UserId

用户id

integer

None.

DeviceId

设备 id

integer

None.

Info

附加信息

string

None.

RelationName

关系名

string

None.

RelationPhone

电话号码 此关系人员的电话号码

string

None.

ParentId

大分组ID

integer

None.

GroupName

分组名称

string

None.

PersonName

佩戴者姓名

string

None.

NickName

昵称

string

None.

Token

登录后获取到的 Token

string

None.

Language

语言选项

string

None.

AppId

APP应用标识

string

None.

Request Formats

application/json, text/json

Sample:
{
  "UserId": 1,
  "DeviceId": 2,
  "Info": "sample string 3",
  "RelationName": "sample string 4",
  "RelationPhone": "sample string 5",
  "ParentId": 6,
  "GroupName": "sample string 7",
  "PersonName": "sample string 8",
  "NickName": "sample string 9",
  "Token": "sample string 10",
  "Language": "sample string 11",
  "AppId": "sample string 12"
}

application/xml, text/xml

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

Response Information

Resource Description

State状态码说明:
0. 成功
1000. 用户不存在
1100. 设备不存在
1500. 设备存在主控号,并且已向主控号申请查看设备请求
1550. 设备存在主控号,申请查看失败
4000. 失败

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>