接口说明:获取CRM开放的业务对象数据列表
请求说明
请求方式:post
请求参数数据类型:application/json
请求路径:/oapi/corp/v1/data/list.json
请求参数说明:
参数 | 参数类型 | 参数必填 | 说明 |
corpAccessToken | String | 是 | 访问企业数据合法性票据 |
corpId | String | 是 | 企业ID |
conditionConfig | List<Object> | 否 | 筛选条件列表 |
conditionConfig[0].conditions | List<Object> | 否 | 字段条件列表 |
conditionConfig[0].conditions[0].comparison | String | 是 | 比较符 |
conditionConfig[0].conditions[0].deployId | String | 是 | 字段所属业务对象deployId |
conditionConfig[0].conditions[0].fieldName | String | 是 | 字段英文名称 |
conditionConfig[0].conditions[0].fieldTitle | String | 是 | 字段中文名称 |
conditionConfig[0].conditions[0].fieldValue | String | 是 | 筛选条件内容 |
conditionConfig[0].conditions[0].domType | String | 是 | 字段类型 |
page | Integer | 否 | 页码默认1 |
pageSize | Integer | 否 | 每页条数默认20,最大200,超过200则默认以200为默认值 |
deployId | String | 是 | 业务对象deployId |
比较符说明:
具体可参照 :常见comparison查询条件组装格式示例
// 文本运算符
CONTAIN("contain", "包含"),
NOT_CONTAIN("not_contain", "不包含"),
YES("yes", "是"),
NOT("not", "不是"),
START("start", "以指定文本开始"),
END("end", "以指定文本结束"),
NULL("null", "空"),
NOT_NULL("not_null", "不为空"),
// 日期时间运算符
EQUAL("equal", "等于"),
NOT_EQUAL("not_equal", "不等于"),
BEFORE("before", "早于"),
AFTER("after", "晚于"),
DATE_RANGE("date_range", "时间段"),
N_DAY_AGO("n_day_ago", "前N天"),
N_DAY_AFTER("n_day_after", "后N天"),
N_MONTH_AGO("n_month_ago", "前N月"),
N_MONTH_AFTER("n_month_after", "后N月"),
BEFORE_N_DAYS("before_n_days", "N天前"),
AFTER_N_DAYS("after_n_days", "N天后"),
BEFORE_N_MONTHS("before_n_months", "N月前"),
AFTER_N_MONTHS("after_n_months", "N月后"),
// 单选多选,选择人组件
IN_ARRAY("in_array", "属于"),
NOT_IN_ARRAY("not_in_array", "不属于"),
REVERSE_IN_ARRAY("reverse_in_array", "在参数内"),
INTERSECTION("intersection", "有交集"),
NO_INTERSECTION("no_intersection", "无交集"),
// 数值金额
MORE("more", "大于"),
LESS("less", "小于"),
MORE_EQUAL("more_equal", "大于等于"),
LESS_EQUAL("less_equal", "小于等于"),
BETWEEN("between", "介于");
请求参数结构:
{
"corpAccessToken": "8355993e7777895b9859f4771511530992ad4c",
"corpId": "ding2037cc74cbb0f5e735c2f4657eb6378f",
"deployId": "customer",
"conditionConfig": [
{
"conditions": [
{
"comparison": "CONTAIN",
"deployId": "customer",
"fieldName": "custom_name",
"fieldTitle": "客户名称",
"fieldValue": "名字",
"domType": "INPUT"
},
{
"comparison": "CONTAIN",
"deployId": "customer",
"fieldName": "custom_nick",
"fieldTitle": "客户简称",
"fieldValue": "名字",
"domType": "INPUT"
}
]
}
],
"page": 1,
"pageSize": 2
}
响应结果说明:
参数 | 参数类型 | 参数必填 | 说明 |
apiName | String | 是 | 接口apiName |
data | Object | 是 | 查询结果对象 |
data.count | Integer | 是 | 查询结果总条数 |
data.errorMsg | String | 是 | 查询结果错误描述 |
data.success | Boolean | 是 | 查询结果成功状态 true成功、false 失败 |
data.list | List<Map<String,Object>> | 是 | 结果数据列表 |
message | String | 是 | 返回码描述 |
result | Integer | 是 | 返回码 |
响应结果结构示例:
a.正常结果
{
"data": {
"count": 10,
"errorMsg": "",
"list": [
{
"collaborator_id": "",
"custom_district": "东城区",
"custom_source_value": "telephone_consultation",
"custom_level_value": "new_customer",
"invalid_reason": "其他",
"collaborator": [],
"custom_name": "客户名称",
"flow_status": "已通过",
"customer_amount_0_value": "1000.0",
"custom_industry": "教育",
"custom_level": "新建客户",
"invalid_operator": [
{
"corpId": "ding2037cc74cbb0f5e735c2f4657eb6378f",
"depts": [],
"enableStatus": 1,
"ifAuthorized": 1,
"roles": [],
"staffStatus": 1,
"userId": " xxx ",
"userName": " xxx ",
"userPicUrl": ""
}
],
"modified": "2019/09/03 14:55:39",
"keep_type_value": null,
"seas_name": "有成CRM公海",
"id": 1154,
"sign_status_value": "unsign",
"custom_url": "www.ycbg,com",
"charger_name": " xxx ",
"flow_status_value": "pass",
"created": "2019/08/23 13:50:29",
"receive_time": "2019/09/03 15:35:46",
"custom_remark": "",
"charger_id": " xxx ",
"charger_department": [
{
"deptId": " xxx ",
"deptName": "部门1"
}
],
"allocation_status_value": "1",
"invalid_operator_name": " xxx ",
"charger": [
{
"corpId": " xxx ",
"depts": [],
"enableStatus": 1,
"ifAuthorized": 1,
"roles": [],
"staffStatus": 1,
"userId": " xxx ",
"userName": " xxx ",
"userPicUrl": ""
}
],
"custom_tele": " xxx ",
"custom_province": "北京",
"invalid_status": "未作废",
"creator_id": " xxx ",
"allocation_status": "已分配",
"corp_id": " xxx ",
"customer_input_6": "xxx ",
"changer_id": " xxx ",
"keep_id": 0,
"invalid_reason_value": "other",
"custom_source": "有成CRM",
"charger_department_id": "crm_ xxx ",
"changer": [
{
"corpId": " xxx ",
"depts": [],
"enableStatus": 1,
"ifAuthorized": 1,
"roles": [],
"staffStatus": 1,
"userId": " xxx ",
"userName": " xxx ",
"userPicUrl": ""
}
],
"deal_status_value": "undeal",
"invalid_status_value": "0",
"join_time": "2019/09/03 15:35:46",
"customer_amount_0": "1,000.00",
"changer_name": " xxx ",
"customer_select_0": "有成CRM",
"sign_status": "未成交",
"keep_record_status": null,
"comId": " xxx _1154",
"deal_status": "未赢单",
"custom_industry_value": "education",
"creator": [
{
"corpId": " xxx ",
"depts": [],
"enableStatus": 1,
"ifAuthorized": 1,
"roles": [],
"staffStatus": 1,
"userId": " xxx ",
"userName": " xxx ",
"userPicUrl": " xxx "
}
],
"keep_type": null,
"seas_id": "d17619e846bf401e8b3f7da5653e9aec",
"keep_record_user_name": "",
"customer_datetime_0": "2019/04/29 00:00:00",
"keep_record_user": [],
"custom_fax": " xxx ",
"customer_datetime_1": "2019/09/06 17:46:40",
"collaborator_name": "",
"_version_": 1643638839638491100,
"keep_record_status_value": null,
"invalid_time": "2019/09/03 15:01:04",
"creator_name": " xxx ",
"custom_nick": "客户昵称",
"custom_city": "北京市",
"charger_department_name": "部门1",
"custom_country": "中国"
}
],
"success": true
},
"message": "操作成功",
"result": 100
}
b.错误结果
{
"message": "corpAccessToken不存在或已过期",
"result": 12002
}