### Populate dataList values Source: https://open.xbongbong.com/openapi/faq Example of the key-value pairs used to populate the dataList for a record. ```json { "text_1":"杭州逍邦网络科技有限公司", "text_2":"逍邦", "subForm_1":{ "text_1":"手机", "text_2":"13700000001" }, "address_1":{ "city":"杭州市", "address":"滨盛路1505号银丰大厦9F", "district":"滨江区", "province":"浙江省" }, "text_4":"初步接触", "text_18":"确认需求", "text_3":"渠道客户", "text_5":"个人客户", "text_6":"大型", "text_7":"电信", "num_1":1, "text_9":"电话销售", "text_10":"http://www.xbongbong.com/", "text_11":"客户简介", "text_8":"中国", "text_13":"一条备注" } ``` -------------------------------- ### Define dataList structure Source: https://open.xbongbong.com/openapi/faq Example of the field configuration objects used within the dataList array. ```json "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_11", "attrName":"客户简介", "dateType":"yyyy-MM-dd HH:mm", "fieldType":1, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_8", "attrName":"国家", "dateType":"yyyy-MM-dd HH:mm", "fieldType":3, "integerOnly":0, "items":Array[12], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_13", "attrName":"备注", "dateType":"yyyy-MM-dd HH:mm", "fieldType":7, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 } ] ``` -------------------------------- ### Java项目依赖配置 Source: https://open.xbongbong.com/openapi 在Maven项目中引入OkHttp依赖。 ```xml com.squareup.okhttp3 okhttp 3.14.9 ``` -------------------------------- ### API Interface Overview Source: https://open.xbongbong.com/openapi/api_test General information regarding the API base URL and parameter structure for OpenXBongBong. ```APIDOC ## API Interface ### Endpoint `https://proapi.xbongbong.com` ### Usage Notes - Field mappings and fieldType definitions should be retrieved via the System Module or Form Module field explanation interfaces. - Input parameter formats should follow the 'Unified Parameter Description' and 'Control Parameters' guidelines in the developer guide. - Parameter values provided in documentation are for demonstration purposes only. ``` -------------------------------- ### 新建或编辑表单数据入参 Source: https://open.xbongbong.com/openapi/params 用于提交表单数据的新建或编辑接口的完整入参结构。 ```json { "corpid": "lsj", "userId": "xbbTest001", "dataId": 310992, "dataList": { "text_1": "apiTest.001", "text_17": 310836, "text_2": "null", "text_11": null, "text_8": "中国", "text_13": "test", "text_16": "xbbTest002" } } ``` -------------------------------- ### API 接口调用示例 Source: https://open.xbongbong.com/openapi 使用 Java SDK 进行 API 请求的简单示例。 ```APIDOC ### Java SDK 请求示例 ```java import com.xbongbong.api.XbbApi; import com.alibaba.fastjson.JSONObject; // 钉钉版域名: https://proapi.xbongbong.com // 多平台版域名: https://appapi.xbongbong.com String url = "https://proapi.xbongbong.com/pro/v2/api/department/list"; JSONObject paramJson = new JSONObject(); paramJson.put("corpid", "corpid******"); String token = "token******"; try { JSONObject json = XbbApi.apiRequest(url, paramJson, token); System.out.println(json.toJSONString()); } catch (com.xbongbong.helper.XbbException e) { throw new RuntimeException(e); } ``` ``` -------------------------------- ### Implement Webhook Callback Handler Source: https://open.xbongbong.com/openapi Use the XbbWebhook utility to parse incoming POST requests. The token parameter is optional for validation. ```java package org.example; import com.alibaba.fastjson.JSONObject; import com.xbongbong.api.XbbWebhook; import com.xbongbong.helper.XbbException; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.io.IOException; @RestController public class WebhookDemo { @RequestMapping(value = "/callback", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public String callback(HttpServletRequest httpServletRequest) { try { JSONObject params = XbbWebhook.getParams(httpServletRequest); System.out.println(params.toJSONString()); } catch (IOException e) { throw new RuntimeException(e); } catch (XbbException e) { throw new RuntimeException(e); } //webHook的token,跟api的不是同一个 String token = "token******"; try { JSONObject params = XbbWebhook.getParams(httpServletRequest, token); //如果不需要校验token可以不传 // JSONObject params = XbbWebhook.getParams(httpServletRequest); System.out.println(params.toJSONString()); } catch (IOException e) { throw new RuntimeException(e); } catch (XbbException e) { throw new RuntimeException(e); } return "操作成功!"; } } ``` -------------------------------- ### 基础API请求参数 Source: https://open.xbongbong.com/openapi/params 所有API请求必须包含的身份验证参数。 ```json { "corpid":"1", "userId":"1" } ``` -------------------------------- ### Java API请求示例 Source: https://open.xbongbong.com/openapi 使用销帮帮SDK进行接口请求的Java代码示例。 ```java package org.example; import com.xbongbong.api.XbbApi; import com.alibaba.fastjson.JSONObject; public class ApiRequestDemo { public static void main(String[] args) { //钉钉版本的api域名:https://proapi.xbongbong.com //多平台(企微/飞书/多平台)的api域名:https://appapi.xbongbong.com String host = ""; //接口的路劲,以部门列表为例:/pro/v2/api/department/list String path = ""; String url = host + path; //请求参数,需要按照接口文档传参 // { // "corpid":"****" // } JSONObject paramJson = new JSONObject(); paramJson.put("corpid", "corpid******"); //api的token String token = "token******"; System.out.println("url:" + url); System.out.println("参数信息:" + paramJson.toJSONString()); System.out.println("token:" + token); try { JSONObject json = XbbApi.apiRequest(url, paramJson, token); System.out.println(json.toJSONString()); } catch (com.xbongbong.helper.XbbException e) { throw new RuntimeException(e); } } } ``` -------------------------------- ### Configure Maven Dependencies Source: https://open.xbongbong.com/openapi Include these dependencies in your pom.xml to support JSON parsing, web requests, and Servlet API integration. ```xml com.alibaba fastjson 1.2.48.sec06 org.springframework spring-web 5.3.20 org.apache.tomcat.embed tomcat-embed-core 9.0.63 ``` -------------------------------- ### 获取表单模版字段定义示例 Source: https://open.xbongbong.com/openapi/faq 通过调用表单模版接口获取的字段定义结构,用于指导新建或编辑操作中 dataList 的数据填充。 ```json [ { "accuracy":2, "attr":"text_1", "attrName":"客户名称", "dateType":"yyyy-MM-dd HH:mm", "fieldType":1, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":1, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":1 }, { "accuracy":2, "attr":"text_2", "attrName":"客户简称", "dateType":"yyyy-MM-dd HH:mm", "fieldType":1, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"subForm_1", "attrName":"客户电话", "dateType":"yyyy-MM-dd HH:mm", "fieldType":20003, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":1, "subFieldList":Array[2] }, { "accuracy":2, "attr":"address_1", "attrName":"客户地址", "dateType":"", "fieldType":12, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_4", "attrName":"客户状态", "dateType":"yyyy-MM-dd HH:mm", "fieldType":3, "integerOnly":0, "items":Array[6], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_18", "attrName":"客户阶段", "dateType":"yyyy-MM-dd HH:mm", "fieldType":3, "integerOnly":0, "items":Array[7], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_19", "attrName":"流失原因", "dateType":"yyyy-MM-dd HH:mm", "fieldType":3, "integerOnly":0, "items":Array[5], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_22", "attrName":"流失备注", "dateType":"yyyy-MM-dd HH:mm", "fieldType":7, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_3", "attrName":"客户类型", "dateType":"yyyy-MM-dd HH:mm", "fieldType":3, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_5", "attrName":"客户性质", "dateType":"yyyy-MM-dd HH:mm", "fieldType":3, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_6", "attrName":"客户分级", "dateType":"yyyy-MM-dd HH:mm", "fieldType":3, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_7", "attrName":"客户行业", "dateType":"yyyy-MM-dd HH:mm", "fieldType":3, "integerOnly":0, "items":Array[15], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"num_1", "attrName":"重要程度", "dateType":"yyyy-MM-dd HH:mm", "fieldType":10, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_9", "attrName":"客户来源", "dateType":"yyyy-MM-dd HH:mm", "fieldType":3, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }, { "accuracy":2, "attr":"text_10", "attrName":"客户官网", "dateType":"yyyy-MM-dd HH:mm", "fieldType":1, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":0 }] ``` -------------------------------- ### List Interface Query Parameters Source: https://open.xbongbong.com/openapi/params Standard structure for querying list data with pagination and filtering. ```APIDOC ## List Query Parameters ### Description Standard input structure for retrieving paginated list data with optional filtering. ### Parameters - **corpid** (String) - Required - Company ID. - **userId** (String) - Optional - Operator ID. - **formId** (Long) - Optional - Form ID. - **conditions** (Array) - Optional - Filtering criteria. - **page** (Integer) - Optional - Page number, default 1. - **pageSize** (Integer) - Optional - Items per page, default 20, max 100. ### Request Example { "formId": 19274, "conditions": [ { "attr": "text_1", "symbol": "equal", "value": ["apiTest.001"] } ], "page": 1, "pageSize": 20, "corpid": "lsj", "userId": "xbbTest001" } ``` -------------------------------- ### Specification Field Source: https://open.xbongbong.com/openapi/params Represents a product specification field. ```json { "text_5": "苹果味" } ``` -------------------------------- ### 多行文本字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为7的多行文本控件入参。 ```json { "text_2": "多行文本" } ``` -------------------------------- ### 单行文本字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为1的单行文本控件入参。 ```json { "text_1": "单行文本" } ``` -------------------------------- ### 附件字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为8的附件控件入参,包含文件名、URL、扩展名及大小。 ```json { "file_2": [ { "filename": "图片.png", //文件名-必填 "attachIndex": "https://cdn.xbongbong.com/xbbProLocal/1/1/png/156758413569081fceb5483a6e40248d4e3170d555e45.png", //URL 地址-必填 "ext": "png", //文件类型-必填 "size": 31872 // 文件大小-不必填 },{ "filename": "图片2.png", //文件名-必填 "attachIndex": "https://cdn.xbongbong.com/xbbProLocal/1/1/png/156758413569081fceb5483a6e40248d4e3170d555e88.png", //URL 地址-必填 "ext": "png", //文件类型-必填 "size": 31872 // 文件大小-不必填 } ] } ``` -------------------------------- ### API 请求签名规则 Source: https://open.xbongbong.com/openapi 所有 API 请求需在 HTTP Header 中携带 sign 参数。签名计算方式为:SHA256(压缩后的请求参数JSON + token)。 ```APIDOC ### 签名生成方式 1. 将请求参数进行 JSON 压缩(去除空格、换行)。 2. 将压缩后的参数字符串与 token 拼接。 3. 对拼接后的字符串进行 SHA256 运算得到 sign。 4. 将 sign 放入 HTTP Header 中。 #### 示例 请求参数: `{"corpid":"1","userId":"1"}` token: `123456789` sign = SHA256({"corpid":"1","userId":"1"}123456789) = 8f58cbe2c34129dc85c9cf4d2a921d3b112c996ac727a8697a5479de5a9f3f9a ``` -------------------------------- ### 生成API请求签名示例 Source: https://open.xbongbong.com/openapi 展示请求参数与Token拼接后进行SHA256运算的签名过程。 ```text {"corpid":"1","userId":"1"} ``` ```text sign = SHA256(请求参数+ token) = SHA256({"corpid":"1","userId":"1"}123456789) = 8f58cbe2c34129dc85c9cf4d2a921d3b112c996ac727a8697a5479de5a9f3f9a ``` ```text {"corpid":"1" , "userId" : "1" ,"text_2" : "张三"} ``` ```text sign = SHA256(请求参数+ token) = SHA256({"corpid":"1" , "userId" : "1" ,"text_2" : "张三"}123456789) = 9a9facf6d6a7abe0e647e2bc350fed527fc943657a7596f8a2329f7a6f90f47f ``` ```text {"corpid":"1","userId":"1","text_2":"\张三\"} ``` ```text sign = SHA256(请求参数 + token) = SHA256({"corpid":"1","userId":"1","text_2":"\张三\"}123456789) = fcd6620ce5ccbec35178795a226d325c443799b2261e6d091401855bc43ecb83 ``` -------------------------------- ### 新建编辑数据参数拼接示例 Source: https://open.xbongbong.com/openapi 展示更新特定字段时的参数拼接格式。 ```json { "corpid": "贵公司corpid", "dataId": 更新的数据id, "dataList": { "text_2": "销帮帮" } } ``` -------------------------------- ### 音频字段入参 Source: https://open.xbongbong.com/openapi/params 音频控件入参,需包含钉钉组件返回的mediaId。 ```json { "file_4": [ "{\"mediaId\":\"@lATPDgQ9rBeu6x3OGpagys57KrvR\",\"time\":4}" ] } ``` -------------------------------- ### API请求参数示例 Source: https://open.xbongbong.com/openapi/api_test 用于测试API接口的JSON格式参数示例。 ```json ``` -------------------------------- ### 图片字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为6的图片控件入参,以URL数组形式传递。 ```json { "file_1": [ "https://cdn.xbongbong.com/xbbProLocal/1/1/png/156758412881981fceb5483a6e40248d4e3170d555e45.png?1567584128793", "https://cdn.xbongbong.com/xbbProLocal/1/1/png/78gh2456923234lkjtr3223457a6756702dsgf4668sd1.png?1567584128793" ] } ``` -------------------------------- ### Associated Product Field Source: https://open.xbongbong.com/openapi/params Represents associated product data, including new and existing product entries. ```json { "array_4": [ //新增关联产品 { "text_1": 2175003, //子产品id "num_3": 100, "num_4": 100, "num_6": 1.5, "text_3": "备注" }, //编辑关联产品 { "productSubId": 9258668, "text_1": 2175003, //子产品id "num_3": 100, "num_4": 100, "num_6": 1.5, "text_3": "备注" } //其它没有传的关联产品,将被删除 ] } ``` -------------------------------- ### 配置API白名单示例 Source: https://open.xbongbong.com/openapi 设置公网可访问的IPv4地址,多IP之间使用竖线分隔。 ```text 122.233.154.195|12.56.4.197 ``` -------------------------------- ### 关联数据多选筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=10032的关联数据多选字段筛选。 ```json 等于 { "attr":"array_5", "symbol":"equal", "value":[299, 557] } 包含任意一个 { "attr":"array_5", "symbol":"include", "value":[299, 557] } 同时包含 { "attr":"array_5", "symbol":"allinclude", "value":[299, 557] } 为空 { "attr":"array_5", "symbol":"empty", "value":[] } 不为空 { "attr":"array_5", "symbol":"noempty", "value":[] } ``` -------------------------------- ### List Interface Unified Input Source: https://open.xbongbong.com/openapi/params Standard input structure for list query interfaces. ```json { "formId": 19274, "conditions": [ { "attr": "text_1", "symbol": "equal", "value": [ "apiTest.001" ] } ], "page": 1, "pageSize": 20, "corpid": "lsj", "userId": "xbbTest001" } ``` -------------------------------- ### 复选框组字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为9的复选框组控件入参,值为items中的text值数组。 ```json { "array_1": [ "选项值1", "选项值2", "选项值3" ] } ``` -------------------------------- ### WebHook Callback Source: https://open.xbongbong.com/openapi/webhook The system sends an HTTP POST request to the configured callback URL when data changes occur. The request body contains the details of the modified data. ```APIDOC ## POST [Callback URL] ### Description Receives a notification when data within the CRM system is modified. The request is sent as a JSON payload. ### Method POST ### Request Body - **corpid** (String) - Company ID - **dataId** (Long) - Business primary key ID - **formId** (Long) - Form template ID - **operate** (String) - Operation type (new, edit, delete, completelyDelete, archived, cancelArchived) - **saasMark** (int) - 1: System template data, 2: Custom form data - **type** (String) - Callback business type ### Request Example { "corpid": "XXX", "dataId": 594347, "formId": 10929, "operate": "edit", "saasMark": 1, "type": "customer" } ### Response #### Success Response (2XX) - The receiver must return a 2XX status code within 3 seconds to acknowledge receipt. ``` -------------------------------- ### 关联业务多选筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=20002的关联业务多选字段筛选。 ```json 等于任意一个 { "attr":"text_81", "symbol":"in", "value":["27073400", "15699"] } ``` -------------------------------- ### 成员多选字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为10010的成员多选控件入参,值为userId数组。 ```json { "array_3": [ "xbbTest001", "xbbTest002" ] } ``` -------------------------------- ### 数字字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为2的数字控件入参。 ```json { "num_1": 123 } ``` -------------------------------- ### 单选按钮字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为10000的单选按钮控件入参。 ```json { "text_3": "选项值1" } ``` -------------------------------- ### 签名校验计算示例 Source: https://open.xbongbong.com/openapi/webhook 展示了如何通过 SHA256 算法对请求参数与 token 进行拼接校验。 ```json { "corpid":"XXX", "dataId":594347, "formId":10929, "operate":"edit", "saasMark":1, "type":"customer" } ``` ```text checkSign = SHA256(请求参数+token) = SHA256({"corpid":"XXX","dataId":594347,"formId":10929,"operate":"edit","saasMark":1,"type":"customer"}123456789) = 190fcd3d7ab9f26e6344e995ae4ce4fdc3040e1d2b082c110b3334aec0bc68ae ``` -------------------------------- ### 请求简单接口参数示例 Source: https://open.xbongbong.com/openapi 展示请求部门列表接口的参数结构。 ```json { "corpid": "lsj" } ``` -------------------------------- ### 普通字段查询条件示例 Source: https://open.xbongbong.com/openapi/faq 展示如何根据字段解释获取 attr 并构建基础查询条件。 ```json { "accuracy":2, "attr":"text_6", "attrName":"备注", "dateType":"yyyy-MM-dd HH:mm", "fieldType":1, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":1 } ``` ```json [{ "attr":"text_6", "symbol":"equal", "value":["备注memo"] }] ``` -------------------------------- ### 下拉框字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为3的下拉框控件入参,值为items中的text值。 ```json { "text_4": "选项值1" } ``` -------------------------------- ### 成员多选筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=10010的成员多选字段筛选。 ```json 等于 { "attr":"array_4", "symbol":"equal", "value":["userId1", "userId2"] } 不等于 { "attr":"array_4", "symbol":"noequal", "value":["userId1", "userId2"] } 包含任意一个 { "attr":"array_4", "symbol":"include", "value":["userId1", "userId2"] } 同时包含 { "attr":"array_4", "symbol":"allinclude", "value":["userId1", "userId2"] } 为空 { "attr":"array_4", "symbol":"empty", "value":[] } 不为空 { "attr":"array_4", "symbol":"noempty", "value":[] } ``` -------------------------------- ### Follow-up Business Field Source: https://open.xbongbong.com/openapi/params Represents a follow-up business record structure. ```json { "text_5": { "businessType": 201, //跟进业务类型 "id": 2130, //关联业务dataId "name": "SO.20190925011" //关联业务name } } ``` -------------------------------- ### Configure List Sorting Source: https://open.xbongbong.com/openapi/params Use the sortMap object to define custom sorting fields and order for list API requests. ```json { "formId": 1102430, "conditions": [ { "attr": "addTime", "symbol": "range", "value": [ "1660492800", "1662443568" ] } ], "sortMap": { "field": "addTime", "sort": "desc" }, "corpid":"ding45b220254ed2e97335c2f4657eb6378f" } ``` -------------------------------- ### 回调参数示例 Source: https://open.xbongbong.com/openapi/webhook 展示了 WebHook 回调请求体中包含的核心业务数据字段。 ```json { "corpid":"XXX", "dataId":594347, "formId":10929, "operate":"edit", "saasMark":1, "type":"customer" } ``` -------------------------------- ### Owner ID Field Source: https://open.xbongbong.com/openapi/params Represents a list of user IDs for the owner field. ```json { "ownerId": [ "xbbTest001", "xbbTest002" ] } ``` -------------------------------- ### 子表单字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为10006的子表单控件入参,支持新增、编辑和删除操作。 ```json { "subForm_1": [ //新建 { "subStatus": 1, "text_1": "文本", "num_1": 123 }, //编辑 { "subDataId": 23, "subStatus": 2, "text_1": "文本1", "num_1": 123 }, //删除 { "subDataId": 24, "subStatus": 3, } ] } ``` -------------------------------- ### 部门多选筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=10012及fieldType=800000的部门多选或标签字段筛选。 ```json 等于 { "attr":"array_7", "symbol":"equal", "value":[5, 16] } 不等于 { "attr":"array_7", "symbol":"noequal", "value":[5, 16] } 包含任意一个 { "attr":"array_7", "symbol":"include", "value":[5, 16] } 同时包含 { "attr":"array_7", "symbol":"allinclude", "value":[5, 16] } 为空 { "attr":"array_7", "symbol":"empty", "value":[] } 不为空 { "attr":"array_7", "symbol":"noempty", "value":[] } ``` -------------------------------- ### 子表单字段查询条件示例 Source: https://open.xbongbong.com/openapi/faq 展示子表单场景下如何使用 attr 和 subAttr 构建查询条件。 ```text 注:子表单中的字段查询时attr为子表单的attr,subAttr为查询字段的attr。 ``` ```json { "accuracy":2, "attr":"subForm_1", "attrName":"客户电话", "fieldType":20003, "integerOnly":0, "items":Array[3], "multiple":0, "noRepeat":0, "numericalLimits":Object{...}, "numericalLimitsFlag":0, "required":1, "subForm":[{ "attr": "text_1", "fieldType": 3, "attrName":"类型" ... },{ "attr": "text_2", "fieldType": 1, "attrName":"电话" ... }] } ``` ```json [{ "attr":"subForm_1", "subAttr": "text_2", "symbol":"equal", "value":["13700000000"] }] ``` -------------------------------- ### Error Handling Source: https://open.xbongbong.com/openapi/api_test Standard error response format for API requests. ```APIDOC ## Error Handling Every API request returns a `code` and `msg` field. ### Response Codes - **1**: Successful request. - **Other**: Refer to the `msg` field for specific error details. ``` -------------------------------- ### 下拉复选框字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为10001的下拉复选框控件入参。 ```json { "array_2": [ "选项值1", "选项值2" ] } ``` -------------------------------- ### 部门单选筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=10011及fieldType=10016的部门单选字段筛选。 ```json 等于 { "attr":"text_28", "symbol":"equal", "value":[5] } 不等于 { "attr":"text_28", "symbol":"noequal", "value":[5] } 等于任意一个 { "attr":"text_28", "symbol":"in", "value":[5, 16] } 不等于任意一个 { "attr":"text_28", "symbol":"noin", "value":[5, 16] } 为空 { "attr":"text_28", "symbol":"empty", "value":[] } 不为空 { "attr":"text_28", "symbol":"noempty", "value":[] } ``` -------------------------------- ### Data Retrieval Detail Interface Source: https://open.xbongbong.com/openapi/params Retrieves the full data record for a specific entry using its unique identifier. ```APIDOC ### Description Retrieves the full data record for a specific entry. Associated business data must be fetched via their respective detail interfaces. ### Parameters #### Request Body - **corpid** (String) - Required - Company ID. - **dataId** (Long) - Required - Data ID (record primary key). - **userId** (String) - Optional - Current operator's DingTalk ID. ### Request Example { "dataId": 310992, "corpid": "lsj", "userId": "xbbTest001" } ``` -------------------------------- ### 成员单选筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=10009的成员单选字段筛选。 ```json 等于 { "attr":"text_24", "symbol":"equal", "value":["userId"] } 不等于 { "attr":"text_24", "symbol":"noequal", "value":["userId"] } 等于任意一个 { "attr":"text_24", "symbol":"in", "value":["userId1", "userId2"] } 不等于任意一个 { "attr":"text_24", "symbol":"noin", "value":["userId1", "userId2"] } 为空 { "attr":"text_24", "symbol":"empty", "value":[] } 不为空 { "attr":"text_24", "symbol":"noempty", "value":[] } ``` -------------------------------- ### 成员单选字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为10009的成员单选控件入参,值为userId。 ```json { "text_7": "xbbTest001" } ``` -------------------------------- ### Request Detail or Delete Operations Source: https://open.xbongbong.com/openapi/params Standard input structure for retrieving or deleting specific records using dataId and corpid. ```json { "dataId": 310992, "corpid": "lsj", "userId": "xbbTest001" } ``` -------------------------------- ### List Filtering Conditions Source: https://open.xbongbong.com/openapi/params Standard filter structures for basic text and identifier fields. ```json 等于 { "attr":"text_21", "symbol":"equal", "value":["765462a3-a0d9-8dcb-d515-1ca050388244"] } 不等于 { "attr":"text_21", "symbol":"noequal", "value":["765462a3-a0d9-8dcb-d515-1ca050388244"] } 等于任意一个 { "attr":"text_21", "symbol":"in", "value":["49b4ec7f-965b-c431-5fb2-63d630a67e08","765462a3-a0d9-8dcb-d515-1ca050388244"] } 不等于任意一个 { "attr":"text_21", "symbol":"noin", "value":["49b4ec7f-965b-c431-5fb2-63d630a67e08","765462a3-a0d9-8dcb-d515-1ca050388244"] } 为空 { "attr":"text_21", "symbol":"empty", "value":[] } 不为空 { "attr":"text_21", "symbol":"noempty", "value":[] } ``` -------------------------------- ### 关联产品筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=20004的关联产品字段筛选。 ```json 包含任意一个,value为关联产品的id(子产品id) { "attr":"array_4", "symbol":"include", "value":[18324984, 13239456] } ``` -------------------------------- ### Standard API Response Formats Source: https://open.xbongbong.com/openapi/params Standardized JSON response structures for successful and failed API requests. ```json { "code": 1, "msg": "操作成功", "result": { }, "success": true } ``` ```json { "code": 100404, "msg": "XXX", "success": false } ``` -------------------------------- ### 日期字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为4的日期控件入参,需传入标准Unix时间戳(秒)。 ```json { "date_1": 1567526400 } ``` -------------------------------- ### 创建人筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=10013的创建人字段筛选。 ```json 等于 { "attr":"creatorId", "symbol":"equal", "value":["userId"] } 不等于 { "attr":"creatorId", "symbol":"noequal", "value":["userId"] } 等于任意一个 { "attr":"creatorId", "symbol":"in", "value":["userId1", "userId2"] } 不等于任意一个 { "attr":"creatorId", "symbol":"noin", "value":["userId1", "userId2"] } 为空 { "attr":"creatorId", "symbol":"empty", "value":[] } 不为空 { "attr":"creatorId", "symbol":"noempty", "value":[] } ``` -------------------------------- ### 子表单字段筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=10006的子表单字段筛选,通过subAttr指定子字段。 ```json 查询子表单(subForm_1)下字段(text_2),其中symbol、value都是text_2的条件,可以通过subAttr的fieldType拼接 { "attr":"subForm_1", "subAttr":"text_2", "symbol":"equal", "value":["18898765432"] } ``` -------------------------------- ### 部门单选字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为10011的部门单选控件入参,值为部门id。 ```json { "text_8": 1 } ``` -------------------------------- ### 地址字段入参 Source: https://open.xbongbong.com/openapi/params fieldType为12的地址控件入参,包含省市区及详细地址。 ```json { "address_1": { "city": "石家庄市", "address": "撒发生大", "district": "长安区", "province": "河北省" } } ``` -------------------------------- ### Date Field Filtering Source: https://open.xbongbong.com/openapi/params Filters for date, creation time, and modification time fields using Unix timestamps. ```json 等于 { "attr":"date_5", "symbol":"equal", "value":[1712073600] } 不等于 { "attr":"date_5", "symbol":"noequal", "value":[1712073600] } 大于 { "attr":"date_5", "symbol":"greatethan", "value":[1712073600] } 大于等于 { "attr":"date_5", "symbol":"greaterequal", "value":[1712073600] } 小于 { "attr":"date_5", "symbol":"lessthan", "value":[1712073600] } 小于等于 { "attr":"date_5", "symbol":"lessequal", "value":[1712073600] } 为空 { "attr":"date_5", "symbol":"empty", "value":[] } 不为空 { "attr":"date_5", "symbol":"noempty", "value":[] } 选择范围,以下例子相当于:大于等于1711987200且小于1712073600 { "attr":"date_5", "symbol":"range", "value":[1711987200,1712073600] } ``` -------------------------------- ### 负责人筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=10017的负责人字段筛选。 ```json 等于 { "attr":"ownerId", "symbol":"equal", "value":["userId1", "userId2"] } 不等于 { "attr":"ownerId", "symbol":"noequal", "value":["userId1", "userId2"] } 包含任意一个 { "attr":"ownerId", "symbol":"include", "value":["userId1", "userId2"] } 不为空 { "attr":"ownerId", "symbol":"noempty", "value":[] } ``` -------------------------------- ### 产品分类筛选条件 Source: https://open.xbongbong.com/openapi/params 适用于fieldType=10023的产品分类字段筛选。 ```json 等于 { "attr":"num_13", "symbol":"equal", "value":[271] } ``` -------------------------------- ### Department ID Field Source: https://open.xbongbong.com/openapi/params Represents a department ID field. ```json { "departmentId": 1 } ```