天天看點

悟空CRM SAAS平台接口API文檔

文章目錄

    • 說明
    • 通用接口
      • 登入
      • 擷取字段選項
      • 擷取篩選場景
      • 添加篩選場景
      • 跟進
    • 線索
      • 線索新增/修改
      • 線索清單
      • 線索詳情
      • 線索轉移
      • 線索轉化為客戶
      • 線索批量删除
      • 線索導入
      • 線索批量導出
      • 線索全部導出
    • 客戶
      • 客戶新增/修改
      • 客戶清單
      • 客戶詳情
      • 客戶批量修改成交狀态
      • 客戶批量轉移
      • 客戶放入公海
      • 客戶批量删除
      • 客戶批量鎖定/解鎖
      • 客戶導入
      • 客戶批量導出
      • 客戶全部導出
    • 聯系人
      • 聯系人新增/修改
      • 聯系人清單
      • 聯系人詳情
      • 聯系人批量修改成交狀态
      • 聯系人批量轉移
      • 聯系人批量删除
      • 聯系人導入
      • 聯系人批量導出
      • 聯系人全部導出
    • 商機
      • 商機新增/修改
      • 商機清單
      • 商機詳情
      • 商機批量轉移
      • 商機批量删除
      • 商機導入
      • 商機批量導出
      • 商機全部導出
    • 産品
    • 合同
    • 回款

說明

  1. 接口來自悟空CRM SAAS平台(Java版11.0版本)抓包擷取,響應結果及參數有待完善,需要自行注冊SAAS免費賬戶,了解相關業務操作。
  2. 基本上所有接口都支援GET/POST兩種方式
  3. 接口授權方式為,使用使用者名密碼請求登入接口,從響應中擷取到Admin-Token,請求其他接口時将Admin-Token添加到請求頭中,格式為:Admin-Token=…
  4. CRM常見概念

CRM: 客戶關系管理平台,用于收集潛在客戶線索,發現商機,跟進客戶,促成成交等

線索:收集到的原始客戶資訊,待核實确認

客戶:有潛在購買需求的公司或機關

聯系人:客戶機關的聯系人

商機:客戶或潛在客戶的某次購買意願和傾向

  1. 線上接口位址: base_url=https://www.72crm.com

通用接口

登入

請求方法:POST/GET

接口位址:/api/login

内容類型:application/x-www-form-urlencoded

示例請求

username=***&password=***

           

| 參數名 | 解釋|

| — | — |

|username |使用者名 |

|password |密碼 |

示例響應

{

"code": 0,

"Admin-Token": "f16efb1b6a1c471c920760e838a37397",

"user": {

"deptName": "全公司",

"img": null,

"createTime": "2020-10-09 14:21:04",

"lastLoginTime": "2020-10-09 16:32:00",

"companyId": "1314450786960412672",

"num": null,

"sex": null,

"companyName": "臨淵",

"mobile": "18010181267",

"realname": "admin",

"parentName": null,

"post": "标準崗位",

"userId": 28510,

"parentId": null,

"lastLoginIp": "111.194.126.253",

"deptId": 28856,

"oldUserId": null,

"email": null,

"username": "18010181267",

"status": 1

},

"auth": {

...

},

"isAdmin": true,

"cardAuth": false,

"emailId": null,

"isReadNotice": 1,

"firstModel": null,

"call": 0

}

           

擷取字段選項

擷取表單相關字段選項,如線索來源等

請求方法:POST/GET

接口位址:/api/field/queryField

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

label=1

           

| 參數名 | 解釋|

| — | — |

|label |類型1.線索 2.客戶 3.聯系人 4.産品 5.商機|

示例響應

{

"code": 0,

"data": [

...

{

"fieldId": 2398372,

"formType": "select",

"authLevel": 3,

"isNull": 0,

"isUnique": 0,

"inputTips": null,

"defaultValue": "",

"label": 1,

"type": 3,

"fieldName": "線索來源",

"setting": [

"促銷",

"搜尋引擎",

"廣告",

"轉介紹",

"線上注冊",

"線上詢價",

"預約上門",

"陌拜",

"電話咨詢",

"郵件咨詢"

],

"name": "線索來源",

"options": "促銷,搜尋引擎,廣告,轉介紹,線上注冊,線上詢價,預約上門,陌拜,電話咨詢,郵件咨詢",

"value": "",

"fieldType": 2

},

...

]

}

           

