POST api/KWatch/SetContact
K1Watch 设置联系人 [专用接口]
Request Information
Body Parameters
SetContactModel| Name | Description | Type | Additional information |
|---|---|---|---|
| ContactId |
联系人 id |
integer |
None. |
| DeviceId |
设备 id |
integer |
None. |
| PhoneNum |
电话号码 |
string |
None. |
| Name |
名称 |
string |
None. |
| Type |
联系人类型 1: father 2: mother 3: grandfather 4: grandmother 5: brother 6: sister 7: custom image 此项暂不允许设置 |
integer |
None. |
| IsSos |
是否 sos 号码 |
boolean |
None. |
| Action |
动作 参见 ContactAction Add = 1, // 添加 Update = 2, // 修改 Deleted = 3 //删除 ContactAction |
integer |
None. |
| Token |
登录后获取到的 Token |
string |
None. |
| Language |
语言选项 |
string |
None. |
| AppId |
APP应用标识 |
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
| 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>