Skip to main content

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 NameTypeDescriptionRequired
fileUrlstringFile download linkYes
filenamestringFilename with extension (supports text (doc,docx,wps))Yes
tokenTypestringThird-party token type, value is cookie or headerNo
tokenValuestringThird-party token value, passed back when zOffice downloads files or callback notificationsNo
callbackstringCallback address. zOffice will callback to notify status after task completionYes
typestringSplit type, enum: WORDHEADING: split by heading, SECTBREAK: split by section break, TEXT: split by keywordYes
keywordstringRequired 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"
}
}