擷取篩選場景

擷取線索/客戶/商機等清單篩選場景

請求方法:POST/GET

接口位址:/api/scene/queryScene

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

type=1

           

| 參數名 | 解釋|

| — | — |

|type |類型1.線索 2.客戶 3.聯系人 4.産品 5.商機|

示例響應

{

"code": 0,

"data": [

{

"isSystem": 1,

"bydata": null,

"data": "{\"is_transform\":{\"condition\":\"is\",\"name\":\"is_transform\",\"value\":0}}",

"sceneId": 434349,

"name": "全部線索",

"isDefault": 0

},

...

]

}

           

添加篩選場景

擷取線索/客戶/商機等清單篩選場景

請求方法:POST/GET

接口位址:/api/scene/addScene

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

type=2&isDefault=0&name=成交客戶&data={"deal_status":{"condition":"is","value":1,"formType":"dealStatus","name":"deal_status"}}

           

| 參數名 | 解釋|

| — | — |

|type |類型1.線索 2.客戶 3.聯系人 4.産品 5.商機|

|isDefault |是否預設場景|

|name |場景名稱|

|data |具體篩選參數|

示例響應

{

"code": 0

}

           

跟進

跟進線索/客戶/商機

請求方法:POST/GET

接口位址:/api/CrmLeads/addOrUpdate

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

activityType=1&activityTypeId=927662&content=跟進線索1&category=打電話&businessIds=&contactsIds=&nextTime=2020-10-16 00:00:00&isEvent=0

           

| 參數名 | 解釋|

| — | — |

|activityType |活動類型1.線索 2.客戶 3.聯系人 4.産品 5.商機|

|content |跟進内容|

|category |跟進類型|

|businessIds |關聯商機id|

|contactsIds |關聯聯系id|

|nextTime |下次聯系時間|

|isEvent ||

示例響應

{

"code": 0

}

           

線索

線索新增/修改

請求方法:POST/GET

接口位址:/api/CrmLeads/addOrUpdate

内容類型:application/json

授權方法:請求頭中攜帶Admin-Token

示例請求

{

"entity": {

"leads_name": "線索3",

"mobile": "18010181267",

"telephone": "",

"email": "",

"address": "",

"next_time": "",

"remark": ""

}

}

           

| 參數名 | 解釋|

| — | — |

|leadsId |線索id,包含線索id時為修改,不包含時為新增 |

|leads_name |線索名稱 |

|mobile |手機 |

|email |郵件 |

|address |位址 |

|next_time |下次聯系時間 |

|remark |備注 |

示例響應

{

"code": 0

}

           

線索清單

無參時傳回預設清單,支援按場景篩選和進階篩選

請求方法:POST/GET

接口位址:/api/CrmLeads/queryPageList

内容類型:application/json

授權方法:請求頭中攜帶Admin-Token

示例請求

{"page":1,"limit":15,"search":"","type":1,"sceneId":434350,"data":{"mobile":{"condition":"contains","value":"18010181267","formType":"mobile","name":"mobile"}}}

           

| 參數名 | 解釋|

| — | — |

|page |頁碼 |

|limit |每頁條數 |

|search |搜尋關鍵字 |

|type |類型 1.線索 2.客戶 3.聯系人 4.産品 5.商機 |

|sceneId |篩選場景id |

|data |進階篩選條件 |

示例響應

{

"code": 0,

"data": {

"totalRow": 7,

"list": [

{

"ownerUserName": "admin",

"createUserName": "admin",

"batchId": "7b1110923eab47e58b0e0bad45685553",

"remark": "",

"客戶行業": null,

"線索來源": null,

"isTransform": 0,

"leadsId": 927847,

"updateTime": "2020-10-10 11:30:52",

"nextTime": null,

"lastTime": null,

"leadsName": "線索3",

"email": null,

"客戶級别": null,

"createUserId": 28510,

"address": "",

"createTime": "2020-10-10 11:30:52",

"companyId": "1314450786960412672",

"star": 0,

"ownerUserId": 28510,

"mobile": "18010181267",

"telephone": "",

"fieldBatchId": "7b1110923eab47e58b0e0bad45685553",

"lastContent": null,

"followup": null,

"oldLeadsId": null,

"customerId": null

},

...

]

}

}

           

線索詳情

請求方法:POST/GET

接口位址:/api/CrmLeads/queryById

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

