服务热线
13918951761
https://api.docsdk.com/v3/convert
名称 | 类型 | 是否必填 | 说明 |
---|---|---|---|
apiKey | String | 是 | 九云图分配的 API KEY |
timestamp | Long | 是 | 当前时间戳(毫秒数) |
sign | String | 是 | 签名,见签名算法说明 |
message | String | 否 | 可选填,用一句话描述附加要求。 |
format | String | 是 | 输出格式:docx。 |
document | String | 是 | PDF文件的URL或BASE64编码。 |
tag | String | 否 | 当前任务附带的标记信息,用于在回调中进行识别匹配 |
webHook | String | 否 | 任务完成后的回调地址 |
sign = sha256(apiKey + apiSecret + timestamp)
用九云图分配的 apiKey、九云图分配的 apiSecret,当前时间戳 timestamp,按上述顺序拼接成字符串,再进行 sha256 哈希得到。如下:
String apiKey = "xyzxy2121zxyz";
String apiSecret = "efcefcef1121cefcefc1212121";
String timestamp = "1555378976238";
String str = apiKey + apiSecret + timestamp;
String sign = sha256(str);
{
"id": "abfc0c52a8ac40c3c658363426c31c701e548be0", //任务编号
"status": "finished", //任务状态
"percent": 100, //处理进度百分比
"result": "https://pss.docsdk.com/resource/e09fdb12f937d66574353c51bbf191df9ceae87c/6f85a0854d614a259bc8a11cf82cb4dd.docx", //处理结果
"FileSize": 241879, //文件大小
"PageTotal": 8 //文件页数
}
{
"id": "abfc0c52a8ac40c3c658363426c31c701e548be0", //任务编号
"status": "error", //任务状态
"percent": 39, //处理进度百分比
"message": "19302-Imports URL failure." //错误信息
}
字段名 | 类型 | 说明 |
---|---|---|
status | String | 处理状态,可能值为“processing”(正在处理)、“finished”(已完成)或“error”(出错)。 |
result | String | Word文件的URL。 |
query_url | String | 用来查询解析状态的URL。 |
percent | Integer | 处理进度百分比,取值范围为0到100。 |
message | String | 服务端返回的备注信息,用于了解转换状态或错误信息。 |
id | String | 转换任务的唯一标识符,用于跟踪转换进度和结果。 |
content | String | Word文件的BASE64编码。 |
ThumbURL | String | 文件的缩略图。 |
PreviewURL | String | 在线预览链接,用于快速查看文件内容。 |
PageTotal | Integer | 文件的总页数。 |
FileSize | Integer | 文件大小,单位为字节。 |
FileName | String | 转换后的Word文件名称。 |