工单系统
邮件回复工单
以邮件形式回复工单,将请求写入工单邮件回复发送流程。sheetId 和 staffId 必须是 JSON 数字;staffId 必须为当前具体处理人。toMailList 不能为空,每个收件人至少包含 address;sender 必须是已配置的工单回复邮箱。成功返回仅表示请求已被接收并进入发送流程,不代表 SMTP 投递完成。接口按企业做 QPS 限制,默认 5 QPS。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| appKey | string | 是 | 应用 AppKey | |
| time | int64 | 是 | 请求时间戳(秒) | |
| checksum | string | 是 | 请求签名校验和 | |
| checksumAlgorithm | int32 | 否 | 签名算法:0 - 默认(SHA1),1 - SHA256 |
请求体
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| sheetId | int64 | 是 | 工单 ID(JSON 字段名 sheetId) | 123456 |
| staffId | int64 | 是 | 当前处理坐席 ID,必须是工单当前具体处理人 | 10001 |
| toMailList | object[] | 是 | 收件人列表,不能为空;每项必须包含 address | |
| └address | string | 是 | 收件人邮箱地址 | user@example.com |
| └nickName | string | 否 | 收件人昵称 | 张三 |
| sender | string | 是 | 发件邮箱,必须是已配置的工单回复邮箱 | service@example.com |
| subject | string | 是 | 邮件主题 | 关于退款进度的回复 |
| comment | string | 是 | 邮件正文纯文本内容 | 已联系财务核实退款状态,预计 1 个工作日内给您答复。 |
| attachs | string | 否 | 附件列表 JSON 字符串,内容为 WorksheetAttachmentVO 数组;为空、缺失或 [] 表示不带附件 | [{"name":"退款凭证.pdf","size":245760,"url":"https://example.com/refund-proof.pdf","type":0}] |
返回参数
| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| code | int32 | 状态码,200 表示成功 | 200 |
| message | string | 成功提示 | success |
错误码
| 状态码 | 描述 |
|---|---|
| 14001 | AppKey 不存在 |
| 14002 | checksum 校验失败 |
| 14003 | time 缺失或请求时间戳与服务器时间误差超过限制 |
| 14004 | 请求体不是合法 JSON;必填字段缺失或类型错误 |
| 14500 | 服务内部异常或邮件回复处理失败 |
| default | 请求频率超过企业限制时返回 GLOBAL_REQUEST_LIMIT 对应业务码 |
postEndpoint
/openapi/v2/ticket/mail/replycurl -X POST "https://qiyukf.com/openapi/v2/ticket/mail/reply?appKey=string&time=0&checksum=string" \ -H "Content-Type: application/json" \ -d '{ "sheetId": 123456, "staffId": 10001, "toMailList": [ { "address": "user@example.com" } ], "sender": "service@example.com", "subject": "关于退款进度的回复", "comment": "已联系财务核实退款状态,预计 1 个工作日内给您答复。" }'{
"code": 200,
"message": "success"
}{
"code": 14001,
"message": "AppKey 不存在"
}{
"code": 14002,
"message": "checksum 校验失败"
}{
"code": 14003,
"message": "time 缺失或请求时间戳与服务器时间误差超过限制"
}{
"code": 14004,
"message": "请求体不是合法 JSON;必填字段缺失或类型错误"
}{
"code": 14500,
"message": "服务内部异常或邮件回复处理失败"
}"string"这篇文档有帮助吗?