主题
工单(会员中心)
工单状态列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 工单状态列表 |
| 接口地址 | /console/v1/ticket/status |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
无
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:工单状态列表 |
| list[].id | int | - | desc:ID |
| list[].name | string | - | desc:工单状态 |
| list[].color | string | - | desc:状态颜色 |
| list[].status | int | - | desc:完结状态 |
| list[].default | int | - | desc:是否默认状态 |
工单列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 工单列表 |
| 接口地址 | /console/v1/ticket |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| keywords | string | - | validate:optional | desc:关键字 |
| status | int | - | 通过/console/v1/ticket/status获取validate:optional | desc:状态搜索 |
| ticket_type_id | int | - | 通过/console/v1/ticket/type获取validate:optional | desc:工单类型搜索 |
| client_id | int | - | validate:optional | desc:客户ID |
| admin_id | int | - | validate:optional | desc:管理员ID |
| host_id | int | - | validate:optional | desc:产品ID |
| page | int | - | validate:optional | desc:页数 |
| limit | int | - | validate:optional | desc:每页条数 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:工单列表 |
| list[].id | int | - | desc:ID |
| list[].ticket_num | string | - | desc:工单号 |
| list[].title | string | - | desc:标题 |
| list[].name | string | - | desc:类型 |
| list[].post_time | int | - | desc:提交时间 |
| list[].last_reply_time | int | - | desc:最近回复时间 |
| list[].status | string | - | desc:状态 |
| list[].color | string | - | desc:状态颜色 |
| list[].last_urge_time | string | - | desc:上次催单时间戳 |
| count | int | - | desc:工单总数 |
工单统计
| 项目 | 内容 |
|---|---|
| 接口描述 | 工单统计 |
| 接口地址 | /console/v1/ticket/statistic |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
无
响应参数
| name | type | default | desc |
|---|---|---|---|
| 1 | int | - | desc:待接单数量 |
| 2 | int | - | desc:待回复数量 |
| 3 | int | - | desc:已回复数量 |
| 5 | int | - | desc:处理中数量 |
查看工单
| 项目 | 内容 |
|---|---|
| 接口描述 | 查看工单 |
| 接口地址 | /console/v1/ticket/:id |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:工单ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| ticket | object | - | desc:工单详情 |
| ticket.client_id | int | - | desc:用户ID |
| ticket.id | int | - | desc:工单ID |
| ticket.title | string | - | desc:工单标题 |
| ticket.content | string | - | desc:内容 |
| ticket.ticket_type_id | int | - | desc:类型ID |
| ticket.status | string | - | desc:状态 |
| ticket.color | string | - | desc:状态颜色 |
| ticket.create_time | int | - | desc:创建时间 |
| ticket.attachment | array | - | desc:工单附件数组 |
| ticket.last_reply_time | int | - | desc:工单最后回复时间 |
| ticket.username | string | - | desc:用户名 |
| ticket.host_ids | array | - | desc:关联产品ID数组 |
| ticket.can_operate | int | - | desc:是否可操作 |
| ticket.replies | array | - | desc:沟通记录数组 |
| ticket.replies[].id | int | - | desc:回复ID |
| ticket.replies[].content | string | - | desc:内容 |
| ticket.replies[].attachment | array | - | desc:附件访问地址数组 |
| ticket.replies[].create_time | int | - | desc:时间 |
| ticket.replies[].type | string | - | desc:类型 |
| ticket.replies[].client_name | string | - | desc:用户名 |
| ticket.replies[].admin_name | string | - | desc:管理员名 |
| ticket.replies[].quote_reply_id | int | - | desc:引用的回复ID |
| ticket.replies[].quote_info | object | - | desc:引用的回复信息 |
| ticket.replies[].quote_info.id | int | - | desc:被引用回复ID |
| ticket.replies[].quote_info.content | string | - | desc:被引用内容 |
| ticket.replies[].quote_info.type | string | - | desc:类型 |
| ticket.replies[].quote_info.sender_name | string | - | desc:发送者名称 |
| ticket.replies[].quote_info.create_time | int | - | desc:发送时间 |
| ticket.replies[].quote_info.is_deleted | int | - | desc:该回复是否已删除 |
创建工单
| 项目 | 内容 |
|---|---|
| 接口描述 | 创建工单 |
| 接口地址 | /console/v1/ticket |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| title | string | - | validate:required | desc:工单标题 |
| ticket_type_id | int | - | 通过/console/v1/ticket/type获取validate:required | desc:工单类型ID |
| host_ids | array | - | validate:optional | desc:关联产品ID数组 |
| content | string | - | validate:optional | desc:问题描述 |
| attachment | array | - | 调用console/v1/upload上传文件取save_namevalidate:optional | desc:附件数组 |
响应参数
无
回复工单
| 项目 | 内容 |
|---|---|
| 接口描述 | 回复工单 |
| 接口地址 | /console/v1/ticket/:id/reply |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:工单ID |
| content | string | - | 不超过3000个字符validate:required | desc:回复内容 |
| attachment | array | - | 调用console/v1/upload上传文件取save_namevalidate:optional | desc:附件数组 |
| quote_reply_id | int | - | 默认0表示不引用validate:optional | desc:引用的回复ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| ticket_reply_id | int | - | desc:回复ID |
催单
| 项目 | 内容 |
|---|---|
| 接口描述 | 催单 |
| 接口地址 | /console/v1/ticket/:id/urge |
| 请求方式 | PUT |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:工单ID |
响应参数
无
关闭工单
| 项目 | 内容 |
|---|---|
| 接口描述 | 关闭工单 |
| 接口地址 | /console/v1/ticket/:id/close |
| 请求方式 | PUT |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:工单ID |
响应参数
无
工单部门
| 项目 | 内容 |
|---|---|
| 接口描述 | 工单部门 |
| 接口地址 | /console/v1/ticket/department |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
无
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:工单部门列表 |
| list[].id | int | - | desc:工单部门ID |
| list[].name | string | - | desc:工单部门名称 |
工单类型列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 工单类型列表 |
| 接口地址 | /console/v1/ticket/type |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
无
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:工单类型列表 |
| list[].id | int | - | desc:工单类型ID |
| list[].name | string | - | desc:工单类型名称 |
工单附件下载
| 项目 | 内容 |
|---|---|
| 接口描述 | 工单附件下载 |
| 接口地址 | /console/v1/ticket/download |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| name | string | - | validate:required | desc:附件名称 |
响应参数
无
工单通知设置
| 项目 | 内容 |
|---|---|
| 接口描述 | 工单通知设置 |
| 接口地址 | /console/v1/ticket/config |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
无
响应参数
| name | type | default | desc |
|---|---|---|---|
| ticket_notice_open | int | - | desc:是否开启工单通知 |
| ticket_notice_description | string | - | desc:工单通知描述 |
工单处理中
| 项目 | 内容 |
|---|---|
| 接口描述 | 工单处理中 |
| 接口地址 | /console/v1/ticket/:id/processing |
| 请求方式 | PUT |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:工单ID |
响应参数
无
工单终止传递
| 项目 | 内容 |
|---|---|
| 接口描述 | 工单终止传递 |
| 接口地址 | /console/v1/ticket/:id/terminate |
| 请求方式 | PUT |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:工单ID |
响应参数
无
更新工单状态
| 项目 | 内容 |
|---|---|
| 接口描述 | 更新工单状态 |
| 接口地址 | /console/v1/ticket/:id/status |
| 请求方式 | PUT |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:工单ID |
| status | int | - | validate:required | desc:工单状态 |
响应参数
无
更新工单回复
| 项目 | 内容 |
|---|---|
| 接口描述 | 更新工单回复 |
| 接口地址 | /console/v1/ticket/:id/reply |
| 请求方式 | PUT |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:工单ID |
| ticket_reply_id | int | - | validate:required | desc:工单回复ID |
| content | string | - | validate:required | desc:工单回复内容 |
响应参数
无
删除工单回复
| 项目 | 内容 |
|---|---|
| 接口描述 | 删除工单回复 |
| 接口地址 | /console/v1/ticket/:id/reply |
| 请求方式 | DELETE |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:工单ID |
| ticket_reply_id | int | - | validate:required | desc:工单回复ID |
响应参数
无
创建工单回复
| 项目 | 内容 |
|---|---|
| 接口描述 | 创建工单回复 |
| 接口地址 | /console/v1/ticket/:id/reply |
| 请求方式 | POST |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:工单ID |
| upstream_ticket_reply_id | int | - | validate:required | desc:上游工单回复ID |
| content | string | - | validate:required | desc:工单回复内容 |
| attachment | array | - | validate:optional | desc:附件 |
响应参数
无