友米聚合 - 开放API
  1. 接口详情
友米聚合 - 开放API
  • 应用场景
    • 自有订单系统 嵌入 企客聊侧边栏
  • v1
    • 文档
      • 介绍
        • 开发文档阅读说明
        • 错误码返回说明
      • 入门说明
        • 生成signature
        • 获取TOKEN方法
        • 请求Headers说明
      • 接口详情
        • 基础数据类接口
        • 数据读取类接口
        • 行为操作类接口
        • 回调数据
  • v2
    • 事件发布格式说明
    • ChatMess
      • 发送消息
      • 申请接管
      • 终止接管
      • 激活会话
      • 发送通知
      • 读取聊天记录
    • Report
      • 获取员工客服统计
      • 获取员工激活客户数统计
    • System
      • 获取部门列表
      • 根据部门获得组
      • 根据组获得员工
      • 获得员工列表
    • Friend
      • 读取粉丝列表
      • 读取粉丝总数
    • Todo
      • 新增待办记录
      • 新增待办记录(返回编号)
      • 获取待办列表
      • 获取待办列表总数
    • Ad
      • 读取广告列表
      • 读取广告条数
    • BulkSend
      • 保存RPA群发
      • 删除RPA群发
    • 注册回调地址
      POST
    • 订阅事件
      POST
    • 获取商户TOKEN
      POST
  1. 接口详情

基础数据类接口

运营号配置#

接口URL:WeCaht

请求方式:Get
Headers:#
access_token:token
Content-type: text/json

###### 其他参数参考Headers说明

请求参数#

参数名数据类型是否必须说明
ad_wechat_leiint否0(默认0;0=个微、3=企微)

请求示例#

http://《你服务器IP》:5003/v1/WeCaht

接收返回结果#

{
    "errmsg": 20000,
    "succeed": true,
    "msgTime": "2018-05-11T15:40:14.1523923+08:00",
    "values": [
        {
            "ad_wechat_id": 135389,
            "ad_wechat_nober": "微信号",
            "ad_wechat_nick": "昵称",
            "ad_wechat_qrcode":"二维码",
            "ad_wechat_addtime": "添加时间",
            "ad_original_nober": "原始微信号",
            "ad_wechat_usercode": null,
            "ad_wechat_viewnum": 0,
            "ad_wechat_vnumday": 0,
            "ad_wechat_vnumlday": 0,
            "ad_wechat_rfriend": 0,
            "ad_wechat_friend": 1709,
            "ad_wechat_group": 23,
            "ad_wechat_weight": 0,
            "ad_wechat_friends": true,
            "ad_wechat_chat": true,
            "ad_state": null,
            "ad_wechat_nickname": "刘潇",
            "ad_wechat_initiative": false,
            "ad_wechat_passive": false,
            "ad_wechat_y3": true,
            "ad_receive_code": null,
            "ad_key_code": null,
            "ad_chatroom_code": null,
            "ad_wechat_push": true,
            "ad_wechat_new": 1705,
            "is_receiveaddfriendtask": 1,
            "ad_wechat_lei": 0,
            "ad_wechat_record": false,
            "imei": null
        }
    ]
}

返回结果说明#

参数名数据类型说明
ad_wechat_idint运营号编号
ad_wechat_noberstring微信号
ad_wechat_nickstring机号,
ad_wechat_qrcodestring二维码
ad_wechat_addtimedatetime添加时间
ad_original_noberstring运营号原始微信号
ad_wechat_friendint好友数量(含被动删除和被动拉黑)
ad_wechat_groupint群总数
ad_wechat_friendsbool运营号监控授权
ad_wechat_nicknamestring微信昵称
ad_receive_codestring异常通知员工
ad_key_codestring关键字通知员工
ad_chatroom_codestring好友申请消息通知员工
ad_wechat_pushbool推送授权
is_receiveaddfriendtaskint是否开启加粉任务(0否,1是)
ad_wechat_leiint0微信号,1公账号,2小程序
ad_wechat_recordbool工作手机通话记录授权
imeistring运营号登录手机唯一码
ad_wechat_usercodestring弃用
ad_wechat_viewnumint弃用
ad_wechat_vnumdayint弃用
ad_wechat_vnumldayint弃用
ad_wechat_rfriendint弃用
ad_wechat_weightint弃用
ad_wechat_chatbool弃用
ad_statestring弃用
ad_wechat_initiativebool弃用
ad_wechat_passivebool弃用
ad_wechat_y3bool弃用
ad_wechat_newint弃用

员工配置#

接口URL:staff

请求方式:Get
Headers:#
access_token:token
Content-type: text/json

其他参数参考Headers说明

请求参数#

参数名数据类型是否必须说明
ad_staff_stateint否员工状态(-1所有,0启用,1停用,默认值-1)
ad_staff_codestring否员工号
ad_staff_namestring否员工姓名
ad_staff_addtimestring否员工添加时间

请求示例#

http://《你服务器IP》:5003/v1/staff?ad_staff_state=-1

接收返回结果#

