Document Split
💡 API calls require authentication. Refer to Interface Authentication for authentication
POST {apiPrefix}/split
Submit document split 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 |
|---|---|---|---|
| fileUrl | string | File download link | Yes |
| filename | string | Filename with extension (supports text (doc,docx,wps)) | 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 |
| callback | string | Callback address. zOffice will callback to notify status after task completion | Yes |
| type | string | Split type, enum: WORDHEADING: split by heading, SECTBREAK: split by section break, TEXT: split by keyword | Yes |
| keyword | string | Required when type is TEXT, split document by this text (this keyword refers to text in headings, headings containing it regardless of level) | No |
- For tokenType/tokenValue/callback description, see Common Field Description in this document
- Text file 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"
}
}