leadsId=927847

           

| 參數名 | 解釋|

| — | — |

|leadsId |線索id|

示例響應

{

"code": 0,

"data": {

"createUserId": 28510,

"address": "",

"createTime": "2020-10-10 11:30:52",

"companyId": "1314450786960412672",

"star": 0,

"ownerUserId": 28510,

"batchId": "7b1110923eab47e58b0e0bad45685553",

"mobile": "18010181267",

"telephone": "",

"remark": "",

"isTransform": 0,

"lastContent": null,

"followup": null,

"leadsId": 927847,

"updateTime": "2020-10-10 11:30:52",

"oldLeadsId": null,

"nextTime": null,

"lastTime": null,

"name": "線索3",

"ownerUserName": "admin",

"leadsName": "線索3",

"customerId": null,

"email": null

}

}

           

線索轉移

轉移給其他人負責

請求方法:POST/GET

接口位址:/api/CrmLeads/changeOwnerUser

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

leadsIds=927847,927846

newOwnerUserId: 28517

           

| 參數名 | 解釋|

| — | — |

|leadsIds |線索id,多個以英文逗号分開|

|newOwnerUserId |新負責人使用者id|

示例響應

{"code":0}

           

線索轉化為客戶

請求方法:POST/GET

接口位址:/api/CrmLeads/transfer

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

leadsIds=927847,927846

           

| 參數名 | 解釋|

| — | — |

|leadsIds |線索id,多個以英文逗号分開|

示例響應

{"code":0}

{"code": 500,"msg": "已轉化線索不能再次轉化"}

{"code":500,"msg":"客戶名稱已存在"}

           

線索批量删除

批量删除線索

請求方法:POST/GET

接口位址:/api/CrmLeads/deleteByIds

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

leadsIds=927847,927846

           

| 參數名 | 解釋|

| — | — |

|leadsIds |線索id,多個以英文逗号分開|

示例響應

{

"code": 0

}

           

線索導入

通過Excel批量導入線索

請求方法:POST/GET

接口位址:/api/CrmLeads/uploadExcel

内容類型:multipart/form-data

授權方法:請求頭中攜帶Admin-Token

示例請求

| 參數名 | 解釋|

| — | — |

|repeatHandling |重複處理 1.覆寫|

|ownerUserId |所屬使用者id|

|file |上傳的xls檔案|

示例響應

{

"code": 0,

"data": 191383

}

           

線索批量導出

批量導出線索為Excel

請求方法:POST/GET

接口位址:/api/CrmLeads/batchExportExcel

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

leadsIds=927847,927846

           

| 參數名 | 解釋|

| — | — |

|leadsIds |線索id,多個以英文逗号分開|

示例響應

xls二進制檔案流

線索全部導出

批量導出線索為Excel

請求方法:POST/GET

接口位址:/api/CrmLeads/allExportExcel

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

search=

           

| 參數名 | 解釋|

| — | — |

|search ||

示例響應

xls二進制檔案流

客戶

客戶新增/修改

請求方法:POST/GET

接口位址:/api/CrmCustomer/addOrUpdate

内容類型:application/json

授權方法:請求頭中攜帶Admin-Token

示例請求

{

"entity": {

"customer_name": "韓志超2",

"mobile": "18010181267",

"telephone": "",

"website": "",

"email": "",

"next_time": "2020-10-31 00:00:00",

"remark": "",

"address": "北京市,北京城區,東城區",

"detailAddress": "朝陽門",

"location": "",

"lng": "",

"lat": ""

}

}

           

| 參數名 | 解釋|

| — | — |

|customerId |客戶id,包含客戶id時為修改,不包含時為新增 |

|customer_name |客戶名稱 |

|telephone |電話 |

|email |郵件 |

|address |位址 |

|detailAddress |詳細位址 |

|next_time |下次聯系時間 |

|location |位置 |

|lng |經度 |

|lat |次元 |

|remark |備注 |

示例響應

{

"code": 0

}

           

客戶清單

無參時傳回預設清單,支援按場景篩選和進階篩選

請求方法:POST/GET

接口位址:/api/CrmCustomer/queryPageList

内容類型:application/json

授權方法:請求頭中攜帶Admin-Token

示例請求

{"page":1,"limit":15,"search":"","type":2,"data":{"mobile":{"condition":"contains","value":"18010181267","formType":"mobile","name":"mobile"}}}

           