返回参数:
{
    "errmsg": 20000,
    "succeed": true,
    "msgTime": "2019-11-05T20:43:44.6250063+08:00",
    "values": [
        {
            "ad_staff_code": "b01",
            "ad_staff_name": "b01",
            "ad_staff_state": 1,
            "ad_self_user": "b08"
        }
    ]
}

返回结果说明#

参数名数据类型说明
ad_staff_codestring员工号
ad_staff_namestring员工名称
ad_staff_statestring员工状态(0启用,1停用)
ad_self_userstring绑定的自有订单用户名

标签分类#

接口URL:/Label

请求方式:Get
Headers:#
access_token:token
Content-type: text/json

###### 其他参数参考Headers说明

请求参数#

暂无

请求示例#

http://《你服务器IP》:5003/v1/Label

接收返回结果#

{
  "errmsg": 20000,
  "succeed": true,
  "msgTime": "2021-03-30T16:49:01.7151839+08:00",
  "values": [
    {
      "ad_label_id": 263,
      "ad_label_name": "A.客户级别",
      "ad_choose": 0
    }
   ],
  "errdesc": null
}

返回结果说明#

参数名数据类型说明
ad_label_idint标签分类编号
ad_label_namestirng标签分类名称
ad_chooseint0或者1(0单选,1多选)

标签配置#

接口URL:wecahtlabel

请求方式:Get
Headers:#
access_token:token
Content-type: text/json

其他参数参考Headers说明

请求参数#

参数名数据类型是否必须说明
categoriesint否-1(默认-1查询所有,其他可以传入大类编号(ad_label_id)获得所属的分类详细列表)

请求示例#

http://《你服务器IP》:5003/v1/wecahtlabel?categories=-1

接收返回结果#

{
    "errmsg": 20000,
    "succeed": true,
    "msgTime": "2018-05-11T15:40:14.1523923+08:00",
    "values": [
        {
            "ad_label_info_id": 1158,
            "ad_label_info_name": "测试超长标签添加测试超长标签添加测试超长标签添加",
            "ad_label_id": 189,
            "ad_label_time": "2018-01-18T21:17:35.613849+08:00",
            "merchant_id": null,
            "ad_label_name": "客户意向",
            "ad_choose": 0
        },
        {
            "ad_label_info_id": 1072,
            "ad_label_info_name": "潜在",
            "ad_label_id": 189,
            "ad_label_time": "2018-01-05T11:53:23.580502+08:00",
            "merchant_id": null,
            "ad_label_name": "客户意向",
            "ad_choose": 0
        },
        {
            "ad_label_info_id": 1071,
            "ad_label_info_name": "成交",
            "ad_label_id": 189,
            "ad_label_time": "2018-01-05T11:53:10.641563+08:00",
            "merchant_id": null,
            "ad_label_name": "客户意向",
            "ad_choose": 0
        },
        {
            "ad_label_info_id": 991,
            "ad_label_info_name": "零售",
            "ad_label_id": 1,
            "ad_label_time": "2017-12-08T10:43:22.802228+08:00",
            "merchant_id": null,
            "ad_label_name": "职务",
            "ad_choose": 0
        },
        {
            "ad_label_info_id": 976,
            "ad_label_info_name": "炒股",
            "ad_label_id": 1,
            "ad_label_time": "2017-12-07T10:24:22.527081+08:00",
            "merchant_id": null,
            "ad_label_name": "职务",
            "ad_choose": 0
        }
    ]
}

返回结果说明#

参数名数据类型说明
ad_label_info_idint976(标签详细编号)
ad_label_info_namestirng炒股(标签名字)
ad_label_idstring1(标签分类)
ad_label_namestring职务(标签分类名称)
ad_chooseint0或者1(0单选,1多选)

投放组配置#

请求地址:AdManage
请求方式:Get
Headers:#
access_token:token
Content-type: text/json

###### 其他参数参考Headers说明

请求参数#

暂无

请求示例#

http://《你服务器IP》:5003/v1/AdManage

接收返回结果#

{
    "errmsg": 20000,
    "succeed": true,
    "msgTime": "2019-09-29T20:45:05.1353996+08:00",
    "values": [
        {
            "ad_brand_id": 155,
            "ad_brand_name": "12",
            "ad_brand_code": "21",
            "ad_brand_welist": "[\"3516\", \"3521\"]",
            "merchantid": "640462692",
            "ad_wechat_nick": "P05(dong23287),P04(mioz888)",
            "wechats": "[{\"ad_wechat_nober\" : \"dong23287\", \"ad_wechat_qrcode\" : \"http://7nimg.agsoft.net/wxid_w4ebc6txje6622mmqrcode1568877590436.png\"}, {\"ad_wechat_nober\" : \"mioz888\", \"ad_wechat_qrcode\" : \"http://7nimg.agsoft.net/wxid_9g3nmp3wywf622mmqrcode1568711034785.png\"}]",
            "ad_brand_region_code": "360800"
        },
        {
            "ad_brand_id": 151,
            "ad_brand_name": "景田百岁山广告",
            "ad_brand_code": "001",
            "ad_brand_welist": "[]",
            "merchantid": "640462692",
            "ad_wechat_nick": null,
            "wechats": null,
            "ad_brand_region_code": "440100"
        }
    ]
}

