=====概述=====
远程ID是帮我吧远程模块的用户标识,如果用户需要寻求远程服务,则需安装帮我吧客户端程序,安装完毕系统自动生成一个针对每台电脑唯一的9位ID号。在帮我吧系统中,远程ID可绑定且只能绑定到一个联系人下,一个联系人又可绑定且只能绑定到一个公司下。
====JSON格式====
^名称 ^类型 ^只读 ^必填 ^注释^
|id |varchar |是 |是 |远程ID,系统自动生成 |
|url |varchar |是 |否 |该远程ID的url |
|remark |varchar |否 |否 |远程ID的备注,长度不能超过100个字符。 |
|userId |int|是 |是 |远程ID所属的联系人Id |
====JSON示例====
{
"id": 232454567,
"url": "https://www.bangwo8.com/api/v1/unique_ids/232454567.json",
"remark": "北京金万维科技有限公司的服务器",
"userId": "232"
}
====获取指定远程ID的信息====
GET /api/v1/unique_ids/{id}.json
**调用者权限**
所有客服
**调用示例**
curl https://www.bangwo8.com/api/v1/unique_ids/456787673.json -v -u {account}:{password}
**返回值示例**
Status: 200 OK
{
"unique_id": {
"id": 456787673,
"remark": "异速联的演示服务器",
"userId": "232"
}
}
====绑定远程ID到指定联系人====
POST /api/v1/unique_ids/bind.json
**调用者权限**
所有客服
**调用示例**
curl https://www.bangwo8.com/api/v1/unique_ids/bind.json \
-v -u {account}:{password} \
-H "Content-Type: application/json" \
-d '{"unique_ids":[{"id":"987876674","userId":"22"},{"id":"342233443","userId":"22"}, \
{"id":"453344554","userId":"45"}]}' \
-X POST
**返回值示例**
Status: 200 OK
{
"results": [
{
"id": 987876674,
"success": true,
"error_log": ""
},
{
"id": 342233443,
"success": false,
"error_log": "该id已绑定到userId为232的联系人下"
},
{
"id": 453344554,
"success": true,
"error_log": ""
}
]
}
====解绑远程ID====
DELETE /api/v1/unique_ids/unbind.json
**调用者权限**
所有客服
**调用示例**
curl https://www.bangwo8.com/api/v1/unique_ids/unbind.json?ids=987876674,342233443,453344554 \
-v -u {account}:{password} -X DELETE
**返回值示例**
Status: 200 OK
{
"results": [
{
"id": 987876674,
"success": true,
"error_log": ""
},
{
"id": 342233443,
"success": false,
"error_log": "id不存在"
},
{
"id": 453344554,
"success": true,
"error_log": ""
}
]
}
====修改远程ID的备注====
PUT /api/v1/unique_ids/modify.json
**调用者权限**
所有客服
**调用示例**
curl https://www.bangwo8.com/api/v1/unique_ids/modify.json \
-v -u {account}:{password} \
-H "Content-Type: application/json" \
-d '{"unique_ids":[{"id":"987876674","remark":"帮我吧的演示服务器"}, \
{"id":"342233443","remark":"异速联的演示服务器"},{"id":"453344554","remark":"选软件的演示服务器"}]}' \
-X PUT
**返回值示例**
Status: 200 OK
{
"results": [
{
"id": 987876674,
"success": true,
"error_log": ""
},
{
"id": 342233443,
"success": false,
"error_log": "id不存在"
},
{
"id": 453344554,
"success": true,
"error_log": ""
}
]
}