| 參數名 | 解釋|

| — | — |

|page |頁碼 |

|limit |每頁條數 |

|search |搜尋關鍵字 |

|type |類型 1.線索 2.客戶 3.聯系人 4.産品 5.商機 |

|sceneId |篩選場景id |

|data |進階篩選條件 |

示例響應

{

"code": 0,

"data": {

"totalRow": 4,

"list": [

{

"ownerUserName": "admin",

"createUserName": "admin",

"batchId": "1acb1f8e230d435ca21b0b5b37857030",

"客戶來源": "促銷",

"contactsName": "韓志超",

"dealTime": null,

"remark": "",

"客戶行業": "",

"contactsMobile": "18010181267",

"updateTime": "2020-10-09 15:06:46",

"poolDay": 7,

"nextTime": "2020-10-16 00:00:00",

"lastTime": null,

"businessCount": 3,

"rwUserId": ",",

"email": null,

"lat": "",

"客戶級别": "A(重點客戶)",

"dealStatus": 0,

"createUserId": 28510,

"isReceive": null,

"website": "",

"address": "",

"lng": "",

"createTime": "2020-10-09 15:06:46",

"companyId": "1314450786960412672",

"star": 0,

"ownerUserId": 28510,

"roUserId": ",",

"detailAddress": "",

"mobile": "18010181267",

"receiveTime": "2020-10-09 15:06:46",

"telephone": "",

"oldCustomerId": null,

"contactsAddress": "",

"preOwnerUserId": null,

"fieldBatchId": "1acb1f8e230d435ca21b0b5b37857030",

"lastContent": null,

"followup": null,

"poolTime": null,

"isLock": 0,

"contactsId": 409447,

"location": "",

"customerName": "線索1",

"customerId": 4156588,

"status": 1

},

...

]

}

}

           

客戶詳情

請求方法:POST/GET

接口位址:/api/CrmCustomer/queryById

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

customerId=4156484

           

| 參數名 | 解釋|

| — | — |

|customerId |客戶id|

示例響應

{

"code":0,

"data":{

"batchId":"a5107b6ffa00490eb8236c63b6b074ca",

"客戶來源":"促銷",

"dealTime":null,

"remark":"",

"isPool":0,

"客戶行業":"IT",

"updateTime":"2020-10-09 14:37:54",

"nextTime":"2020-10-31 00:00:00",

"lastTime":"2020-10-09 14:37:54",

"ownerUserName":"admin",

"rwUserId":",",

"email":null,

"lat":"",

"客戶級别":"A(重點客戶)",

"dealStatus":0,

"createUserId":28510,

"isReceive":null,

"website":"",

"address":"北京市,北京城區,東城區",

"lng":"",

"createTime":"2020-10-09 14:37:54",

"companyId":"1314450786960412672",

"star":0,

"ownerUserId":28510,

"roUserId":",",

"detailAddress":"朝陽門",

"mobile":"18010181267",

"receiveTime":"2020-10-09 14:37:54",

"telephone":"",

"oldCustomerId":null,

"preOwnerUserId":null,

"lastContent":null,

"followup":null,

"poolTime":null,

"isLock":0,

"contactsId":null,

"location":"",

"customerName":"韓志超2",

"customerId":4156484,

"status":1

}

}

           

客戶批量修改成交狀态

轉移給其他人負責

請求方法:POST/GET

接口位址:/api/CrmCustomer/setDealStatus

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

dealStatus=1&ids=4156484

           

| 參數名 | 解釋|

| — | — |

|dealStatus |成交狀态 0.未成交 1.成交|

|ids |客戶id,多個以英文逗号隔開|

示例響應

{"code":0}

           

客戶批量轉移

請求方法:POST/GET

接口位址:/api/CrmCustomer/transfer

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

newOwnerUserId: 28517

transferType: 1

customerIds: 4156484,4156480

changeType: 1

           

| 參數名 | 解釋|

| — | — |

|newOwnerUserId |新使用者id|

|transferType |轉移類型|

|customerIds |客戶id,多個以逗号隔開|

|changeType |變更類型|

示例響應

{"code":0}

           

客戶放入公海

請求方法:POST/GET

接口位址:/api/CrmCustomer/updateCustomerByIds

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

ids: 4156484

poolId: 46155

           

| 參數名 | 解釋|

| — | — |

|ids |客戶id,多個以逗号隔開|