返回结果说明#

参数名数据类型说明
ad_brand_idint投放组编号
ad_brand_namestring投放组名称
ad_brand_codestring投放组代号
ad_brand_welistjson数组投放组微信号惟一标识集合
merchantidstring商家编号
ad_wechat_nickstring机号(微信号)叠加集合
wechatsjson数组ad_wechat_nober(微信号),ad_wechat_qrcode(二维码)
ad_brand_region_codestring行政区划代码

好友自定义属性配置#

请求地址:friend/GetCustomAttributeList
请求方式:Get
Headers:#
access_token:token
Content-type: text/json

###### 其他参数参考Headers说明

请求参数#

暂无

请求示例#

http://《你服务器IP》:5003/v1/friend/GetCustomAttributeList

接收返回结果#

{
    "errmsg": 20000,
    "succeed": true,
    "msgTime": "2020-06-24T17:04:11.6360253+08:00",
    "values": [
        {
            "id": "15",
            "sort": 1,
            "merchantId": null,
            "customName": "住址",
            "customType": 1,
            "customLength": 20,
            "customIsred": false,
            "customAddtime": "2019-08-09T15:42:30.946993+08:00",
            "customAddtimeStr": "2019-08-09 15:42:30",
            "customValJsonStr": [],
            "customDateformat": "YYYY-MM-DD",
            "customVal": "[]"
        },
        {
            "id": "14",
            "sort": 1,
            "merchantId": null,
            "customName": "爱好",
            "customType": 4,
            "customLength": 0,
            "customIsred": false,
            "customAddtime": "2019-07-26T10:18:08.189804+08:00",
            "customAddtimeStr": "2019-07-26 10:18:08",
            "customValJsonStr": [
                {
                    "key": "足球",
                    "value": "1"
                },
                {
                    "key": "篮球",
                    "value": "2"
                },
                {
                    "key": "游泳",
                    "value": "3"
                }
            ],
            "customDateformat": "YYYY-MM-DD",
            "customVal": "[{\"key\": \"足球\", \"value\": \"1\"}, {\"key\": \"篮球\", \"value\": \"2\"}, {\"key\": \"游泳\", \"value\": \"3\"}]"
        },
        {
            "id": "13",
            "sort": 1,
            "merchantId": null,
            "customName": "结婚纪念日",
            "customType": 2,
            "customLength": 0,
            "customIsred": false,
            "customAddtime": "2019-07-26T10:16:12.899589+08:00",
            "customAddtimeStr": "2019-07-26 10:16:12",
            "customValJsonStr": [],
            "customDateformat": "YYYY-MM-DD",
            "customVal": "[]"
        },
        {
            "id": "12",
            "sort": 1,
            "merchantId": null,
            "customName": "专业",
            "customType": 1,
            "customLength": 50,
            "customIsred": false,
            "customAddtime": "2019-07-26T10:15:48.139436+08:00",
            "customAddtimeStr": "2019-07-26 10:15:48",
            "customValJsonStr": [],
            "customDateformat": "YYYY-MM-DD",
            "customVal": "[]"
        }
    ],
    "errdesc": null
}

返回结果说明#

参数名数据类型说明
idint属性编号
customNamestring字段名称
sortint字段排序
merchantIdstring商家编号
customTypestring字段类型(1、文本框 2、日期框、3、单选框 4、多选框)
customLengthint字段长度
customIsredint是否必填(true是,false否)
customAddtimedatetime添加时间
customAddtimeStrdatetime添加时间格式化后的时间
customValJsonStrobjectjson数组,多选框,单选框的值
customDateformatstring日期框日期格式
customValstring多选框,单选框未序列化之前的值

员工管理运营机#

接口URL:staff/GetStaffWechat

请求方式:POST
Headers:#
access_token:token
Content-type: text/json

###### 其他参数参考Headers说明

请求参数#

参数名数据类型是否必须说明
ad_staff_codestring否员工号(不传获取所有员工管理运营机)

请求示例#

{
"ad_staff_code":"b03"
}

接收返回结果#

{
	"requestId": null,
	"errmsg": 20000,
	"succeed": true,
	"msgTime": "2021-12-27T15:18:13.1647541+08:00",
	"values": [{
		"ad_staff_code": "b03",
		"ad_wechat_id": 3547,
		"ad_wechat_nober": "zznn72537",
		"ad_wechat_nick": "P03",
		"ad_wechat_nickname": "秀逗吖Q.",
		"ad_wechat_qrcode": "http://img-1259062805.cos.ap-chengdu.myqcloud.com/640462692/other/wxid_2yfwlz5fu21922mmqrcode1632752533600.png",
		"ad_original_nober": "wxid_2yfwlz5fu21922"
	}],
	"errdesc": null
}

返回结果说明#

参数名数据类型说明
ad_staff_codestring员工号
ad_wechat_idint运营号编号
ad_wechat_noberstring微信号
ad_wechat_nickstring机号,
ad_wechat_qrcodestring二维码
ad_wechat_nicknamestring微信昵称
ad_original_noberstring运营号原始微信号
上一页
请求Headers说明
下一页
数据读取类接口
Built with