# 查询企业字段ID

> 获取配置中心客户设置中的企业字段设置列表，用于查询企业列表，建立字段与字段详情的对应关系

```
POST https://qw-openapi-tx.dustess.com/enterprise/v2/fieldConf?accessToken=

Content-Type: application/json
```

**接口限制**：每分钟调用600次；

**Params:**

| 字段        | 类型     | 描述        | 是否必须 |
| ----------- | -------- | ----------- | -------- |
| accessToken | `String` | accessToken | true     |

**Body:**

| 名称       | 类型        | 是否必须 | 默认值 | 备注             |
| ---------- | ---------- | ------- | ---- | ---------------- |
| fieldType  | `String[]` | 否      |       | 字段类型，枚举值有CustomerFieldTypeSDF 系统字段、CustomerFieldTypeUDF 自定义字段，不传入获取所有类型字段 |
| enabled    | `Bool`     | 否      |       | 是否停启用，true获取启用字段 false获取停用字段，不传入获取所有状态字段 |
| categoryID | `String`   | 否      |       | 企业类型ID，传入仅返回单个企业类型下的字段，不传入则不限定企业类型 |

**成功响应**

| 响应参数名          | 类型       | 说明                                                          |
| ------------------- | ---------- | ------------------------------------------------------------- |
| success                      | `Bool`     | 请求状态，true：成功，false：失败_Allowed values: true,false_ |
| code                         | `Int`      | 响应码_Allowed values: 0,1_                                   |
| msg                          | `String`   | 消息提示                                                      |
| data                         | `Object`   | 数据信息                                                      |
| data.stable                  | `Object[]` | 系统字段                                                      |
| data.stable.id               | `String`   | 字段标识id                                                    |
| data.stable.name             | `String`   | 字段名称                                                      |
| data.stable.label            | `Bool`     | 展示值                                                      |
| data.stable.enabled          | `Bool`     | 是否启用                                                      |
| data.stable.required         | `String[]` | 是否必填                                                    |
| data.stable.editable         | `Bool`     | 是否可编辑                                                      |
| data.stable.options          | `Object[]`   |  选项                                                     |
| data.stable.options.id       | `String`   |  选项标识id                                                     |
| data.stable.options.value    | `String`   |  选项名称                                                     |
| data.stable.options.enable   | `Bool`   |  是否启用                                                     |
| data.stable.options.allowDel | `Bool`   |  是否可删除                                                     |
| data.udf                                                            | `object[]`          | 自定义字段                                                                                                                                                                                                  |
| data.udf.column_id                                                  | `uint64`            | 字段雪花ID                                                                                                                                                                                                  |
| data.udf.column_name                                                | `string`            | 字段业务ID，新增编辑时使用该ID对字段进行操作                                                                                                                                                                |
| data.udf.column_type                                                | `string`            | 字段类型：string 单行文本；float 数字；datetime 日期时间；date 日期；text 多行文本；single_choice 单选项；multiple_choice 多选项；file 附件；single_cascader 多级联选-单选；multiple_cascader 多级联选-多选 |
| data.udf.column_name_full                                           | `string`            | 字段显示名称                                                                                                                                                                                                |
| data.udf.column_description                                         | `string`            | 提示文案                                                                                                                                                                                                    |
| data.udf.column_required                                            | `bool`              | 是否启用, true: 必填, false: 非必填                                                                                                                                                                         |
| data.udf.column_indexed                                             | `bool`              | 是否索引, true: 启用, false: 未启用                                                                                                                                                                         |
| data.udf.column_unique                                              | `bool`              | 是否限定值唯一, true: 限定唯一, false: 不限定                                                                                                                                                               |
| data.udf.column_is_del                                              | `bool`              | 是否被删除, true: 已删除, false: 未删除                                                                                                                                                                     |
| data.udf.column_closed                                              | `bool`              | 是否被停用, true: 已停用, false: 未停用                                                                                                                                                                     |
| data.udf.column_relation                                            | `bool`              | 是否被模版关联, true: 已关联, false: 未关联                                                                                                                                                                 |
| data.udf.column_verify_rule                                         | `string`            | 校验规则                                                                                                                                                                                                    |
| data.udf.column_order                                               | `int`               | 模版中字段排序位置                                                                                                                                                                                          |
| data.udf.column_field_biz_classify                                  | `string`            | 字段业务类型：UDF 用户自定义字段；SDF 系统预设字段                                                                                                                                                          |
| data.udf.column_field_enums                                         | `object[]`          | 单选/多选字段选项                                                                                                                                                                                           |
| data.udf.column_field_enums.enum_name                               | `string`            | 选项显示名称                                                                                                                                                                                                |
| data.udf.column_field_enums.enum_value                              | `string`            | 选项ID，编辑存储时传递                                                                                                                                                                                      |
| data.udf.column_field_enums.is_del                                  | `bool`              | 选项是否被删除, true: 已删除, false: 未删除                                                                                                                                                                 |
| data.udf.column_type_constraint                                     | `map[string]object` | 字段约束                                                                                                                                                                                                    |
| data.udf.column_type_constraint.multiple_cascader                   | `map[string]object` | 字段约束-多级联选多选相关约束                                                                                                                                                                               |
| data.udf.column_type_constraint.multiple_cascader.parent_can_select | `bool`              | 字段约束-多级联选多选父级是否可选父级, true: 可选父级, false/或字段key不存在: 仅选最后一级                                                                                                                  |
| data.udf.column_type_constraint.multiple_cascader                   | `map[string]object` | 字段约束-多级联选单选相关约束                                                                                                                                                                               |
| data.udf.column_type_constraint.single_cascader.parent_can_select   | `bool`              | 字段约束-多级联选单选父级是否可选父级, true: 可选父级, false/或字段key不存在: 仅选最后一级                                                                                                                  |


