POST api/Command/SetContact

Set up the contact [specific device specific interface HW]

Request Information

Body Parameters

SetContactModel
NameDescriptionTypeAdditional information
ContactId

contacts id

integer

None.

DeviceId

device id

integer

None.

PhoneNum

phone number

string

None.

Name

name

string

None.

Type

contacts type 1: father 2: mother 3: grandfather 4: grandmother 5: brother 6: sister 7: custom image

integer

None.

IsSos

whether sos number

boolean

None.

Action

motion refer to ContactAction Add = 1, // add Update = 2, // amend Deleted = 3 //delete ContactAction

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:
{
  "ContactId": 1,
  "DeviceId": 2,
  "PhoneNum": "sample string 3",
  "Name": "sample string 4",
  "Type": 5,
  "IsSos": true,
  "Action": 7,
  "Token": "sample string 8",
  "Language": "sample string 9",
  "AppId": "sample string 10"
}

application/xml, text/xml

Sample:
<SetContactModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 10</AppId>
  <Language>sample string 9</Language>
  <Token>sample string 8</Token>
  <Action>7</Action>
  <ContactId>1</ContactId>
  <DeviceId>2</DeviceId>
  <IsSos>true</IsSos>
  <Name>sample string 4</Name>
  <PhoneNum>sample string 3</PhoneNum>
  <Type>5</Type>
</SetContactModel>

Response Information

Resource Description

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>