客户管理
按手机号查询 CRM 信息
通过手机号查询 CRM 用户信息。phone 必填,长度不超过 64 字符。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| appKey | string | 是 | 应用 AppKey | |
| time | int64 | 是 | 请求时间戳(秒) | |
| checksum | string | 是 | 请求签名校验和 | |
| checksumAlgorithm | int32 | 否 | 签名算法:0 - 默认(SHA1),1 - SHA256 |
请求体
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| phone | string | 是 | 手机号 | 13725698555 |
返回参数
| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| code | int32 | 状态码,200 表示成功 | 200 |
| message | string | 提示信息 | success |
| data | object | 客户资料信息。对应客户查询接口成功响应中的 data 字段。 | |
| └address | string | 地址 | 示例地址 |
| └corp_id | int64 | 企业 ID | 96535 |
| └create_time | int64 | 创建时间,毫秒时间戳。 | 1646120135431 |
| └customField | object | 自定义属性值,key 为自定义属性 ID,value 为对应属性值。 | |
| string | 邮箱 | user@example.com | |
| └first_session_time | int64 | 首次会话时间,毫秒时间戳。 | 1646120135431 |
| └foreign_id | string | 外部 ID | external-user-1 |
| └id | string | 客户资料 ID | 621dccc7d60e000020cc8255 |
| └mid_guid | string | 企微客户 mid guid | mid-guid-example |
| └name | string | 客户姓名 | 示例客户 |
| └phone | string | 电话 | 13800000000 |
| └remarks | string | 备注 | 示例备注 |
| └status | int32 | 客户资料状态:0-临时数据,1-正常数据,2-已删除。 | 1 |
| └tags | int64[] | 标签 ID 列表 | |
| └tagsString | string | 标签 ID 列表字符串形式。 | ["_118195_","_118196_"] |
| └union_id | string | unionId | union-id-example |
| └update_time | int64 | 更新时间,毫秒时间戳。 | 1646120135431 |
| └user_id | int64 | 关联访客 userId | 292288219072 |
| └wx_corp_name | string | 企微主体名称 | 企业名称 |
| └wxworkExtId | string | 企微客户外部 ID | external-user-1 |
错误码
| 状态码 | 描述 |
|---|---|
| 14001 | AppKey 不存在 |
| 14002 | checksum 校验失败 |
| 14003 | 请求时间戳与服务器时间误差超过 10 分钟 |
| 14004 | 请求体 JSON 格式错误 |
| 14301 | phone 为空或长度超过 64 字符 |
| 14500 | 服务内部异常 |
postEndpoint
/openapi/crm/queryCrmInfoByPhonecurl -X POST "https://qiyukf.com/openapi/crm/queryCrmInfoByPhone?appKey=string&time=0&checksum=string" \ -H "Content-Type: application/json" \ -d '{ "phone": "13725698555" }'{
"code": 200,
"message": "success",
"data": {
"address": "示例地址",
"corp_id": 96535,
"create_time": 1646120135431,
"customField": {
"property1": {},
"property2": {}
},
"email": "user@example.com",
"first_session_time": 1646120135431,
"foreign_id": "external-user-1",
"id": "621dccc7d60e000020cc8255",
"mid_guid": "mid-guid-example",
"name": "示例客户",
"phone": "13800000000",
"remarks": "示例备注",
"status": 1,
"tags": [
0
],
"tagsString": "[\"_118195_\",\"_118196_\"]",
"union_id": "union-id-example",
"update_time": 1646120135431,
"user_id": 292288219072,
"wx_corp_name": "企业名称",
"wxworkExtId": "external-user-1"
}
}{
"code": 14001,
"message": "AppKey 不存在"
}{
"code": 14002,
"message": "checksum 校验失败"
}{
"code": 14003,
"message": "请求时间戳与服务器时间误差超过 10 分钟"
}{
"code": 14004,
"message": "请求体 JSON 格式错误"
}{
"code": 14301,
"message": "phone 为空或长度超过 64 字符"
}{
"code": 14500,
"message": "服务内部异常"
}这篇文档有帮助吗?