====JSON格式==== ^名称 ^类型 ^只读 ^注释 ^ |attachId | int |是 |附件id,系统自动分配 | |ticketReplyId| int |是 |附件所属的工单回复id,系统自动分配 | |fileName| varchar|是|附件名称| |filePath| varchar |是 | 附件下载地址| |token| string|是|附件token,通过token将附件和工单回复绑定到一起| ====JSON示例==== { "attachId": 213, "ticketReplyId": 3542, "fileName": "phone.png", "filePath": "https://bangwo8.oss-cn-shenzhen.aliyuncs.com/18/Z28tfzPdB.png", "token": "w23e687e45634c2341af75c6fd2654e" } ====查看附件==== GET /api/v1/attachments/{id}.json 调用者权限 所有客服 调用示例 curl -u {account}:{password} \ https://www.bangwo8.com/api/v1/attachments/{id}.json 返回值示例 Status: 200 OK { "attachment": { "attachId": 123, "fileName": "file.png", "filePath": "https://bangwo8.oss-cn-shenzhen.aliyuncs.com/18/Z28tfzPdB.png", "token": "00154af5872418a7792dda0edb32921" } } ====上传附件==== POST /api/v1/attachments.json //说明:// *//url里需要增加fileName参数来设置附件名// *//同一个附件只能对应一个工单回复// *//请求header里要设置"Content-Type: application/binary"// 调用者权限 所有客服 调用示例 curl "https://www.bangwo8.com/api/v1/uploads.json?filename=myfile.dat&ticketReplyId=32342" \ -v -u {account}:{password} \ -H "Content-Type: application/binary" \ --data-binary @file.dat -X POST 返回值示例 Status: 201 Created Location: https://www.bangwo8.com/api/v1/attachments/{id}.json { "attachment": { "attachId": 123, "ticketReplyId": 234234, "fileName": "file.png", "filePath": "https://bangwo8.oss-cn-shenzhen.aliyuncs.com/18/Z28tfzPdB.png", "token": "00154af5872418a7792dda0edb32921" } }