接口说明:根据手机号和openId获取客户信息,如果该用户没有该参数值,那么将不会返回该参数字段。
应用权限: 用户->用户资料
用户→用户资料
访问路径:/api/audience/getInfoByPhoneAndOpenid
Type: POST
Author: zhuyanpeng
...
Description: 根据手机号和openId获取客户信息
Body-parameters:
Parameter | Type | Required | Description |
---|---|---|---|
companyId | string | false | 第三方平台企业 |
id | |||
phone | string | false | 手机号 |
openid | string | false | openid |
传参注意:
1.phone和openid,必须至少传一个,不能出现同时传空。
2.如果companyId和uid都不传,会通过token校验拿到当前数据集成对应的企业信息,去查询用户信息返回。companyId不传,会通过token校验拿到当前数据集成对应的企业信息,去查询用户信息返回。
3.如果要查询数据集成应用下面子企业的客户信息,那么companyId和uid一定都要传。如果要查询数据集成应用下面子企业的客户信息,那么companyId一定要传。
Response-fields:
Field | Type | Description |
orgId | string | 兔展企业Id |
createTime | long | 创建时间,时间戳 |
audienceUserId | long | 客户ID |
openids | list | openid列表 "openids": [ |
openid | string | 最新微信openid |
unionid | string | 最新微信unionid,会更新覆盖 |
mpAppid | string | 最新unionid对应的公众号appid,会更新覆盖 |
thirdId | string | 第三方用户ID |
phoneList | list | 手机号码列表 "phoneList": [ |
realName | string | 真实姓名 |
sex | integer | 性别(1 男 2 女 0 未知) |
avatar | string | 头像 |
wxNickname | string | 微信昵称 |
wxCountry | string | 微信资料获取的国家名称 |
wxProvince | string | 微信资料获取的省名称 |
wxCity | string | 微信资料获取的市名称 |
province | string | 最近通过IP获取的省名称 |
city | string | 最近通过IP获取的市名称 |
lbsProvince | string | 通过地理位置授权获取的省名称 |
lbsCity | string | 通过地理位置授权获取的市名称 |
addressList | list | 地址列表 |
birthday | long | 生日 ,时间戳 |
remark | string | 备注 |
lastActiveTime | long | 最近活跃时间 ,时间戳 |
gzhInteractTime | long | 公众号最后互动时间 ,时间戳 |
markFlag | integer | 是否星标 1 是 0 否 |
subWechatList | list | 客户关注的公众号列表 [{"appid":"123456","wechatName":"兔展"}] |
active | long | 总活跃度 |
weekActive | object | 7天活跃度 {"count":数量,"updateTime":时间戳} |
monthActive | object | 30天活跃度 {"count":数量,"updateTime":时间戳} |
spread | long | 传播力 |
weekSpread | object | 7天传播力 {"count":数量,"updateTime":时间戳} |
monthSpread | object | 30天传播力 {"count":数量,"updateTime":时间戳} |
groupIdList | list | 客户分组id列表 |
tagIdList | list | 标签id列表 |
Curl-example:
代码块 |
---|
curl -X POST -k -H 'Content-Type: application/json; charset=utf-8' --header 'X-Token: r9i6T6VXdAV0vjiMBxODFRddRVY' -i https://integrate.rabbitpre.com/api/open/api/audience/getInfoByPhoneAndOpenid --data '{ "companyId": "31", "phone": "13339938205", "openid": "31" }' |
Request-body-example:
{
"companyId": "C1002",
"phone": "19169815147",
"openid":"xxxx"
}
Response-example:
{
"code":"200",
"errorCode":"SUCCESS",
"msg":"ok",
"data":[
{
"orgId":"928a852d-e749-45be-bc31-f8e23f07b999",
"createTime":1559096182000,
"audienceUserId":123,
"openids":[
{
"openid":"oqm2m5MEyDHmLy3ySThLOHsiM22",
"appId":"123456"
}
],
"openid":"testW5hX5zbPudKpeAKVAGztest",
"unionid":"oilcW5hX5zbPudKpeAKVAGz9u11",
"mpAppid":"wx59e26bd946c5e7d7",
"phoneList":[
{
"phone":"13888888888",
"isVerify":"1"
}
],
"realName":"小兔子",
"sex":1,
"avatar":"https://file3.rabbitpre.com/f5c8c727-cc57-4f6d-8874-1895cfc875ee-7266",
"wxNickname":"小兔子",
"wxCountry":"中国",
"wxProvince":"广东",
"wxCity":"深圳",
"province":"广东",
"city":"深圳",
"lbsProvince":"广东",
"lbsCity":"深圳",
"addressList":[
{
"address":"深圳兔展智能科技有限公司"
},
{
"address":"深圳市南山区深圳湾科技生态园9栋B-4座429-432号"
}
],
"birthday":1567180800000,
"remark":"重要客户",
"lastActiveTime":1566972932910,
"gzhInteractTime":1566972932910,
"markFlag":1,
"subWechatList":[
{
"appid":"wx35f5cc5cd3869597",
"wechatName":"精准云销"
}
],
"active":14,
"spread":10,
"weekActive":{
"count":4,
"updateTime":1566942300216
},
"monthActive":{
"count":10,
"updateTime":1566942300216
},
"weekSpread":{
"count":10,
"updateTime":1566942300216
},
"monthSpread":{
"count":10,
"updateTime":1566942300216
},
"groupIdList":["123456","654321"],
"tagIdList":["123456","654321"],
}
]
}