调用地址
POST /api/v1/user/relationship/cid.json
请求参数
| 名称 | 类型 | 必需的 | 注释 |
|---|---|---|---|
| cId | int | 是 | 联系人ID |
| openId | string | 是 | 第三方系统用户唯一ID |
| appId | string | 否 | 绑定微信时微信公众号id |
| account_source | string | 是 | 绑定账号来源 dingding/wechat/workWechat/open |
调用者权限
所有客服
调用示例
curl -v -u {account}:{password} https://www.bangwo8.com/api/v1/user/relationship/cid.json \
-H "Content-Type: application/json" -X POST -d '{"cId":"6862715","openId":"564354327","appId":"789","account_source":"wechat"}'
返回值示例 成功时:
{
"data": true,
"msg": "success"
}
当联系人不存在时报错:
{
"state": "403",
"message": "user error"
}
当联系人存在但已经有绑定关系时报错:
{
"state": "403",
"message": "Bind Already exists"
}
调用地址
GET /api/v1/user/relationship/cid.json
请求参数
| 名称 | 类型 | 必需的 | 注释 |
|---|---|---|---|
| cId | int | cId与openId至少用一个参数,两个参数都存在时,绑定关系对应才返回相应值 | 联系人ID |
| openId | string | 第三方系统用户唯一ID | |
| account_source | string | 是 | 绑定账号来源 dingding/wechat/open |
调用者权限
所有客服
调用示例
curl https://www.bangwo8.com/api/v1/user/relationship/cid.json?cId=30851821&account_source=dingding&openId=10014850
-v -u {account}:{password}
返回值示例
成功响应:
{
"data": [
{
"aId": "601993",
"cId": "30851821",
"account": "u2_601993_15cdbc98048f7c059b24f6f3f2065bbd",
"remark": "",
"templateId": "0",
"openId": "10014850",
"appId": "",
"account_source": "dingding"
}
],
"msg": "success"
}
失败响应:
{
"state": "403",
"message": "user error"
}
调用地址
PUT /api/v1/user/relationship/cid.json
请求参数
| 名称 | 类型 | 必需的 | 注释 |
|---|---|---|---|
| cId | int | 是 | 联系人ID |
| openId | string | 否 | 第三方系统用户唯一ID |
| account_source | string | 是 | 绑定账号来源 dingding/wechat/open |
| appId | string | 否 | 微信公众号id |
调用示例
curl https://www.bangwo8.com/api/v1/user/relationship/cid.json \
-H "Content-Type: application/json" \
-d '{
"cId": "40713895",
"account_source": "wechat",
"openId": "12345",
"appId": "123"
}' \
-v -u {account}:{password} -X PUT
返回值示例
成功响应:
{
"data": true,
"msg": "success"
}
调用地址
DELETE /api/v1/user/relationship/cid.json
请求参数
| 名称 | 类型 | 必需的 | 注释 |
|---|---|---|---|
| cId | int | 是 | 联系人ID |
| account_source | string | 是 | 绑定账号来源 dingding/wechat/open |
Content-Type: multipart/form-data
调用示例
curl -v -u {account}:{password} https://www.bangwo8.com/api/v1/user/relationship/cid.json?account_source=wechat&cId=6862715 \
-H "Content-Type: multipart/form-data"
-X DELETE
返回值示例
{
"data": true,
"msg": "success"
}