POST api/User/InviteUser

Invited users
illustrate:The requirement is a login account for the phone number

Request Information

Body Parameters

InviteUserModel
NameDescriptionTypeAdditional information
Phone

Invited person cell phone number

string

None.

RelationName

Relationship name

string

None.

DeviceId

Invite guardian device id

integer

None.

UserId

Login user id

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:
{
  "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

statestatus codeillustrate:
0.success
8000 have been invited
8001 Non-master number, no right to invite
1000 User Id doesn't exist
1100 Device id doesn't exist
1105 The device doesn't need an invitation under the phone's name
1106 The phone number has permission to access the device
1501 The mobile phone number has applied for access to the device, waiting for the master to agree

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>