帮我吧文档:数据接口:工单:工单字段

查询工单自定义字段列表

请求参数

请求地址

GET /api/v1/tickets/ticket_fields.json

调用者权限

所有客服

调用示例

curl https://www.bangwo8.com/api/v1/tickets/ticket_fields.json -v -u  {bw8cs001}:{123456}

返回参数

名称 类型 注释
id int 字段id,系统自动分配
url varchar 字段的资源url
name varchar 字段名字
key varchar 字段的唯一标识
system tinyint 是否为系统字段,取值为:1-系统字段,0-自定义字段,默认为0
type int 字段类型,取值为:1-下拉列表,2-单行文本,3-多行文本,4-正整数,5-小数,6-复选框,7-正则表达式,8-日期(格式为:2018-02-03),11-表单,12-附件,13-评星,14-高级复选框,15-商品表,16-满意度评价表,17-电话类型的文本,20-资产表
isRequired tinyint 是否必选,取值为:1-非必选,0-必选
isReadonly tinyint 是否只读,取值为:1-只读,0-可编辑
readonly_range int 只读范围,只有isReadonly取值为1时,该参数才生效。取值为:1-所有客服,2-客服分组,3-客服,4-当前用户。
readonly_support varchar 当只读范围是某个客服时,该参数是客服id;当只读范围是某个客服分组时,该参数是客服分组id。
custom_field_options array 展示下拉列表选项或级联目录,如果字段类型是下拉列表,该字段会展示下拉列表的选项;如果字段是级联字段,会展示级联的多级目录;其他的字段类型展示为空。
custom_field_table array 表单的列,如果字段类型是表单或商品表单,该字段会有值。

返回示例

[
    {
        "id": "8769479",
        "name": "新梯数据表",
        "key": "field_1",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769482",
        "name": "电梯日常使用状况检查表",
        "key": "field_2",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769485",
        "name": "保养汇总表",
        "key": "field_3",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769488",
        "name": "电/扶梯保养记录表",
        "key": "field_4",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769491",
        "name": "曳引与强制驱动电梯日常维修保养记录单",
        "key": "field_5",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769494",
        "name": "深圳市特种设备安装改造大修告知书",
        "key": "field_6",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769551",
        "name": "深圳市特种设备安装改造大修告知书-告知设备清单",
        "key": "field_7",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769554",
        "name": "中华人民共和国特种设备安装改造维修许可证",
        "key": "field_8",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769557",
        "name": "安装确认表",
        "key": "field_9",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769560",
        "name": "安装完成表",
        "key": "field_10",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769563",
        "name": "工人签字",
        "key": "field_11",
        "type": "23",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769569",
        "name": "主管签字",
        "key": "field_12",
        "type": "23",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769572",
        "name": "经理签字",
        "key": "field_13",
        "type": "23",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769575",
        "name": "特种设备安全监察局签字",
        "key": "field_14",
        "type": "23",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8781221",
        "name": "确认情况",
        "key": "field_15",
        "type": "1",
        "isRequired": "0",
        "isReadonly": "0",
        "custom_field_options": [
            {
                "key": "1197569",
                "value": "安装局确认"
            },
            {
                "key": "1197572",
                "value": "安装师傅确认"
            },
            {
                "key": "1197575",
                "value": "主管确认"
            },
            {
                "key": "1197578",
                "value": "经理确认"
            }
        ]
    },
    {
        "id": "9481577",
        "name": "开单日期",
        "key": "field_18",
        "type": "8",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "9481617",
        "name": "区域",
        "key": "field_19",
        "type": "2",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "9481685",
        "name": "胶水",
        "key": "field_22",
        "type": "2",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "9481693",
        "name": "印刷方式",
        "key": "field_24",
        "type": "1",
        "isRequired": "0",
        "isReadonly": "0",
        "custom_field_options": [
            {
                "key": "1328981",
                "value": "转轮uv"
            },
            {
                "key": "1328985",
                "value": "普通uv"
            }
        ]
    },
    {
        "id": "24139508",
        "name": "测试级联字段",
        "key": "field_4",
        "type": "18",
        "isRequired": "0",
        "isReadonly": "0",
        "custom_field_options": [
            {
                "key": "1",
                "value": "北京市",
                "subset_value": [
                    {
                        "key": "26",
                        "value": "海淀",
                        "subset_value": [
                            {
                                "key": "32",
                                "value": "中关村"
                            },
                            {
                                "key": "33",
                                "value": "清华大学"
                            }
                        ]
                    },
                    {
                        "key": "27",
                        "value": "丰台"
                    },
                    {
                        "key": "28",
                        "value": "朝阳"
                    }
                ]
            },
            {
                "key": "6",
                "value": "吉林省",
                "subset_value": [
                    {
                        "key": "29",
                        "value": "长春"
                    },
                    {
                        "key": "30",
                        "value": "吉林"
                    },
                    {
                        "key": "31",
                        "value": "四平"
                    }
                ]
            }
        ]
    }
]