|poolId |公海id|

示例響應

{"code":0}

           

客戶批量删除

批量删除客戶

請求方法:POST/GET

接口位址:/api/CrmCustomer/deleteByIds

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

customerIds=4158571,4156588

           

| 參數名 | 解釋|

| — | — |

|customerIds |客戶id,多個以英文逗号分開|

示例響應

{

"code": 0

}

           

客戶批量鎖定/解鎖

請求方法:POST/GET

接口位址:/api/CrmCustomer/lock

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

status: 2

ids: 4156480

           

| 參數名 | 解釋|

| — | — |

|ids |客戶id,多個以英文逗号分開|

|status |狀态 1.解鎖 2.鎖定|

示例響應

{

"code": 0

}

           

客戶導入

通過Excel批量導入客戶

請求方法:POST/GET

接口位址:/api/CrmCustomer/uploadExcel

内容類型:multipart/form-data

授權方法:請求頭中攜帶Admin-Token

示例請求

| 參數名 | 解釋|

| — | — |

|repeatHandling |重複處理 1.覆寫|

|ownerUserId |所屬使用者id|

|file |上傳的xls檔案|

示例響應

{

"code": 0,

"data": 191383

}

           

客戶批量導出

批量導出客戶為Excel

請求方法:POST/GET

接口位址:/api/CrmCustomer/batchExportExcel

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

ids: 4156480

           

| 參數名 | 解釋|

| — | — |

|ids |客戶id,多個以英文逗号分開|

示例響應

xls二進制檔案流

客戶全部導出

批量導出客戶為Excel

請求方法:POST/GET

接口位址:/api/CrmCustomer/allExportExcel

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

search=

           

| 參數名 | 解釋|

| — | — |

|search |搜尋關鍵詞|

示例響應

xls二進制檔案流

聯系人

聯系人新增/修改

請求方法:POST/GET

接口位址:/api/CrmContacts/addOrUpdate

内容類型:application/json

授權方法:請求頭中攜帶Admin-Token

示例請求

{

"entity":{

"name":"寒池",

"customer_id":4156480,

"mobile":"18010181267",

"telephone":"",

"email":"",

"post":"采購經理",

"address":"",

"next_time":"",

"remark":""

}

}

           

| 參數名 | 解釋|

| — | — |

|contactsId |聯系人id,包含聯系人id時為修改,不包含時為新增 |

|name |聯系人名稱 |

|customer_id |客戶id |

|telephone |電話 |

|email |郵件 |

|address |位址 |

|next_time |下次聯系時間 |

|post |職位 |

|remark |備注 |

示例響應

{

"code": 0

}

           

聯系人清單

無參時傳回預設清單,支援按場景篩選和進階篩選

請求方法:POST/GET

接口位址:/api/CrmContacts/queryPageList

内容類型:application/json

授權方法:請求頭中攜帶Admin-Token

示例請求

{"page":1,"limit":15,"search":"","type":2,"data":{"mobile":{"condition":"contains","value":"18010181267","formType":"mobile","name":"mobile"}}}

           

| 參數名 | 解釋|

| — | — |

|page |頁碼 |

|limit |每頁條數 |

|search |搜尋關鍵字 |

|type |類型 1.線索 2.聯系人 3.聯系人 4.産品 5.商機 |

|sceneId |篩選場景id |

|data |進階篩選條件 |

示例響應

{

"code":0,

"data":{

"totalRow":3,

"list":[

{

"ownerUserName":"admin",

"createUserName":"admin",

"batchId":"641ddcb772bc458e8248e930bcb9535b",

"是否關鍵決策人":"是",

"remark":"",

"updateTime":"2020-10-10 14:58:48",

"nextTime":null,

"post":"采購經理",

"lastTime":null,

"email":null,

"createUserId":28510,

"address":"",

"oldContactsId":null,

"createTime":"2020-10-10 14:56:35",

"companyId":"1314450786960412672",

"star":0,

"ownerUserId":28510,

"mobile":"18010181267",

"telephone":"111",

"fieldBatchId":"641ddcb772bc458e8248e930bcb9535b",

"性别":"",

"name":"寒池",

"contactsId":409650,

"customerName":"韓志超2",

"customerId":4156480

},

...

]

}

}

           

聯系人詳情

請求方法:POST/GET

接口位址:/api/CrmCustomer/queryById

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

contactsId=409650

           

