Skip to main content

Check which documents you may delete.

POST/api/v1/documents/check-deletedocuments:read

The Delete dialog's check, one answer per document sent. Needs Bulk Delete Documents: can_delete is true when you can read the document and hold Delete Other Users Documents, or Delete Self Owned Documents on a document you own. A document that does not exist or that you cannot read answers false, as the Portal's does. is_blocked_by_sub_workflow is true when a group sub-workflow is still running on the document, which refuses the delete until its workflows are cancelled (cancel_document_workflows). Changes nothing.

Scopedocuments:read
AsynchronousNo
MCP toolcheck_document_delete
Portal permissionsbulk_delete_documents

Parameters​

NameInTypeRequiredDescription
Docwize-Versionheaderstring (date)Optional

Request body​

Content typeType
application/jsonDocumentDeleteCheckRequestInput

Responses​

StatusDescriptionBody
200Success.application/json DocumentDeleteCheckResult
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

DocumentDeleteCheck​

FieldTypeRequiredDescription
can_deletebooleanRequiredWhether you may delete the document: false when it is not readable by you, as well as when you hold no delete permission for it.
document_idstringRequiredThe ID as sent.
is_blocked_by_sub_workflowbooleanRequiredWhether a group sub-workflow is still running on the document; the delete is refused until it is cancelled.

DocumentDeleteCheckRequestInput​

FieldTypeRequiredDescription
document_idsarray of stringRequiredThe documents to check, up to 1000.

DocumentDeleteCheckResult​

FieldTypeRequiredDescription
documentsarray of DocumentDeleteCheckRequiredOne entry per document sent, in the order sent.