docs: correct htsy API field types, names, and CLI examples
This commit is contained in:
+3
-1
@@ -21,7 +21,8 @@ description: 当用户需要通过海豚私域 htsy-cli 操作账号、用户、
|
||||
htsy-cli status
|
||||
htsy-cli login --username USER --password PASS
|
||||
htsy-cli call /api/account/user/info -d '{}'
|
||||
htsy-cli call /api/bot/wx/list -d '{"page":1,"pageSize":20,"botType":1}'
|
||||
htsy-cli call /api/bot/wx/list -d '{"page":1,"pageSize":20,"botType":1}' # 个微
|
||||
htsy-cli call /api/bot/wx/list -d '{"page":1,"pageSize":20,"botType":2}' # 企微
|
||||
htsy-cli call /api/bot/wx/list -d @request.json
|
||||
```
|
||||
|
||||
@@ -48,5 +49,6 @@ htsy-cli call /api/bot/wx/list -d @request.json
|
||||
- 不要在回答里输出用户密码、token 或 `.htsy/config.json` 的完整内容。
|
||||
- 不确定字段时,先读对应模块参考,不要臆造请求字段。
|
||||
- `botType` 常用取值:`1` 个微,`2` 企微。
|
||||
- 企微接口需要 `corpId` 时,先调用 `POST /api/bot/wx/corp/list` 获取主体列表,返回项的 `id` 就是请求里的 `corpId`。
|
||||
- 时间字段如未特别说明,按毫秒时间戳处理。
|
||||
- 不面向用户直接调用的协议实例、Cron、客户端节点、回调上报、内部专用、第三方特供接口不要主动提供给用户。
|
||||
|
||||
@@ -30,8 +30,8 @@ htsy-cli register --username PHONE --password PASS --sms-code CODE
|
||||
| --- | --- | --- | --- |
|
||||
| 账号信息 | `POST /api/account/info` | `{}` | `id`(int64);`phone`(string);`main`(bool,是否是主账号);`cfg`(CfgItem,账号配置);`clientType`(string,客户端类型);`clientDownloadUrl`(string,客户端下载地址);`isDistributor`(bool,是否是渠道商);`agreeTerms`(bool,是否同意条款 false) |
|
||||
| 登录 | `POST /api/account/login/in` | `phone`(string, 必填);`password`(string, 可选,密码登录);`code`(string, 可选,验证码登录) | `token`(string) |
|
||||
| 设置账号配置 | `POST /api/account/cfg/set` | `singleDel`(bool, 必填,false 手动 true 自动);`singleCronNum`(int64, 必填,定时单删的好友上限 默认全部删除);`singleDelEvent`(bool, 必填,false 不执行, true执行);`singleBlacklistDel`(bool, 必填,被客户加入黑名单 是否定时删除 false 手动, true 自动);`singleBlacklistNum`(int64, 必填,定时删除被客户加入黑名单的客户上线 默认全部删除);`singleBlacklistEvent`(bool, 必填,被客户加入黑名单时删除客户 false 不执行, true执行);`botIds`(repeated int64, 可选,生效的微号id);`botRangeType`(string, 可选,all 所有 specify 指定);`isSendMsg`(bool, 可选,删除前是否发送消息);`messageList`(repeated Message, 可选,消息列表);`schedule`(Schedule, 可选,删除时间);`frequency`(Frequency, 可选,频率设置);`isSendFriendApply`(bool, 可选,删除前是否发送好友申请);`verifyContent`(string, 可选,好友申请的文本);`qwQueueCfg`(QueueCfg, 可选,企微队列配置);`wxQueueCfg`(QueueCfg, 可选,企微队列配置);`localBotSyncTagCfg`(LocalBotSyncTagCfg, 可选,本地微号同步标签配置) | 空对象或无业务数据 |
|
||||
| 检查这个手机号是否属于海豚账号 | `POST /api/account/check/phone` | `phone`(string, 可选);`num`(int64, 可选);`botType`(int32, 可选);`codeType`(int32, 可选) | `flag`(bool);`accountId`(int64);`darkToken`(string);`price`(float) |
|
||||
| 设置账号配置 | `POST /api/account/cfg/set` | `singleDel`(bool, 必填,false 手动 true 自动);`singleCronNum`(int64, 必填,定时单删的好友上限 默认全部删除);`singleDelEvent`(bool, 必填,false 不执行, true执行);`singleBlacklistDel`(bool, 必填,被客户加入黑名单 是否定时删除 false 手动, true 自动);`singleBlacklistNum`(int64, 必填,定时删除被客户加入黑名单的客户上限 默认全部删除);`singleBlacklistEvent`(bool, 必填,被客户加入黑名单时删除客户 false 不执行, true执行);`botIds`(repeated int64, 可选,生效的微号id);`botRangeType`(string, 可选,all 所有 specify 指定);`isSendMsg`(bool, 可选,删除前是否发送消息);`messageList`(repeated Message, 可选,消息列表);`schedule`(Schedule, 可选,删除时间);`frequency`(Frequency, 可选,频率设置);`isSendFriendApply`(bool, 可选,删除前是否发送好友申请);`verifyContent`(string, 可选,好友申请的文本);`qwQueueCfg`(QueueCfg, 可选,企微队列配置);`wxQueueCfg`(QueueCfg, 可选,个微队列配置);`localBotSyncTagCfg`(LocalBotSyncTagCfg, 可选,本地微号同步标签配置) | 空对象或无业务数据 |
|
||||
| 检查这个手机号是否属于海豚账号 | `POST /api/account/check/phone` | `phone`(string, 可选);`num`(int64, 可选);`botType`(int32, 可选,1 个微 2 企微);`codeType`(int32, 可选,1 客户端 2 协议) | `flag`(bool);`accountId`(int64);`darkToken`(string);`price`(float) |
|
||||
| 账号级白名单配置详情 | `POST /api/account/whiteList/info` | `{}` | `groupIds`(repeated int64,个微白名单群) |
|
||||
| 账号级白名单配置更新 | `POST /api/account/whiteList/update` | `groupIds`(repeated int64, 必填,个微白名单群) | 空对象或无业务数据 |
|
||||
| 资源包列表 | `POST /api/account/resource/list` | `{}` | `list`(repeated ResourcePackageInfoReply,资源包类型) |
|
||||
@@ -51,7 +51,7 @@ htsy-cli register --username PHONE --password PASS --sms-code CODE
|
||||
| 删除子账号 | `POST /api/account/user/delete` | `id`(int64, 必填,子账号id) | 空对象或无业务数据 |
|
||||
| 用户账号登录 | `POST /api/account/user/login/in` | `username`(string, 必填,子账号用户名 xxx@主账号手机号);`password`(string, 必填,密码) | `token`(string,token) |
|
||||
| 用户账号登出 | `POST /api/account/user/login/logout` | `{}` | 空对象或无业务数据 |
|
||||
| 子账号列表 | `POST /api/account/user/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`roleId`(int64, 可选,角色的ID) | `list`(repeated HttpUserInfo,组内群列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 子账号列表 | `POST /api/account/user/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`roleId`(int64, 可选,角色的ID) | `list`(repeated HttpUserInfo,子账号列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 修改密码 | `POST /api/account/user/password/modify` | `oldPassword`(string, 可选,旧密码);`newPassword`(string, 可选);`code`(string, 可选,验证码修改);`phone`(string, 可选,获取验证码的手机号) | 空对象或无业务数据 |
|
||||
| 获取登录二维码 | `POST /api/account/user/login/qrCode` | `{}` | `link`(string,二维码链接);`code`(string,回调code) |
|
||||
| 扫码回调 | `POST /api/account/user/login/scan/callback` | `code`(string, 必填,回调code) | `success`(bool,是否成功);`list`(repeated AccountUser,多账号列表) |
|
||||
@@ -67,7 +67,7 @@ htsy-cli register --username PHONE --password PASS --sms-code CODE
|
||||
| 发送短信验证码 | `POST /api/account/user/phone/sendCode` | `phone`(string, 必填,手机号码);`scene`(string, 必填,场景 注册 register 修改密码 resetPwd 登录 login 绑定手机号 bind) | 空对象或无业务数据 |
|
||||
| 设置密码 | `POST /api/account/user/setPassword` | `password`(string, 必填,设置密码) | 空对象或无业务数据 |
|
||||
| 关联手机号码 | `POST /api/account/bindPhone` | `phone`(string, 必填,手机号码);`smsCode`(string, 必填,短信验证码) | 空对象或无业务数据 |
|
||||
| 获取客服子账号 | `POST /api/account/customer/list` | `{}` | `list`(repeated HttpUserInfo,组内群列表) |
|
||||
| 获取客服子账号 | `POST /api/account/customer/list` | `{}` | `list`(repeated HttpUserInfo,客服子账号列表) |
|
||||
|
||||
|
||||
## 席位管理
|
||||
@@ -115,7 +115,7 @@ htsy-cli register --username PHONE --password PASS --sms-code CODE
|
||||
| 用余额完成订单 | `POST /api/account/order/complete/byBalance` | `orderId`(string, 必填,订单id) | 空对象或无业务数据 |
|
||||
| 用订单创建微信支付订单 | `POST /api/account/order/complete/byWxPay` | `orderId`(string, 必填,订单id);`openid`(string, 必填,openid) | `payInfo`(google.protobuf.Value,微信支付信息) |
|
||||
| 账号金额明细 | `POST /api/account/order/record/list` | `page`(int64, 可选);`pageSize`(int64, 可选);`payType`(string, 可选,支付类型:余额:balance 微信:wx);`incomeOrExpense`(int64, 可选,0:全部 1 收入 2 支出) | `list`(repeated RecordItem);`total`(int64);`last`(bool);`page`(int64);`pageSize`(int64) |
|
||||
| 各个产品的价格 | `POST /api/account/product/prices` | `{}` | `list`(repeated Product,全功能 1 个微协议 2 个微客户端 3 企微协议 4 企微客户端 发单 5 企微协议 6企微客户端) |
|
||||
| 各个产品的价格 | `POST /api/account/product/prices` | `{}` | `list`(repeated Product,全功能:1 个微协议 2 个微客户端 3 企微协议 4 企微客户端;发单:5 企微协议 6 企微客户端) |
|
||||
| 充值余额 | `POST /api/account/recharge/balance` | `accountId`(int64, 可选);`auth`(string, 可选);`money`(double, 可选) | 空对象或无业务数据 |
|
||||
| 代理商-转账 | `POST /api/account/transfer/balance` | `phone`(string, 可选);`money`(double, 可选) | 空对象或无业务数据 |
|
||||
| 使用微信支付充值余额 | `POST /api/account/recharge/wxPay` | `money`(double, 可选) | `qrCode`(string,微信支付的时候存在 二维码);`orderId`(string,订单id);`price`(double,实付价);`originPrice`(double,原价);`payType`(int32,支付类型 1 余额 2 微信支付);`totalAmount`(double,到账总价);`tables`(google.protobuf.Value,表格名字) |
|
||||
@@ -135,6 +135,6 @@ htsy-cli register --username PHONE --password PASS --sms-code CODE
|
||||
```bash
|
||||
htsy-cli call /api/account/info -d '{}'
|
||||
htsy-cli call /api/account/user/list -d '{"page":1,"pageSize":20}'
|
||||
htsy-cli call /api/account/bot/list -d '{"page":1,"pageSize":20,"botType":1}'
|
||||
htsy-cli call /api/account/bot/list -d '{"page":1,"pageSize":20,"botType":2,"sort":0}' # botType: 1 个微 2 企微;sort: 0默认 1过期升序 2过期降序
|
||||
htsy-cli call /api/account/role/list -d '{}'
|
||||
```
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
| sop-记录 | `POST /api/sop/record` | `sopType`(string, 必填,sop类型:标签模版 tag 新客模版 newFriend);`id`(int64, 必填,id);`itemId`(int64, 必填,itemId);`page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`startTime`(int64, 必填,开始时间);`endTime`(int64, 必填,结束时间);`sopBotId`(int64, 必填,应用微号的方案id) | `list`(repeated SopRecordItem,客户列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后);`pushMode`(string,推送模式 极速群发 fastPush 正常模式 common) |
|
||||
| sop-应用列表 | `POST /api/sop/apply/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize) | `list`(repeated SopApplyInfoItem,应用列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| sop-应用微号 | `POST /api/sop/apply/bot` | `sopType`(string, 必填,sop类型:标签模版 tag 新客模版 newFriend);`id`(int64, 必填,id);`applyType`(string, 必填,应用类型 所有微号 all 单号模式-指定 specify);`botIds`(repeated int64, 必填,botIds);`sopId`(int64, 必填,sopId);`qwTag`(QwTagCondition, 可选,企微标签列表);`name`(string, 必填,名称);`pushMode`(string, 必填,推送模式 极速群发 fastPush 正常模式 common);`stopSopQwTag`(QwTagCondition, 可选,停止sop任务的标签);`condition`(repeated Condition, 可选,条件);`isNoTriggerByCondition`(bool, 可选,true 满足条件不触发 false 满足条件触发);`isStopByNoMeetCondition`(bool, 可选,不符合条件停止);`conditionTriggerMode`(string, 可选,触发条件模式 and 满足所有条件 or 满足任意条件) | `sopType`(string,sop类型:标签模版 tag 新客模版 newFriend);`id`(int64,id) |
|
||||
| sop-应用Sop的详情 | `POST /api/sop/apply/info` | `id`(int64, 必填,id) | `id`(int64,id);`sopId`(int64,sopId);`sopType`(string,sop类型:标签模版 tag 新客模版 newFriend);`applyType`(string,应用类型 所有微号 all 单号模式-指定 specify);`applyBotInfo`(repeated ApplyBotInfo,单号模式-指定 应用微号信息);`qwTag`(QwTagCondition,企微标签列表);`name`(string,名称);`sopTag`(SopTag,标签模版);`sopNewFriend`(SopNewFriend,新客模版);`botType`(int64,1 个微 2 企微);... |
|
||||
| sop-应用Sop的详情 | `POST /api/sop/apply/info` | `id`(int64, 必填,id) | `id`(int64,id);`sopId`(int64,sopId);`sopType`(string,sop类型:标签模版 tag 新客模版 newFriend);`applyType`(string,应用类型 所有微号 all 单号模式-指定 specify);`applyBotInfo`(repeated ApplyBotInfo,单号模式-指定 应用微号信息);`qwTag`(QwTagCondition,企微标签列表);`name`(string,名称);`sopTag`(SopTag,标签模版);`sopNewFriend`(SopNewFriend,新客模版);`botType`(int32,1 个微 2 企微);... |
|
||||
| sop-应用Sop删除 | `POST /api/sop/apply/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
|
||||
|
||||
@@ -101,11 +101,11 @@
|
||||
| 手动触发检查 | `POST /api/addListener/check/trigger` | `planId`(int64, 必填,计划ID) | 空对象或无业务数据 |
|
||||
| 重置统计计数 | `POST /api/addListener/stats/reset` | `planId`(int64, 必填,计划ID);`botIds`(repeated int64, 可选,指定重置的微信号IDs,为空则重置计划下所有微信号) | 空对象或无业务数据 |
|
||||
| 中控群-列表 | `POST /api/central/control/group/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize) | `list`(repeated CentralControlGroupItem,列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 中控群-添加 | `POST /api/central/control/group/add` | `id`(int64, 可选,id);`listeningObjectList`(repeated ListeningObjectList, 必填,监听对象列表);`targetGroupId`(int64, 必填,中控群);`botType`(int64, 必填,1 个微 2 企微);`msgType`(repeated string, 必填,监听的消息类型);`userIds`(repeated int64, 必填,可见的客服);`name`(string, 必填,名称);`isAutoAtSender`(bool, 必填,是否自动@发送者);`timeRange`(repeated TimeRangeItem, 必填,时间段) | `id`(int64,id) |
|
||||
| 中控群-更新 | `POST /api/central/control/group/update` | `id`(int64, 可选,id);`listeningObjectList`(repeated ListeningObjectList, 必填,监听对象列表);`targetGroupId`(int64, 必填,中控群);`botType`(int64, 必填,1 个微 2 企微);`msgType`(repeated string, 必填,监听的消息类型);`userIds`(repeated int64, 必填,可见的客服);`name`(string, 必填,名称);`isAutoAtSender`(bool, 必填,是否自动@发送者);`timeRange`(repeated TimeRangeItem, 必填,时间段) | 空对象或无业务数据 |
|
||||
| 中控群-详情 | `POST /api/central/control/group/info` | `id`(int64, 必填,id) | `id`(int64,id);`listeningObjectList`(repeated ListeningObjectList,监听对象列表);`targetGroupId`(int64,中控群);`botType`(int64,1 个微 2 企微);`msgType`(repeated string,监听的消息类型);`userIds`(repeated int64,可见的客服);`name`(string,名称);`targetGroupName`(string,中控群昵称);`targetGroupAvatar`(string,中控群头像);`isAutoAtSender`(bool,是否自动@发送者);... |
|
||||
| 中控群-添加 | `POST /api/central/control/group/add` | `id`(int64, 可选,id);`listeningObjectList`(repeated ListeningObjectList, 必填,监听对象列表);`targetGroupId`(int64, 必填,中控群);`botType`(int32, 必填,1 个微 2 企微);`msgType`(repeated string, 必填,监听的消息类型);`userIds`(repeated int64, 必填,可见的客服);`name`(string, 必填,名称);`isAutoAtSender`(bool, 必填,是否自动@发送者);`timeRange`(repeated TimeRangeItem, 必填,时间段) | `id`(int64,id) |
|
||||
| 中控群-更新 | `POST /api/central/control/group/update` | `id`(int64, 可选,id);`listeningObjectList`(repeated ListeningObjectList, 必填,监听对象列表);`targetGroupId`(int64, 必填,中控群);`botType`(int32, 必填,1 个微 2 企微);`msgType`(repeated string, 必填,监听的消息类型);`userIds`(repeated int64, 必填,可见的客服);`name`(string, 必填,名称);`isAutoAtSender`(bool, 必填,是否自动@发送者);`timeRange`(repeated TimeRangeItem, 必填,时间段) | 空对象或无业务数据 |
|
||||
| 中控群-详情 | `POST /api/central/control/group/info` | `id`(int64, 必填,id) | `id`(int64,id);`listeningObjectList`(repeated ListeningObjectList,监听对象列表);`targetGroupId`(int64,中控群);`botType`(int32,1 个微 2 企微);`msgType`(repeated string,监听的消息类型);`userIds`(repeated int64,可见的客服);`name`(string,名称);`targetGroupName`(string,中控群昵称);`targetGroupAvatar`(string,中控群头像);`isAutoAtSender`(bool,是否自动@发送者);... |
|
||||
| 中控群-删除 | `POST /api/central/control/group/del` | `ids`(repeated int64, 必填,ids) | 空对象或无业务数据 |
|
||||
| 获取原先群的信息 | `POST /api/central/control/group/getOriginalGroup` | `msgId`(string, 必填,消息id) | `botId`(int64,微号id);`botType`(int64,微号类型);`chatType`(string,聊天类型);`sender`(int64,发送者 客户就客户id 群就群就是群成员id);`originalId`(int64,来源: 客户就客户id 群就群就是群id) |
|
||||
| 获取原先群的信息 | `POST /api/central/control/group/getOriginalGroup` | `msgId`(string, 必填,消息id) | `botId`(int64,微号id);`botType`(int32,微号类型);`chatType`(string,聊天类型);`sender`(int64,发送者 客户就客户id 群就群就是群成员id);`originalId`(int64,来源: 客户就客户id 群就群就是群id) |
|
||||
| 中控群关键词替换列表 | `POST /api/central/control/group/keywordReplace/list` | `{}` | `id`(int64,id);`keywordList`(repeated string,需要替换的关键词列表);`threePartyApi`(string,空 不使用 aliyun 使用阿里云的api);`newKeywordList`(repeated KeywordReplaceList,支持自定义替换) |
|
||||
| 中控群关键词替换更新 | `POST /api/central/control/group/keywordReplace/update` | `id`(int64, 必填,id);`keywordList`(repeated string, 必填,需要替换的关键词列表);`threePartyApi`(string, 必填,空 不使用 aliyun 使用阿里云的api);`newKeywordList`(repeated KeywordReplaceList, 必填,支持自定义替换) | 空对象或无业务数据 |
|
||||
| 中控群-手动排序 | `POST /api/central/control/group/updatePosition` | `sourceId`(int64, 必填,移动方案id);`targetId`(int64, 必填,目标方案id) | 空对象或无业务数据 |
|
||||
@@ -145,7 +145,7 @@
|
||||
| 推广位-更新 | `POST /api/taoke/promotion/position/update` | `id`(int64, 必填,id);`taokeId`(int64, 必填,淘客id);`pid`(string, 必填,pid);`name`(string, 必填,名称);`type`(string, 必填,类型: taobao 淘宝 jd 京东 pdd 拼多多 meituan 美团) | 空对象或无业务数据 |
|
||||
| 推广位-删除 | `POST /api/taoke/promotion/position/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 美团-选品策略 | `POST /api/taoke/meituan/productSelectionStrategy` | `{}` | `items`(repeated ProductSelectionStrategyItem);`cities`(repeated CityItem) |
|
||||
| 美团-查询订单 | `POST /api/taoke/meituan/query/product` | `platform`(int64, 可选,1 到家及其他业务类型,2 到店业务类型(包含到店美食、休闲生活、酒店、门票);不填则默认1);`businessLine`(repeated int64, 可选,业务线标识);`categoryIds`(repeated int64, 可选,订单品类;);`actId`(int64, 可选,活动物料id);`sid`(string, 可选,二级推广位id);`orderId`(string, 可选,订单id);`startTime`(int64, 可选,开始时间 秒);`endTime`(int64, 可选,结束时间 秒);`page`(int64, 可选,页码);`limit`(int64, 可选,每页限制条数,默认100,最大支持100);`queryTimeType`(int64, 可选,查询时间类型,枚举值, 1 按订单支付时间查询, 2 按照更新时间查询, 默认为1);`tradeType`(int64, 可选,交易类型,1表示CPS,2表示CPA);`scrollId`(string, 可选,分页id,当searchType选择2逐页查询时,本字段为必填。若不填写,默认查询首页。取值为上一页查询时出参的scrollId字段);`searchType`(int64, 可选,订单分页查询方案选择,不填则默认为1。);`cityNames`(repeated string, 可选,可输入城市名称圈定特定城市的订单,单次最多查询10个城市(英文逗号分隔)。);`scrmOrderMode`(int64, 可选,订单查询模式,0:查普通订单,1:查推品订单,不填默认0);`promotionPositionId`(int64, 可选,推广位id) | `QueryOrderReply`(google.protobuf.Struct,查询美团订单的接口返回data) |
|
||||
| 美团-查询订单 | `POST /api/taoke/meituan/query/product` | `platform`(int64, 可选,1 到家及其他业务类型,2 到店业务类型(包含到店美食、休闲生活、酒店、门票);不填则默认1);`businessLine`(repeated int64, 可选,业务线标识);`categoryIds`(repeated int64, 可选,订单品类;);`actId`(int64, 可选,活动物料id);`sid`(string, 可选,二级推广位id);`orderId`(string, 可选,订单id);`startTime`(int64, 可选,开始时间 秒);`endTime`(int64, 可选,结束时间 秒);`page`(int64, 可选,页码);`limit`(int64, 可选,每页限制条数,默认100,最大支持100);`queryTimeType`(int64, 可选,查询时间类型,枚举值, 1 按订单支付时间查询, 2 按照更新时间查询, 默认为1);`tradeType`(int64, 可选,交易类型,1表示CPS,2表示CPA);`scrollId`(string, 可选,分页id,当searchType选择2逐页查询时,本字段为必填。若不填写,默认查询首页。取值为上一页查询时出参的scrollId字段);`searchType`(int64, 可选,订单分页查询方案选择,不填则默认为1。);`cityNames`(repeated string, 可选,可输入城市名称圈定特定城市的订单,单次最多查询10个城市(英文逗号分隔)。);`scrmOrderMode`(int64, 可选,订单查询模式,0:查普通订单,1:查推品订单,不填默认0);`promotionPositionId`(int64, 可选,推广位id) | `data`(google.protobuf.Struct,查询美团订单的接口返回数据) |
|
||||
| 推广位-拼多多推广位备案 | `POST /api/taoke/pdd/promotionPosition/auth` | `promotionPositionId`(int64, 可选,推广位id) | `link`(string) |
|
||||
|
||||
|
||||
@@ -157,7 +157,10 @@ _暂无公开接口。_
|
||||
## 常用示例
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/keyword/list -d '{"page":1,"pageSize":20,"botType":1}'
|
||||
htsy-cli call /api/messagePush/list -d '{"page":1,"pageSize":20,"botType":1}'
|
||||
htsy-cli call /api/sop/list -d '{"page":1,"pageSize":20,"botType":1}'
|
||||
# 关键词方案列表(botType 可选:1 个微 2 企微)
|
||||
htsy-cli call /api/keyword/list -d '{"page":1,"pageSize":20,"botType":2}'
|
||||
# 群发计划列表(该接口无 botType 字段;statusList 见字段表:success/fail/executing/stop/running)
|
||||
htsy-cli call /api/messagePush/list -d '{"page":1,"pageSize":20,"statusList":["success","fail"]}'
|
||||
# SOP 列表(sopType 必填,不传会返回 400:标签模版 tag / 新客模版 newFriend)
|
||||
htsy-cli call /api/sop/list -d '{"page":1,"pageSize":20,"sopType":"tag"}'
|
||||
```
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
| 分组-列表 | `POST /api/bot/wx/category/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pageSize);`name`(string, 可选,分组名字);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated CategoryItem,分组列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 分组-添加机器人 | `POST /api/bot/wx/category/botAdd` | `id`(int64, 必填,分组id);`botIds`(repeated int64, 必填,组内-机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-删除机器人 | `POST /api/bot/wx/category/botDel` | `id`(int64, 必填,分组id);`botIds`(repeated int64, 必填,组内-机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 子账号拥有的机器人列表 | `POST /api/bot/wx/user/list` | `userId`(int64, 必填,子账号id);`page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`botName`(string, 可选,机器人名字);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated HttpBotInfo,组内群列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 子账号拥有的机器人列表 | `POST /api/bot/wx/user/list` | `userId`(int64, 必填,子账号id);`page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`botName`(string, 可选,机器人名字);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated HttpBotInfo,机器人列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 修改机器人描述 | `POST /api/bot/wx/remark/update` | `id`(int64, 必填,机器人id);`remark`(string, 必填,备注);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 修改机器人备注名 | `POST /api/bot/wx/name/update` | `id`(int64, 必填,机器人id);`name`(string, 必填,别名);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 消息发送统计-根据日期 | `POST /api/bot/wx/stats/msgSendData/byDate` | `date`(string, 可选,日期,不传默认为今日);`botId`(int64, 必填,机器人id);`botType`(int32, 必填,类型 1 个微 2企微) | `msgNum`(int64,消息发送数量);`groupNum`(int64,在多少个群发送);`friendNum`(int64,给多少个好友发消息);`planNum`(int64,参与计划数) |
|
||||
@@ -32,14 +32,14 @@
|
||||
| 获取账号下的所有企微号的所在主体,需要主体id则需要从这里获取 | `POST /api/bot/wx/corp/list` | `{}` | `list`(repeated CorpInfoItem) |
|
||||
| 更新微号的状态 | `POST /api/bot/wx/updateBotStatus` | `botId`(int64, 必填,微号id);`botStatus`(int32, 必填,微号状态 0正常 1封禁);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
|
||||
| 微号管理-清空所有指令 | `POST /api/bot/wx/cleanAll/cmd` | `botId`(int64, 必填,微号id);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
|
||||
| 微号扫码添加好友 | `POST /api/bot/wx/scanQrcode/addFriend` | `botId`(int64, 必填,微号id);`botType`(int64, 必填,机器人类型 1是个微 2企微) | 空对象或无业务数据 |
|
||||
| 微号扫码添加好友 | `POST /api/bot/wx/scanQrcode/addFriend` | `botId`(int64, 必填,微号id);`botType`(int32, 必填,机器人类型 1是个微 2企微) | 空对象或无业务数据 |
|
||||
| 迁移微号 | `POST /api/bot/wx/transferBot` | `botIds`(repeated int64, 可选);`targetAccountId`(int64, 可选);`botType`(int32, 可选) | `successIds`(repeated int64,成功Id列表);`failList`(repeated failItem,失败列表) |
|
||||
| 联系人统计,目前只有客户数 | `POST /api/bot/wx/contactStats` | `ids`(repeated int64, 可选);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | `list`(repeated ContactStatsStatsItem,列表) |
|
||||
| 登录码-自动登录 | `POST /api/bot/wx/login/autoLogin` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微);`addressId`(string, 可选,代理地址) | 空对象或无业务数据 |
|
||||
| 登录码-推送确认登录 | `POST /api/bot/wx/login/push/confirmLogin` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
|
||||
| 解除微号异常 | `POST /api/bot/wx/releaseAbnormal` | `botIds`(repeated int64, 必填,微号ids);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | 空对象或无业务数据 |
|
||||
| 微号管理-微号休眠状态变更 | `POST /api/bot/wx/sleep/update` | `botIds`(repeated int64, 必填,微号id);`isSleep`(bool, 必填,是否休眠 true 是 false 否);`botType`(int32, 可选) | `list`(repeated HttpWxbotSleepStatusUpdateItem) |
|
||||
| 微号管理-微号扫码进群 | `POST /api/bot/wx/scanQrcode/joinGroup` | `botId`(int64, 必填,微号id);`botType`(int64, 必填,机器人类型 1是个微 2企微);`qrcodeUrl`(string, 可选,二维码的链接);`groupUrl`(string, 可选,二维码扫描出来的群链接) | 空对象或无业务数据 |
|
||||
| 微号管理-微号扫码进群 | `POST /api/bot/wx/scanQrcode/joinGroup` | `botId`(int64, 必填,微号id);`botType`(int32, 必填,机器人类型 1是个微 2企微);`qrcodeUrl`(string, 可选,二维码的链接);`groupUrl`(string, 可选,二维码扫描出来的群链接) | 空对象或无业务数据 |
|
||||
| 云端h5-获取登录二维码 | `POST /api/bot/wx/login/h5/getQrcode` | `botKey`(string, 必填,botKey);`addressId`(string, 可选,代理的城市代码);`loginType`(int64, 必填,登录类型 0默认服务器登录 1 微蜂的app登录);`botType`(int32, 必填,机器人类型 1是个微 2是企微);`clientVersion`(string, 必填,客户端版本 4.1.12 和 4.1.16);`clientPlatform`(int32, 必填,客户端平台类型 1 mac 2 pc 3 ipad);`token`(string, 可选,h5获取二维码的时候,授权token) | `code`(string,登录码);`expireTime`(int64,二维码的过期时间 多少秒) |
|
||||
| 云端h5-获取登录二维码登录状态 | `POST /api/bot/wx/login/h5/scanStatus` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微) | `wxStatus`(int32,扫码状态,1 等待 2 成功 4取消);`authStatus`(int32,授权状态 1成功 2失败);`failReason`(string,失败原因);`needVerifyCode`(bool,是否需要登录验证码);`authUrl`(string,验证链接);`loginAuthParam`(LoginAuthParam,登录验证参数);`authQrcode`(string,验证二维码 app扫码) |
|
||||
| 云端h5-新登录发送验证码 | `POST /api/bot/wx/login/h5/codeVerify` | `botKey`(string, 必填,botKey);`botType`(int32, 必填,机器人类型 1是个微 2是企微);`code`(string, 必填,验证码) | 空对象或无业务数据 |
|
||||
@@ -51,10 +51,13 @@
|
||||
|
||||
## 常用示例
|
||||
|
||||
查询微号列表:
|
||||
查询微号列表(`botType` 决定查询的是个微还是企微,**查企微必须传 `botType:2`**;账号下若没有个微号,照搬个微示例会得到 `total:0`):
|
||||
|
||||
```bash
|
||||
# 个微微号列表
|
||||
htsy-cli call /api/bot/wx/list -d '{"page":1,"pageSize":20,"botType":1}'
|
||||
# 企微微号列表
|
||||
htsy-cli call /api/bot/wx/list -d '{"page":1,"pageSize":20,"botType":2}'
|
||||
```
|
||||
|
||||
发送文本消息:
|
||||
|
||||
@@ -6,19 +6,19 @@
|
||||
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 客服消息-发送 | `POST /api/customer/msg/send` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int64, 必填,机器人类型);`msgType`(string, 必填,消息类型);`text`(MessageText, 可选,文本消息);`image`(MessageImage, 可选,图片消息);`sticker`(MessageSticker, 可选,表情消息);`video`(MessageVideo, 可选,视频消息);`audio`(MessageAudio, 可选,音频);`file`(MessageFile, 可选,文件);`compositeImage`(MessageCompositeImage, 可选,合成图消息);`miniProgram`(MessageMiniProgram, 可选,小程序消息);`link`(MessageLink, 可选,链接消息);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`group`(MessageGroup, 可选,群号);`liveBroadcastRoom`(MessageLiveBroadcastRoom, 可选,直播间消息);`dialogue`(Dialogue, 可选,话术库id);`materialGroup`(repeated MaterialGroup, 可选,素材组);... 另有 5 个字段 | `message`(MessageItem,消息);`time`(int64,发送时间);`sender`(string,发送者的wxid, 有可能是botwxid,有可能是好友的wxid);`senderBot`(bool,是否是机器人);`senderAvatar`(string,发送者头像);`name`(string,昵称);`status`(string,状态);`failReason`(string,原因);`msgId`(string,消息id);`wxMsgId`(string,微信的msgId);... |
|
||||
| 消息撤回 | `POST /api/customer/msg/retract` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int64, 必填,机器人类型);`msgId`(string, 必填,微信官方的msgID) | 空对象或无业务数据 |
|
||||
| 发送话术库 | `POST /api/customer/msg/send/dialogue` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int64, 必填,机器人类型);`msgType`(string, 必填,消息类型);`text`(MessageText, 可选,文本消息);`image`(MessageImage, 可选,图片消息);`sticker`(MessageSticker, 可选,表情消息);`video`(MessageVideo, 可选,视频消息);`audio`(MessageAudio, 可选,音频);`file`(MessageFile, 可选,文件);`compositeImage`(MessageCompositeImage, 可选,合成图消息);`miniProgram`(MessageMiniProgram, 可选,小程序消息);`link`(MessageLink, 可选,链接消息);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`group`(MessageGroup, 可选,群号);`liveBroadcastRoom`(MessageLiveBroadcastRoom, 可选,直播间消息);`dialogue`(Dialogue, 可选,话术库id);`materialGroup`(repeated MaterialGroup, 可选,素材组);... 另有 5 个字段 | `list`(repeated MsgRecordItem,消息) |
|
||||
| 消息转发 | `POST /api/customer/msg/forward` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int64, 必填,机器人类型);`message`(MessageItem, 必填,消息) | `message`(MessageItem,消息);`time`(int64,发送时间);`sender`(string,发送者的wxid, 有可能是botwxid,有可能是好友的wxid);`senderBot`(bool,是否是机器人);`senderAvatar`(string,发送者头像);`name`(string,昵称);`status`(string,状态);`failReason`(string,原因);`msgId`(string,消息id);`wxMsgId`(string,微信的msgId);... |
|
||||
| 客服消息-发送 | `POST /api/customer/msg/send` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int32, 必填,机器人类型);`msgType`(string, 必填,消息类型);`text`(MessageText, 可选,文本消息);`image`(MessageImage, 可选,图片消息);`sticker`(MessageSticker, 可选,表情消息);`video`(MessageVideo, 可选,视频消息);`audio`(MessageAudio, 可选,音频);`file`(MessageFile, 可选,文件);`compositeImage`(MessageCompositeImage, 可选,合成图消息);`miniProgram`(MessageMiniProgram, 可选,小程序消息);`link`(MessageLink, 可选,链接消息);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`group`(MessageGroup, 可选,群号);`liveBroadcastRoom`(MessageLiveBroadcastRoom, 可选,直播间消息);`dialogue`(Dialogue, 可选,话术库id);`materialGroup`(repeated MaterialGroup, 可选,素材组);... 另有 5 个字段 | `message`(MessageItem,消息);`time`(int64,发送时间);`sender`(string,发送者的wxid, 有可能是botwxid,有可能是好友的wxid);`senderBot`(bool,是否是机器人);`senderAvatar`(string,发送者头像);`name`(string,昵称);`status`(string,状态);`failReason`(string,原因);`msgId`(string,消息id);`wxMsgId`(string,微信的msgId);... |
|
||||
| 消息撤回 | `POST /api/customer/msg/retract` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int32, 必填,机器人类型);`msgId`(string, 必填,微信官方的msgID) | 空对象或无业务数据 |
|
||||
| 发送话术库 | `POST /api/customer/msg/send/dialogue` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int32, 必填,机器人类型);`msgType`(string, 必填,消息类型);`text`(MessageText, 可选,文本消息);`image`(MessageImage, 可选,图片消息);`sticker`(MessageSticker, 可选,表情消息);`video`(MessageVideo, 可选,视频消息);`audio`(MessageAudio, 可选,音频);`file`(MessageFile, 可选,文件);`compositeImage`(MessageCompositeImage, 可选,合成图消息);`miniProgram`(MessageMiniProgram, 可选,小程序消息);`link`(MessageLink, 可选,链接消息);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`group`(MessageGroup, 可选,群号);`liveBroadcastRoom`(MessageLiveBroadcastRoom, 可选,直播间消息);`dialogue`(Dialogue, 可选,话术库id);`materialGroup`(repeated MaterialGroup, 可选,素材组);... 另有 5 个字段 | `list`(repeated MsgRecordItem,消息) |
|
||||
| 消息转发 | `POST /api/customer/msg/forward` | `chatType`(string, 必填,群group 好友 friend);`sender`(int64, 必填,接收者id);`botId`(int64, 必填,机器人Id);`botType`(int32, 必填,机器人类型);`message`(MessageItem, 必填,消息) | `message`(MessageItem,消息);`time`(int64,发送时间);`sender`(string,发送者的wxid, 有可能是botwxid,有可能是好友的wxid);`senderBot`(bool,是否是机器人);`senderAvatar`(string,发送者头像);`name`(string,昵称);`status`(string,状态);`failReason`(string,原因);`msgId`(string,消息id);`wxMsgId`(string,微信的msgId);... |
|
||||
| 客服会话-所有的消息对象 | `POST /api/customer/list` | `targetType`(string, 必填,不传默认都有:群group 好友 friend);`botId`(int64, 可选,可不传,用作筛选:机器人Id);`name`(string, 可选,可不传,用作筛选:名称);`msgType`(int64, 必填,0所有 1 已接待已读 2 接待中已读 3 接待中未读 4已接待 5接待中);`offset`(int64, 可选,上一次最后一条的开始时间);`start`(int64, 可选,从第几条开始);`limit`(int64, 可选,不传默认1万条,一次多少条);`customerUserId`(int64, 可选,客服账号id,只有主账号请求有效);`isCollect`(bool, 可选,true 筛选出收藏的客户);`tag`(repeated int64, 可选,标签);`qwTag`(repeated string, 可选,企微标签 第一个主体 后面接标签值) | `list`(repeated MsgItem);`offset`(int64,最后一条消息的时间戳);`last`(bool,是否已结束);`total`(int64,总数) |
|
||||
| 客服会话-所有的消息对象中进行搜索 | `POST /api/customer/list/search` | `targetType`(string, 必填,不传默认都有:群group 好友 friend);`targetId`(int64, 可选,可不传,用作筛选:群groupID 好友 friendId);`botId`(int64, 可选,可不传,用作筛选:机器人Id);`name`(string, 可选,可不传,用作筛选:名称);`msgType`(int64, 必填,0所有 1 已接待已读 2 接待中已读 3 接待中未读 4已接待 5接待中);`start`(int64, 必填,从第几条开始);`limit`(int64, 必填,不传默认1万条,一次多少条);`customerUserId`(int64, 可选,客服账号id,只有主账号请求有效);`tag`(repeated int64, 可选,标签);`qwTag`(repeated string, 可选,企微标签 第一个主体 后面接标签值) | `list`(repeated MsgSearchItem);`offset`(int64,最后一条消息的时间戳);`last`(bool,是否已结束);`total`(int64,总数) |
|
||||
| 客服会话-某个消息对象的聊天记录 | `POST /api/customer/record/list` | `startTime`(int64, 必填,开始时间);`endTime`(int64, 必填,结束时间);`offset`(int64, 必填,上一次最后一条的开始时间);`limit`(int64, 必填,一次多少条);`nextId`(int64, 必填,下一个id);`ids`(string, 必填,botID_FriendId_GroupId) | `list`(repeated MsgRecordItem,记录列表);`offset`(int64,最后一条消息的时间戳);`last`(bool,是否已结束);`total`(int64,总数);`nextId`(int64,下一个id) |
|
||||
| 客服会话-获取聊天界面的群或者客户的最新一条数据 | `POST /api/customer/latest` | `customerUserId`(int64, 可选,客服账号id,只有主账号请求有效);`idList`(repeated string, 必填,[]botID_FriendId_GroupId) | `list`(repeated MsgLatestReplyItem) |
|
||||
| 客服会话-改变同一条聊天记录的接待状态 | `POST /api/customer/msg/change` | `msgType`(int64, 必填,1 已接待已读 2 接待中已读 3 接待中未读 4已接待 5接待中);`ids`(string, 必填,botID_FriendId_GroupId) | `msgType`(int64,改变后的状态 1 已接待已读 2 接待中已读 3 接待中未读 4已接待 5接待中) |
|
||||
| 客服会话-标记这条消息已读 | `POST /api/customer/msg/read` | `sendTime`(int64, 可选,发送时间);`ids`(string, 必填,botID_FriendId_GroupId) | 空对象或无业务数据 |
|
||||
| 客服会话-某个消息对象的聊天记录 | `POST /api/customer/record/list` | `startTime`(int64, 必填,开始时间);`endTime`(int64, 必填,结束时间);`offset`(int64, 必填,上一次最后一条的开始时间);`limit`(int64, 必填,一次多少条);`nextId`(int64, 必填,下一个id);`ids`(string, 必填,botId_friendId_groupId) | `list`(repeated MsgRecordItem,记录列表);`offset`(int64,最后一条消息的时间戳);`last`(bool,是否已结束);`total`(int64,总数);`nextId`(int64,下一个id) |
|
||||
| 客服会话-获取聊天界面的群或者客户的最新一条数据 | `POST /api/customer/latest` | `customerUserId`(int64, 可选,客服账号id,只有主账号请求有效);`idList`(repeated string, 必填,[]botId_friendId_groupId) | `list`(repeated MsgLatestReplyItem) |
|
||||
| 客服会话-改变同一条聊天记录的接待状态 | `POST /api/customer/msg/change` | `msgType`(int64, 必填,1 已接待已读 2 接待中已读 3 接待中未读 4已接待 5接待中);`ids`(string, 必填,botId_friendId_groupId) | `msgType`(int64,改变后的状态 1 已接待已读 2 接待中已读 3 接待中未读 4已接待 5接待中) |
|
||||
| 客服会话-标记这条消息已读 | `POST /api/customer/msg/read` | `sendTime`(int64, 可选,发送时间);`ids`(string, 必填,botId_friendId_groupId) | 空对象或无业务数据 |
|
||||
| 根据senderInfo获取 | `POST /api/customer/sender/info` | `senders`(repeated string, 必填,格式为: sender-bot 或者 sender-friend 或者 sender-group) | `senderList`(repeated SenderInfo,发送者的info) |
|
||||
| 客服会话-根据cdn参数下载资源 | `POST /api/customer/download` | `cdnType`(int32, 必填,c2c 2 微信:);`qwCdn`(QwCdn, 可选);`msgType`(string, 可选);`botId`(int64, 可选);`traceId`(string, 可选,聊天记录的traceId);`chatType`(string, 可选,聊天类型) | `link`(string) |
|
||||
| 客服会话-客服转接 | `POST /api/customer/switch` | `userId`(int64, 必填,转接给哪一个用户的用户id);`ids`(repeated string, 必填,转接的对象;botId_friendId_GroupId) | `fail`(string);`failList`(repeated string) |
|
||||
| 客服会话-客服转接 | `POST /api/customer/switch` | `userId`(int64, 必填,转接给哪一个用户的用户id);`ids`(repeated string, 必填,转接的对象;botId_friendId_groupId) | `fail`(string);`failList`(repeated string) |
|
||||
| 客服配置-添加关键词过滤,客户过滤,接收群设置 | `POST /api/customer/config/add` | `userId`(int64, 必填,子账号);`groupRange`(repeated int64, 可选,监听退群进群事件的群范围);`friendFilter`(repeated int64, 可选,需要过滤的客户);`friendRange`(repeated int64, 可选,只接收的客户);`keyWordRule`(repeated keyWordRuleItem, 可选,关键词规则:eg:[{"content":"文本","type":"eq"}]);`tagRange`(repeated string, 可选,只接收拥有这个标签的客户);`allocationUpperLimit`(int64, 可选,接待上限);`isRealRead`(bool, 可选,是否点到企微的未读);`config`(google.protobuf.Value, 可选,个人配置);`filters`(repeated Filter, 可选,条件筛选);`receivedAutoDel`(receiveAutoDelItem, 可选,已接待自动延时或者立即删除);`receiveGroupRange`(map<int64, int64>, 可选,设置客服接待的客户群,以及指定客户群的监听的微号);`receptionTimeRange`(repeated ReceptionTimeRangeItem, 可选,上班时间范围);`defaultReplyList`(repeated DefaultReply, 可选,默认回复) | 空对象或无业务数据 |
|
||||
| 客服配置-主账号获取子账号自身的配置 | `POST /api/customer/config/get` | `userId`(int64, 可选) | `id`(int64,id);`accountId`(int64,主账号id);`userId`(int64,子账号id);`groupRange`(repeated int64,可见群);`friendFilter`(repeated int64,需要过滤的客户);`friendRange`(repeated int64,只接收的客户);`keyWordRule`(repeated keyWordRuleItem,关键词规则:eg:[{"content":"文本","type":"eq"}]);`tagRange`(repeated string,只接收拥有这个标签的客户);`allocationUpperLimit`(int64,接待上限);`username`(string,账号);... |
|
||||
| 客服配置-子账号获取自身的配置 | `POST /api/customer/config/getByUserId` | `{}` | `id`(int64,id);`accountId`(int64,主账号id);`userId`(int64,子账号id);`groupRange`(repeated int64,可见群);`friendFilter`(repeated int64,需要过滤的客户);`friendRange`(repeated int64,只接收的客户);`keyWordRule`(repeated keyWordRuleItem,关键词规则:eg:[{"content":"文本","type":"eq"}]);`tagRange`(repeated string,只接收拥有这个标签的客户);`allocationUpperLimit`(int64,接待上限);`username`(string,账号);... |
|
||||
@@ -34,33 +34,38 @@
|
||||
| 客服工具栏-工具栏列表排序 | `POST /api/customer/tool/sort` | `list`(repeated ToolItem, 可选) | 空对象或无业务数据 |
|
||||
| 客服工具栏-工具栏列表删除 | `POST /api/customer/tool/del` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 客服工具栏-工具栏开关 | `POST /api/customer/tool/switch` | `id`(int64, 可选);`switch`(bool, 可选) | 空对象或无业务数据 |
|
||||
| 客服会话-批量删除接待列表中对象 | `POST /api/customer/msg/del` | `idList`(repeated string, 必填,[]botID_FriendId_GroupId) | 空对象或无业务数据 |
|
||||
| 客服会话-语音消息转文字 | `POST /api/customer/msg/voice/convert` | `ids`(string, 必填,botId_friendId_GroupId);`msgId`(string, 必填,消息id) | `text`(string) |
|
||||
| 客服会话-批量删除接待列表中对象 | `POST /api/customer/msg/del` | `idList`(repeated string, 必填,[]botId_friendId_groupId) | 空对象或无业务数据 |
|
||||
| 客服会话-语音消息转文字 | `POST /api/customer/msg/voice/convert` | `ids`(string, 必填,botId_friendId_groupId);`msgId`(string, 必填,消息id) | `text`(string) |
|
||||
| 客服会话-查看账号下的客服消息 | `POST /api/customer/info` | `userId`(int64, 可选,可以查询某个客服下的情况,userId为0就是未分配的客户) | `userId`(int64,客服账号id);`total`(int64,总数);`receive`(int64,接待中);`received`(int64,已接待);`nickName`(string,客服名称);`avatar`(string,客服头像);`receiveList`(repeated string,接待中对象);`receivedList`(repeated string,已接待对象);`isOnLine`(bool,是否在线) |
|
||||
| 客服会话-统计账号下的客服消息 | `POST /api/customer/info/count` | `{}` | `total`(int64,总数);`allocated`(int64,已分配数);`undistributed`(int64,未分配数);`customerList`(repeated CustomerInfoItem,账号下的客服列表) |
|
||||
| 客服会话-设置为收藏 | `POST /api/customer/set/collect` | `isCollect`(bool, 可选,是否收藏);`ids`(string, 必填,botID_FriendId_GroupId) | 空对象或无业务数据 |
|
||||
| 客服会话-设置为收藏 | `POST /api/customer/set/collect` | `isCollect`(bool, 可选,是否收藏);`ids`(string, 必填,botId_friendId_groupId) | 空对象或无业务数据 |
|
||||
| 客服会话-客服系统未分配的详情 | `POST /api/customer/info/count/unDistributed` | `{}` | `list`(repeated CustomerUnDistributedItem) |
|
||||
| 客服会话-主动接待客户 | `POST /api/customer/friend/receive` | `chatType`(string, 可选,群group 好友 friend);`friendId`(int64, 可选,客户id);`groupId`(int64, 可选,群id);`botId`(int64, 可选,机器人的id);`userId`(int64, 可选,客服id);`isForced`(bool, 可选,是否强制接待 默认为是) | 空对象或无业务数据 |
|
||||
| 客服统计-按时间范围查询 | `POST /api/customer/info/statistics` | `startTime`(int64, 可选);`endTime`(int64, 可选) | `list`(repeated StatisticsDataItem) |
|
||||
| 客服统计-主动调用统计接口 | `POST /api/customer/info/statisticsByDate` | `dateTime`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 账号配置-列表 | `POST /api/customer/config/group/info` | `{}` | `id`(int64,id);`botList`(CustomerConfigGroupBotItem,过滤的微号);`friendList`(repeated int64,需要过滤的客户);`corpList`(repeated string,需要过滤的主体);`whiteListGroup`(repeated int64,白名单群Id);`keyWordRule`(repeated keyWordRuleItem,关键词规则:eg:[{"content":"文本","type":"eq"}]);`groupMemberList`(repeated int64,需要过滤的群成员ids);`friendAndGroupWxids`(repeated string,需要过滤的客户和群成员wxids);`linkFilter`(repeated LinkFilterItem,链接过滤);`miniProgramFilter`(repeated MiniProgramFilterItem,小程序过滤);... |
|
||||
| 账号配置-分页加载过滤客户 | `POST /api/customer/config/group/filterFriend` | `page`(int64, 可选);`pageSize`(int64, 可选);`botType`(int64, 可选);`name`(string, 可选) | `friendList`(repeated string,需要过滤的客户);`total`(int64);`last`(bool);`page`(int64);`pageSize`(int64) |
|
||||
| 账号配置-分页加载过滤客户 | `POST /api/customer/config/group/filterFriend` | `page`(int64, 可选);`pageSize`(int64, 可选);`botType`(int32, 可选);`name`(string, 可选) | `friendList`(repeated string,需要过滤的客户);`total`(int64);`last`(bool);`page`(int64);`pageSize`(int64) |
|
||||
| 账号配置-设置过滤的企微号 | `POST /api/customer/config/group/add/bot` | `botIds`(repeated int64, 必填,需要过滤的企微id) | 空对象或无业务数据 |
|
||||
| 账号配置-设置过滤的客户 | `POST /api/customer/config/group/add/friend` | `friendIds`(repeated int64, 必填,需要过滤的客户id);`FriendAndGroupMemberWxids`(repeated string, 必填,需要过滤的客户或者群成员的wxid);`wxFriendAndGroupMemberWxids`(repeated string, 必填,个微-需要过滤的客户或者群成员的wxid) | 空对象或无业务数据 |
|
||||
| 账号配置-移除过滤的客户 | `POST /api/customer/config/group/del/friend` | `friendIds`(repeated int64, 必填,需要过滤的客户id);`FriendAndGroupMemberWxids`(repeated string, 必填,需要过滤的客户或者群成员的wxid);`wxFriendAndGroupMemberWxids`(repeated string, 必填,个微-需要过滤的客户或者群成员的wxid) | 空对象或无业务数据 |
|
||||
| 账号配置-设置过滤的客户 | `POST /api/customer/config/group/add/friend` | `friendIds`(repeated int64, 必填,需要过滤的客户id);`friendAndGroupMemberWxids`(repeated string, 必填,需要过滤的客户或者群成员的wxid);`wxFriendAndGroupMemberWxids`(repeated string, 必填,个微-需要过滤的客户或者群成员的wxid) | 空对象或无业务数据 |
|
||||
| 账号配置-移除过滤的客户 | `POST /api/customer/config/group/del/friend` | `friendIds`(repeated int64, 必填,需要过滤的客户id);`friendAndGroupMemberWxids`(repeated string, 必填,需要过滤的客户或者群成员的wxid);`wxFriendAndGroupMemberWxids`(repeated string, 必填,个微-需要过滤的客户或者群成员的wxid) | 空对象或无业务数据 |
|
||||
| 账号配置-设置放行的企微客户 | `POST /api/customer/config/group/release/qwFriend` | `qwFriendWxids`(repeated string, 必填,需要放行的企微);`isDel`(bool, 必填,是否删除) | 空对象或无业务数据 |
|
||||
| 账号配置-更新 | `POST /api/customer/config/group/update` | `id`(int64, 可选,id);`botList`(CustomerConfigGroupBotItem, 可选,过滤的微号);`friendList`(repeated int64, 可选,需要过滤的客户);`corpList`(repeated string, 可选,需要过滤的主体);`keyWordRule`(repeated keyWordRuleItem, 可选,关键词规则:eg:[{"content":"文本","type":"eq"}]);`groupMemberList`(repeated int64, 可选,需要过滤的群成员ids);`friendAndGroupWxids`(repeated string, 可选,需要过滤的客户和群成员wxids);`linkFilter`(repeated LinkFilterItem, 可选,链接过滤);`miniProgramFilter`(repeated MiniProgramFilterItem, 可选,小程序过滤);`freeVideoFilter`(repeated FreeVideoFilterItem, 可选,视频号过滤);`wxFriendAndGroupWxids`(repeated string, 可选,个微需要过滤的客户和群成员wxids);`Allocation`(string, 可选,分配模式 auto 自动 manual 手动);`qwFriendWxids`(repeated string, 必填,需要放行的企微) | 空对象或无业务数据 |
|
||||
| 账号配置-更新 | `POST /api/customer/config/group/update` | `id`(int64, 可选,id);`botList`(CustomerConfigGroupBotItem, 可选,过滤的微号);`friendList`(repeated int64, 可选,需要过滤的客户);`corpList`(repeated string, 可选,需要过滤的主体);`keyWordRule`(repeated keyWordRuleItem, 可选,关键词规则:eg:[{"content":"文本","type":"eq"}]);`groupMemberList`(repeated int64, 可选,需要过滤的群成员ids);`friendAndGroupWxids`(repeated string, 可选,需要过滤的客户和群成员wxids);`linkFilter`(repeated LinkFilterItem, 可选,链接过滤);`miniProgramFilter`(repeated MiniProgramFilterItem, 可选,小程序过滤);`freeVideoFilter`(repeated FreeVideoFilterItem, 可选,视频号过滤);`wxFriendAndGroupWxids`(repeated string, 可选,个微需要过滤的客户和群成员wxids);`allocation`(string, 可选,分配模式 auto 自动 manual 手动);`qwFriendWxids`(repeated string, 必填,需要放行的企微) | 空对象或无业务数据 |
|
||||
| 客服配置-批量设置工作时间和默认回复 | `POST /api/customer/config/defaultReply/batch` | `userIds`(repeated int64, 必填,userIds);`receptionTimeRange`(repeated ReceptionTimeRangeItem, 可选,上班时间范围);`defaultReplyList`(repeated DefaultReply, 可选,默认回复) | 空对象或无业务数据 |
|
||||
| 客服-重新分配接待池 | `POST /api/customer/reallocate` | `userIds`(repeated int64, 必填,按子账号重新分配);`botIds`(repeated int64, 必填,指定微号的客户重新分配) | 空对象或无业务数据 |
|
||||
| 客服-ai回复 | `POST /api/customer/ai/reply` | `ids`(string, 必填,botID_FriendId_GroupId) | `content`(string,回复) |
|
||||
| 微号列表 | `POST /api/bot/list` | `botType`(int32, 必填,微号类型 1 个微 2 企微);`status`(int64, 可选,在线状态 在线状态 0未接入 1 离线 2 过期 3 在线);`keyword`(string, 可选,搜索的微号名字);`accountId`(int64, 必填,账号id) | `list`(repeated BotInfo,列表) |
|
||||
| 客服-ai回复 | `POST /api/customer/ai/reply` | `ids`(string, 必填,botId_friendId_groupId) | `content`(string,回复) |
|
||||
| 微号列表 | `POST /api/bot/list`(实测返回 404,查微号请改用 `POST /api/account/bot/list`) | `botType`(int32, 必填,微号类型 1 个微 2 企微);`status`(int64, 可选,在线状态 在线状态 0未接入 1 离线 2 过期 3 在线);`keyword`(string, 可选,搜索的微号名字);`accountId`(int64, 必填,账号id) | `list`(repeated BotInfo,列表) |
|
||||
| 海豚私域客服,用于回复海豚私域产品。 海豚私域是一款完善且高效的私域流量管理运营产品,帮助客户更加高效地管理私域客户。是企业微信在私域方面的补充。 | `POST /api/aiReply` | `query`(string, 必填,问题) | `answer`(string,回答) |
|
||||
|
||||
|
||||
## 常用示例
|
||||
|
||||
> 注意:上方“微号列表 `POST /api/bot/list`”实测返回 404,查微号请改用席位管理 `POST /api/account/bot/list`。
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/customer/chat/list -d '{"page":1,"pageSize":20}'
|
||||
htsy-cli call /api/customer/message/list -d '{"page":1,"pageSize":20}'
|
||||
htsy-cli call /api/bot/list -d '{"page":1,"pageSize":20,"botType":1}'
|
||||
# 客服会话列表(msgType: 0所有 1已接待已读 2接待中已读 3接待中未读 4已接待 5接待中)
|
||||
htsy-cli call /api/customer/list -d '{"msgType":0}'
|
||||
# 客服某个会话的聊天记录(ids 格式:botId_friendId_groupId)
|
||||
htsy-cli call /api/customer/record/list -d '{"startTime":1,"endTime":9999999999999,"offset":0,"limit":20,"nextId":0,"ids":"1_2_3"}'
|
||||
# 微号列表(席位管理;botType: 1 个微 2 企微;sort: 0默认 1过期升序 2过期降序)
|
||||
htsy-cli call /api/account/bot/list -d '{"page":1,"pageSize":20,"botType":2,"sort":0}'
|
||||
```
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
| 黑名单数据包-客户列表 | `POST /api/wx/friend/blacklist/package/friendList` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`packageId`(int64, 必填,包id);`wxid`(string, 可选,好友的wxid);`nickName`(string, 可选,好友的昵称) | `list`(repeated BlacklistInfo,客户信息);`page`(int64);`pageSize`(int64);`total`(int64,总数);`last`(bool,是否最后一页) |
|
||||
| 客户列表 | `POST /api/wx/friend/list` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`name`(string, 可选,昵称搜索);`botType`(int32, 必填,类型 1 个微 2企微);`ids`(repeated int64, 可选,ids,客户ids);`botId`(int64, 可选,机器人id);`botIds`(repeated int64, 可选,机器人ids);`corpId`(string, 必填,主体id);`filters`(repeated TargetFilter, 可选,多筛选条件,且的关系);`inTagIds`(repeated int64, 可选,包含标签ids);`notInTagIds`(repeated int64, 可选,排除标签ids);`inQwTagIds`(repeated string, 可选,包含企微标签ids);`notInQwTagIds`(repeated string, 可选,排除企微标签ids);`threePartyService`(string, 可选,三方服务过滤部分字段使用);`groupRange`(repeated int64, 可选,所属群聊);`friendType`(int32, 可选,客户类型 1 个微 2 企微) | `list`(repeated FriendInfo,客户信息);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 通过客户wxId获取客户信息 | `POST /api/wx/friend/list/byWxid` | `wxids`(repeated string, 可选) | `list`(repeated FriendInfo,客户信息) |
|
||||
| 客户详情 | `POST /api/wx/friend/get` | `id`(int64, 必填,客户的id);`botType`(int64, 必填,个微还是企微);`botId`(int64, 可选,机器人id);`corpId`(string, 可选,主体id) | `id`(int64,id);`nickname`(string,昵称);`avatar`(string,头像);`wxid`(string,客户的wxid);`tagList`(repeated api.wx.wxgatewayfriendTag.Tag,标签列表);`sex`(int32,性别);`remark`(string,备注);`isBlack`(bool,是否是黑名单);`botFriendInfoList`(repeated FriendInfoByBot,和微号相关的信息);`groupFriendInfoList`(repeated FriendInfoByGroup,和群相关的信息);... |
|
||||
| 客户详情 | `POST /api/wx/friend/get` | `id`(int64, 必填,客户的id);`botType`(int32, 必填,个微还是企微);`botId`(int64, 可选,机器人id);`corpId`(string, 可选,主体id) | `id`(int64,id);`nickname`(string,昵称);`avatar`(string,头像);`wxid`(string,客户的wxid);`tagList`(repeated api.wx.wxgatewayfriendTag.Tag,标签列表);`sex`(int32,性别);`remark`(string,备注);`isBlack`(bool,是否是黑名单);`botFriendInfoList`(repeated FriendInfoByBot,和微号相关的信息);`groupFriendInfoList`(repeated FriendInfoByGroup,和群相关的信息);... |
|
||||
| 同步客户列表 | `POST /api/wx/friend/manualSync` | `botIds`(repeated int64, 必填,机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 同步内部联系人(仅限企微号) | `POST /api/wx/friend/inner/manualSync` | `botIds`(repeated int64, 必填,机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 内部联系人列表(仅限企微号) | `POST /api/wx/friend/inner/list` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`botType`(int32, 必填,类型 1 个微 2企微);`ids`(repeated int64, 可选,ids,客户ids);`wxids`(repeated string, 可选,wxids);`corpId`(string, 可选,主体id);`name`(string, 可选,按名称搜索) | `list`(repeated InnerFriendItem,内部联系人信息);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
@@ -25,18 +25,18 @@
|
||||
| 内部联系人删除(仅限企微号) | `POST /api/wx/friend/inner/del` | `wxid`(string, 必填,id);`corpId`(string, 必填,corpId) | 空对象或无业务数据 |
|
||||
| 内部联系人更新(仅限企微号) | `POST /api/wx/friend/inner/update` | `id`(int64, 必填,id);`nickname`(string, 必填,昵称);`avatar`(string, 可选,头像);`wxid`(string, 必填,客户的wxid);`sex`(int32, 可选,性别);`corpId`(string, 可选,主体id) | 空对象或无业务数据 |
|
||||
| 同步通信录 | `POST /api/wx/friend/contacts/sync` | `botIds`(repeated int64, 必填,机器人id);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated SyncContactItem) |
|
||||
| 客户备注 | `POST /api/wx/friend/remark/set` | `friendId`(int64, 必填,客户id);`remark`(string, 必填,备注);`botType`(int64, 必填,个微还是企微);`botId`(int64, 必填,微号id) | 空对象或无业务数据 |
|
||||
| 客户备注 | `POST /api/wx/friend/remark/set` | `friendId`(int64, 必填,客户id);`remark`(string, 必填,备注);`botType`(int32, 必填,个微还是企微);`botId`(int64, 必填,微号id) | 空对象或无业务数据 |
|
||||
| 客户拉黑企微 - 列表 | `POST /api/wx/friend/single/blacklist/list` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`botType`(int32, 必填,类型 1 个微 2企微);`botIds`(repeated int64, 可选,机器人ids);`corpId`(string, 可选,主体id);`nickname`(string, 可选,客户昵称筛选) | `list`(repeated HttpSingleBlackFriendItem,客户信息);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 客户拉黑企微-删除 | `POST /api/wx/friend/single/blacklist/del` | `ids`(repeated int64, 必填,客户微号的id) | 空对象或无业务数据 |
|
||||
| 单向客户列表 | `POST /api/wx/friend/singleList` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`botType`(int32, 必填,类型 1 个微 2企微);`botIds`(repeated int64, 可选,机器人ids);`nickname`(string, 可选,客户昵称筛选);`corpId`(string, 可选,主体id);`addTimeStart`(int64, 可选,添加时间开始);`addTimeEnd`(int64, 可选,添加时间结束);`timeStart`(int64, 可选,流失时间开始);`timeEnd`(int64, 可选,流失时间结束) | `list`(repeated HttpSingleFriendListItem,客户信息);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 单向客户同步 | `POST /api/wx/friend/single/sync` | `botId`(int64, 必填,微号id);`botType`(int64, 必填,微号类型) | 空对象或无业务数据 |
|
||||
| 单向客户同步 | `POST /api/wx/friend/single/sync` | `botId`(int64, 必填,微号id);`botType`(int32, 必填,微号类型) | 空对象或无业务数据 |
|
||||
| 单向客户删除 | `POST /api/wx/friend/single/del` | `ids`(repeated int64, 必填,客户微号的id) | 空对象或无业务数据 |
|
||||
| 客户删除 | `POST /api/wx/friend/deleteFriend` | `ids`(repeated int64, 必填,ids);`botId`(int64, 必填,botId);`botType`(int32, 必填,微号类型) | 空对象或无业务数据 |
|
||||
| 企微删除客户记录 - 列表 | `POST /api/wx/friend/del/recordList` | `page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pageSize);`botType`(int32, 必填,类型 1 个微 2企微);`botIds`(repeated int64, 可选,机器人ids);`corpId`(string, 可选,主体id);`nickname`(string, 可选,客户昵称筛选) | `list`(repeated HttpSingleFriendListItem,客户信息);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 单向客户删除记录 | `POST /api/wx/friend/single/delRecord` | `ids`(repeated int64, 必填,客户微号的id) | 空对象或无业务数据 |
|
||||
| 被动黑名单删除记录 | `POST /api/wx/friend/single/blacklist/delRecord` | `ids`(repeated int64, 必填,客户微号的id) | 空对象或无业务数据 |
|
||||
| 获取客户和群成员信息 | `POST /api/wx/friendAndGroup/info` | `friendAndGroupWxid`(repeated string, 必填,客户和群成员的wxid);`botType`(int64, 必填,微号类型) | `list`(repeated FriendAndGroupInfo) |
|
||||
| 获取客户的所属群信息 | `POST /api/wx/friend/info/group` | `ids`(repeated int64, 必填,客户的id);`botType`(int64, 必填,微号类型) | `list`(repeated FriendGroupInfoItem) |
|
||||
| 获取客户和群成员信息 | `POST /api/wx/friendAndGroup/info` | `friendAndGroupWxid`(repeated string, 必填,客户和群成员的wxid);`botType`(int32, 必填,微号类型) | `list`(repeated FriendAndGroupInfo) |
|
||||
| 获取客户的所属群信息 | `POST /api/wx/friend/info/group` | `ids`(repeated int64, 必填,客户的id);`botType`(int32, 必填,微号类型) | `list`(repeated FriendGroupInfoItem) |
|
||||
| 获取客户昵称头像信息 | `POST /api/wx/friend/baseInfo/byWxids` | `botType`(int32, 必填,微号类型);`wxids`(repeated string, 必填,wxids) | `list`(repeated FriendBaseInfo) |
|
||||
|
||||
|
||||
@@ -80,8 +80,12 @@
|
||||
## 常用示例
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/wx/friend/list -d '{"page":1,"pageSize":20,"botType":1,"botId":1001}'
|
||||
htsy-cli call /api/wx/friend/get -d '{"id":2002,"botType":1}'
|
||||
htsy-cli call /api/wx/friend/remark/set -d '{"id":2002,"remark":"重要客户","botType":1}'
|
||||
htsy-cli call /api/wx/friend/tag/list -d '{"page":1,"pageSize":50,"botType":1}'
|
||||
# 客户列表(企微 botType:2 必传 corpId;CORP_ID 可从 /api/bot/wx/corp/list 返回项的 id 获取)
|
||||
htsy-cli call /api/wx/friend/list -d '{"page":1,"pageSize":20,"botType":2,"corpId":"CORP_ID"}'
|
||||
# 客户详情
|
||||
htsy-cli call /api/wx/friend/get -d '{"id":2002,"botType":2}'
|
||||
# 设置客户备注(字段是 friendId 不是 id;botId 必填)
|
||||
htsy-cli call /api/wx/friend/remark/set -d '{"friendId":2002,"remark":"重要客户","botType":2,"botId":1001}'
|
||||
# 标签列表
|
||||
htsy-cli call /api/wx/friend/tag/list -d '{"page":1,"pageSize":50,"botType":2}'
|
||||
```
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
| 手动同步某个群的成员 | `POST /api/wx/group/member/sync` | `groupId`(int64, 必填,群id);`botId`(int64, 可选,如果有botid则为指定机器人同步);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 同步群列表 | `POST /api/wx/group/manualSync` | `botIds`(repeated int64, 必填,机器人id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 同步群信息 | `POST /api/wx/group/syncGroupInfo` | `groupIds`(repeated int64, 必填,群id列表);`botType`(int32, 必填,类型 1 个微 2企微);`botId`(int64, 可选,微号id) | 空对象或无业务数据 |
|
||||
| 获取某个微号的微信群 | `POST /api/wx/group/list/byBot` | `botId`(int64, 必填,群id);`page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pagesize);`groupName`(string, 可选,群名字);`groupType`(string, 可选,群类型);`botType`(int32, 必填,类型 1 个微 2企微);`corpId`(string, 可选,主体id);`isManager`(bool, 可选,是否是管理员) | `list`(repeated HttpGroupInfoReply);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 获取某个微号的微信群 | `POST /api/wx/group/list/byBot` | `botId`(int64, 必填,微号id);`page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pagesize);`groupName`(string, 可选,群名字);`groupType`(string, 可选,群类型);`botType`(int32, 必填,类型 1 个微 2企微);`corpId`(string, 可选,主体id);`isManager`(bool, 可选,是否是管理员) | `list`(repeated HttpGroupInfoReply);`page`(int64);`pageSize`(int64);`total`(int64);`last`(bool) |
|
||||
| 群详情 | `POST /api/wx/group/info` | `groupId`(int64, 必填,群id);`botType`(int32, 必填,类型 1 个微 2企微) | `id`(int64,群id);`nickname`(string,群昵称);`avatar`(string,头像);`totalMember`(int64,成员数);`manager`(GroupManager,管理员);`categoryInfo`(CategoryItem,分组信息);`wxid`(string,群微信id);`groupType`(string,群类型 qw 企微群 wx个微群);`status`(int32,群状态 0正常 1 封禁);`corpIds`(repeated string,属于的主体) |
|
||||
| 根据群ids获取部分列表 | `POST /api/wx/group/list/byIds` | `ids`(repeated int64, 必填,群id列表);`groupName`(string, 可选,群名字);`groupType`(string, 可选,群类型);`botType`(int32, 必填,类型 1 个微 2企微) | `list`(repeated HttpGroupInfoReply) |
|
||||
| 分组-添加 | `POST /api/wx/group/category/add` | `name`(string, 必填,分组的名字);`botType`(int32, 必填,类型 1 个微 2企微);`corpId`(string, 必填,主体id) | `id`(int64,id) |
|
||||
| 分组-列表 | `POST /api/wx/group/category/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pageSize);`name`(string, 可选,分组名字);`ids`(repeated int64, 可选,分子ids);`botType`(int32, 必填,类型 1 个微 2企微);`corpId`(string, 必填,主体id) | `list`(repeated CategoryItem,分组列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 分组-列表 | `POST /api/wx/group/category/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pageSize);`name`(string, 可选,分组名字);`ids`(repeated int64, 可选,分组ids);`botType`(int32, 必填,类型 1 个微 2企微);`corpId`(string, 必填,主体id) | `list`(repeated CategoryItem,分组列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 分组-删除 | `POST /api/wx/group/category/del` | `id`(int64, 必填,分组id);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-更新 | `POST /api/wx/group/category/update` | `id`(int64, 必填,分组id);`name`(string, 必填,分组名字);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 分组-新增分组内的群 | `POST /api/wx/group/category/addGroup` | `id`(int64, 必填,分组id);`groupIds`(repeated int64, 必填,组内-群id列表);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
@@ -87,11 +87,11 @@
|
||||
| 批量群邀请-预估人数 | `POST /api/wx/group/batchInviteJoinPlan/predictPeople` | `botType`(int32, 必填,微号类型);`filters`(repeated TargetFilter, 必填,客户的筛选类型);`botList`(repeated SenderBot, 必填,机器人ids);`useBlacklist`(bool, 可选,是否使用黑名单);`targetType`(string, 可选,推送对象 friend 客户 qwMember 企微成员);`targetRequireType`(string, 可选,specify 指定某些用户 filter 筛选 all 全部);`targetIds`(repeated int64, 可选,指定成员Ids) | `predictPeople`(int64,预估人数) |
|
||||
| 批量群邀请-失败计划的客户重发 | `POST /api/wx/group/batchInviteJoinPlan/copyFailPlan` | `planId`(int64, 必填,失败计划) | 空对象或无业务数据 |
|
||||
| 批量群邀请-固定成员进群记录 | `POST /api/wx/group/batchInviteJoinPlan/fixedRecord/list` | `planId`(int64, 必填,计划id);`page`(int64, 必填,分页page);`pageSize`(int64, 必填,分页pagesize);`status`(string, 可选,状态);`memberId`(int64, 可选,企微成员id);`inviterId`(int64, 可选,邀请人botId) | `list`(repeated FixedMemberRecord,记录);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 接受群邀请-受邀记录 | `POST /api/wx/group/inviteJoin/list` | `cfgId`(int64, 可选,方案id);`page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`botId`(int64, 可选,机器人id);`statusList`(repeated int64, 可选,状态筛选);`fromName`(string, 可选,邀请者名字);`botType`(int64, 可选,所属类型:1个微 2 企微) | `list`(repeated GroupInviteItem,组内群列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 接受群邀请-受邀记录 | `POST /api/wx/group/inviteJoin/list` | `cfgId`(int64, 可选,方案id);`page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`botId`(int64, 可选,机器人id);`statusList`(repeated int64, 可选,状态筛选);`fromName`(string, 可选,邀请者名字);`botType`(int32, 可选,所属类型:1个微 2 企微) | `list`(repeated GroupInviteItem,受邀记录列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 接受群邀请-操作 | `POST /api/wx/group/inviteJoin/operate` | `id`(int64, 必填,邀请加入群聊的id);`agree`(bool, 必填,是否同意 true同意, false拒绝) | 空对象或无业务数据 |
|
||||
| 接受群邀请-获取方案配置 | `POST /api/wx/group/inviteJoin/conf` | `id`(int64, 可选) | `timeInterval`(int64,通过的时间间隔);`disturb`(bool,是否打扰 false 免打扰 true 打扰);`fold`(bool,是否折叠 true 折叠 false 不折叠);`auto`(bool,是否自动通过 true 自动 false 不自动);`joinGroupInvitePassCondition`(JoinGroupInviteCondition,通过条件);`id`(int64,id);`name`(string,方案名字);`botIds`(repeated int64,使用的机器人ids);`default`(bool,是否是默认方案);`botType`(int32,类型 1 个微 2企微);... |
|
||||
| 接受群邀请-获取方案配置列表 | `POST /api/wx/group/inviteJoin/conf/list` | `botType`(int32, 可选,微号类型);`botId`(int64, 可选,微号id) | `list`(repeated JoinGroupInviteConf,方案配置) |
|
||||
| 接受群邀请-修改方案配置 | `POST /api/wx/group/inviteJoin/conf/modify` | `timeInterval`(int64, 必填,通过的时间间隔);`disturb`(bool, 必填,是否打扰 false 免打扰 true 打扰);`fold`(bool, 必填,是否折叠 true 折叠 false 不折叠);`auto`(bool, 必填,是否自动通过 true 自动 false 不自动);`joinGroupInvitePassCondition`(JoinGroupInviteCondition, 必填,通过条件);`name`(string, 必填,方案名字);`botIds`(repeated int64, 必填,使用的机器人ids);`id`(int64, 必填,id);`botType`(int64, 必填,botType) | 空对象或无业务数据 |
|
||||
| 接受群邀请-修改方案配置 | `POST /api/wx/group/inviteJoin/conf/modify` | `timeInterval`(int64, 必填,通过的时间间隔);`disturb`(bool, 必填,是否打扰 false 免打扰 true 打扰);`fold`(bool, 必填,是否折叠 true 折叠 false 不折叠);`auto`(bool, 必填,是否自动通过 true 自动 false 不自动);`joinGroupInvitePassCondition`(JoinGroupInviteCondition, 必填,通过条件);`name`(string, 必填,方案名字);`botIds`(repeated int64, 必填,使用的机器人ids);`id`(int64, 必填,id);`botType`(int32, 必填,botType) | 空对象或无业务数据 |
|
||||
| 接受群邀请-创建方案配置 | `POST /api/wx/group/inviteJoin/conf/create` | `timeInterval`(int64, 必填,通过的时间间隔);`disturb`(bool, 必填,是否打扰 false 打扰 true 免打扰);`fold`(bool, 必填,是否折叠 true 折叠 false 不折叠);`auto`(bool, 必填,是否自动通过 true 自动 false 不自动);`joinGroupInvitePassCondition`(JoinGroupInviteCondition, 必填,通过条件);`name`(string, 必填,方案名字);`botIds`(repeated int64, 必填,使用的机器人ids) | `id`(int64,创建id) |
|
||||
| 接受群邀请-删除方案配置(默认的无法删除) | `POST /api/wx/group/inviteJoin/conf/del` | `id`(int64, 必填,方案id) | 空对象或无业务数据 |
|
||||
| 接受群邀请-手动排序 | `POST /api/wx/group/inviteJoin/conf/updatePosition` | `sourceId`(int64, 必填,移动方案id);`targetId`(int64, 必填,目标方案id) | 空对象或无业务数据 |
|
||||
@@ -104,18 +104,18 @@
|
||||
| 群公告计划-删除 | `POST /api/wx/group/announcement/plan/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 群公告计划-方案记录列表 | `POST /api/wx/group/announcement/plan/record/list` | `pid`(int64, 必填,方案id) | `list`(repeated GroupAnnouncementPlanRecordItem) |
|
||||
| 群公告计划-方案记录 | `POST /api/wx/group/announcement/plan/record/item/list` | `pid`(int64, 必填,方案id);`recordId`(int64, 必填,方案记录id);`page`(int64, 必填,page);`pageSize`(int64, 必填,分页pagesize);`status`(string, 必填,状态);`botWxid`(string, 必填,机器人wxid);`groupWxid`(string, 必填,群wxid) | `list`(repeated HttpGroupAnnouncementPlanRecordItemListItem,list);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 群查重-计划创建 | `POST /api/wx/group/duplicate/plan/create` | `id`(int64, 可选,id);`name`(string, 必填,计划昵称);`groupIds`(repeated int64, 必填,群ids);`friendIds`(repeated int64, 可选,不参与查重的客户);`isAddBlacklist`(bool, 可选,是否拉黑);`isKickingMember`(bool, 可选,是否踢人);`kickInterval`(int64, 可选,踢人间隔 单位秒);`botId`(int64, 可选,踢人拉黑的执行微号);`Schedule`(Schedule, 可选,定时);`scheduleType`(string, 必填,delay quick);`targetType`(string, 必填,groupMember 群成员 bot 微号 inGroupSystemBot 在群微号查重);`specifyWxids`(repeated string, 可选,指定查重的对象);`botType`(int32, 必填,类型 1 个微 2企微) | `id`(int64,id);`name`(string,计划昵称);`groupIds`(repeated int64,群ids);`friendIds`(repeated int64,不参与查重的客户);`isAddBlacklist`(bool,是否拉黑);`isKickingMember`(bool,是否踢人);`kickInterval`(int64,踢人间隔);`botId`(int64,踢人拉黑的执行微号);`Schedule`(Schedule,定时);`scheduleType`(string,delay quick);... |
|
||||
| 群查重-计划创建 | `POST /api/wx/group/duplicate/plan/create` | `id`(int64, 可选,id);`name`(string, 必填,计划昵称);`groupIds`(repeated int64, 必填,群ids);`friendIds`(repeated int64, 可选,不参与查重的客户);`isAddBlacklist`(bool, 可选,是否拉黑);`isKickingMember`(bool, 可选,是否踢人);`kickInterval`(int64, 可选,踢人间隔 单位秒);`botId`(int64, 可选,踢人拉黑的执行微号);`schedule`(Schedule, 可选,定时);`scheduleType`(string, 必填,delay quick);`targetType`(string, 必填,groupMember 群成员 bot 微号 inGroupSystemBot 在群微号查重);`specifyWxids`(repeated string, 可选,指定查重的对象);`botType`(int32, 必填,类型 1 个微 2企微) | `id`(int64,id);`name`(string,计划昵称);`groupIds`(repeated int64,群ids);`friendIds`(repeated int64,不参与查重的客户);`isAddBlacklist`(bool,是否拉黑);`isKickingMember`(bool,是否踢人);`kickInterval`(int64,踢人间隔);`botId`(int64,踢人拉黑的执行微号);`schedule`(Schedule,定时);`scheduleType`(string,delay quick);... |
|
||||
| 群查重-计划列表 | `POST /api/wx/group/duplicate/plan/list` | `name`(string, 可选,名字);`page`(int64, 可选,page);`pageSize`(int64, 可选,pageSize);`id`(string, 可选,从指定的id开始获取offset条计划,为空从头开始);`offset`(string, 可选,分页大小,id offset都为空则查全部);`botType`(int32, 可选,类型 1 个微 2企微) | `list`(repeated DuplicatePlanInfo,列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last);`nextId`(string,查询下一页时的起始id) |
|
||||
| 群查重-计划更新 | `POST /api/wx/group/duplicate/plan/update` | `id`(int64, 可选,id);`name`(string, 必填,计划昵称);`groupIds`(repeated int64, 必填,群ids);`friendIds`(repeated int64, 可选,不参与查重的客户);`isAddBlacklist`(bool, 可选,是否拉黑);`isKickingMember`(bool, 可选,是否踢人);`kickInterval`(int64, 可选,踢人间隔 单位秒);`botId`(int64, 可选,踢人拉黑的执行微号);`Schedule`(Schedule, 可选,定时);`scheduleType`(string, 必填,delay quick);`targetType`(string, 必填,groupMember 群成员 bot 微号 inGroupSystemBot 在群微号查重);`specifyWxids`(repeated string, 可选,指定查重的对象);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 群查重-计划更新 | `POST /api/wx/group/duplicate/plan/update` | `id`(int64, 可选,id);`name`(string, 必填,计划昵称);`groupIds`(repeated int64, 必填,群ids);`friendIds`(repeated int64, 可选,不参与查重的客户);`isAddBlacklist`(bool, 可选,是否拉黑);`isKickingMember`(bool, 可选,是否踢人);`kickInterval`(int64, 可选,踢人间隔 单位秒);`botId`(int64, 可选,踢人拉黑的执行微号);`schedule`(Schedule, 可选,定时);`scheduleType`(string, 必填,delay quick);`targetType`(string, 必填,groupMember 群成员 bot 微号 inGroupSystemBot 在群微号查重);`specifyWxids`(repeated string, 可选,指定查重的对象);`botType`(int32, 必填,类型 1 个微 2企微) | 空对象或无业务数据 |
|
||||
| 群查重-计划删除 | `POST /api/wx/group/duplicate/plan/del` | `id`(int64, 可选,id) | 空对象或无业务数据 |
|
||||
| 群查重-计划详情 | `POST /api/wx/group/duplicate/plan/info` | `id`(int64, 可选,id) | `id`(int64,id);`name`(string,计划昵称);`groupIds`(repeated int64,群ids);`friendIds`(repeated int64,不参与查重的客户);`isAddBlacklist`(bool,是否拉黑);`isKickingMember`(bool,是否踢人);`kickInterval`(int64,踢人间隔);`botId`(int64,踢人拉黑的执行微号);`Schedule`(Schedule,定时);`scheduleType`(string,delay quick);... |
|
||||
| 群查重-计划详情 | `POST /api/wx/group/duplicate/plan/info` | `id`(int64, 可选,id) | `id`(int64,id);`name`(string,计划昵称);`groupIds`(repeated int64,群ids);`friendIds`(repeated int64,不参与查重的客户);`isAddBlacklist`(bool,是否拉黑);`isKickingMember`(bool,是否踢人);`kickInterval`(int64,踢人间隔);`botId`(int64,踢人拉黑的执行微号);`schedule`(Schedule,定时);`scheduleType`(string,delay quick);... |
|
||||
| 群查重-计划记录 | `POST /api/wx/group/duplicate/plan/record` | `pid`(int64, 可选,id);`page`(int64, 可选,page);`pageSize`(int64, 可选,pageSize) | `list`(repeated DuplicatePlanRecordItem);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last);`status`(string,状态);`failReason`(string,失败原因);`listByGroup`(repeated DuplicatePlanRecordItemByGroup,targetType:inGroupSystemBot 有值);`targetType`(string,groupMember 群成员 bot 微号 inGroupSystemBot 在群微号查重) |
|
||||
| 群查重-踢人或者拉黑 | `POST /api/wx/group/duplicate/plan/record/kickOrBlacklist` | `recordId`(repeated int64, 必填,记录id);`type`(string, 必填,kick 踢 blacklist 拉黑);`botId`(int64, 必填,指定微号,不然就到各各群里拿管理员,拉黑只会拿一个);`isKeepOn`(bool, 可选,踢出时是否保留一个群不踢) | 空对象或无业务数据 |
|
||||
| 群查重-退出或者踢出单个群 | `POST /api/wx/group/duplicate/plan/record/kickOrQuit` | `recordItemId`(repeated int64, 必填,记录id);`type`(string, 必填,kick 踢 quit 退出);`botId`(int64, 必填,指定微号,不然就到各各群里拿管理员) | 空对象或无业务数据 |
|
||||
| 入群欢迎语-添加 | `POST /api/wx/group/welcome/add` | `id`(int64, 可选,id);`name`(string, 必填,名称);`botType`(int64, 必填,1个微 2企微);`botIds`(repeated int64, 必填,应用微号);`groupIds`(repeated int64, 必填,应用客户群);`ruleList`(repeated Rule, 可选,触发规则);`replyList`(repeated Message, 必填,回复内容);`replyMode`(string, 必填,回复模式 fixed 固定 random 随机);`newReplyList`(repeated ReplyItem, 必填,新的回复内容结构) | `id`(int64,id) |
|
||||
| 群查重-踢人或者拉黑 | `POST /api/wx/group/duplicate/plan/record/kickOrBlacklist` | `recordId`(repeated int64, 必填,记录id);`type`(string, 必填,kick 踢 blacklist 拉黑);`botId`(int64, 必填,指定微号,不然就到各个群里拿管理员,拉黑只会拿一个);`isKeepOn`(bool, 可选,踢出时是否保留一个群不踢) | 空对象或无业务数据 |
|
||||
| 群查重-退出或者踢出单个群 | `POST /api/wx/group/duplicate/plan/record/kickOrQuit` | `recordItemId`(repeated int64, 必填,记录id);`type`(string, 必填,kick 踢 quit 退出);`botId`(int64, 必填,指定微号,不然就到各个群里拿管理员) | 空对象或无业务数据 |
|
||||
| 入群欢迎语-添加 | `POST /api/wx/group/welcome/add` | `id`(int64, 可选,id);`name`(string, 必填,名称);`botType`(int32, 必填,1个微 2企微);`botIds`(repeated int64, 必填,应用微号);`groupIds`(repeated int64, 必填,应用客户群);`ruleList`(repeated Rule, 可选,触发规则);`replyList`(repeated Message, 必填,回复内容);`replyMode`(string, 必填,回复模式 fixed 固定 random 随机);`newReplyList`(repeated ReplyItem, 必填,新的回复内容结构) | `id`(int64,id) |
|
||||
| 入群欢迎语-列表 | `POST /api/wx/group/welcome/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,分页pagesize);`userId`(int64, 可选,userid);`name`(string, 可选,名称搜索);`botType`(int32, 可选,类型 1 个微 2企微) | `list`(repeated GroupWelcomeItem,方案列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 入群欢迎语-详情 | `POST /api/wx/group/welcome/info` | `id`(int64, 必填,id) | `id`(int64,id);`name`(string,名称);`botType`(int64,1个微 2企微);`botIds`(repeated int64,应用微号);`groupIds`(repeated int64,应用客户群);`ruleList`(repeated Rule,触发规则);`replyList`(repeated Message,回复内容);`replyMode`(string,回复模式 fixed 固定 random 随机);`newReplyList`(repeated ReplyItem,新的回复内容结构) |
|
||||
| 入群欢迎语-更新 | `POST /api/wx/group/welcome/update` | `id`(int64, 可选,id);`name`(string, 必填,名称);`botType`(int64, 必填,1个微 2企微);`botIds`(repeated int64, 必填,应用微号);`groupIds`(repeated int64, 必填,应用客户群);`ruleList`(repeated Rule, 可选,触发规则);`replyList`(repeated Message, 必填,回复内容);`replyMode`(string, 必填,回复模式 fixed 固定 random 随机);`newReplyList`(repeated ReplyItem, 必填,新的回复内容结构) | 空对象或无业务数据 |
|
||||
| 入群欢迎语-详情 | `POST /api/wx/group/welcome/info` | `id`(int64, 必填,id) | `id`(int64,id);`name`(string,名称);`botType`(int32,1个微 2企微);`botIds`(repeated int64,应用微号);`groupIds`(repeated int64,应用客户群);`ruleList`(repeated Rule,触发规则);`replyList`(repeated Message,回复内容);`replyMode`(string,回复模式 fixed 固定 random 随机);`newReplyList`(repeated ReplyItem,新的回复内容结构) |
|
||||
| 入群欢迎语-更新 | `POST /api/wx/group/welcome/update` | `id`(int64, 可选,id);`name`(string, 必填,名称);`botType`(int32, 必填,1个微 2企微);`botIds`(repeated int64, 必填,应用微号);`groupIds`(repeated int64, 必填,应用客户群);`ruleList`(repeated Rule, 可选,触发规则);`replyList`(repeated Message, 必填,回复内容);`replyMode`(string, 必填,回复模式 fixed 固定 random 随机);`newReplyList`(repeated ReplyItem, 必填,新的回复内容结构) | 空对象或无业务数据 |
|
||||
| 入群欢迎语-删除 | `POST /api/wx/group/welcome/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 群守卫-添加 | `POST /api/wx/group/guard/plan/add` | `botType`(int32, 必填,类型 1 个微 2企微);`name`(string, 必填,名称);`botId`(int64, 必填,应用微号:单个);`groupIds`(repeated int64, 必填,应用客户群:多个);`timeFrame`(TimeFrame, 必填,生效时间段);`rule`(GuardRule, 必填,触发规则);`action`(GuardAction, 必填,动作);`status`(repeated string, 必填,规则状态);`applyGroup`(string, 必填,应用群范围, all / specify);`execBotId`(int64, 可选,执行微号(个微计划)) | `id`(int64) |
|
||||
| 群守卫-修改 | `POST /api/wx/group/guard/plan/update` | `botType`(int32, 必填,类型 1 个微 2企微);`id`(int64, 必填,id);`name`(string, 必填,名称);`botId`(int64, 必填,应用微号:单个);`groupIds`(repeated int64, 必填,应用客户群:多个);`timeFrame`(TimeFrame, 必填,生效时间段);`rule`(GuardRule, 必填,触发规则);`action`(GuardAction, 必填,动作);`status`(repeated string, 必填,规则状态);`applyGroup`(string, 必填,应用群范围, all / specify);`execBotId`(int64, 可选,执行动作的微号) | 空对象或无业务数据 |
|
||||
@@ -125,15 +125,15 @@
|
||||
| 群守卫-白名单更新 | `POST /api/wx/group/guard/whitelist/update` | `isSystem`(bool, 必填,系统内微号自动加入白名单);`whitelist`(repeated int64, 必填,手动设置的白名单客户);`link`(repeated string, 必填,链接白名单);`miniProgram`(repeated WhitelistItem, 必填,小程序白名单);`freeVideo`(repeated string, 必填,视频号白名单);`corpIds`(repeated string, 必填,过滤企微主体);`globalWhitelist`(bool, 可选,全局白名单开关);`corpType`(string, 可选,主体过滤类型);`wxBatchWhite`(repeated string, 可选,个微计划批量导入白名单);`qwBatchWhite`(repeated string, 可选,企微计划批量导入白名单) | 空对象或无业务数据 |
|
||||
| 群守卫-白名单信息 | `POST /api/wx/group/guard/whitelist/info` | `{}` | `isSystem`(bool,系统内微号自动加入白名单);`whitelist`(repeated int64,手动设置的白名单客户);`link`(repeated string,链接白名单);`miniProgram`(repeated WhitelistItem,小程序白名单);`freeVideo`(repeated string,视频号白名单);`corpIds`(repeated string,过滤企微主体);`globalWhitelist`(bool,全局白名单开关);`corpType`(string,主体过滤类型);`wxBatchWhite`(repeated string,个微计划批量导入白名单);`qwBatchWhite`(repeated string,企微计划批量导入白名单) |
|
||||
| 群守卫-执行记录 | `POST /api/wx/group/guard/record/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pagesize);`guardId`(int64, 可选,群守卫计划id);`action`(string, 可选,执行的动作) | `list`(repeated GroupGuardRecordItem,群守卫执行记录列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 退群监听-列表 | `POST /api/wx/group/quit/plan/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pagesize) | `list`(repeated ListItem,群守卫列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 退群监听-列表 | `POST /api/wx/group/quit/plan/list` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pagesize) | `list`(repeated ListItem,退群监听列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 退群监听-创建 | `POST /api/wx/group/quit/plan/create` | `name`(string, 必填,方案名称);`botId`(int64, 必填,机器人id);`botType`(int32, 必填,机器人类型);`groupIds`(repeated int64, 必填,群id列表);`targetGroupId`(int64, 必填,目标群id);`status`(bool, 必填,状态 默认 关闭 false, true是开);`guideMessageList`(repeated Message, 必填,引导语);`maxInviteCount`(int32, 必填,最大拉入次数,0表示不限制) | `id`(int64,id) |
|
||||
| 退群监听-更新 | `POST /api/wx/group/quit/plan/update` | `id`(int64, 必填,id);`name`(string, 必填,方案名称);`botId`(int64, 必填,机器人id);`botType`(int32, 必填,机器人类型);`groupIds`(repeated int64, 必填,群id列表);`targetGroupId`(int64, 必填,目标群id);`status`(bool, 必填,状态 默认 关闭 false, true是开);`guideMessageList`(repeated Message, 必填,引导语);`maxInviteCount`(int32, 必填,最大拉入次数,0表示不限制) | 空对象或无业务数据 |
|
||||
| 退群监听-删除 | `POST /api/wx/group/quit/plan/delete` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
| 退群监听-详情 | `POST /api/wx/group/quit/plan/info` | `id`(int64, 必填,id) | `id`(int64,id);`name`(string,名称);`botId`(int64,机器人id);`botType`(int32,机器人类型);`groupIds`(repeated int64,群id列表);`targetGroupId`(int64,目标群id);`status`(bool,状态 默认 关闭 false, true是开);`guideMessageList`(repeated Message,引导语);`maxInviteCount`(int32,最大拉入次数,0表示不限制) |
|
||||
| 退群监听-更新状态 | `POST /api/wx/group/quit/plan/update/status` | `id`(int64, 必填,id);`status`(bool, 必填,状态 默认 关闭 false, true是开) | 空对象或无业务数据 |
|
||||
| 退群监听-记录 | `POST /api/wx/group/quit/plan/records` | `page`(int64, 可选,page);`pageSize`(int64, 可选,pagesize);`pid`(int64, 必填,计划id) | `list`(repeated RecordItem,记录);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 群转播-添加 | `POST /api/wx/group/relay/add` | `botType`(int32, 必填,类型 1 个微 2企微);`sources`(repeated Source, 必填,转发的来源);`relayTypes`(repeated string, 必填,要转发的消息类型);`targetType`(string, 必填,对象类型:normal,role,qwMember);`targetGroupIds`(repeated int64, 必填,转发的目标群);`targetQwMemberIds`(repeated int64, 必填,转发的目标企微成员);`targetQwMemberCorpId`(string, 必填,企微corpId);`rolePlanId`(int64, 必填,角色方案);`relayExecutorIds`(repeated int64, 必填,转发的人);`name`(string, 必填,计划名称);`filterContent`(repeated string, 必填,过滤内容);`replaceList`(repeated Replace, 必填,替换内容);`autoImageToSticker`(bool, 必填,图片发送超限转成表情发送);`status`(bool, 必填,开关状态);`imageToStickerEnable`(bool, 必填,主动图片转表情发送);`LinkConvConf`(repeated LinkConvConf, 必填,转链配置);`timeFrame`(repeated int64, 必填,生效时间段);`linkConvFailSkip`(bool, 必填,转链失败就跳过转链直接发);`textLinkWhitelist`(repeated string, 必填,文本链接白名单);`textLinkConvSkipList`(repeated string, 必填,跳过转链的文本链接名单);... 另有 3 个字段 | `id`(int64,id) |
|
||||
| 群转播-修改 | `POST /api/wx/group/relay/update` | `id`(int64, 必填,id);`botType`(int32, 必填,类型 1 个微 2企微);`sources`(repeated Source, 必填,转发的来源);`relayTypes`(repeated string, 必填,要转发的消息类型);`targetType`(string, 必填,对象类型:normal,role,qwMember);`targetGroupIds`(repeated int64, 必填,转发的目标群);`targetQwMemberIds`(repeated int64, 必填,转发的目标企微成员);`targetQwMemberCorpId`(string, 必填,企微corpId);`rolePlanId`(int64, 必填,角色方案);`relayExecutorIds`(repeated int64, 必填,转发的人);`name`(string, 必填,计划名称);`filterContent`(repeated string, 必填,过滤内容);`replaceList`(repeated Replace, 必填,替换内容);`autoImageToSticker`(bool, 必填,图片发送超限转成表情发送);`status`(bool, 必填,开关状态);`imageToStickerEnable`(bool, 必填,主动图片转表情发送);`LinkConvConf`(repeated LinkConvConf, 必填,转链配置);`timeFrame`(repeated int64, 必填,生效时间段);`linkConvFailSkip`(bool, 必填,转链失败就跳过转链直接发);`textLinkWhitelist`(repeated string, 必填,文本链接白名单);... 另有 4 个字段 | 空对象或无业务数据 |
|
||||
| 群转播-添加 | `POST /api/wx/group/relay/add` | `botType`(int32, 必填,类型 1 个微 2企微);`sources`(repeated Source, 必填,转发的来源);`relayTypes`(repeated string, 必填,要转发的消息类型);`targetType`(string, 必填,对象类型:normal,role,qwMember);`targetGroupIds`(repeated int64, 必填,转发的目标群);`targetQwMemberIds`(repeated int64, 必填,转发的目标企微成员);`targetQwMemberCorpId`(string, 必填,企微corpId);`rolePlanId`(int64, 必填,角色方案);`relayExecutorIds`(repeated int64, 必填,转发的人);`name`(string, 必填,计划名称);`filterContent`(repeated string, 必填,过滤内容);`replaceList`(repeated Replace, 必填,替换内容);`autoImageToSticker`(bool, 必填,图片发送超限转成表情发送);`status`(bool, 必填,开关状态);`imageToStickerEnable`(bool, 必填,主动图片转表情发送);`linkConvConf`(repeated LinkConvConf, 必填,转链配置);`timeFrame`(repeated int64, 必填,生效时间段);`linkConvFailSkip`(bool, 必填,转链失败就跳过转链直接发);`textLinkWhitelist`(repeated string, 必填,文本链接白名单);`textLinkConvSkipList`(repeated string, 必填,跳过转链的文本链接名单);... 另有 3 个字段 | `id`(int64,id) |
|
||||
| 群转播-修改 | `POST /api/wx/group/relay/update` | `id`(int64, 必填,id);`botType`(int32, 必填,类型 1 个微 2企微);`sources`(repeated Source, 必填,转发的来源);`relayTypes`(repeated string, 必填,要转发的消息类型);`targetType`(string, 必填,对象类型:normal,role,qwMember);`targetGroupIds`(repeated int64, 必填,转发的目标群);`targetQwMemberIds`(repeated int64, 必填,转发的目标企微成员);`targetQwMemberCorpId`(string, 必填,企微corpId);`rolePlanId`(int64, 必填,角色方案);`relayExecutorIds`(repeated int64, 必填,转发的人);`name`(string, 必填,计划名称);`filterContent`(repeated string, 必填,过滤内容);`replaceList`(repeated Replace, 必填,替换内容);`autoImageToSticker`(bool, 必填,图片发送超限转成表情发送);`status`(bool, 必填,开关状态);`imageToStickerEnable`(bool, 必填,主动图片转表情发送);`linkConvConf`(repeated LinkConvConf, 必填,转链配置);`timeFrame`(repeated int64, 必填,生效时间段);`linkConvFailSkip`(bool, 必填,转链失败就跳过转链直接发);`textLinkWhitelist`(repeated string, 必填,文本链接白名单);... 另有 4 个字段 | 空对象或无业务数据 |
|
||||
| 群转播-列表 | `POST /api/wx/group/relay/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`userId`(int64, 可选,筛选计划的创建者);`name`(string, 必填,搜索计划名字) | `list`(repeated HttpInfoReply,列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,total);`last`(bool,last) |
|
||||
| 群转播-详情 | `POST /api/wx/group/relay/info` | `id`(int64, 必填,id) | `id`(int64,id);`botType`(int32,类型 1 个微 2企微);`sources`(repeated Source,转发的来源);`relayTypes`(repeated string,要转发的消息类型);`targetType`(string,对象类型:normal,role,qwMember);`targetGroupIds`(repeated int64,转发的目标群);`targetQwMemberIds`(repeated int64,转发的目标企微成员);`targetQwMemberCorpId`(string,企微corpId);`rolePlanId`(int64,角色方案);`relayExecutorIds`(repeated int64,转发的人);... |
|
||||
| 群转播-删除 | `POST /api/wx/group/relay/del` | `id`(int64, 必填,id) | 空对象或无业务数据 |
|
||||
@@ -153,8 +153,12 @@
|
||||
## 常用示例
|
||||
|
||||
```bash
|
||||
htsy-cli call /api/wx/group/list -d '{"page":1,"pageSize":20,"botType":1,"botId":1001}'
|
||||
htsy-cli call /api/wx/group/member/list -d '{"page":1,"pageSize":50,"groupId":3001,"botType":1}'
|
||||
htsy-cli call /api/wx/group/getCode -d '{"groupId":3001,"botType":1}'
|
||||
htsy-cli call /api/wx/group/category/add -d '{"name":"活动群","botType":1}'
|
||||
# 群列表(企微无 botId 时必传 corpId;CORP_ID 可从 /api/bot/wx/corp/list 返回项的 id 获取)
|
||||
htsy-cli call /api/wx/group/list -d '{"page":1,"pageSize":20,"botType":2,"corpId":"CORP_ID"}'
|
||||
# 群成员列表(corpId 必填)
|
||||
htsy-cli call /api/wx/group/member/list -d '{"groupId":3001,"botType":2,"corpId":"CORP_ID"}'
|
||||
# 群二维码(botId 必填)
|
||||
htsy-cli call /api/wx/group/getCode -d '{"botId":1001,"groupId":3001,"botType":2}'
|
||||
# 创建群分组(corpId 必填)
|
||||
htsy-cli call /api/wx/group/category/add -d '{"name":"活动群","botType":2,"corpId":"CORP_ID"}'
|
||||
```
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
| 目标 | 接口 | 请求字段 | 常用返回字段 |
|
||||
| --- | --- | --- | --- |
|
||||
| 素材上传 | `POST /api/material/upload` | `type`(string, 必填,素材类型);`material`(bytes, 必填,素材) | `link`(string,素材地址) |
|
||||
| 列表 | `POST /api/material/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`name`(string, 可选,素材名字搜索);`type`(string, 必填,类型);`isQy`(bool, 可选,是否属于企业) | `list`(repeated MaterialInfo,计划列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 列表 | `POST /api/material/list` | `page`(int64, 必填,page);`pageSize`(int64, 必填,pageSize);`name`(string, 可选,素材名字搜索);`type`(string, 必填,类型);`isQy`(bool, 可选,是否属于企业) | `list`(repeated MaterialInfo,素材列表);`page`(int64,page);`pageSize`(int64,pageSize);`total`(int64,总数);`last`(bool,是否最后) |
|
||||
| 添加 | `POST /api/material/add` | `id`(int64, 可选,素材id);`type`(string, 必填,素材类型);`name`(string, 必填,素材名字);`text`(MessageText, 可选,文本消息 text);`image`(MessageImage, 可选,图片消息 image);`sticker`(MessageSticker, 可选,表情消息 sticker);`video`(MessageVideo, 可选,视频消息 video);`miniProgram`(MessageMiniProgram, 可选,小程序 miniProgram);`link`(MessageLink, 可选,链接 link);`audio`(MessageAudio, 可选,音频 audio);`compositeImage`(MessageCompositeImage, 可选,合成图 compositeImage);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`goods`(MessageGoods, 可选,商品 goods);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`liveBroadcastRoom`(MessageLiveBroadcastRoom, 可选,直播间 liveBroadcastRoom);`file`(MessageFile, 可选,文件 file);`note`(MessageNote, 可选,笔记 note);`collection`(repeated Collection, 可选,合集 collection);`materialGroup`(repeated MaterialDialogueContent, 可选,素材组List);`isQy`(bool, 可选,是否属于企业);... 另有 1 个字段 | `id`(int64) |
|
||||
| 删除 | `POST /api/material/del` | `ids`(repeated int64, 必填,删除的ids);`type`(string, 必填,素材类型) | 空对象或无业务数据 |
|
||||
| 更新 | `POST /api/material/update` | `id`(int64, 可选,素材id);`type`(string, 必填,素材类型);`name`(string, 必填,素材名字);`text`(MessageText, 可选,文本消息 text);`image`(MessageImage, 可选,图片消息 image);`sticker`(MessageSticker, 可选,表情消息 sticker);`video`(MessageVideo, 可选,视频消息 video);`miniProgram`(MessageMiniProgram, 可选,小程序 miniProgram);`link`(MessageLink, 可选,链接 link);`audio`(MessageAudio, 可选,音频 audio);`compositeImage`(MessageCompositeImage, 可选,合成图 compositeImage);`inviteGroup`(MessageInviteGroup, 可选,入群邀请 inviteGroup);`goods`(MessageGoods, 可选,商品 goods);`freeVideo`(MessageFreeVideo, 可选,视频号 freeVideo);`liveBroadcastRoom`(MessageLiveBroadcastRoom, 可选,直播间 liveBroadcastRoom);`file`(MessageFile, 可选,文件 file);`note`(MessageNote, 可选,笔记 note);`collection`(repeated Collection, 可选,合集 collection);`materialGroup`(repeated MaterialDialogueContent, 可选,素材组List);`isQy`(bool, 可选,是否属于企业);... 另有 1 个字段 | 空对象或无业务数据 |
|
||||
@@ -24,7 +24,7 @@
|
||||
| 话术库标签创建 | `POST /api/material/dialogue/tag/add` | `name`(string, 可选,类别名) | `id`(int64,id) |
|
||||
| 话术库标签列表 | `POST /api/material/dialogue/tag/list` | `{}` | `list`(repeated MaterialDialogueTagItem) |
|
||||
| 话术库标签更新 | `POST /api/material/dialogue/tag/update` | `id`(int64, 可选);`name`(string, 可选) | 空对象或无业务数据 |
|
||||
| 话术库分类删除 | `POST /api/material/dialogue/tag/del` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 话术库标签删除 | `POST /api/material/dialogue/tag/del` | `id`(int64, 可选) | 空对象或无业务数据 |
|
||||
| 为话术库设置分类或者标签 | `POST /api/material/dialogue/setCategoryOrTag` | `dialogueId`(repeated int64, 必填,素材id);`categoryId`(int64, 可选,类别id);`tagIds`(repeated int64, 可选,标签id);`needDelTagIds`(repeated int64, 可选,要删除的标签id) | 空对象或无业务数据 |
|
||||
| 获取oss上传的token,有效期5分钟 | `POST /api/material/getOssToken` | `type`(string, 必填,素材类型 image video等);`original`(string, 必填,来源 messagePush material等) | `accessID`(string,阿里云accessid);`host`(string,阿里云host);`policy`(string,阿里云policy);`signature`(string,阿里云signature);`dir`(string,阿里云文件目录);`expire`(int64,阿里云expire 毫秒);`domain`(string,阿里云domain) |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user