| 參數名 | 解釋|

| — | — |

|contactsId |聯系人id|

示例響應

{

"code":0,

"data":{

"createUserId":28510,

"address":"",

"oldContactsId":null,

"createTime":"2020-10-10 14:56:35",

"companyId":"1314450786960412672",

"star":0,

"ownerUserId":28510,

"batchId":"641ddcb772bc458e8248e930bcb9535b",

"是否關鍵決策人":"是",

"mobile":"18010181267",

"telephone":"111",

"remark":"",

"性别":"",

"updateTime":"2020-10-10 14:58:48",

"nextTime":null,

"post":"采購經理",

"lastTime":null,

"name":"寒池",

"contactsId":409650,

"customerName":"韓志超2",

"customerId":4156480,

"email":null

}

}

           

聯系人批量修改成交狀态

轉移給其他人負責

請求方法:POST/GET

接口位址:/api/CrmCustomer/setDealStatus

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

dealStatus=1&ids=4156484

           

| 參數名 | 解釋|

| — | — |

|dealStatus |成交狀态 0.未成交 1.成交|

|ids |聯系人id,多個以英文逗号隔開|

示例響應

{"code":0}

           

聯系人批量轉移

請求方法:POST/GET

接口位址:/api/CrmContacts/transfer

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

newOwnerUserId: 28517

contactsIds: 409448

           

| 參數名 | 解釋|

| — | — |

|newOwnerUserId |新使用者id|

|contactsIds |聯系人id,多個以逗号隔開|

示例響應

{"code":0}

           

聯系人批量删除

批量删除聯系人

請求方法:POST/GET

接口位址://api/CrmContacts/deleteByIds

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

contactsIds=409650

           

| 參數名 | 解釋|

| — | — |

|contactsIds |聯系人id,多個以英文逗号分開|

示例響應

{

"code": 0

}

           

聯系人導入

通過Excel批量導入聯系人

請求方法:POST/GET

接口位址:/api/CrmContacts/uploadExcel

内容類型:multipart/form-data

授權方法:請求頭中攜帶Admin-Token

示例請求

| 參數名 | 解釋|

| — | — |

|repeatHandling |重複處理 1.覆寫|

|ownerUserId |所屬使用者id|

|file |上傳的xls檔案|

示例響應

{

"code": 0,

"data": 191383

}

           

聯系人批量導出

批量導出聯系人為Excel

請求方法:POST/GET

接口位址:/api/CrmContacts/batchExportExcel

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

ids: 4156480

           

| 參數名 | 解釋|

| — | — |

|ids |聯系人id,多個以英文逗号分開|

示例響應

xls二進制檔案流

聯系人全部導出

批量導出聯系人為Excel

請求方法:POST/GET

接口位址:/api/CrmContacts/allExportExcel

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

search=

           

| 參數名 | 解釋|

| — | — |

|search |搜尋關鍵詞|

示例響應

xls二進制檔案流

商機

商機新增/修改

請求方法:POST/GET

接口位址:/api/CrmBusiness/addOrUpdate

内容類型:application/json

授權方法:請求頭中攜帶Admin-Token

示例請求

{

"entity":{

"business_name":"hello",

"customer_id":4156480,

"money":"",

"deal_date":"2020-10-05 00:00:00",

"type_id":23934,

"status_id":83318,

"remark":"",

"totalPrice":0,

"discountRate":0

},

"field":[

],

"product":[

]

}

           

| 參數名 | 解釋|

| — | — |

|contactsId |商機id,包含商機id時為修改,不包含時為新增 |

|business_name |商機名稱 |

|customer_id |客戶id |

|money |電話 |

|deal_date |預計成交日期 |

|type_id |商機狀态組 |

|status_id |商機階段 |

|totalPrice |總價 |

|discountRate |折扣 |

|remark |備注 |

示例響應

{

"code": 0

}

           

商機清單

無參時傳回預設清單,支援按場景篩選和進階篩選

請求方法:POST/GET

接口位址:https://www.72crm.com/api/CrmBusiness/queryPageList

内容類型:application/json

授權方法:請求頭中攜帶Admin-Token

示例請求

{"page":1,"limit":15,"search":"","type":5}

           

| 參數名 | 解釋|

| — | — |

|page |頁碼 |

|limit |每頁條數 |

|search |搜尋關鍵字 |

|type |類型 1.線索 2.商機 3.商機 4.産品 5.商機 |

