POST api/User/InviteUser
邀请用户
说明:要求是以手机号为登录帐号的情况
Request Information
Body Parameters
InviteUserModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Phone |
被邀请人的手机号 |
string |
None. |
| RelationName |
关系名 |
string |
None. |
| DeviceId |
邀请监控的设备Id |
integer |
None. |
| UserId |
登录用户Id |
integer |
None. |
| Token |
登录后获取到的 Token |
string |
None. |
| Language |
语言选项 |
string |
None. |
| AppId |
APP应用标识 |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"Phone": "sample string 1",
"RelationName": "sample string 2",
"DeviceId": 3,
"UserId": 4,
"Token": "sample string 5",
"Language": "sample string 6",
"AppId": "sample string 7"
}
application/xml, text/xml
Sample:
<InviteUserModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel"> <AppId>sample string 7</AppId> <Language>sample string 6</Language> <Token>sample string 5</Token> <DeviceId>3</DeviceId> <Phone>sample string 1</Phone> <RelationName>sample string 2</RelationName> <UserId>4</UserId> </InviteUserModel>
Response Information
Resource Description
state状态码说明:
0.成功
8000已邀请
8001非主控号,无权邀请
1000用户Id不存在
1100设备id不存在
1105设备就在手机号名下不需要邀请
1106该手机号已有权限访问该设备
1501该手机号已申请访问该设备了,等待主控号同意
| Name | Description | Type | Additional 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>