Document Merge
💡 API calls require authentication. Refer to Interface Authentication for authentication
POST {apiPrefix}/merge
Submit document merge task
- If task addition fails, the failure reason is returned synchronously
- If task addition succeeds, the task ID is returned synchronously. Third parties can configure task callback notifications to get task status.
Request Body:
Content-Type is application/json
| Parameter Name | Type | Description | Required |
|---|---|---|---|
| callback | string | Callback address. zOffice will callback to notify status after task completion | Yes |
| tokenType | string | Third-party token type, value is cookie or header | No |
| tokenValue | string | Third-party token value, passed back when zOffice downloads files or callback notifications | No |
| fileList | array | List of files to merge (file information see table below, length between 1~10 (inclusive)) | Yes |
File Information:
| Parameter Name | Type | Description | Required |
|---|---|---|---|
| downloadUrl | string | File download link | Yes |
| filename | string | Filename with extension (supports text (doc,docx,wps) and fixed layout (pdf), must be same type) | Yes |
| start | number | Starting page number of document to merge (inclusive), starting from 1. Default 1. Must be greater than or equal to 1. Only pdf files supported. | No |
| end | number | Ending page number of document to merge (inclusive), starting from 1. Default last page. Must be greater than or equal to 1. Only pdf files supported. | No |
- For downloadUrl(same as fileUrl)/tokenType/tokenValue/callback description, see Common Field Description in this document
- Fixed layout files single size cannot exceed 200m, total size cannot exceed 400m. Text files single size cannot exceed 200m, total size cannot exceed 300m.
Normal Response:
{
"taskId": "6f6598c8-c87e-420b-b6c4-6f1b187201dc",
"code": "Ok",
"detail": {
"taskStatus": "IN_QUEUE"
}
}
Error Response:
{
"taskId": "695fbf6e-90d2-42ba-83d5-00e81e5e366e",
"code": "TaskQueueCongestion",
"detail": {
"taskStatus": "FAIL"
}
}