功能说明:获取当前机构已启用的联系人字段信息(包括基础字段,自定义字段和表单字段)
请求方式:POST(HTTPS)
请求地址:https://qwif.do1.com.cn/qwcgi/api/crm/contacts/getContactsFields.do?token=token&corpId=corpId
CrmApi api = QwSdkUtil.getInter(CrmApi.class); // 调用接口 ApiCrmContactsFieldsResultVO result = api.getContactsFields(QwSdkUtil.getCacheToken()); System.out.println(JSONUtil.stringify(result));
{ "code":"0", "data": { "basicFields": [ { "fieldName":"name", "isNecessary":"true", "label":"姓名", "sort":1, "type":"TextField" }, { "fieldName":"client", "isNecessary":"true", "label":"所属客户", "sort":2, "type":"TextField" }, { "fieldName":"phone", "isNecessary":"false", "label":"手机", "sort":3, "type":"PhoneNumber" }, { "fieldName":"telephone", "isNecessary":"false", "label":"座机", "sort":4, "type":"PhoneNumber" }, { "fieldName":"position", "isNecessary":"false", "label":"职位", "sort":5, "type":"TextField" }, { "fieldName":"email", "isNecessary":"false", "label":"邮箱", "sort":6, "type":"Email" }, { "fieldName":"birthday", "isNecessary":"false", "label":"生日", "sort":7, "type":"Date" }, { "fieldName":"schoolName", "isNecessary":"false", "label":"毕业院校", "sort":8, "type":"TextField" }, { "fieldName":"hobby", "isNecessary":"false", "label":"兴趣爱好", "sort":9, "type":"TextField" }, { "fieldName":"remark", "isNecessary":"false", "label":"备注", "sort":10, "type":"TextArea" } ], "customFields": [ { "customFieldId":"76d25030a1def2da7c5b86885df03d93", "desc":"单行文本", "isNecessary":"false", "label":"单行", "sort":1, "type":"TextField" }, { "customFieldId":"17bbe0977f5175390e4b92c0d2dafb95", "desc":"多行文本", "isNecessary":"false", "label":"多行", "sort":2, "type":"TextArea" }, { "choices": [ { "optionId":"bc8304b8b35943979173c2c3ae567bd0", "optionName":"选项1", "sort":1, "value":"1" }, { "optionId":"4d6601790faa4cf6893432aeab897d35", "optionName":"选项2", "sort":2, "value":"2" }, { "optionId":"e19d831da2bc4883a1883bd7cfc951f5", "optionName":"选项3", "sort":3, "value":"3" } ], "customFieldId":"72d9c4e51ad2dc78a43a9e7c7901378d", "isNecessary":"false", "label":"下拉", "sort":3, "type":"SelectField" }, { "customFieldId":"15a819243580b3c4a0ec6bddfd0d1adf", "desc":"联系方式", "isNecessary":"false", "label":"联系方式", "sort":4, "type":"PhoneNumber" }, { "customFieldId":"06043e8b8da7982cdf24758cf396c541", "isNecessary":"false", "label":"整数", "sort":5, "type":"Integer" }, { "customFieldId":"9cc624b395e2dc4054ffa989dd3d9465", "isNecessary":"false", "label":"小数", "sort":6, "type":"Double" }, { "customFieldId":"2a0e059174b67898183626bf90215033", "isNecessary":"false", "label":"百分比", "sort":7, "type":"Percent" } ], "seniorFields": [ { "fieldId":"fo4acf32007e5742c2ac001dc9a96e2be7", "fieldName":"(表单)单行文字", "isNecessary":"true", "note":"请输入", "sort":"1", "type":"TextField" }, { "fieldId":"fo0074c8bb21b943cbb674f75a867e0fac", "fieldName":"(表单)邮箱", "isNecessary":"false", "note":"请输入", "sort":"2", "type":"EmailField" }, { "fieldId":"fod3174d0bbc7449c080449c0cbbe6cc86", "fieldName":"(表单)数字", "isNecessary":"true", "note":"请输入", "sort":"3", "type":"NumberField" }, { "fieldId":"fo6d502db6136a4a1e821415f383b0ffaa", "fieldName":"(表单)电话", "isNecessary":"false", "note":"分隔请用-或空格,国际电话请加+", "sort":"4", "type":"TelephoneField" }, { "fieldId":"foc14e0347f57b40d283324c3b489f5d0f", "fieldName":"(表单)手机", "isNecessary":"false", "note":"请输入", "sort":"5", "type":"MobileField" }, { "fieldId":"fof58d5ec766514c53bdb4961110053575", "fieldName":"(表单)多行文字", "isNecessary":"false", "note":"请输入", "sort":"6", "type":"TextArea" }, { "fieldId":"fo375dfaeb87b241e681634b7dc8906bee", "fieldName":"(表单)日期", "isNecessary":"false", "note":"请选择", "sort":"7", "type":"DateField" }, { "fieldId":"fo855fd02dffc8461d984a12c119730df2", "fieldName":"(表单)时间", "isNecessary":"false", "note":"请选择", "sort":"8", "type":"TimeField" }, { "fieldId":"fo9a71a63280374c5b851de2f752d466a9", "fieldName":"(表单)日期时间", "isNecessary":"false", "note":"请选择", "sort":"9", "type":"DateTimeField" }, { "choices": [ { "optionId":"foe0cd24dc3f6440ebaf4014cc1506ae3e", "optionName":"选项1", "sort":1 }, { "optionId":"fobcb78b055b284d47819e249331d9eed2", "optionName":"选项2", "sort":2 }, { "optionId":"foe58efb490f6e4be28d4fdd63e8dac0e1", "optionName":"选项3", "sort":3 } ], "fieldId":"fo0dec944e2817445787141a96a9922aa2", "fieldName":"(表单)单项选择", "isNecessary":"false", "sort":"10", "type":"RadioButton" }, { "choices": [ { "optionId":"fo2a53981b22ec4d298b8f43ed41e99a82", "optionName":"选项1", "sort":1 }, { "optionId":"foe6b5df849f824a23bc95f48893218192", "optionName":"选项2", "sort":2 }, { "optionId":"fo30168fb6ce7d432f88e89858316146d5", "optionName":"选项3", "sort":3 } ], "fieldId":"foe59e667acacc46799d99e12d1af34fa9", "fieldName":"(表单)多项选择", "isNecessary":"false", "sort":"11", "type":"CheckBox" }, { "choices": [ { "optionId":"fo81a20466198c43fa87b7592e4db09d8c", "optionName":"选项1", "sort":1 }, { "optionId":"fo3ea9316e9eba49dfa816df1dd8441296", "optionName":"选项2", "sort":2 }, { "optionId":"fo6735fc627040495088f7de855c0e4020", "optionName":"选项3", "sort":3 } ], "fieldId":"fobfb40e3e839d441286fce7cb25f30618", "fieldName":"(表单)下拉框", "isNecessary":"false", "sort":"12", "type":"DropDown" }, { "choices": [ { "optionId":"foe19826c750d042b49eed2edc85f8763f", "optionName":"选项", "sort":1 }, { "optionId":"foe1652cf16c4b4c9182eb3a1dcc552e03", "optionName":"选项", "sort":2 }, { "optionId":"fo041f54152075400c825098dcdbfff441", "optionName":"选项", "sort":3 } ], "fieldId":"foa7b53a4b28a841bb8feffbca2efaae42", "fieldName":"(表单)评分", "isNecessary":"false", "sort":"13", "type":"RatingField" }, { "fieldId":"fo8cad6f5a58ba46558b9431d5204edb2b", "fieldName":"(表单)地理位置", "isNecessary":"false", "sort":"14", "type":"GeoField" }, { "fieldId":"fo192681ba68204d908e70f81066512a26", "fieldName":"(表单)说明项", "isNecessary":"false", "note":"请输入", "sort":"15", "type":"ImageCheckBox" }, { "fieldId":"fo7d684233347749e9916d69469a5963f1", "fieldName":"(表单)分节", "isNecessary":"false", "sort":"16", "type":"SectionBreak" }, { "fieldId":"fo03a32cded98b45f0802326e78a3422aa", "fieldName":"(表单)图片", "isNecessary":"false", "sort":"17", "type":"ImageField" }, { "fieldId":"focac8c53ef9344513adf316dd744fcc88", "fieldName":"(表单)附件", "isNecessary":"false", "sort":"18", "type":"AccessoryField" }, { "fieldId":"fo50ab5879143647ab903b8e57ecd1db44", "fieldName":"(表单)省市区", "isNecessary":"false", "sort":"19", "type":"CityField" }, { "fieldId":"fo33f8c688a7ee445a9f7c3c0f5fee89cc", "fieldName":"(表单)计算式", "isNecessary":"false", "note":"(表单)数字", "sort":"20", "type":"EquationField" }, { "choices": [ { "optionId":"fo6e892337a7f14bd29dab052e61fe9542", "optionName":"选项1:二级选项1", "sort":1 }, { "optionId":"fo6e892337a7f14bd29dab052e61fe9542", "optionName":"选项1:二级选项2", "sort":2 }, { "optionId":"foe7416257061342888ed9361dce544ef0", "optionName":"选项2:二级选项1", "sort":3 }, { "optionId":"foe7416257061342888ed9361dce544ef0", "optionName":"选项2:二级选项2", "sort":4 } ], "fieldId":"fo4a614a867c60409f814dbd1981f5f13f", "fieldName":"(表单)两级下拉框", "isNecessary":"false", "sort":"21", "type":"CascadeDropDown" }, { "fieldId":"fofc48b703309d44fa8c02099cafb50638", "fieldName":"(表单)微信扫码", "isNecessary":"false", "sort":"22", "type":"ImageRadioButton" }, { "fieldId":"fo21d3476b5a4647e584f85f78acf8f1f8", "fieldName":"(表单)流水号", "isNecessary":"false", "note":"请输入", "sort":"23", "type":"SerialNumberField" }, { "fieldId":"foe2d99bcf4fc0470b9326c408016a7295", "fieldName":"(表单)手写签名", "isNecessary":"false", "note":"请输入", "sort":"24", "type":"HandWrittenField" }, { "fieldId":"fo468250bcf0bb4a949a786b473349c561", "fieldName":"(表单)通讯录成员", "isNecessary":"false", "sort":"25", "type":"MEMBERCustomerField" }, { "fieldId":"foa2a9b2d6f631454080cdbe2b002af086", "fieldName":"(表单)部门", "isNecessary":"false", "sort":"26", "type":"DEPTCustomerField" } ] }, "desc":"成功" }
basicField参数
参数 | 说明 | 备注 |
---|---|---|
fieldName | 字段名 |
|
type | 字段类型 |
TextField:单行;TextArea:多行;SelectField:下拉选项;DateTime:日期; Number:浮点或整数;PhoneNumber:电话号码 |
label | 字段中文注释 |
|
isNecessary | 是否必须 |
|
sort | 排序号 |
|
choices | 选项choice数组 | 只有是SelectField类型才有值,其余未空数组[] |
customField参数
参数 | 说明 | 备注 |
---|---|---|
customFieldId | 自定义字段Id |
|
type | 自定义字段类型 |
TextField:单行;TextArea:多行;SelectField:下拉选项;DateTime:日期; Integer:整数;Double:小数;Percent:百分数;PhoneNumber:电话号码 |
label | 自定义字段中文注释 |
|
isNecessary | 是否必填 | 1:必填;0:非必填 |
sort | 排序号 |
|
desc | 自定义字段填写提示 |
|
choices | 选项choice数组 |
只有是SelectField类型才有值,其余未空数组[] |
seniorFields参数
参数 |
说明 |
备注 |
---|---|---|
fieldId |
表单字段ID |
|
fieldName |
表单字段名称 |
|
type |
字段类型 |
TextField(单行文字)、EmailField(邮箱)、NumberField(数字)、TelephoneField(电话)、MobileField(手机)、 MEMBERCustomerField(通讯录成员)、DEPTCustomerField(部门) |
isNecessary |
是否必填 |
true=必填,false=非必填 |
sort |
排序号 |
|
choices |
选项列表 |
只有 RadioButton(单项选择)、CheckBox(多项选择)、DropDown(下拉框)、RatingField(评分)、CascadeDropDown(两级下拉框) 才有值,其余为[] |
note |
填写提示 |
|
choice参数
参数 | 说明 | 备注 |
---|---|---|
optionId | 选项Id |
|
optionName | 选项名 |
|
sort | 排序号 |
|
value | 选项值 |
|