1.1. 销售线索接口
1.1.1. 获取销售线索列表
请求地址
- GET /v1/leads/search
请求参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| timestamp | Long | false | 时间戳(例:当前秒数,1533092860) | |
| sign | String | false | 签名:身份认证签名(DigestUtils.sha1Hex(email&secretKey×tamp)) | |
| String | false | 邮箱 | ||
| filterId | int | false | 过滤器ID | |
| pageNum | int | false | 页码 | |
| pageSize | int | false | 每页数量,默认20,最大50 |
响应参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| code | String | false | 返回码 | |
| message | String | false | 返回消息 | |
| visible | boolean | false | 是否可见(暂不使用) | |
| data | Object | true | 结果 | |
| data.list | Array | true | 结果数组 | |
| data.list[].id | int | false | 线索id | |
| data.list[].name | String | false | 公司名称 | |
| data.list[].contactsName | String | false | 联系人 | |
| data.list[].telephone | String | true | 电话 | |
| data.list[].mobile | String | true | 手机 | |
| data.list[].email | String | true | 邮箱 | |
| data.list[].masterUserId | int | false | 销售线索所有人 | |
| data.list[].address | String | true | 详细地址 | |
| data.list[].followStatus | int | false | 跟进状态 | |
| data.list[].leadsHighSeaId | int | false | 所属公海 | |
| data.list[].province | int | true | 省 | |
| data.list[].city | int | true | 市 | |
| data.list[].district | int | true | 地区 | |
| data.list[].businessCategoryId | int | false | 线索类型 | |
| data.list[].remark | String | true | 备注 | |
| data.list[].officeId | int | true | 负责组 | |
| data.list[].highSeaStatus | int | false | 公海状态 | |
| data.list[].leadsHighSeaReceiveTime | date | false | 领取时间 | |
| data.list[].leadsHighSeaReturnCount | int | false | 退回次数 | |
| data.list[].createUserId | int | false | 创建人 | |
| data.list[].createTime | date | false | 创建时间 | |
| data.list[].updateUserId | int | false | 最近修改人 | |
| data.list[].updateTime | date | false | 最近修改时间 | |
| data.list[].notFollowDays | int | false | 未跟进天数 | |
| data.list[].lastMasterUserId | int | false | 最后所有人 | |
| data.list[].transferToHighSeaReason | int | false | 退回公海原因 | |
| data.list[].recentActivityRecordTime | date | false | 最新活动记录时间 | |
| data.list[].expireTime | date | false | 到期时间 | |
| data.list[].fieldMap | Object | true | 自定义变量串(例:{"CustomField_2384":{"id":2384,"contentType":"checkbox","content":["1"],"fieldCode":"CustomField_2384"},"CustomField_2421":{"id":2421,"contentType":"numeric","content":"1","fieldCode":"CustomField_2421"}}) |
请求示例
$ curl 'http://localhost:8080/api/v1/leads/search?filterId=1896&email=1@test.cn×tamp=1542191920&sign=123' -i -X GET -H 'Content-Type: application/json'
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"code" : 200,
"message" : "OK",
"visible" : false,
"data": {
"list": [
{
"id": 70447,
"createUserId": 7,
"createTime": "2018-09-14 17:11:45",
"updateUserId": 1,
"updateTime": "2018-09-19 15:20:31",
"deleteFlag": 0,
"name": "自定义字段更新4",
"contactsName": "更新自定义字段1",
"companyId": 5,
"officeId": 51,
"telephone": "",
"mobile": "",
"masterUserId": 368,
"followStatus": 1,
"leadsHighSeaId": 29,
"leadsHighSeaReceiveTime": null,
"leadsHighSeaReturnCount": 1,
"master": {
"id": 368,
"deleteFlag": 0,
"realname": "曹立鹏",
"roleList": [],
"admin": false
},
"createUser": {
"id": 7,
"deleteFlag": 0,
"realname": "总公司负责人Ao",
"roleList": [],
"admin": false
},
"updateUser": {
"id": 1,
"deleteFlag": 0,
"realname": "系统",
"roleList": [],
"admin": true
},
"lastMasterUser": {
"deleteFlag": 0,
"realname": "总公司负责人Ao",
"roleList": [],
"admin": false
},
"masterOffice": {
"id": 51,
"name": "销售二部",
"masterUserIdArray": []
},
"isTransferToCustomer": 0,
"leadsHighSea": {
"name": "0120测试",
"masterUserIdArray": [],
"memberUserIdArray": [],
"memberOfficeIdArray": [],
"id": 29,
"deleteFlag": 0
},
"businessCategory": {
"name": "默认业务类型",
"deleteFlag": 0
},
"changeTimestamp": "2018-09-19 15:20:30.782",
"source": 1,
"customFieldJson": "[{\"id\":1794,\"contentType\":\"droplist\",\"content\":\"\",\"fieldCode\":\"CustomField_1794\"}]",
"highSeaStatus": 6,
"transferToHighSeaTime": "2018-09-19 15:20:31",
"transferToHighSeaReason": 0,
"transferToHighSeaRemark": "2天未跟进",
"businessCategoryId": 5,
"fieldMap": {
"CustomField_1794": {
"id": 1794,
"contentType": "droplist",
"content": "",
"fieldCode": "CustomField_1794"
}
},
"matchRule": 0,
"lastFollowTime": "2018-09-19 15:20:31",
"notFollowDays": 56,
"lastMasterUserId": 7,
"isDuplicate": 0,
"showDetail": 1,
"tagList": [],
"expireTime": null,
"lastTransferToHighSeaRemark": "2天未跟进",
"userGroupPermissionIds": [
2
],
"officePermissionIds": [],
"businessPermissionList": [
{
"userGroupPermissionId": 2,
"permissionAction": 2,
"deleteFlag": 0
}
]
},
{
"id": 70446,
"createUserId": 7,
"createTime": "2018-09-14 17:03:07",
"updateUserId": 1,
"updateTime": "2018-09-19 15:20:31",
"deleteFlag": 0,
"name": "自定义字段更新3",
"contactsName": "自定义字段更新3",
"companyId": 5,
"officeId": 51,
"telephone": "",
"mobile": "",
"masterUserId": 368,
"followStatus": 1,
"leadsHighSeaId": 29,
"leadsHighSeaReceiveTime": null,
"leadsHighSeaReturnCount": 1,
"master": {
"id": 368,
"deleteFlag": 0,
"realname": "曹立鹏",
"roleList": [],
"admin": false
},
"createUser": {
"id": 7,
"deleteFlag": 0,
"realname": "总公司负责人Ao",
"roleList": [],
"admin": false
},
"updateUser": {
"id": 1,
"deleteFlag": 0,
"realname": "系统",
"roleList": [],
"admin": true
},
"lastMasterUser": {
"deleteFlag": 0,
"realname": "总公司负责人Ao",
"roleList": [],
"admin": false
},
"masterOffice": {
"id": 51,
"name": "销售二部",
"masterUserIdArray": []
},
"isTransferToCustomer": 0,
"leadsHighSea": {
"name": "0120测试",
"masterUserIdArray": [],
"memberUserIdArray": [],
"memberOfficeIdArray": [],
"id": 29,
"deleteFlag": 0
},
"businessCategory": {
"name": "默认业务类型",
"deleteFlag": 0
},
"changeTimestamp": "2018-09-19 15:20:30.778",
"source": 1,
"customFieldJson": "[{\"id\":51,\"contentType\":\"number\",\"content\":\"1\",\"fieldCode\":\"CustomField_51\"},{\"id\":1794,\"contentType\":\"droplist\",\"content\":\"\",\"fieldCode\":\"CustomField_1794\"}]",
"highSeaStatus": 6,
"transferToHighSeaTime": "2018-09-19 15:20:31",
"transferToHighSeaReason": 0,
"transferToHighSeaRemark": "2天未跟进",
"businessCategoryId": 5,
"fieldMap": {
"CustomField_51": {
"id": 51,
"contentType": "number",
"content": "1",
"fieldCode": "CustomField_51"
},
"CustomField_1794": {
"id": 1794,
"contentType": "droplist",
"content": "",
"fieldCode": "CustomField_1794"
}
},
"matchRule": 0,
"lastFollowTime": "2018-09-19 15:20:31",
"notFollowDays": 56,
"lastMasterUserId": 7,
"isDuplicate": 0,
"showDetail": 1,
"tagList": [],
"expireTime": null,
"lastTransferToHighSeaRemark": "2天未跟进",
"userGroupPermissionIds": [
2
],
"officePermissionIds": [],
"businessPermissionList": [
{
"userGroupPermissionId": 2,
"permissionAction": 2,
"deleteFlag": 0
}
]
}
],
"pageNum": 1,
"pageSize": 20,
"total": 2,
"paging": null
}
}
1.1.2. 获取销售线索详情
请求地址
- GET /v1/leads/{id}
请求参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| timestamp | Long | false | 时间戳(例:当前秒数,1533092860) | |
| sign | String | false | 签名:身份认证签名(DigestUtils.sha1Hex(email&secretKey×tamp)) | |
| String | false | 邮箱 | ||
| id | int | false | 线索id |
响应参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| code | String | false | 返回码 | |
| message | String | false | 返回消息 | |
| visible | boolean | false | 是否可见(暂不使用) | |
| data | Object | true | 结果 | |
| data.id | int | false | 线索id | |
| data.name | String | false | 公司名称 | |
| data.contactsName | String | false | 联系人 | |
| data.telephone | String | true | 电话 | |
| data.mobile | String | true | 手机 | |
| data.email | String | true | 邮箱 | |
| data.masterUserId | int | false | 销售线索所有人 | |
| data.address | String | true | 详细地址 | |
| data.followStatus | int | false | 跟进状态 | |
| data.leadsHighSeaId | int | false | 所属公海 | |
| data.province | int | true | 省 | |
| data.city | int | true | 市 | |
| data.district | int | true | 地区 | |
| data.businessCategoryId | int | false | 线索类型 | |
| data.remark | String | true | 备注 | |
| data.officeId | int | true | 负责组 | |
| data.highSeaStatus | int | false | 公海状态 | |
| data.leadsHighSeaReceiveTime | date | false | 领取时间 | |
| data.leadsHighSeaReturnCount | int | false | 退回次数 | |
| data.createUserId | int | false | 创建人 | |
| data.createTime | date | false | 创建时间 | |
| data.updateUserId | int | false | 最近修改人 | |
| data.updateTime | date | false | 最近修改时间 | |
| data.notFollowDays | int | false | 未跟进天数 | |
| data.lastMasterUserId | int | false | 最后所有人 | |
| data.transferToHighSeaReason | int | false | 退回公海原因 | |
| data.recentActivityRecordTime | date | false | 最新活动记录时间 | |
| data.expireTime | date | false | 到期时间 | |
| data.fieldMap | Object | true | 自定义变量串(例:{"CustomField_2384":{"id":2384,"contentType":"checkbox","content":["1"],"fieldCode":"CustomField_2384"},"CustomField_2421":{"id":2421,"contentType":"numeric","content":"1","fieldCode":"CustomField_2421"}}) |
请求示例
$ curl 'http://localhost:8080/api/v1/leads/1?&email=1@test.cn×tamp=1542187894&sign=123' -i -X GET -H 'Content-Type: application/json'
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"code" : 200,
"message" : "OK",
"visible" : false,
"data": {
"id": 1,
"createUserId": 1,
"createTime": "2017-11-21 11:19:00",
"updateUserId": 14,
"updateTime": "2016-11-23 11:02:56",
"deleteFlag": 0,
"name": "初始线索1",
"remoteId": 17,
"companyId": 5,
"officeId": 5,
"telephone": "010-10000000",
"mobile": "18600000000",
"email": "1@1.com",
"masterUserId": 7,
"address": "地址",
"url": "www.wangzhi.com",
"sld": "wangzhi.wangzhi",
"agentCount": 10,
"sourceChannel": "1",
"qqId": "qq",
"weiboId": "weibo",
"weixinId": "weixin",
"registerDate": "2016-08-30",
"signDate": "2016-08-30",
"followStatus": 1,
"leadsHighSeaId": 2,
"leadsHighSeaReceiveTime": null,
"leadsHighSeaReturnCount": 2,
"province": 1,
"city": 1,
"district": 1,
"master": {
"id": 7,
"deleteFlag": 0,
"realname": "总公司负责人Ao",
"roleList": [],
"admin": false
},
"createUser": {
"id": 1,
"deleteFlag": 0,
"realname": "系统",
"roleList": [],
"admin": true
},
"updateUser": {
"id": 14,
"deleteFlag": 0,
"realname": "金融一组销售A",
"roleList": [],
"admin": false
},
"masterOffice": {
"id": 5,
"name": "udesk测试总公司",
"masterUserIdArray": []
},
"provinceEntity": {
"name": "北京市",
"id": 1
},
"isTransferToCustomer": 0,
"leadsHighSea": {
"name": "默认公海(停用,错误数据)",
"masterUserIdArray": [],
"memberUserIdArray": [],
"memberOfficeIdArray": [],
"id": 2,
"deleteFlag": 0
},
"businessCategory": {
"name": "默认业务类型",
"deleteFlag": 0
},
"changeTimestamp": "2018-07-20 16:16:58.100",
"source": 3,
"customFieldJson": "[{\"id\":13,\"content\":\"www.wangzhi.com\",\"contentType\":\"text\",\"fieldCode\":\"CustomField_13\"},{\"id\":14,\"content\":\"2016-08-30\",\"contentType\":\"date\",\"fieldCode\":\"CustomField_14\"},{\"id\":18,\"content\":\"wangzhi.wangzhi\",\"contentType\":\"text\",\"fieldCode\":\"CustomField_18\"},{\"id\":19,\"content\":0,\"contentType\":\"droplist\",\"fieldCode\":\"CustomField_19\"},{\"id\":20,\"content\":\"0,1\",\"contentType\":\"checkbox\",\"fieldCode\":\"CustomField_20\"},{\"id\":21,\"content\":\"qq\",\"contentType\":\"text\",\"fieldCode\":\"CustomField_21\"},{\"id\":22,\"content\":\"weibo\",\"contentType\":\"text\",\"fieldCode\":\"CustomField_22\"},{\"id\":23,\"content\":\"weixin\",\"contentType\":\"text\",\"fieldCode\":\"CustomField_23\"},{\"id\":24,\"content\":10,\"contentType\":\"number\",\"fieldCode\":\"CustomField_24\"}]",
"highSeaStatus": 1,
"sourceChannelId": 1,
"businessCategoryId": 5,
"fieldMap": {
"CustomField_22": {
"id": 22,
"contentType": "text",
"content": "weibo",
"fieldCode": "CustomField_22"
},
"CustomField_23": {
"id": 23,
"contentType": "text",
"content": "weixin",
"fieldCode": "CustomField_23"
}
},
"matchRule": 0,
"lastFollowTime": "2016-11-23 11:02:56",
"notFollowDays": 721,
"lastMasterUserId": null,
"isDuplicate": 1,
"showDetail": 1,
"tagList": [],
"expireTime": null,
"userGroupPermissionIds": [],
"officePermissionIds": [],
"businessPermissionList": [],
"permissionAction": 2
}
}
1.1.3. 获取销售线索字段结构描述
请求地址
- GET /v1/customFields/type/leads
请求参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| timestamp | Long | false | 时间戳(例:当前秒数,1533092860) | |
| sign | String | false | 签名:身份认证签名(DigestUtils.sha1Hex(email&secretKey×tamp)) | |
| String | false | 邮箱 |
响应参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| code | String | false | 返回码 | |
| message | String | false | 返回消息 | |
| visible | boolean | false | 是否可见(暂不使用) | |
| data | Array | true | 结果 | |
| data[].id | int | false | 字段项 | |
| data[].name | String | false | 显示名称 | |
| data[].contentType | String | false | 字段类型 | |
| data[].options | String | true | 字段内容(key键value值) | |
| data[].required | int | false | 是否必填(0否1是) | |
| data[].status | int | false | 启用禁用(0禁用1启用) | |
| data[].sysFieldName | String | true | 系统字段英文名 | |
| data[].fieldFlag | int | false | 自定义或系统(1系统2自定义) | |
| data[].businessCategoryFieldList | Array | false | 参数和业务类型对应是否必填 | |
| data[].businessCategoryFieldList[].businessCategoryId | int | false | 业务类型id | |
| data[].businessCategoryFieldList[].fieldId | int | false | 字段项 | |
| data[].businessCategoryFieldList[].required | int | false | 是否必填(0非必填1必填) |
请求示例
$ curl 'http://localhost:8080/api/v1/customFields/type/leads?email=1@test.cn×tamp=1542192982&sign=123' -i -X GET -H 'Content-Type: application/json'
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"code" : 200,
"message" : "OK",
"visible" : false,
"data": [
{
"id": 106,
"name": "公司名称",
"contentType": "text",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "name",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 107,
"name": "联系人",
"contentType": "text",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "contactsName",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 108,
"name": "手机",
"contentType": "phone",
"options": "[]",
"required": 0,
"status": 1,
"sysFieldName": "mobile",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 109,
"name": "固定电话",
"contentType": "phone",
"options": "[]",
"required": 0,
"status": 1,
"sysFieldName": "telephone",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 110,
"name": "邮件",
"contentType": "text",
"options": "[]",
"required": 0,
"status": 1,
"sysFieldName": "email",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 111,
"name": "跟进状态",
"contentType": "droplist",
"options": "[{\"key\":1,\"value\":\"未跟进\",\"orders\":1,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":null},{\"key\":2,\"value\":\"跟进中\",\"orders\":2,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":null},{\"key\":3,\"value\":\"不跟进\",\"orders\":3,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":null},{\"key\":4,\"value\":\"asdf\",\"orders\":4,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":null},{\"key\":5,\"value\":\"跟进中-未联系上\",\"orders\":5,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]}]",
"required": 1,
"status": 1,
"sysFieldName": "followStatus",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 112,
"name": "省、市、区",
"contentType": "text",
"options": "[]",
"required": 0,
"status": 1,
"sysFieldName": "location",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 113,
"name": "详细地址",
"contentType": "text",
"options": "[]",
"required": 0,
"status": 1,
"sysFieldName": "address",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 114,
"name": "备注",
"contentType": "text",
"options": "[]",
"required": 0,
"status": 1,
"sysFieldName": "remark",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 115,
"name": "销售线索所有人",
"contentType": "text",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "masterUserId",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 116,
"name": "负责组",
"contentType": "text",
"options": "[]",
"required": 0,
"status": 1,
"sysFieldName": "officeId",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 117,
"name": "所属公海",
"contentType": "text",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "leadsHighSeaId",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 118,
"name": "公海状态",
"contentType": "text",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "highSeaStatus",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 119,
"name": "领取时间",
"contentType": "datetime",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "leadsHighSeaReceiveTime",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 120,
"name": "退回次数",
"contentType": "number",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "leadsHighSeaReturnCount",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 121,
"name": "创建人",
"contentType": "text",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "createUserId",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 122,
"name": "创建时间",
"contentType": "datetime",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "createTime",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 123,
"name": "最近修改人",
"contentType": "text",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "updateUserId",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 124,
"name": "最近修改时间",
"contentType": "datetime",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "updateTime",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 125,
"name": "未跟进天数",
"contentType": "number",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "notFollowDays",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 126,
"name": "最后所有人",
"contentType": "text",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "lastMasterUserId",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 127,
"name": "退回公海原因",
"contentType": "text",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "transferToHighSeaReason",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 675,
"name": "线索类型",
"contentType": "text",
"options": "[]",
"required": 1,
"status": 1,
"sysFieldName": "businessCategoryId",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 2891,
"name": "最新活动记录时间",
"contentType": "datetime",
"options": "[]",
"required": 0,
"status": 1,
"sysFieldName": "recentActivityRecordTime",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 2997,
"name": "到期时间",
"contentType": "datetime",
"options": "[]",
"required": 0,
"status": 1,
"sysFieldName": "expireTime",
"fieldFlag": 1,
"businessCategoryFieldList": []
},
{
"id": 591,
"name": "单行",
"contentType": "text",
"options": null,
"required": 0,
"status": 0,
"sysFieldName": "CustomField_591",
"fieldFlag": 2,
"businessCategoryFieldList": []
},
{
"id": 47,
"name": "多行",
"contentType": "area_text",
"options": null,
"required": 0,
"status": 0,
"sysFieldName": "CustomField_47",
"fieldFlag": 2,
"businessCategoryFieldList": []
},
{
"id": 48,
"name": "下拉",
"contentType": "droplist",
"options": "[{\"key\":4,\"value\":\"1\",\"orders\":1,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]},{\"key\":2,\"value\":\"2\",\"orders\":2,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]},{\"key\":3,\"value\":\"3\",\"orders\":3,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]},{\"key\":5,\"value\":\"66\",\"orders\":4,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]}]",
"required": 0,
"status": 1,
"sysFieldName": "CustomField_48",
"fieldFlag": 2,
"businessCategoryFieldList": [
{
"businessCategoryId": 5,
"fieldId": 48,
"required": 0
}
]
},
{
"id": 49,
"name": "多选",
"contentType": "checkbox",
"options": "[{\"key\":2,\"value\":\"2\",\"orders\":1,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]},{\"key\":3,\"value\":\"3\",\"orders\":2,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]},{\"key\":1,\"value\":\"1\",\"orders\":3,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]},{\"key\":4,\"value\":\"66\",\"orders\":4,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]}]",
"required": 0,
"status": 1,
"sysFieldName": "CustomField_49",
"fieldFlag": 2,
"businessCategoryFieldList": [
{
"businessCategoryId": 5,
"fieldId": 49,
"required": 0
}
]
},
{
"id": 51,
"name": "整数",
"contentType": "number",
"options": null,
"required": 0,
"status": 1,
"sysFieldName": "CustomField_51",
"fieldFlag": 2,
"businessCategoryFieldList": [
{
"businessCategoryId": 5,
"fieldId": 51,
"required": 0
}
]
},
{
"id": 52,
"name": "实数",
"contentType": "numeric",
"options": null,
"required": 0,
"status": 1,
"sysFieldName": "CustomField_52",
"fieldFlag": 2,
"businessCategoryFieldList": [
{
"businessCategoryId": 5,
"fieldId": 52,
"required": 0
}
]
},
{
"id": 1273,
"name": "爱好",
"contentType": "droplist",
"options": "[{\"key\":1,\"value\":\"篮球\",\"orders\":1,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]},{\"key\":2,\"value\":\"足球\",\"orders\":2,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]}]",
"required": 0,
"status": 1,
"sysFieldName": "CustomField_1273",
"fieldFlag": 2,
"businessCategoryFieldList": [
{
"businessCategoryId": 5,
"fieldId": 1273,
"required": 0
}
]
},
{
"id": 1794,
"name": "调研接口",
"contentType": "droplist",
"options": "[{\"key\":1,\"value\":\"下拉\",\"orders\":1,\"defaultFlag\":1,\"deleteFlag\":0,\"subOptionList\":[]},{\"key\":2,\"value\":\"多级\",\"orders\":2,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]},{\"key\":3,\"value\":\"级联\",\"orders\":3,\"defaultFlag\":0,\"deleteFlag\":0,\"subOptionList\":[]}]",
"required": 0,
"status": 1,
"sysFieldName": "CustomField_1794",
"fieldFlag": 2,
"businessCategoryFieldList": [
{
"businessCategoryId": 5,
"fieldId": 1794,
"required": 0
}
]
}
]
}
1.1.4. 获取销售线索过滤器列表
请求地址
- GET /v1/leadsFilters/manage
请求参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| timestamp | Long | false | 时间戳(例:当前秒数,1533092860) | |
| sign | String | false | 签名:身份认证签名(DigestUtils.sha1Hex(email&secretKey×tamp)) | |
| String | false | 邮箱 |
响应参数 | 参数 | 类型 | 是否可空 | 描述 ---|---|---|--- |code|String|false|返回码 |message|String|false|返回消息 |visible|boolean|false|是否可见(暂不使用) |data|Array|true|结果 |data[].id|int|false|过滤器ID |data[].name|String|false|名称
请求示例
$ curl 'http://localhost:8080/api/v1/leadsFilters/manage?email=1@test.cn×tamp=1542192660&sign=123' -i -X GET -H 'Content-Type: application/json'
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"code" : 200,
"message" : "OK",
"visible" : false,
"data": [
{
"id": 823,
"name": "线索所有人"
},
{
"id": 1896,
"name": "全部销售线索"
}
]
}
1.1.5. 获取销售线索公海列表
请求地址
- GET /v1/leadsHighSeas/nameAll
请求参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| timestamp | Long | false | 时间戳(例:当前秒数,1533092860) | |
| sign | String | false | 签名:身份认证签名(DigestUtils.sha1Hex(email&secretKey×tamp)) | |
| String | false | 邮箱 |
响应参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| code | String | false | 返回码 | |
| message | String | false | 返回消息 | |
| visible | boolean | false | 是否可见(暂不使用) | |
| data | Array | true | 结果 | |
| data[].id | int | false | ID | |
| data[].name | String | false | 名称 |
请求示例
$ curl 'http://localhost:8080/api/v1/leadsHighSeas/nameAll?&email=1@test.cn×tamp=1542188231&sign=123' -i -X GET -H 'Content-Type: application/json'
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"code" : 200,
"message" : "OK",
"visible" : false,
"data": [
{
"id": 2,
"name": "默认公海(停用,错误数据)"
},
{
"id": 5,
"name": "测试公海测试而是"
}
]
}
1.1.6. 创建销售线索
请求地址
- POST /v1/leads/batch
请求参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| timestamp | Long | false | 时间戳(例:当前秒数,1533092860) | |
| sign | String | false | 签名:身份认证签名(DigestUtils.sha1Hex(email&secretKey×tamp)) | |
| String | false | 邮箱 | ||
| leadsCreateRequestList | Array | false | 线索数组 | |
| leadsCreateRequestList[].name | String | false | 公司名称 | |
| leadsCreateRequestList[].contactsName | String | false | 联系人 | |
| leadsCreateRequestList[].telephone | String | true | 电话 | |
| leadsCreateRequestList[].mobile | String | true | 手机 | |
| leadsCreateRequestList[].email | String | true | 邮箱 | |
| leadsCreateRequestList[].masterUserId | int | false | 销售线索所有人 | |
| leadsCreateRequestList[].address | String | true | 详细地址 | |
| leadsCreateRequestList[].followStatus | int | false | 跟进状态 | |
| leadsCreateRequestList[].leadsHighSeaId | int | false | 所属公海 | |
| leadsCreateRequestList[].province | int | true | 省 | |
| leadsCreateRequestList[].city | int | true | 市 | |
| leadsCreateRequestList[].district | int | true | 地区 | |
| leadsCreateRequestList[].businessCategoryId | int | false | 线索类型 | |
| leadsCreateRequestList[].remark | String | true | 备注 | |
| leadsCreateRequestList[].customFieldMap | Object | true | 自定义变量串(例:{CustomField_1=2018-08-01, CustomField_2=16620804699}) |
响应参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| code | String | false | 返回码 | |
| message | String | false | 返回消息 | |
| visible | boolean | false | 是否可见(暂不使用) | |
| data | Object | true | 结果 | |
| data.successList | Array | true | 成功结果 | |
| data.successTotal | int | true | 成功总数 | |
| data.total | int | true | 总数 | |
| data.failMap | Object | true | 失败结果 | |
| data.failTotal | int | true | 失败总数 |
请求示例
$ curl 'http://localhost:8080/api/v1/leads/batch' -i -X POST -H 'Content-Type: application/json' -d ' {
"leadsCreateRequestList": [{
"masterUserId": 557,
"address": "线索接口自建测试12031645",
"businessCategoryId": 36,
"province":"1",
"city": "2",
"district": "3",
"contactsName": "线索接口自建测试12031645",
"email": "dianxaio@test.cn",
"focusArray": [],
"followStatus": 1,
"highSeaFlag": 0,
"leadsHighSeaId": 81,
"mobile": "18353469831",
"name":"线索接口自建测试12031645",
"remark":"线索接口自建测试12031645",
"telephone":"0105620912",
"customFieldMap":{
"CustomField_2383":"线索接口自建测试12031645",
"CustomField_2384":["1", "3"],
"CustomField_2410":"2018-11-29 11:30:35",
"CustomField_2412":2,
"CustomField_2416":"05319087901",
"CustomField_2417":"05711234567",
"CustomField_2421":"123",
"CustomField_2533":[4, 5],
"CustomField_2534":2
}
}]
}'
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"code": 200,
"message": "OK",
"visible": false,
"exception": null,
"paging": null,
"data": {
"successList": [
30735
],
"failMap": {},
"total": 1,
"successTotal": 1,
"failTotal": 0
},
"extra": null
}
1.1.7. 删除销售线索
请求地址
- DELETE /v1/leads/delete/{ids}
请求参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| timestamp | Long | false | 时间戳(例:当前秒数,1533092860) | |
| sign | String | false | 签名:身份认证签名(DigestUtils.sha1Hex(email&secretKey×tamp)) | |
| String | false | 邮箱 | ||
| ids | String | false | 线索id串(例如:100,101) |
响应参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| code | String | false | 返回码 | |
| message | String | false | 返回消息 | |
| visible | boolean | false | 是否可见(暂不使用) | |
| data | Object | true | 结果 | |
| data.successList | Array | true | 成功结果 | |
| data.successTotal | int | true | 成功总数 | |
| data.total | int | true | 总数 | |
| data.failMap | Object | true | 失败结果 | |
| data.failTotal | int | true | 失败总数 |
请求示例
$ curl 'http://localhost:8080/api/v1/leads/delete/70442?email=1@test.cn×tamp=1542268142&sign=123' -i -X DELETE -H 'Content-Type: application/json'
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"code" : 200,
"message" : "OK",
"visible" : false,
"data" : {
"successList" : [70442],
"successTotal" 1,
"total" : 1,
"failMap" : {},
"failTotal" : 0
}
}
1.1.8. 修改销售线索
请求地址
- PUT /v1/leads/batch
请求参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| timestamp | Long | false | 时间戳(例:当前秒数,1533092860) | |
| sign | String | false | 签名:身份认证签名(DigestUtils.sha1Hex(email&secretKey×tamp)) | |
| String | false | 邮箱 | ||
| leadsUpdateRequestList | Array | false | 线索数组 | |
| leadsUpdateRequestList[].id | int | false | 线索id | |
| leadsUpdateRequestList[].name | String | false | 公司名称 | |
| leadsUpdateRequestList[].contactsName | String | false | 联系人 | |
| leadsUpdateRequestList[].telephone | String | true | 电话 | |
| leadsUpdateRequestList[].mobile | String | true | 手机 | |
| leadsUpdateRequestList[].email | String | true | 邮箱 | |
| leadsUpdateRequestList[].address | String | true | 详细地址 | |
| leadsUpdateRequestList[].followStatus | int | false | 跟进状态 | |
| leadsUpdateRequestList[].leadsHighSeaId | int | false | 所属公海 | |
| leadsUpdateRequestList[].province | int | true | 省 | |
| leadsUpdateRequestList[].city | int | true | 市 | |
| leadsUpdateRequestList[].district | int | true | 地区 | |
| leadsUpdateRequestList[].businessCategoryId | int | false | 线索类型 | |
| leadsUpdateRequestList[].remark | String | true | 备注 | |
| leadsUpdateRequestList[].customFieldMap | Object | true | 自定义变量串(例:{CustomField_1=2018-08-01, CustomField_2=16620804699}) |
响应参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| code | String | false | 返回码 | |
| message | String | false | 返回消息 | |
| visible | boolean | false | 是否可见(暂不使用) | |
| data | Object | true | 结果 | |
| data.successList | Array | true | 成功结果 | |
| data.successTotal | int | true | 成功总数 | |
| data.total | int | true | 总数 | |
| data.failMap | Object | true | 失败结果 | |
| data.failTotal | int | true | 失败总数 |
请求示例
$ curl 'http://localhost:8080/api/v1/leads/batch' -i -X PUT -H 'Content-Type: application/json' -d '{
"leadsUpdateRequestList": [{
"id":30735,
"address": "接口自建数据测试12031652",
"businessCategoryId": 36,
"province":"1",
"city": "2",
"district": "3",
"contactsName": "接口自建数据测试12031652",
"email": "dianxaio@test.cn",
"focusArray": [],
"followStatus": 1,
"highSeaFlag": 0,
"leadsHighSeaId": 81,
"mobile": "18353469831",
"name":"接口自建数据测试12031652",
"remark":"接口自建数据测试12031652",
"telephone":"0105620912",
"customFieldMap":{
"CustomField_2383":"接口自建数据测试12031652",
"CustomField_2384":["1", "3"],
"CustomField_2410":"2018-11-29 11:30:35",
"CustomField_2412":2,
"CustomField_2416":"05319087901",
"CustomField_2417":"05711234567",
"CustomField_2421":"123",
"CustomField_2533":[4, 5],
"CustomField_2534":2
}
}]
}'
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"code": 200,
"message": "OK",
"visible": false,
"exception": null,
"paging": null,
"data": {
"successList": [
30735
],
"failMap": {},
"total": 1,
"successTotal": 1,
"failTotal": 0
},
"extra": null
}
1.1.9. 转移线索
请求地址
- PUT /v1/leads/{ids}/transferToMaster/{masterUserId}
请求参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| timestamp | Long | false | 时间戳(例:当前秒数,1533092860) | |
| sign | String | false | 签名:身份认证签名(DigestUtils.sha1Hex(email&secretKey×tamp)) | |
| String | false | 邮箱 | ||
| ids | String | false | 线索id串(例:1,2,3,4,5) | |
| masterUserId | int | false | 目标所有人id |
响应参数
| 参数 | 类型 | 是否可空 | 描述 | |
|---|---|---|---|---|
| code | String | false | 返回码 | |
| message | String | false | 返回消息 | |
| visible | boolean | false | 是否可见(暂不使用) | |
| data | Object | true | 结果 | |
| data.successList | Array | true | 成功结果 | |
| data.successTotal | int | true | 成功总数 | |
| data.total | int | true | 总数 | |
| data.failMap | Object | true | 失败结果 | |
| data.failTotal | int | true | 失败总数 |
请求示例
$ curl 'http://localhost:8080/api/v1/leads/1,2/transferToMaster/7' -i -X PUT -H 'Content-Type: application/json'
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"code" : 200,
"message" : "OK",
"visible" : false,
"data" : {
"successList" : [1,2],
"successTotal" 2,
"total" : 2,
"failMap" : {},
"failTotal" : 0
}
}