POST api/Device/AddDeviceToUserGroup

Add the device to the user group and use the selected relationship [watch]

Request Information

Body Parameters

AddDeviceToUserGroupModel
NameDescriptionTypeAdditional information
UserId

User id

integer

None.

GroupId

Role id

integer

None.

DeviceId

Device id

integer

None.

Info

overhead information

string

None.

RelationName

Relationship name

string

None.

RelationPhone

phone number

string

None.

Icon

icon

integer

None.

DeviceType

1.child's backpack, 2 is an adult backpack

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:
{
  "UserId": 1,
  "GroupId": 2,
  "DeviceId": 3,
  "Info": "sample string 4",
  "RelationName": "sample string 5",
  "RelationPhone": "sample string 6",
  "Icon": 7,
  "DeviceType": 8,
  "Token": "sample string 9",
  "Language": "sample string 10",
  "AppId": "sample string 11"
}

application/xml, text/xml

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

Response Information

Resource Description

Statestatus code:
0. success
1000. The user does not exist
1100. device does not exist
1500. The device has the main control number and has applied to the main control number to see the device request
1550. The device has the main control number and applies for viewing 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>