查询工单字段列表(包含系统字段)

请求参数

请求地址

GET /api/v1/tickets/ticket_fields2.json

调用者权限

所有客服

调用示例

curl https://www.bangwo8.com/api/v1/tickets/ticket_fields2.json
 -v -u {bw8cs001}:{123456}

返回参数

名称 类型 注释
id int 字段id,系统自动分配
url varchar 字段的资源url
name varchar 字段名字
key varchar 字段的唯一标识
system tinyint 是否为系统字段,取值为:1-系统字段,0-自定义字段,默认为0
type int 字段类型,取值为:1-下拉列表,2-单行文本,3-多行文本,4-正整数,5-小数,6-复选框,7-正则表达式,8-日期(格式为:2018-02-03),11-表单,12-附件,13-评星,14-高级复选框,15-商品表,16-满意度评价表,17-电话类型的文本,20-资产表
isRequired tinyint 是否必选,取值为:1-非必选,0-必选
isReadonly tinyint 是否只读,取值为:1-只读,0-可编辑
readonly_range int 只读范围,只有isReadonly取值为1时,该参数才生效。取值为:1-所有客服,2-客服分组,3-客服,4-当前用户。
readonly_support varchar 当只读范围是某个客服时,该参数是客服id;当只读范围是某个客服分组时,该参数是客服分组id。
custom_field_options array 下拉列表的选项,如果字段类型是下拉列表,该字段会有值。
custom_field_table array 表单的列,如果字段类型是表单或商品表单,该字段会有值。

返回示例

[
    {
        "id": "8769479",
        "name": "新梯数据表",
        "key": "field_1",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769482",
        "name": "电梯日常使用状况检查表",
        "key": "field_2",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769485",
        "name": "保养汇总表",
        "key": "field_3",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769488",
        "name": "电/扶梯保养记录表",
        "key": "field_4",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769491",
        "name": "曳引与强制驱动电梯日常维修保养记录单",
        "key": "field_5",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769494",
        "name": "深圳市特种设备安装改造大修告知书",
        "key": "field_6",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769551",
        "name": "深圳市特种设备安装改造大修告知书-告知设备清单",
        "key": "field_7",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769554",
        "name": "中华人民共和国特种设备安装改造维修许可证",
        "key": "field_8",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769557",
        "name": "安装确认表",
        "key": "field_9",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769560",
        "name": "安装完成表",
        "key": "field_10",
        "type": "12",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769563",
        "name": "工人签字",
        "key": "field_11",
        "type": "23",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769569",
        "name": "主管签字",
        "key": "field_12",
        "type": "23",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769572",
        "name": "经理签字",
        "key": "field_13",
        "type": "23",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8769575",
        "name": "特种设备安全监察局签字",
        "key": "field_14",
        "type": "23",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "8781221",
        "name": "确认情况",
        "key": "field_15",
        "type": "1",
        "isRequired": "0",
        "isReadonly": "0",
        "custom_field_options": [
            {
                "key": "1197569",
                "value": "安装局确认"
            },
            {
                "key": "1197572",
                "value": "安装师傅确认"
            },
            {
                "key": "1197575",
                "value": "主管确认"
            },
            {
                "key": "1197578",
                "value": "经理确认"
            }
        ]
    },
    {
        "id": "9481577",
        "name": "开单日期",
        "key": "field_18",
        "type": "8",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "9481617",
        "name": "区域",
        "key": "field_19",
        "type": "2",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "9481685",
        "name": "胶水",
        "key": "field_22",
        "type": "2",
        "isRequired": "0",
        "isReadonly": "0"
    },
    {
        "id": "9481693",
        "name": "印刷方式",
        "key": "field_24",
        "type": "1",
        "isRequired": "0",
        "isReadonly": "0",
        "custom_field_options": [
            {
                "key": "1328981",
                "value": "转轮uv"
            },
            {
                "key": "1328985",
                "value": "普通uv"
            }
        ]
    }
]

页面工具