# 获取指定工单自定义字段

该接口用于获取工单自定义字段详情。

## 请求

基本 | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/helpdesk/v1/ticket_customized_fields/:ticket_customized_field_id
HTTP Method | GET
支持的应用类型 | Custom App
权限要求<br>**调用该 API 所需的权限。开启其中任意一项权限即可调用** | 获取服务台资源详情(helpdesk:all:readonly)

### 请求头

名称 | 类型 | 必填 | 描述
---|---|---|---
Authorization | string | 是 | `tenant_access_token`<br>**值格式**："Bearer `access_token`"<br>**示例值**："Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[了解更多：如何选择与获取 access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)
Content-Type | string | 是 | **固定值**："application/json; charset=utf-8"

**注意事项**：服务台请求Header中还需添加“服务台token”参数：

Key: X-Lark-Helpdesk-Authorization

Value: base64(helpdesk_id:helpdesk_token)，通过base64加密将helpdesk_id和helpdesk_token用':'连接而成的字符串。

[了解更多：获取与使用服务台token](https://open.feishu.cn/document/ukTMukTMukTM/ugDOyYjL4gjM24CO4IjN)

### 路径参数

名称 | 类型 | 描述
---|---|---
ticket_customized_field_id | string | 工单自定义字段ID<br>**示例值**："6948728206392295444"

## 响应

### 响应体

名称 | 类型 | 描述
---|---|---
code | int | 错误码，非 0 表示失败
msg | string | 错误描述
data | ticket_customized_field | \-
&emsp;∟&nbsp;ticket_customized_field_id | string | 工单自定义字段ID
&emsp;∟&nbsp;helpdesk_id | string | 服务台ID
&emsp;∟&nbsp;key_name | string | 键名
&emsp;∟&nbsp;display_name | string | 名称
&emsp;∟&nbsp;position | string | 字段在列表后台管理列表中的位置
&emsp;∟&nbsp;field_type | string | 类型
&emsp;∟&nbsp;description | string | 描述
&emsp;∟&nbsp;visible | boolean | 是否可见
&emsp;∟&nbsp;editable | boolean | 是否可以修改
&emsp;∟&nbsp;required | boolean | 是否必填
&emsp;∟&nbsp;created_at | string | 创建时间
&emsp;∟&nbsp;updated_at | string | 更新时间
&emsp;∟&nbsp;created_by | ticket_user | 创建用户
&emsp;&emsp;∟&nbsp;id | string | 用户ID
&emsp;&emsp;∟&nbsp;avatar_url | string | 用户头像url
&emsp;&emsp;∟&nbsp;name | string | 用户名
&emsp;&emsp;∟&nbsp;email | string | 用户邮箱
&emsp;∟&nbsp;updated_by | ticket_user | 更新用户
&emsp;&emsp;∟&nbsp;id | string | 用户ID
&emsp;&emsp;∟&nbsp;avatar_url | string | 用户头像url
&emsp;&emsp;∟&nbsp;name | string | 用户名
&emsp;&emsp;∟&nbsp;email | string | 用户邮箱
∟&nbsp;dropdown_options | dropdown_option | 下拉列表选项
&emsp;&emsp;∟&nbsp;children | dropdown_option[] | 选项列表
&emsp;&emsp;∟&nbsp;tag | string | 选项ID
&emsp;&emsp;∟&nbsp;display_name | string | 展示名称
&emsp;&emsp;∟&nbsp;children | dropdown_option[] | 同上：选项列表，只适用于多层下拉列表（最多可以设置三级下拉列表）
&emsp;∟&nbsp;dropdown_allow_multiple | boolean | 是否支持多选，仅在字段类型是dropdown的时候有效

### 响应体示例

```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "ticket_customized_field_id": "6834320707288072194",
        "helpdesk_id": "1542164574896126",
        "key_name": "test dropdown",
        "display_name": "test dropdown",
        "position": "3",
        "field_type": "dropdown",
        "description": "下拉示例",
        "visible": true,
        "editable": true,
        "required": false,
        "created_at": "1591239289000",
        "updated_at": "1591239289000",
        "created_by": {
            "id": "ou_37019b7c830210acd88fdce886e25c71",
            "avatar_url": "https://xxxx",
            "name": "abc",
            "email": "xxxx@abc.com"
        },
        "updated_by": {
            "id": "ou_37019b7c830210acd88fdce886e25c71",
            "avatar_url": "https://xxxx",
            "name": "abc",
            "email": "xxxx@abc.com"
        },
        "dropdown_options":{
         "children":[
            {
               "tag":"a2ac322d-8d8c-432e-9631-17c4acaddbf7",
               "display_name":"a"
            },
            {
               "tag":"67068d18-20c9-412e-afc0-714d0e8fac29",
               "display_name":"b"
            },
            {
               "tag":"d135b9f3-f260-49e6-bb7b-32e334a99caf",
               "display_name":"c"
            }
         ]
      },
        "dropdown_allow_multiple": true
    }
}
```

### 错误码

HTTP状态码 | 错误码 | 描述 | 排查建议
---|---|---|---
400 | 154000 | Bad request, please check your request body | 请求不合法，请检查参数
401 | 154001 | Unauthorized, please check you have the correct access | 检查Authorization 和 X-Lark-Helpdesk-Authorization 是否正确，应用和服务台属于同一租户
403 | 154003 | Please check you have the correct access | 检查是否申请正确权限
500 | 155000 | Internal error | 内部错误，请联系我们

