public interface WxCpExternalContactService
外部联系人管理接口,企业微信的外部联系人的接口和通讯录接口已经拆离 Created by Joe Cao on 2019/6/14
限定符和类型 | 方法和说明 | ||
---|---|---|---|
WxCpContactWayResult |
addContactWay(WxCpContactWayInfo info)
配置客户联系「联系我」方式
企业可以在管理后台-客户联系中配置成员的「联系我」的二维码或者小程序按钮,客户通过扫描二维码或点击小程序上的按钮,即可获取成员联系方式,主动联系到成员。
|
||
WxCpUserExternalTagGroupInfo |
addCorpTag(WxCpUserExternalTagGroupInfo tagGroup)
企业可通过此接口向客户标签库中添加新的标签组和标签,每个企业最多可配置3000个企业标签。
|
||
String |
addGroupWelcomeTemplate(WxCpGroupWelcomeTemplateResult template)
添加入群欢迎语素材。
|
||
String |
addInterceptRule(WxCpInterceptRuleAddRequest ruleAddRequest)
新建敏感词规则
企业和第三方应用可以通过此接口新建敏感词规则
请求方式:POST(HTTPS)
请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_intercept_rule?
|
||
WxCpGroupJoinWayResult |
addJoinWay(WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo)
配置客户群进群方式
企业可以在管理后台-客户联系中配置「加入群聊」的二维码或者小程序按钮,客户通过扫描二维码或点击小程序上的按钮,即可加入特定的客户群。
|
||
WxCpAddMomentResult |
addMomentTask(WxCpAddMomentTask task)
企业和第三方应用可通过该接口创建客户朋友圈的发表任务。
|
||
WxCpMsgTemplateAddResult |
addMsgTemplate(WxCpMsgTemplate wxCpMsgTemplate)
添加企业群发消息任务
企业可通过此接口添加企业群发消息的任务并通知客服人员发送给相关客户或客户群。
|
||
String |
addProductAlbum(WxCpProductAlbumInfo wxCpProductAlbumInfo)
创建商品图册
企业和第三方应用可以通过此接口增加商品
请求方式:POST(HTTPS)
请求地址:
WxCpBaseResp cancelGroupMsgSend(String msgId)
停止企业群发
企业和第三方应用可调用此接口,停止无需成员继续发送的企业群发
请求方式: POST(HTTPS)
请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/cancel_groupmsg_send?
| ||
WxCpBaseResp |
cancelMomentTask(String momentId)
停止发表企业朋友圈。
|
||
WxCpBaseResp |
closeTempChat(String userId,
String externalUserId)
结束临时会话
将指定的企业成员和客户之前的临时会话断开,断开前会自动下发已配置的结束语。
|
||
String |
convertToOpenid(String externalUserid)
企业和服务商可通过此接口,将微信外部联系人的userid转为微信openid,用于调用支付相关接口。
|
||
WxCpCustomerAcquisitionCustomerList |
customerAcquisitionCustomer(String linkId,
Integer limit,
String cursor)
获取获客客户列表
企业可通过此接口获取到由指定的获客链接添加的客户列表。
|
||
WxCpCustomerAcquisitionCreateResult |
customerAcquisitionLinkCreate(WxCpCustomerAcquisitionRequest wxCpCustomerAcquisitionRequest)
创建获客链接
企业可通过此接口创建新的获客链接。
|
||
WxCpBaseResp |
customerAcquisitionLinkDelete(String linkId)
删除获客链接
企业可通过此接口删除获客链接,删除后的获客链接将无法继续使用。
|
||
WxCpCustomerAcquisitionInfo |
customerAcquisitionLinkGet(String linkId)
获取获客链接详情
企业可通过此接口根据获客链接id获取链接配置详情。。
|
||
WxCpCustomerAcquisitionList |
customerAcquisitionLinkList(Integer limit,
String cursor)
获取获客链接列表
企业可通过此接口获取当前仍然有效的获客链接。
|
||
WxCpCustomerAcquisitionQuota |
customerAcquisitionQuota()
查询剩余使用量
企业可通过此接口查询当前剩余的使用量。
|
||
WxCpCustomerAcquisitionStatistic |
customerAcquisitionStatistic(String linkId,
Date startTime,
Date endTime)
查询链接使用详情
服务商可通过此接口查询指定组件授权的获客链接在指定时间范围内的访问情况。
|
||
WxCpBaseResp |
customerAcquisitionUpdate(WxCpCustomerAcquisitionRequest wxCpCustomerAcquisitionRequest)
编辑获客链接
企业可通过此接口编辑获客链接,修改获客链接的关联范围或修改获客链接的名称。
|
||
WxCpBaseResp |
delCorpTag(String[] tagId,
String[] groupId)
企业可通过此接口删除客户标签库中的标签,或删除整个标签组。
|
||
WxCpBaseResp |
deleteContactWay(String configId)
删除企业已配置的「联系我」方式
删除一个已配置的「联系我」二维码或者「联系我」小程序按钮。
|
||
void |
deleteProductAlbum(String productId)
删除商品图册
企业和第三方应用可以通过此接口删除商品信息
请求方式:POST(HTTPS)
请求地址:
WxCpBaseResp delGroupWelcomeTemplate(String templateId,
String agentId)
删除入群欢迎语素材。
| ||
void |
delInterceptRule(String ruleId)
删除敏感词规则
企业和第三方应用可以通过此接口修改敏感词规则
请求方式:POST(HTTPS)
WxCpBaseResp delJoinWay(String configId)
删除客户群进群方式配置
文档地址:https://developer.work.weixin.qq.com/document/path/92229
| ||
WxCpBaseResp |
editCorpTag(String id,
String name,
Integer order)
企业可通过此接口编辑客户标签/标签组的名称或次序值。
|
||
WxCpBaseResp |
editGroupWelcomeTemplate(WxCpGroupWelcomeTemplateResult template)
编辑入群欢迎语素材。
|
||
WxCpBaseResp |
finishExternalUserIdMigration(String corpid)
设置迁移完成
文档地址:https://open.work.weixin.qq.com/api/doc/35863#转换external_userid
企业授权确认之后,且服务商完成了新旧external_userid的迁移,即可主动将该企业设置为“迁移完成”,
设置之后,从该企业获取到的将是新的external_userid。
|
||
String |
fromServiceExternalUserid(String externalUserid,
String sourceAgentId)
将代开发应用或第三方应用获取的externaluserid转换成自建应用的externaluserid
文档地址:https://developer.work.weixin.qq.com/document/path/95884#external-userid%E8%BD%AC%E6%8D%A2
权限说明:
需要使用自建应用或基础应用的access_token
客户的跟进人,或者用户所在客户群的群主,需要同时在access_token和source_agentid所对应应用的可见范围内
|
||
WxCpExternalContactInfo |
getContactDetail(String externalUserId,
String cursor)
获取客户详情.
|
||
WxCpExternalContactBatchInfo |
getContactDetailBatch(String[] userIdList,
String cursor,
Integer limit)
批量获取客户详情.
|
||
WxCpExternalContactListInfo |
getContactList(String cursor,
Integer limit)
获取已服务的外部联系人
企业可通过此接口获取所有已服务的外部联系人,及其添加人和加入的群聊。
|
||
WxCpContactWayInfo |
getContactWay(String configId)
获取企业已配置的「联系我」方式
批量获取企业配置的「联系我」二维码和「联系我」小程序按钮。
|
||
WxCpUserExternalTagGroupList |
getCorpTagList(String[] tagId)
企业可通过此接口获取企业客户标签详情。
|
||
WxCpUserExternalTagGroupList |
getCorpTagList(String[] tagId,
String[] groupId)
企业可通过此接口获取企业客户标签详情。
|
||
WxCpExternalContactInfo |
getExternalContact(String externalUserId)
已过时。
|
||
WxCpUserExternalGroupChatInfo |
getGroupChat(String chatId,
Integer needName)
通过客户群ID,获取详情。
|
||
WxCpUserExternalGroupChatStatistic |
getGroupChatStatistic(Date startTime,
Integer orderBy,
Integer orderAsc,
Integer pageIndex,
Integer pageSize,
String[] userIds,
String[] partyIds)
获取指定日期全天的统计数据。
|
||
WxCpGroupMsgListResult |
getGroupMsgListV2(String chatType,
Date startTime,
Date endTime,
String creator,
Integer filterType,
Integer limit,
String cursor)
企业和第三方应用可通过此接口获取企业与成员的群发记录。
|
||
WxCpGroupMsgResult |
getGroupMsgResult(String msgid,
Integer limit,
String cursor)
企业跟第三方应用可通过该接口获取到创建企业群发的群发发送结果。
|
||
WxCpGroupMsgSendResult |
getGroupMsgSendResult(String msgid,
String userid,
Integer limit,
String cursor)
企业和第三方应用可通过此接口获取企业与成员的群发记录。
|
||
WxCpGroupMsgTaskResult |
getGroupMsgTask(String msgid,
Integer limit,
String cursor)
获取群发成员发送任务列表。
|
||
WxCpGroupWelcomeTemplateResult |
getGroupWelcomeTemplate(String templateId)
获取入群欢迎语素材。
|
||
WxCpInterceptRuleInfo |
getInterceptRuleDetail(String ruleId)
获取敏感词详情
企业和第三方应用可以通过此接口获取单个敏感词规则的详细信息。
|
||
WxCpInterceptRuleList |
getInterceptRuleList()
获取敏感词规则列表
企业和第三方应用可以通过此接口获取所有设置的敏感词规则列表。
|
||
WxCpGroupJoinWayInfo |
getJoinWay(String configId)
获取客户群进群方式配置
获取企业配置的群二维码或小程序按钮。
|
||
WxCpGetMomentComments |
getMomentComments(String momentId,
String userId)
获取客户朋友圈全部的发表记录 获取客户朋友圈的互动数据
文档地址
|
||
WxCpGetMomentCustomerList |
getMomentCustomerList(String momentId,
String userId,
String cursor,
Integer limit)
获取客户朋友圈全部的发表记录 获取客户朋友圈发表时选择的可见范围
文档地址
|
||
WxCpGetMomentList |
getMomentList(Long startTime,
Long endTime,
String creator,
Integer filterType,
String cursor,
Integer limit)
获取客户朋友圈全部的发表记录 获取企业全部的发表列表
文档地址
|
||
WxCpGetMomentSendResult |
getMomentSendResult(String momentId,
String userId,
String cursor,
Integer limit)
获取客户朋友圈全部的发表记录 获取客户朋友圈发表后的可见客户列表
文档地址
|
||
WxCpGetMomentTask |
getMomentTask(String momentId,
String cursor,
Integer limit)
获取客户朋友圈全部的发表记录 获取客户朋友圈企业发表的列表
文档地址
|
||
WxCpGetMomentTaskResult |
getMomentTaskResult(String jobId)
由于发表任务的创建是异步执行的,应用需要再调用该接口以获取创建的结果。
|
||
WxCpNewExternalUserIdList |
getNewExternalUserId(String[] externalUserIdList)
转换external_userid
文档地址:https://open.work.weixin.qq.com/api/doc/35863#转换external_userid
对于历史已授权的企业,在2022年3月1号之前,所有接口与回调返回的external_userid仍然为旧的external_userid,
从2022年3月1号0点开始,所有输入与返回的external_userid字段,将启用升级后的external_userid。
|
||
WxCpProductAlbumResult |
getProductAlbum(String productId)
获取商品图册
获取商品图册
|
||
WxCpProductAlbumListResult |
getProductAlbumList(Integer limit,
String cursor)
获取商品图册
获取商品图册列表
|
||
WxCpUserExternalUserBehaviorStatistic |
getUserBehaviorStatistic(Date startTime,
Date endTime,
String[] userIds,
String[] partyIds)
企业可通过此接口获取成员联系客户的数据,包括发起申请数、新增客户数、聊天数、发送消息数和删除/拉黑成员的客户数等指标。
|
||
List<String> |
listExternalContacts(String userId)
获取客户列表.
|
||
List<String> |
listFollowers()
企业和第三方服务商可通过此接口获取配置了客户联系功能的成员(Customer Contact)列表。
|
||
WxCpUserExternalGroupChatList |
listGroupChat(Integer pageIndex,
Integer pageSize,
int status,
String[] userIds,
String[] partyIds)
|
||
WxCpUserExternalGroupChatList |
listGroupChat(Integer limit,
String cursor,
int status,
String[] userIds)
该接口用于获取配置过客户群管理的客户群列表。
|
||
WxCpUserExternalUnassignList |
listUnassignedList(Integer pageId,
String cursor,
Integer pageSize)
获取待分配的离职成员列表
企业和第三方可通过此接口,获取所有离职成员的客户列表,并可进一步调用分配离职成员的客户接口将这些客户重新分配给其他企业成员。
|
||
WxCpBaseResp |
markTag(String userid,
String externalUserid,
String[] addTag,
String[] removeTag)
企业可通过此接口为指定成员的客户添加上由企业统一配置的标签。
|
||
WxCpUserExternalGroupChatTransferResp |
onjobTransferGroupChat(String[] chatIds,
String newOwner)
企业可通过此接口,将在职成员为群主的群,分配给另一个客服成员。
|
||
String |
opengidToChatid(String opengid)
客户群opengid转换
文档地址:https://open.work.weixin.qq.com/api/doc/90000/90135/94822
用户在微信里的客户群里打开小程序时,某些场景下可以获取到群的opengid,如果该群是企业微信的客户群,
则企业或第三方可以调用此接口将一个opengid转换为客户群chat_id
权限说明:
企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)
|
||
WxCpBaseResp |
remindGroupMsgSend(String msgId)
提醒成员群发
企业和第三方应用可调用此接口,重新触发群发通知,提醒成员完成群发任务,24小时内每个群发最多触发三次提醒。
|
||
WxCpUserTransferCustomerResp |
resignedTransferCustomer(WxCpUserTransferCustomerReq req)
企业可通过此接口,分配离职成员的客户给其他成员。
|
||
WxCpUserTransferResultResp |
resignedTransferResult(String handOverUserid,
String takeOverUserid,
String cursor)
企业和第三方可通过此接口查询离职成员的客户分配情况。
|
||
void |
sendWelcomeMsg(WxCpWelcomeMsg msg)
发送新客户欢迎语
企业微信在向企业推送添加外部联系人事件时,会额外返回一个welcome_code,企业以此为凭据调用接口,即可通过成员向新添加的客户发送个性化的欢迎语。
|
||
String |
toServiceExternalUserid(String externalUserid)
代开发应用external_userid转换
文档地址:https://work.weixin.qq.com/api/doc/90001/90143/95195
企业同时安装服务商第三方应用以及授权代开发自建应用的时,服务商可使用该接口将代开发应用获取到的外部联系人id跟第三方应用的id进行关联,
该接口可将代开发自建应用获取到的external_userid转换为服务商第三方应用的external_userid。
|
||
WxCpUserTransferCustomerResp |
transferCustomer(WxCpUserTransferCustomerReq req)
企业可通过此接口,转接在职成员的客户给其他成员。
|
||
WxCpBaseResp |
transferExternalContact(String externalUserid,
String handOverUserid,
String takeOverUserid)
已过时。
此后续将不再更新维护, 建议使用
transferCustomer(WxCpUserTransferCustomerReq) |
||
WxCpUserExternalGroupChatTransferResp |
transferGroupChat(String[] chatIds,
String newOwner)
企业可通过此接口,将已离职成员为群主的群,分配给另一个客服成员。
|
||
WxCpUserTransferResultResp |
transferResult(String handOverUserid,
String takeOverUserid,
String cursor)
企业和第三方可通过此接口查询在职成员的客户转接情况。
|
||
String |
unionidToExternalUserid(String unionid,
String openid)
服务商为企业代开发微信小程序的场景,服务商可通过此接口,将微信客户的unionid转为external_userid。
|
||
WxCpExternalUserIdList |
unionidToExternalUserid3rd(String unionid,
String openid,
String corpid)
企业客户微信unionid的升级 - unionid查询external_userid
文档地址:https://open.work.weixin.qq.com/api/doc/35863#4.2%20unionid%E6%9F%A5%E8%AF%A2external_userid
当微信用户在微信中使用第三方应用的小程序或公众号时,第三方可将获取到的unionid与openid,调用此接口转换为企业客户external_userid。
|
||
WxCpBaseResp |
updateContactWay(WxCpContactWayInfo info)
更新企业已配置的「联系我」方式
更新企业配置的「联系我」二维码和「联系我」小程序按钮中的信息,如使用人员和备注等。
|
||
void |
updateInterceptRule(WxCpInterceptRule interceptRule)
修改敏感词规则
文档地址
企业和第三方应用可以通过此接口修改敏感词规则
请求方式:POST(HTTPS)
请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/update_intercept_rule?
|
||
WxCpBaseResp |
updateJoinWay(WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo)
更新客户群进群方式配置
更新进群方式配置信息。
|
||
void |
updateProductAlbum(WxCpProductAlbumInfo wxCpProductAlbumInfo)
编辑商品图册
企业和第三方应用可以通过此接口修改商品信息
请求方式:POST(HTTPS)
请求地址:
void updateRemark(WxCpUpdateRemarkRequest request)
修改客户备注信息.
| ||
WxMediaUploadResult |
uploadAttachment(String mediaType,
Integer attachmentType,
File file)
上传附件资源
...
|
||
WxMediaUploadResult |
uploadAttachment(String mediaType,
String fileType,
Integer attachmentType,
InputStream inputStream)
上传附件资源
...
|
WxCpContactWayResult addContactWay(WxCpContactWayInfo info) throws WxErrorException
企业可以在管理后台-客户联系中配置成员的「联系我」的二维码或者小程序按钮,客户通过扫描二维码或点击小程序上的按钮,即可获取成员联系方式,主动联系到成员。 企业可通过此接口为具有客户联系功能的成员生成专属的「联系我」二维码或者「联系我」按钮。 如果配置的是「联系我」按钮,需要开发者的小程序接入小程序插件。 注意: 通过API添加的「联系我」不会在管理端进行展示,每个企业可通过API最多配置50万个「联系我」。 用户需要妥善存储返回的config_id,config_id丢失可能导致用户无法编辑或删除「联系我」。 临时会话模式不占用「联系我」数量,但每日最多添加10万个,并且仅支持单人。 临时会话模式的二维码,添加好友完成后该二维码即刻失效。
info
- 客户联系「联系我」方式WxErrorException
- the wx error exceptionWxCpContactWayInfo getContactWay(String configId) throws WxErrorException
批量获取企业配置的「联系我」二维码和「联系我」小程序按钮。
configId
- 联系方式的配置id,必填WxErrorException
- the wx error exceptionWxCpBaseResp updateContactWay(WxCpContactWayInfo info) throws WxErrorException
更新企业配置的「联系我」二维码和「联系我」小程序按钮中的信息,如使用人员和备注等。
info
- 客户联系「联系我」方式WxErrorException
- the wx error exceptionWxCpBaseResp deleteContactWay(String configId) throws WxErrorException
删除一个已配置的「联系我」二维码或者「联系我」小程序按钮。
configId
- 企业联系方式的配置id,必填WxErrorException
- the wx error exceptionWxCpBaseResp closeTempChat(String userId, String externalUserId) throws WxErrorException
将指定的企业成员和客户之前的临时会话断开,断开前会自动下发已配置的结束语。 注意:请保证传入的企业成员和客户之间有仍然有效的临时会话, 通过其他方式的添加外部联系人无法通过此接口关闭会话。
userId
- the user idexternalUserId
- the external user idWxErrorException
- the wx error exception@Deprecated WxCpExternalContactInfo getExternalContact(String externalUserId) throws WxErrorException
getContactDetail(String, String)
企业可通过此接口,根据外部联系人的userid,拉取外部联系人详情。权限说明: 企业需要使用外部联系人管理secret所获取的accesstoken来调用 第三方应用需拥有“企业客户”权限。 第三方应用调用时,返回的跟进人follow_user仅包含应用可见范围之内的成员。
externalUserId
- 外部联系人的useridWxErrorException
- the wx error exceptionWxCpExternalContactInfo getContactDetail(String externalUserId, String cursor) throws WxErrorException
企业可通过此接口,根据外部联系人的userid(如何获取?),拉取客户详情。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get?access_token=ACCESS_TOKEN&external_userid=EXTERNAL_USERID 权限说明: 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?); 第三方/自建应用调用时,返回的跟进人follow_user仅包含应用可见范围之内的成员。
externalUserId
- 外部联系人的userid,注意不是企业成员的帐号cursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填WxErrorException
- .String convertToOpenid(String externalUserid) throws WxErrorException
externalUserid
- 微信外部联系人的useridWxErrorException
- .String unionidToExternalUserid(String unionid, String openid) throws WxErrorException
文档地址:https://work.weixin.qq.com/api/doc/90001/90143/93274 服务商代开发小程序指企业使用的小程序为企业主体的,非服务商主体的小程序。 场景:企业客户在微信端从企业主体的小程序(非服务商应用)登录,同时企业在企业微信安装了服务商的第三方应用,服务商可以调用该接口将登录用户的unionid转换为服务商全局唯一的外部联系人id 权限说明: 仅认证企业可调用 unionid必须是企业主体下的unionid。即unionid的主体(为绑定了该小程序的微信开放平台账号主体)需与当前企业的主体一致。 unionid的主体(即微信开放平台账号主体)需认证 该客户的跟进人必须在应用的可见范围之内
unionid
- 微信客户的unionidopenid
- the openidWxErrorException
- .WxCpGroupJoinWayResult addJoinWay(WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException
wxCpGroupJoinWayInfo
- the wx cp group join way infoWxCpGroupJoinWayResult
WxErrorException
- the wx error exceptionWxCpBaseResp updateJoinWay(WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException
wxCpGroupJoinWayInfo
- the wx cp group join way infoWxErrorException
- the wx error exceptionWxCpGroupJoinWayInfo getJoinWay(String configId) throws WxErrorException
configId
- the config idWxErrorException
- the wx error exceptionWxCpBaseResp delJoinWay(String configId) throws WxErrorException
configId
- the config idWxErrorException
- the wx error exceptionString toServiceExternalUserid(String externalUserid) throws WxErrorException
文档地址:https://work.weixin.qq.com/api/doc/90001/90143/95195 企业同时安装服务商第三方应用以及授权代开发自建应用的时,服务商可使用该接口将代开发应用获取到的外部联系人id跟第三方应用的id进行关联, 该接口可将代开发自建应用获取到的external_userid转换为服务商第三方应用的external_userid。 权限说明: 该企业授权了该服务商第三方应用,且授权的第三方应用具备“企业客户权限->客户基础信息”权限 该客户的跟进人必须在应用的可见范围之内 应用需具备“企业客户权限->客户基础信息”权限
externalUserid
- 代开发自建应用获取到的外部联系人IDWxErrorException
- .String fromServiceExternalUserid(String externalUserid, String sourceAgentId) throws WxErrorException
文档地址:https://developer.work.weixin.qq.com/document/path/95884#external-userid%E8%BD%AC%E6%8D%A2 权限说明: 需要使用自建应用或基础应用的access_token 客户的跟进人,或者用户所在客户群的群主,需要同时在access_token和source_agentid所对应应用的可见范围内
externalUserid
- 服务商主体的external_userid,必须是source_agentid对应的应用所获取sourceAgentId
- 企业授权的代开发自建应用或第三方应用的agentidWxErrorException
WxCpExternalUserIdList unionidToExternalUserid3rd(String unionid, String openid, String corpid) throws WxErrorException
文档地址:https://open.work.weixin.qq.com/api/doc/35863#4.2%20unionid%E6%9F%A5%E8%AF%A2external_userid 当微信用户在微信中使用第三方应用的小程序或公众号时,第三方可将获取到的unionid与openid,调用此接口转换为企业客户external_userid。 该接口调用频次有限,每个服务商每小时仅可调用1万次,仅用于微信用户主动使用第三方应用的场景来调用,服务商切不可滥用。 同时建议服务商的小程序路径或公众号页面链接带上corpid参数,如此可明确地转换出该企业对应的external_userid,以获得更好的性能。 权限说明: 该企业授权了该服务商第三方应用 调用频率最大为10000次/小时 unionid和openid的主体需与服务商的主体一致 openid与unionid必须是在同一个小程序或同一个公众号获取到的
unionid
- 微信客户的unionidopenid
- 微信客户的openidcorpid
- 需要换取的企业corpid,不填则拉取所有企业WxErrorException
- .WxCpNewExternalUserIdList getNewExternalUserId(String[] externalUserIdList) throws WxErrorException
文档地址:https://open.work.weixin.qq.com/api/doc/35863#转换external_userid 对于历史已授权的企业,在2022年3月1号之前,所有接口与回调返回的external_userid仍然为旧的external_userid, 从2022年3月1号0点开始,所有输入与返回的external_userid字段,将启用升级后的external_userid。 所以服务商需要在此之前完成历史数据的迁移整改 权限说明: 该企业授权了该服务商第三方应用 external_userid对应的跟进人需要在应用可见范围内
externalUserIdList
- 微信客户的unionidWxErrorException
- .WxCpBaseResp finishExternalUserIdMigration(String corpid) throws WxErrorException
文档地址:https://open.work.weixin.qq.com/api/doc/35863#转换external_userid 企业授权确认之后,且服务商完成了新旧external_userid的迁移,即可主动将该企业设置为“迁移完成”, 设置之后,从该企业获取到的将是新的external_userid。注意,该接口需要使用provider_access_token来调用, 对于有多个应用的服务商,可逐个应用进行external_userid的转换,最后再使用provider_access_token调用该接口完成设置。 权限说明: 该企业授权了该服务商第三方应用
corpid
- 企业corpidWxErrorException
- .String opengidToChatid(String opengid) throws WxErrorException
文档地址:https://open.work.weixin.qq.com/api/doc/90000/90135/94822 用户在微信里的客户群里打开小程序时,某些场景下可以获取到群的opengid,如果该群是企业微信的客户群, 则企业或第三方可以调用此接口将一个opengid转换为客户群chat_id 权限说明: 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?) 第三方应用需具有“企业客户权限->客户基础信息”权限 对于第三方/自建应用,群主必须在应用的可见范围 仅支持企业服务人员创建的客户群 仅可转换出自己企业下的客户群chat_id
opengid
- 小程序在微信获取到的群ID,参见wx.getGroupEnterInfo(https://developers.weixin.qq
.com/miniprogram/dev/api/open-api/group/wx.getGroupEnterInfo.html)WxErrorException
- .WxCpExternalContactBatchInfo getContactDetailBatch(String[] userIdList, String cursor, Integer limit) throws WxErrorException
企业/第三方可通过此接口获取指定成员添加的客户信息列表。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/batch/get_by_user?access_token=ACCESS_TOKEN 权限说明: 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?); 第三方/自建应用调用时,返回的跟进人follow_user仅包含应用可见范围之内的成员。
userIdList
- 企业成员的userid列表,注意不是外部联系人的帐号cursor
- the cursorlimit
- the limitWxErrorException
- .WxCpExternalContactListInfo getContactList(String cursor, Integer limit) throws WxErrorException
企业可通过此接口获取所有已服务的外部联系人,及其添加人和加入的群聊。 外部联系人分为客户和其他外部联系人,如果是客户,接口将返回外部联系人临时ID和externaluserid;如果是其他外部联系人,接口将只返回外部联系人临时ID。 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/contact_list?access_token=ACCESS_TOKEN 文档地址: https://developer.work.weixin.qq.com/document/path/99434
cursor
- the cursorlimit
- the limitWxErrorException
- .void updateRemark(WxCpUpdateRemarkRequest request) throws WxErrorException
企业可通过此接口修改指定用户添加的客户的备注信息。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/remark?access_token=ACCESS_TOKEN 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/92115
request
- 备注信息请求WxErrorException
- .List<String> listExternalContacts(String userId) throws WxErrorException
企业可通过此接口获取指定成员添加的客户列表。客户是指配置了客户联系功能的成员所添加的外部联系人。没有配置客户联系功能的成员,所添加的外部联系人将不会作为客户返回。 请求方式:GET(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/list?access_token=ACCESS_TOKEN&userid=USERID 权限说明: 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?); 第三方应用需拥有“企业客户”权限。 第三方/自建应用只能获取到可见范围内的配置了客户联系功能的成员。
userId
- 企业成员的useridWxErrorException
- .List<String> listFollowers() throws WxErrorException
企业需要使用外部联系人管理secret所获取的accesstoken来调用(accesstoken如何获取?); 第三方应用需拥有“企业客户”权限。 第三方应用只能获取到可见范围内的配置了客户联系功能的成员
WxErrorException
- .WxCpUserExternalUnassignList listUnassignedList(Integer pageId, String cursor, Integer pageSize) throws WxErrorException
请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_unassigned_list?access_token=ACCESS_TOKEN
pageId
- 分页查询,要查询页号,从0开始cursor
- 分页查询游标,字符串类型,适用于数据量较大的情况,如果使用该参数则无需填写page_id,该参数由上一次调用返回pageSize
- 每次返回的最大记录数,默认为1000,最大值为1000WxErrorException
- the wx error exception@Deprecated WxCpBaseResp transferExternalContact(String externalUserid, String handOverUserid, String takeOverUserid) throws WxErrorException
transferCustomer(WxCpUserTransferCustomerReq)
externalUserid
- the external useridhandOverUserid
- the hand over useridtakeOverUserid
- the take over useridWxErrorException
- the wx error exceptionWxCpUserTransferCustomerResp transferCustomer(WxCpUserTransferCustomerReq req) throws WxErrorException
权限说明: * 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限 接替成员必须在此第三方应用或自建应用的可见范围内。 接替成员需要配置了客户联系功能。 接替成员需要在企业微信激活且已经过实名认证。
req
- 转接在职成员的客户给其他成员请求实体WxErrorException
- the wx error exceptionWxCpUserTransferResultResp transferResult(String handOverUserid, String takeOverUserid, String cursor) throws WxErrorException
企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限 接替成员必须在此第三方应用或自建应用的可见范围内。
handOverUserid
- 原添加成员的useridtakeOverUserid
- 接替成员的useridcursor
- 分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页;WxErrorException
- the wx error exceptionWxCpUserTransferCustomerResp resignedTransferCustomer(WxCpUserTransferCustomerReq req) throws WxErrorException
权限说明:
企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 第三方应用需拥有“企业客户权限->客户联系->离职分配”权限 接替成员必须在此第三方应用或自建应用的可见范围内。 接替成员需要配置了客户联系功能。 接替成员需要在企业微信激活且已经过实名认证。
req
- 转接在职成员的客户给其他成员请求实体WxErrorException
- the wx error exceptionWxCpUserTransferResultResp resignedTransferResult(String handOverUserid, String takeOverUserid, String cursor) throws WxErrorException
企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限 接替成员必须在此第三方应用或自建应用的可见范围内。
handOverUserid
- 原添加成员的useridtakeOverUserid
- 接替成员的useridcursor
- 分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页;WxErrorException
- the wx error exception@Deprecated WxCpUserExternalGroupChatList listGroupChat(Integer pageIndex, Integer pageSize, int status, String[] userIds, String[] partyIds) throws WxErrorException
该接口用于获取配置过客户群管理的客户群列表。 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 暂不支持第三方调用。 微信文档:https://work.weixin.qq.com/api/doc/90000/90135/92119
pageIndex
- the page indexpageSize
- the page sizestatus
- the statususerIds
- the user idspartyIds
- the party idsWxErrorException
- the wx error exceptionWxCpUserExternalGroupChatList listGroupChat(Integer limit, String cursor, int status, String[] userIds) throws WxErrorException
该接口用于获取配置过客户群管理的客户群列表。 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 暂不支持第三方调用。 微信文档:https://work.weixin.qq.com/api/doc/90000/90135/92119
limit
- 分页,预期请求的数据量,取值范围 1 ~ 1000cursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用不填status
- 客户群跟进状态过滤。0 - 所有列表(即不过滤) 1 - 离职待继承 2 - 离职继承中 3 - 离职继承完成 默认为0userIds
- 群主过滤。如果不填,表示获取应用可见范围内全部群主的数据(但是不建议这么用,如果可见范围人数超过1000人,为了防止数据包过大,会报错 81017);用户ID列表。最多100个WxErrorException
- the wx error exceptionWxCpUserExternalGroupChatInfo getGroupChat(String chatId, Integer needName) throws WxErrorException
通过客户群ID,获取详情。包括群名、群成员列表、群成员入群时间、入群方式。(客户群是由具有客户群使用权限的成员创建的外部群) 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 暂不支持第三方调用。 微信文档:https://work.weixin.qq.com/api/doc/90000/90135/92122
chatId
- the chat idneedName
- the need nameWxErrorException
- the wx error exceptionWxCpUserExternalGroupChatTransferResp transferGroupChat(String[] chatIds, String newOwner) throws WxErrorException
群主离职了的客户群,才可继承 继承给的新群主,必须是配置了客户联系功能的成员 继承给的新群主,必须有设置实名 继承给的新群主,必须有激活企业微信 同一个人的群,限制每天最多分配300个给新群主
权限说明:
企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 第三方应用需拥有“企业客户权限->客户联系->分配离职成员的客户群”权限 对于第三方/自建应用,群主必须在应用的可见范围。
chatIds
- 需要转群主的客户群ID列表。取值范围: 1 ~ 100newOwner
- 新群主IDWxErrorException
- the wx error exceptionWxCpUserExternalGroupChatTransferResp onjobTransferGroupChat(String[] chatIds, String newOwner) throws WxErrorException
chatIds
- 需要转群主的客户群ID列表。取值范围: 1 ~ 100newOwner
- 新群主IDWxErrorException
- the wx error exceptionWxCpUserExternalUserBehaviorStatistic getUserBehaviorStatistic(Date startTime, Date endTime, String[] userIds, String[] partyIds) throws WxErrorException
企业可通过此接口获取成员联系客户的数据,包括发起申请数、新增客户数、聊天数、发送消息数和删除/拉黑成员的客户数等指标。 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 第三方应用需拥有“企业客户”权限。 第三方/自建应用调用时传入的userid和partyid要在应用的可见范围内;
startTime
- the start timeendTime
- the end timeuserIds
- the user idspartyIds
- the party idsWxErrorException
- the wx error exceptionWxCpUserExternalGroupChatStatistic getGroupChatStatistic(Date startTime, Integer orderBy, Integer orderAsc, Integer pageIndex, Integer pageSize, String[] userIds, String[] partyIds) throws WxErrorException
获取指定日期全天的统计数据。注意,企业微信仅存储60天的数据。 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。 暂不支持第三方调用。
startTime
- the start timeorderBy
- the order byorderAsc
- the order ascpageIndex
- the page indexpageSize
- the page sizeuserIds
- the user idspartyIds
- the party idsWxErrorException
- the wx error exceptionWxCpMsgTemplateAddResult addMsgTemplate(WxCpMsgTemplate wxCpMsgTemplate) throws WxErrorException
请求方式: POST(HTTP)
请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_msg_template?access_token=ACCESS_TOKEN
wxCpMsgTemplate
- the wx cp msg templateWxErrorException
- the wx error exceptionWxCpBaseResp remindGroupMsgSend(String msgId) throws WxErrorException
请求方式: POST(HTTPS)
请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/remind_groupmsg_send?access_token=ACCESS_TOKEN
msgId
- 群发消息的id,通过获取群发记录列表接口返回WxErrorException
WxCpBaseResp cancelGroupMsgSend(String msgId) throws WxErrorException
请求方式: POST(HTTPS)
请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/cancel_groupmsg_send?access_token=ACCESS_TOKEN
msgId
- 群发消息的id,通过获取群发记录列表接口返回WxErrorException
void sendWelcomeMsg(WxCpWelcomeMsg msg) throws WxErrorException
企业微信在向企业推送添加外部联系人事件时,会额外返回一个welcome_code,企业以此为凭据调用接口,即可通过成员向新添加的客户发送个性化的欢迎语。 为了保证用户体验以及避免滥用,企业仅可在收到相关事件后20秒内调用,且只可调用一次。 如果企业已经在管理端为相关成员配置了可用的欢迎语,则推送添加外部联系人事件时不会返回welcome_code。 每次添加新客户时可能有多个企业自建应用/第三方应用收到带有welcome_code的回调事件,但仅有最先调用的可以发送成功。后续调用将返回41051(externaluser has started chatting)错误,请用户根据实际使用需求,合理设置应用可见范围,避免冲突。 请求方式: POST(HTTP) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/send_welcome_msg?access_token=ACCESS_TOKEN 文档地址
msg
- .WxErrorException
- .WxCpUserExternalTagGroupList getCorpTagList(String[] tagId) throws WxErrorException
企业可通过此接口获取企业客户标签详情。
tagId
- the tag idWxErrorException
- the wx error exceptionWxCpUserExternalTagGroupList getCorpTagList(String[] tagId, String[] groupId) throws WxErrorException
企业可通过此接口获取企业客户标签详情。 若tag_id和group_id均为空,则返回所有标签。 同时传递tag_id和group_id时,忽略tag_id,仅以group_id作为过滤条件。
tagId
- the tag idgroupId
- the tagGroup idWxErrorException
- the wx error exceptionWxCpUserExternalTagGroupInfo addCorpTag(WxCpUserExternalTagGroupInfo tagGroup) throws WxErrorException
企业可通过此接口向客户标签库中添加新的标签组和标签,每个企业最多可配置3000个企业标签。 暂不支持第三方调用。
tagGroup
- the tag groupWxErrorException
- the wx error exceptionWxCpBaseResp editCorpTag(String id, String name, Integer order) throws WxErrorException
企业可通过此接口编辑客户标签/标签组的名称或次序值。 暂不支持第三方调用。
id
- the idname
- the nameorder
- the orderWxErrorException
- the wx error exceptionWxCpBaseResp delCorpTag(String[] tagId, String[] groupId) throws WxErrorException
企业可通过此接口删除客户标签库中的标签,或删除整个标签组。 暂不支持第三方调用。
tagId
- the tag idgroupId
- the group idWxErrorException
- the wx error exceptionWxCpBaseResp markTag(String userid, String externalUserid, String[] addTag, String[] removeTag) throws WxErrorException
企业可通过此接口为指定成员的客户添加上由企业统一配置的标签。 文档地址
userid
- the useridexternalUserid
- the external useridaddTag
- the add tagremoveTag
- the remove tagWxErrorException
- the wx error exceptionWxCpAddMomentResult addMomentTask(WxCpAddMomentTask task) throws WxErrorException
企业和第三方应用可通过该接口创建客户朋友圈的发表任务。 文档地址
task
- the taskWxErrorException
- the wx error exceptionWxCpGetMomentTaskResult getMomentTaskResult(String jobId) throws WxErrorException
由于发表任务的创建是异步执行的,应用需要再调用该接口以获取创建的结果。 文档地址
jobId
- 异步任务id,最大长度为64字节,由创建发表内容到客户朋友圈任务接口获取WxErrorException
- the wx error exceptionWxCpBaseResp cancelMomentTask(String momentId) throws WxErrorException
停止发表企业朋友圈。 文档地址
momentId
- 朋友圈id,可通过获取客户朋友圈企业发表的列表接口获取朋友圈企业发表的列表WxErrorException
- the wx error exceptionWxCpGetMomentList getMomentList(Long startTime, Long endTime, String creator, Integer filterType, String cursor, Integer limit) throws WxErrorException
获取客户朋友圈全部的发表记录 获取企业全部的发表列表 文档地址
startTime
- 朋友圈记录开始时间。Unix时间戳endTime
- 朋友圈记录结束时间。Unix时间戳creator
- 朋友圈创建人的useridfilterType
- 朋友圈类型。0:企业发表 1:个人发表 2:所有,包括个人创建以及企业创建,默认情况下为所有类型cursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填limit
- 返回的最大记录数,整型,最大值100,默认值100,超过最大值时取默认值WxErrorException
- the wx error exceptionWxCpGetMomentTask getMomentTask(String momentId, String cursor, Integer limit) throws WxErrorException
获取客户朋友圈全部的发表记录 获取客户朋友圈企业发表的列表 文档地址
momentId
- 朋友圈id,仅支持企业发表的朋友圈idcursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填limit
- 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值WxErrorException
- the wx error exceptionWxCpGetMomentCustomerList getMomentCustomerList(String momentId, String userId, String cursor, Integer limit) throws WxErrorException
获取客户朋友圈全部的发表记录 获取客户朋友圈发表时选择的可见范围 文档地址
momentId
- 朋友圈iduserId
- 企业发表成员userid,如果是企业创建的朋友圈,可以通过获取客户朋友圈企业发表的
列表获取已发表成员userid,如果是个人创建的朋友圈,创建人userid就是企业发表成员useridcursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填limit
- 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值WxErrorException
- the wx error exceptionWxCpGetMomentSendResult getMomentSendResult(String momentId, String userId, String cursor, Integer limit) throws WxErrorException
获取客户朋友圈全部的发表记录 获取客户朋友圈发表后的可见客户列表 文档地址
momentId
- 朋友圈iduserId
- 企业发表成员userid,如果是企业创建的朋友圈,可以通过获取客户朋友圈企业发表的列表获取已发表成员userid,
如果是个人创建的朋友圈,创建人userid就是企业发表成员useridcursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填limit
- 返回的最大记录数,整型,最大值5000,默认值3000,超过最大值时取默认值WxErrorException
- the wx error exceptionWxCpGetMomentComments getMomentComments(String momentId, String userId) throws WxErrorException
获取客户朋友圈全部的发表记录 获取客户朋友圈的互动数据 文档地址
momentId
- 朋友圈iduserId
- 企业发表成员userid,如果是企业创建的朋友圈,可以通过获取客户朋友圈企业发表的列表获取已发表成员userid,
如果是个人创建的朋友圈,创建人userid就是企业发表成员useridWxErrorException
- the wx error exceptionWxCpGroupMsgListResult getGroupMsgListV2(String chatType, Date startTime, Date endTime, String creator, Integer filterType, Integer limit, String cursor) throws WxErrorException
企业和第三方应用可通过此接口获取企业与成员的群发记录。 文档地址
chatType
- 群发任务的类型,默认为single,表示发送给客户,group表示发送给客户群startTime
- 群发任务记录开始时间endTime
- 群发任务记录结束时间creator
- 群发任务创建人企业账号idfilterType
- 创建人类型。0:企业发表 1:个人发表 2:所有,包括个人创建以及企业创建,默认情况下为所有类型limit
- 返回的最大记录数,整型,最大值100,默认值50,超过最大值时取默认值cursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填WxErrorException
- the wx error exceptionWxCpGroupMsgSendResult getGroupMsgSendResult(String msgid, String userid, Integer limit, String cursor) throws WxErrorException
企业和第三方应用可通过此接口获取企业与成员的群发记录。 获取企业群发成员执行结果
msgid
- 群发消息的id,通过获取群发记录列表接口返回userid
- 发送成员userid,通过获取群发成员发送任务列表接口返回limit
- 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值cursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填WxErrorException
- the wx error exceptionWxCpGroupMsgResult getGroupMsgResult(String msgid, Integer limit, String cursor) throws WxErrorException
企业跟第三方应用可通过该接口获取到创建企业群发的群发发送结果。 文档
msgid
- 群发消息的id,通过创建企业群发接口返回limit
- 返回的最大记录数,整型,最大值10000,默认值10000cursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填WxErrorException
- the wx error exceptionWxCpGroupMsgTaskResult getGroupMsgTask(String msgid, Integer limit, String cursor) throws WxErrorException
获取群发成员发送任务列表。 获取群发成员发送任务列表
msgid
- 群发消息的id,通过获取群发记录列表接口返回limit
- 返回的最大记录数,整型,最大值1000,默认值500,超过最大值时取默认值cursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填WxErrorException
- the wx error exceptionString addGroupWelcomeTemplate(WxCpGroupWelcomeTemplateResult template) throws WxErrorException
添加入群欢迎语素材。 添加入群欢迎语素材
template
- 素材内容WxErrorException
- the wx error exceptionWxCpBaseResp editGroupWelcomeTemplate(WxCpGroupWelcomeTemplateResult template) throws WxErrorException
编辑入群欢迎语素材。 编辑入群欢迎语素材
template
- the templateWxErrorException
- the wx error exceptionWxCpGroupWelcomeTemplateResult getGroupWelcomeTemplate(String templateId) throws WxErrorException
获取入群欢迎语素材。 获取入群欢迎语素材
templateId
- 群欢迎语的素材idWxErrorException
- the wx error exceptionWxCpBaseResp delGroupWelcomeTemplate(String templateId, String agentId) throws WxErrorException
删除入群欢迎语素材。 企业可通过此API删除入群欢迎语素材,且仅能删除调用方自己创建的入群欢迎语素材。 删除入群欢迎语素材
templateId
- 群欢迎语的素材idagentId
- the agent idWxErrorException
- the wx error exceptionWxCpProductAlbumListResult getProductAlbumList(Integer limit, String cursor) throws WxErrorException
获取商品图册 获取商品图册列表
limit
- 返回的最大记录数,整型,最大值100,默认值50,超过最大值时取默认值cursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填WxErrorException
- the wx error exceptionWxCpProductAlbumResult getProductAlbum(String productId) throws WxErrorException
获取商品图册 获取商品图册
productId
- 商品idWxErrorException
- the wx error exceptionWxMediaUploadResult uploadAttachment(String mediaType, String fileType, Integer attachmentType, InputStream inputStream) throws WxErrorException, IOException
上传附件资源 ...
mediaType
- the media typefileType
- the file typeattachmentType
- the attachment typeinputStream
- the input streamWxErrorException
- the wx error exceptionIOException
- the io exceptionWxMediaUploadResult uploadAttachment(String mediaType, Integer attachmentType, File file) throws WxErrorException
上传附件资源 ...
mediaType
- the media typeattachmentType
- the attachment typefile
- the fileWxErrorException
- the wx error exceptionString addInterceptRule(WxCpInterceptRuleAddRequest ruleAddRequest) throws WxErrorException
新建敏感词规则 企业和第三方应用可以通过此接口新建敏感词规则 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_intercept_rule?access_token=ACCESS_TOKEN
ruleAddRequest
- the rule add requestWxErrorException
- the wx error exceptionvoid updateInterceptRule(WxCpInterceptRule interceptRule) throws WxErrorException
修改敏感词规则 文档地址 企业和第三方应用可以通过此接口修改敏感词规则 请求方式:POST(HTTPS) 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/update_intercept_rule?access_token=ACCESS_TOKEN
interceptRule
- the ruleWxErrorException
- the wx error exceptionvoid delInterceptRule(String ruleId) throws WxErrorException
删除敏感词规则 企业和第三方应用可以通过此接口修改敏感词规则 请求方式:POST(HTTPS) 请求地址
ruleId
- 规则idWxErrorException
- the wx error exceptionWxCpInterceptRuleList getInterceptRuleList() throws WxErrorException
WxErrorException
- 微信API异常WxCpInterceptRuleInfo getInterceptRuleDetail(String ruleId) throws WxErrorException
ruleId
- 敏感词规则IDWxErrorException
- 微信API异常String addProductAlbum(WxCpProductAlbumInfo wxCpProductAlbumInfo) throws WxErrorException
创建商品图册 企业和第三方应用可以通过此接口增加商品 请求方式:POST(HTTPS) 请求地址: https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_product_album?access_token=ACCESS_TOKEN 文档地址
wxCpProductAlbumInfo
- 商品图册信息WxErrorException
- the wx error exceptionvoid updateProductAlbum(WxCpProductAlbumInfo wxCpProductAlbumInfo) throws WxErrorException
编辑商品图册 企业和第三方应用可以通过此接口修改商品信息 请求方式:POST(HTTPS) 请求地址: https://qyapi.weixin.qq.com/cgi-bin/externalcontact/update_product_album?access_token=ACCESS_TOKEN 文档地址
wxCpProductAlbumInfo
- 商品图册信息WxErrorException
- the wx error exceptionvoid deleteProductAlbum(String productId) throws WxErrorException
删除商品图册 企业和第三方应用可以通过此接口删除商品信息 请求方式:POST(HTTPS) 请求地址: https://qyapi.weixin.qq.com/cgi-bin/externalcontact/delete_product_album?access_token=ACCESS_TOKEN 文档地址
productId
- 商品idWxErrorException
- the wx error exceptionWxCpCustomerAcquisitionList customerAcquisitionLinkList(Integer limit, String cursor) throws WxErrorException
limit
- 商品idcursor
- 商品idWxErrorException
- the wx error exceptionWxCpCustomerAcquisitionInfo customerAcquisitionLinkGet(String linkId) throws WxErrorException
linkId
- 获客链接IDWxErrorException
- the wx error exceptionWxCpCustomerAcquisitionCreateResult customerAcquisitionLinkCreate(WxCpCustomerAcquisitionRequest wxCpCustomerAcquisitionRequest) throws WxErrorException
wxCpCustomerAcquisitionRequest
- 创建链接请求WxErrorException
- the wx error exceptionWxCpBaseResp customerAcquisitionUpdate(WxCpCustomerAcquisitionRequest wxCpCustomerAcquisitionRequest) throws WxErrorException
wxCpCustomerAcquisitionRequest
- 编辑链接请求WxErrorException
- the wx error exceptionWxCpBaseResp customerAcquisitionLinkDelete(String linkId) throws WxErrorException
linkId
- 获客链接的idWxErrorException
- the wx error exceptionWxCpCustomerAcquisitionCustomerList customerAcquisitionCustomer(String linkId, Integer limit, String cursor) throws WxErrorException
linkId
- 获客链接idlimit
- 返回的最大记录数,整型,最大值1000cursor
- 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填WxErrorException
- the wx error exceptionWxCpCustomerAcquisitionQuota customerAcquisitionQuota() throws WxErrorException
WxErrorException
- the wx error exceptionWxCpCustomerAcquisitionStatistic customerAcquisitionStatistic(String linkId, Date startTime, Date endTime) throws WxErrorException
linkId
- 获客链接的idstartTime
- 统计起始时间endTime
- 统计结束时间WxErrorException
- the wx error exceptionCopyright © 2024. All rights reserved.