document.delete

Soft delete a document from the system.

POST http://api.kompliant.com/document.delete (OpenAPI specification)

Usage Info

This method performs a soft delete operation on a document, removing it from active use while retaining it in the database with a deleted_at timestamp. Only the user who uploaded the document can delete it (system-level operations may bypass this restriction). Documents with accepted fulfillments cannot be deleted and will return an ENTITY_LINKED error. Deleting a document also soft deletes all associated fulfillments. This is an idempotent operation that returns success even if the document is already deleted.

Use this method to remove documents that are no longer needed, clean up incorrectly uploaded files, maintain data retention policies while preserving audit trails, and ensure only document uploaders can delete their own documents.

Request

Authentication: KSig1-HMAC-SHA256

Parameters

ParameterTypeRequiredDescription
document_idstringYesThe identifier for the Document with d_ prefix format.

Example

{
  "document_id": "d_1rQYvnUQdcatd4TcZQu0l8"
}

Response

Data

An empty data object is returned when the completion is successful.

Example

{
  "meta": {
    "status": "SUCCESS",
    "trace_id": "trc_6zNzQZHSf26V83BO3uW6dS",
    "version": "2025-03-24"
  },
  "data": {}
}

Errors

Error CodeHTTP CodePossible Cause
BAD_REQUEST400Required parameters not provided.
ENTITY_LINKED400The document has accepted fulfillments and cannot be deleted.
ENTITY_NOT_FOUND400The document_id provided does not exist.