简要描述:
- 客户列表接口
请求URL:
/api/v2/customers
请求方式:
- GET
请求头:
- 请参考接口必读
请求参数:
字段名 | 是否必填 | 参数类型 | 描述 |
---|---|---|---|
page | false | Long | 页码 |
per_page | false | Int | 每页的数量 |
custom_field_name | false | String | 搜索字段名称,支持自定义字段 |
query | false | String | 搜索关键字 |
department_id | false | Long | 部门id |
sort | false | String | 排序类型(created_at ), api/v2/customers/filter_sort_group 返回值中sorts的value |
order | false | String | 排序方式(asc desc) |
tab_type | false | String | 值为[my, sub, common, assist]或不传 |
user_id | false | Long | 员工筛选 |
status | false | Long | 状态, 值为 api/v2/customers/status/filter_options 返回值 |
category | false | Long | 分类 |
real_revisit_at | false | String | 实际跟进时间 |
product_id | false | Long | product筛选 |
source | false | Long | 客户来源, 调用接 /api/v2/customers/source/filter_options |
1.日期相关自定义查询 如 创建时间 created_at[]=2019-01-01&created_at[]=2019-02-01
不支持到时分秒的查询条件
返回示例:
正确时返回:
{
"code": 0,
"data": {
"customers": [
{
"id": 2456846,
"user_id": 10334573,
"user_name": "李曦宁",
"user_third_userid": null,
"name": "ww",
"status": "1476046",
"status_mapped": "初访",
"category": "",
"category_mapped": "",
"need_hidden_dispose": false,
"updated_at": "2023-11-03 18:25",
"created_at": "2023-11-03 18:25",
"last_revist_log_content": null,
"last_called_at": "",
"revisit_remind_at": "",
"will_flow_time": "",
"approve_status": "approved",
"approve_status_i18n": "已通过",
"custom_field_template_id": null,
"custom_field_template_i18n": "",
"phones_data": [
{
"label": "电话",
"call_field_name": "address.tel",
"custom_field_name": "address.tel",
"phone": "3667899",
"phone_hidden_result": "3667899",
"is_invisible": false,
"is_enable": true,
"entity_class": "Customer",
"entity_id": 2456846,
"recordable_type": "Customer",
"recordable_id": 2456846,
"entity_name": "ww",
"company_name": null,
"job": null,
"status": "初访",
"user": "姜河",
"revisit_remind_at": null,
"name": "ww",
"is_user_self": true,
"is_creator_self": true
},
{
"label": "手机",
"call_field_name": "address.phone",
"custom_field_name": "address.phone",
"phone": "23432",
"phone_hidden_result": "23432",
"is_invisible": false,
"is_enable": true,
"entity_class": "Customer",
"entity_id": 2456846,
"recordable_type": "Customer",
"recordable_id": 2456846,
"entity_name": "ww",
"company_name": null,
"job": null,
"status": "初访",
"user": "李曦宁",
"revisit_remind_at": null,
"name": "ww",
"is_user_self": true,
"is_creator_self": true
}
],
"is_user_self": true,
"is_creator_self": true,
"labels": [
{
"id": 900012,
"group_id": 800002,
"content": "1500万;,2000万)&&--",
"color": "#2da8aa"
}
],
"address": {
"id": 2556846,
"addressable_id": 2456846,
"addressable_type": "Customer",
"country_id": null,
"province_id": null,
"city_id": null,
"district_id": null,
"tel": "3667899",
"phone": "23432",
"email": "",
"qq": "",
"fax": "",
"wechat": "",
"wangwang": null,
"zip": null,
"url": "http://www.baidu.com",
"detail_address": "",
"created_at": "2023-11-03T18:25:41.000+08:00",
"updated_at": "2023-11-03T18:25:41.000+08:00",
"lat": null,
"lng": null,
"off_distance": null,
"region_info": "",
"snippet": null,
"organization_id": 5004848,
"mode": "compat",
"time_format": "ruby",
"use_to_json": true,
"tel_hidden_result": "3667899",
"phone_hidden_result": "23432"
},
"contacts": [],
"contacts_associate_with_traffic": false
},
{
"id": 2371220,
"user_id": 10334573,
"user_name": "李曦宁",
"user_third_userid": null,
"name": "河北省玉名商贸有限公司",
"status": "1476046",
"status_mapped": "初访",
"category": "",
"category_mapped": "",
"need_hidden_dispose": false,
"updated_at": "2023-11-03 16:36",
"created_at": "2023-11-03 16:36",
"last_revist_log_content": null,
"last_called_at": "",
"revisit_remind_at": "",
"will_flow_time": "",
"approve_status": "approved",
"approve_status_i18n": "已通过",
"custom_field_template_id": null,
"custom_field_template_i18n": "",
"phones_data": [
{
"label": "电话",
"call_field_name": "address.tel",
"custom_field_name": "address.tel",
"phone": "0982-7788933",
"phone_hidden_result": "0982-7788933",
"is_invisible": false,
"is_enable": true,
"entity_class": "Customer",
"entity_id": 2371220,
"recordable_type": "Customer",
"recordable_id": 2371220,
"entity_name": "河北省玉名商贸有限公司",
"company_name": null,
"job": null,
"status": "初访",
"user": "李曦宁",
"revisit_remind_at": null,
"name": "河北省玉名商贸有限公司",
"is_user_self": true,
"is_creator_self": true
}
],
"is_user_self": true,
"is_creator_self": true,
"labels": [
{
"id": 1000035,
"group_id": 900009,
"content": "行业先进企业",
"color": "#ffcc00"
},
{
"id": 900010,
"group_id": 900009,
"content": "全国产品质量公证十佳品牌",
"color": "#ffcc00"
},
{
"id": 900011,
"group_id": 800002,
"content": "1千万-1500万",
"color": "#2da8aa"
}
],
"address": {
"id": 2471220,
"addressable_id": 2371220,
"addressable_type": "Customer",
"country_id": null,
"province_id": null,
"city_id": null,
"district_id": null,
"tel": "0982-7788933",
"phone": null,
"email": null,
"qq": null,
"fax": null,
"wechat": null,
"wangwang": null,
"zip": null,
"url": "",
"detail_address": null,
"created_at": "2023-11-03T16:36:01.000+08:00",
"updated_at": "2023-11-03T16:36:01.000+08:00",
"lat": null,
"lng": null,
"off_distance": null,
"region_info": "",
"snippet": null,
"organization_id": 5004848,
"mode": "compat",
"time_format": "ruby",
"use_to_json": true,
"tel_hidden_result": "0982-7788933",
"phone_hidden_result": ""
},
"contacts": [],
"contacts_associate_with_traffic": false
}
],
"column_list": [
"approve_status_i18n",
"submit_applying_at",
"finish_approve_at",
"name",
"labels_mapped",
"company_name",
"category_mapped",
"parent.name",
"contacts",
"address.tel",
"address.phone",
"address.wechat",
"address.qq",
"address.wangwang",
"address.email",
"address.fax",
"address.url",
"address.region_info",
"address.detail_address",
"address.zip",
"status_mapped",
"source_mapped",
"industry_mapped",
"staff_size_mapped",
"revisit_remind_at",
"note",
"channel_mapped",
"lastest_revisit_log.content",
"sold_products",
"revisit_at",
"real_revisit_at",
"real_revisit_at_in_word",
"shop.name",
"user.name",
"creator.name",
"before_user.name",
"owned_department.name",
"before_owned_department.name",
"assist_users",
"customer_common_setting.name",
"before_customer_common_setting.name",
"created_at",
"updated_at",
"will_flow_time",
"custom_field_template.name",
"last_called_at"
],
"has_next_page": false,
"per_page": 15,
"page": 1
}
}
错误时返回:
{
"code": 100401,
"data": null,
"message": "你的帐号已在其他地方登录,本地已经下线"
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
is_user_self | boolean | 是否自己的数据 |
approve_status | string | 审批状态 |
备注:
- 更多返回错误代码请看错误码表描述
文档更新时间: 2025-04-29 14:18 作者:陈胜海