企业内部开发 服务端API 客户联系 客户管理 批量获取客户详情
批量获取客户详情

企业/第三方可通过此接口获取指定成员添加的客户信息列表。

请求方式:POST(HTTPS
请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/batch/get_by_user?access_token=ACCESS_TOKEN

请求示例:

{
   "userid_list":
   [
		"zhangsan",
		"lisi"
	],
   "cursor":"",
   "limit":100
}

 

参数说明:

参数必须说明
access_token调用接口凭证
userid_list企业成员的userid列表,字符串类型,最多支持100个
cursor用于分页查询的游标,字符串类型,由上一次调用返回,首次调用可不填
limit返回的最大记录数,整型,最大值100,默认值50,超过最大值时取最大值

 

权限说明:

返回结果:

{
   "errcode": 0,
   "errmsg": "ok",
   "external_contact_list":
	[
		{
			"external_contact":
			{
				"external_userid":"woAJ2GCAAAXtWyujaWJHDDGi0mACHAAA",
				"name":"李四",
				"position":"Manager",
				"avatar":"http://p.qlogo.cn/bizmail/IcsdgagqefergqerhewSdage/0",
        		"corp_name":"腾讯",
        		"corp_full_name":"腾讯科技有限公司",
        		"type":2,
        		"gender":1,
        		"unionid":"ozynqsulJFCZ2z1aYeS8h-nuasdAAA",
        		"external_profile":
        		{
             	"external_attr":
              	[
              		{
                  	"type":0,
                  	"name":"文本名称",
                  	 "text":
                    	{
                       	"value":"文本"
                    	}
              		},
              		{
              		"type":1,
              		"name":"网页名称",
              		"web":
              		{
                      "url":"http://www.test.com",
                      "title":"标题"
              		}
                },
                {
                  "type":2,
                  "name":"测试app",
                  "miniprogram":
                  {
                      "appid": "wx8bd80126147df384",
                      "pagepath": "/index",
                      "title": "my miniprogram"
                  }
                }
              ]
     		}
			},
			"follow_info":
			{
				"userid":"rocky",
				"remark":"李部长",
				"description":"对接采购事务",
				"createtime":1525779812,
				"tag_id":["etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA"],
				"remark_corp_name":"腾讯科技",
				"remark_mobiles":
				[
              		"13800000001",
              		"13000000002"
				],
				"oper_userid":"rocky",
				"add_way":10,
		        "wechat_channels": {
		            "nickname": "视频号名称",
					"source": 1
		        }
			}
		},
		{
			"external_contact":
			 {
				"external_userid":"woAJ2GCAAAXtWyujaWJHDDGi0mACHBBB",
        		"name":"王五",
        		"position":"Engineer",
        		"avatar":"http://p.qlogo.cn/bizmail/IcsdgagqefergqerhewSdage/0",
        		"corp_name":"腾讯",
        		"corp_full_name":"腾讯科技有限公司",
        		"type":2,
        		"gender":1,
        		"unionid":"ozynqsulJFCZ2asdaf8h-nuasdAAA"
	 		},
			"follow_info":
			{
				"userid":"lisi",
				"remark":"王助理",
				"description":"采购问题咨询",
				"createtime":1525881637,
				"tag_id":["etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA","stJHDDGi0mAGi0mACHBBByujaW"],
				"state":"外联二维码1",
				"oper_userid":"woAJ2GCAAAd1asdasdjO4wKmE8AabjBBB",
				"add_way":3
			}
		}
	],
	"next_cursor":"r9FqSqsI8fgNbHLHE5QoCP50UIg2cFQbfma3l2QsmwI"
}

参数说明:

参数说明
errcode返回码
errmsg对返回码的文本描述内容
external_contact_list.external_contact客户的基本信息,可以参考获取客户详情
external_contact_list.follow_info企业成员客户跟进信息,可以参考获取客户详情,但标签信息只会返回企业标签和规则组标签的tag_id,个人标签将不再返回
next_cursor分页游标,再下次请求时填写以获取之后分页的记录,如果已经没有更多的数据则返回空

 

上一篇
获取客户详情
下一篇
修改客户备注信息