|sceneId |篩選場景id |

|data |進階篩選條件 |

示例響應

{

"code":0,

"data":{

"totalRow":4,

"money":{

"businessSumMoney":"60.00"

},

"list":[

{

"ownerUserName":"admin",

"typeName":"銷售流程商機組",

"createUserName":"admin",

"batchId":"26f51422baf641a080d284bbc1b7c783",

"remark":"",

"discountRate":"0.00",

"updateTime":"2020-10-10 15:47:01",

"statusId":83318,

"nextTime":null,

"rate":"20",

"lastTime":null,

"progressBar":"1/4",

"rwUserId":",",

"statusRemark":"",

"businessName":"hello",

"createUserId":28510,

"dealDate":"2020-10-05 00:00:00",

"totalPrice":"0.00",

"createTime":"2020-10-10 15:47:01",

"companyId":"1314450786960412672",

"star":0,

"ownerUserId":28510,

"typeId":23934,

"roUserId":",",

"statusName":"驗證客戶",

"isEnd":0,

"fieldBatchId":"26f51422baf641a080d284bbc1b7c783",

"money":null,

"oldBusinessId":null,

"contactsId":null,

"customerName":"韓志超2",

"customerId":4156480,

"businessId":19751,

"status":1

},

...

]

}

}

           

商機詳情

請求方法:POST/GET

接口位址:/api/CrmBusiness/queryById

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

businessId=19751

           

| 參數名 | 解釋|

| — | — |

|businessId |商機id|

示例響應

{

"code":0,

"data":{

"typeName":"銷售流程商機組",

"ownerUserName":"admin",

"createUserName":"admin",

"batchId":"26f51422baf641a080d284bbc1b7c783",

"remark":"",

"discountRate":"0.00",

"updateTime":"2020-10-10 15:47:01",

"statusId":83318,

"nextTime":null,

"lastTime":null,

"rwUserId":",",

"statusRemark":"",

"businessName":"hello",

"createUserId":28510,

"dealDate":"2020-10-05 00:00:00",

"totalPrice":"0.00",

"createTime":"2020-10-10 15:47:01",

"companyId":"1314450786960412672",

"star":0,

"ownerUserId":28510,

"typeId":23934,

"roUserId":",",

"statusName":"驗證客戶",

"isEnd":0,

"money":null,

"oldBusinessId":null,

"contactsId":null,

"customerName":"韓志超2",

"customerId":4156480,

"businessId":19751,

"status":1

}

}

           

商機批量轉移

請求方法:POST/GET

接口位址:/api/CrmBusiness/transfer

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

newOwnerUserId: 28517

transferType: 1

businessIds: 19751

           

| 參數名 | 解釋|

| — | — |

|newOwnerUserId |新使用者id|

|businessIds |商機id,多個以逗号隔開|

|transferType |轉移類型 1: 轉出|

示例響應

{"code":0}

           

商機批量删除

批量删除商機

請求方法:POST/GET

接口位址:/api/CrmBusiness/deleteByIds

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

businessIds=19751

           

| 參數名 | 解釋|

| — | — |

|businessIds |商機id,多個以英文逗号分開|

示例響應

{

"code": 0

}

           

商機導入

通過Excel批量導入商機

請求方法:POST/GET

接口位址:/api/CrmBusiness/uploadExcel

内容類型:multipart/form-data

授權方法:請求頭中攜帶Admin-Token

示例請求

| 參數名 | 解釋|

| — | — |

|repeatHandling |重複處理 1.覆寫|

|ownerUserId |所屬使用者id|

|file |上傳的xls檔案|

示例響應

{

"code": 0,

"data": 191383

}

           

商機批量導出

批量導出商機為Excel

請求方法:POST/GET

接口位址:/api/CrmBusiness/batchExportExcel

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

ids: 4156480

           

| 參數名 | 解釋|

| — | — |

|ids |商機id,多個以英文逗号分開|

示例響應

xls二進制檔案流

商機全部導出

批量導出商機為Excel

請求方法:POST/GET

接口位址:/api/CrmBusiness/allExportExcel

内容類型:application/x-www-form-urlencoded

授權方法:請求頭中攜帶Admin-Token

示例請求

search=

           

| 參數名 | 解釋|

| — | — |

|search |搜尋關鍵詞|

示例響應

xls二進制檔案流

産品

合同

回款