**成功响应示例**

```json
{
    "success": true,
    "msg": "",
    "data": {
        "stable": [
            {
                "options": [],
                "id": "fullName",
                "name": "企业全称",
                "label": "企业全称",
                "enabled": true,
                "required": true,
                "editable": false
            },
            {
                "options": [],
                "id": "name",
                "name": "企业简称",
                "label": "企业简称",
                "enabled": true,
                "required": false,
                "editable": false
            },
            {
                "options": [],
                "id": "tel",
                "name": "联系电话",
                "label": "联系电话",
                "enabled": true,
                "required": false,
                "editable": true
            },
            {
                "options": [],
                "id": "web",
                "name": "企业网址",
                "label": "企业网址",
                "enabled": true,
                "required": false,
                "editable": true
            },
            {
                "options": [],
                "id": "address",
                "name": "地址",
                "label": "地址",
                "enabled": true,
                "required": false,
                "editable": true
            },
            {
                "options": [],
                "id": "industry",
                "name": "行业类型",
                "label": "行业类型",
                "enabled": true,
                "required": false,
                "editable": true
            },
            {
                "options": [],
                "id": "peoples",
                "name": "人员规模",
                "label": "人员规模",
                "enabled": true,
                "required": false,
                "editable": true
            },
            {
                "options": [],
                "id": "prov_city",
                "name": "省市",
                "label": "省市",
                "enabled": true,
                "required": false,
                "editable": true
            },
            {
                "options": [
                    {
                        "id": "ordinary",
                        "value": "普通",
                        "enable": true,
                        "allowDel": false
                    },
                    {
                        "id": "important",
                        "value": "重要",
                        "enable": true,
                        "allowDel": false
                    }
                ],
                "id": "level",
                "name": "企业等级",
                "label": "企业等级",
                "enabled": true,
                "required": false,
                "editable": true
            },
            {
                "options": [],
                "id": "sourceCode",
                "name": "来源",
                "label": "来源",
                "enabled": true,
                "required": false,
                "editable": true
            },
            {
                "options": [],
                "id": "code",
                "name": "企业编码",
                "label": "企业编码23",
                "enabled": true,
                "required": false,
                "editable": true
            }
        ],
        "udf": [
            {
                "columnId": 1689542801483816960,
                "columnName": "biz_id",
                "columnType": "string",
                "columnNameFull": "业务ID",
                "columnRequired": true,
                "columnIndexed": true,
                "columnUnique": true,
                "columnRelation": true,
                "columnFieldBizClassify": "SDF",
                "columnTypeConstraint": {}
            },
            {
                "columnId": 1689543084934881280,
                "columnName": "6adpqc-ll4uqr23",
                "columnType": "string",
                "columnNameFull": "lys1-单行文本",
                "columnFieldBizClassify": "UDF",
                "columnTypeConstraint": {}
            },
            {
                "columnId": 1689543084934881281,
                "columnName": "pj67io-ll4uqr23",
                "columnType": "text",
                "columnNameFull": "lys1-多行文本",
                "columnOrder": 1,
                "columnFieldBizClassify": "UDF",
                "columnTypeConstraint": {}
            },
            {
                "columnId": 1689543084934881282,
                "columnName": "ytwhyh-ll4uqr23",
                "columnType": "float",
                "columnNameFull": "lys1-数字",
                "columnOrder": 2,
                "columnFieldBizClassify": "UDF",
                "columnTypeConstraint": {
                    "float": {
                        "type": "no_limit"
                    }
                }
            },
            {
                "columnId": 1689543084934881283,
                "columnName": "wbwsja-ll4uqr23",
                "columnType": "single_choice",
                "columnNameFull": "lys1-单选项",
                "columnOrder": 3,
                "columnFieldBizClassify": "UDF",
                "columnFieldEnums": [
                    {
                        "name": "选项1",
                        "value": "1"
                    },
                    {
                        "name": "选项2",
                        "value": "2"
                    },
                    {
                        "name": "选项3",
                        "value": "3"
                    }
                ],
                "columnTypeConstraint": {}
            },
            {
                "columnId": 1689543084934881287,
                "columnName": "2rph93-ll4uqr23",
                "columnType": "multiple_choice",
                "columnNameFull": "lys1-多选项",
                "columnRequired": true,
                "columnOrder": 4,
                "columnFieldBizClassify": "UDF",
                "columnFieldEnums": [
                    {
                        "name": "选项1",
                        "value": "1"
                    },
                    {
                        "name": "选项2",
                        "value": "2"
                    },
                    {
                        "name": "选项3",
                        "value": "3"
                    }
                ],
                "columnTypeConstraint": {}
            },
            {
                "columnId": 1689543084934881291,
                "columnName": "tqlcsb-ll4uqr23",
                "columnType": "date",
                "columnNameFull": "lys1-日期",
                "columnOrder": 5,
                "columnFieldBizClassify": "UDF",
                "columnTypeConstraint": {}
            },
            {
                "columnId": 1689543084934881292,
                "columnName": "mzoc7c-ll4uqr23",
                "columnType": "datetime",
                "columnNameFull": "lys1-日期时间",
                "columnOrder": 6,
                "columnFieldBizClassify": "UDF",
                "columnTypeConstraint": {
                    "datetime": {
                        "type": "yyyy-MM-dd HH:mm"
                    }
                }
            },
            {
                "columnId": 1689543084934881293,
                "columnName": "d2v12d-ll4uqr23",
                "columnType": "file",
                "columnNameFull": "lys1-附件",
                "columnOrder": 7,
                "columnFieldBizClassify": "UDF",
                "columnTypeConstraint": {}
            },
            {
                "columnId": 1689543084934881294,
                "columnName": "yanyve-ll4uqr23",
                "columnType": "single_cascader",
                "columnNameFull": "lys1-级联-单选",
                "columnOrder": 8,
                "columnFieldBizClassify": "UDF",
                "columnTypeConstraint": {
                    "single_cascader": {}
                }
            },
            {
                "columnId": 1689543084934881295,
                "columnName": "dum07u-ll4uqr23",
                "columnType": "multiple_cascader",
                "columnNameFull": "lys1-级联-多选",
                "columnOrder": 9,
                "columnFieldBizClassify": "UDF",
                "columnTypeConstraint": {
                    "multiple_cascader": {}
                }
            }
        ]
    }
}
```

**错误响应示例**

```json
 {
    "success": false,
    "code": 10001,
    "msg": "system unknown error",
    "data": null
}
```
