DMS Document Schema
Felder
DMS Document Schema
Schema for validating DMS document entities (Dokumentenverwaltung)
title
Document title
description
Optional description or summary
documentTypeId
Reference to dms_document_types (custom document type)
documentType
Legacy document type string (deprecated, use documentTypeId)
customFields
Custom field values defined by the document type schema
status
Document lifecycle status
DRAFTNEEDS_REVIEWAPPROVEDREJECTEDBOOKEDARCHIVEDpartyId
Linked CRM party
contactPartyId
Linked contact person
contractId
Linked contract
projectId
Linked project
employeeId
Linked employee profile
assignedToId
Assigned user for review
customerVisible
When true, document is published on the project customer portal (requires project.customerAccess feature releasedDocuments).
customerUploaded
True if the document was uploaded by a customer via the public portal.
uploadedByPartyId
Customer party that uploaded this file (set when customerUploaded = true).
orgUnitId
Owning org unit
locationId
Standort der eigenen Firma (location entity under the isSelfCompany party, same set as the print-target sites of ADR 0370). Purely organisational: it says which own office the document belongs to (Miet-/Versicherungsvertrag, Brandschutz, Netzdoku je Niederlassung). Absent/null = not assigned — no backfill required.
tags
Manual + auto tags
folderId
Reference to dms_folders entity
folderPath
Virtual folder path (e.g. /invoices/2026/)
checkedOutBy
User ID who has this document checked out
checkedOutAt
When the document was checked out
lockExpiresAt
Auto-release lock after this time (default 24h)
fileId
Reference to files collection
mimeType
MIME type of the document file
sizeBytes
File size in bytes
s3Key
S3 storage key
thumbnailS3Key
S3 key for thumbnail image
pageCount
Number of pages (PDF)
extractedText
Full text extracted from document for search
textExtractionStatus
Text extraction pipeline status
PENDINGCOMPLETEFAILEDocrStatus
OCR processing status
NOT_NEEDEDPENDINGCOMPLETEFAILEDocrMethod
Which OCR method produced the text
tesseractai-visionocrConfidence
OCR confidence score (0-100)
ocrError
Reason why the last OCR attempt failed (exception message or diagnostic hint)
searchablePdfS3Key
S3 key for the searchable PDF (original + invisible OCR text layer)
searchablePdfError
Why the invisible text layer could not be built, even though OCR itself succeeded. Without a text layer the PDF stays unselectable in the viewer, so this is a user-visible outcome and not just a log line. Absent on documents processed before this field existed — treat as "unknown", never as "no error".
classificationConfidence
Classification confidence score 0-1
classificationSource
How the document was classified. EINVOICE = ZUGFeRD/XRechnung Pre-Classifier matched the embedded SellerTradeParty/BuyerTradeParty against the tenant identity.
LLMRULEMANUALEINVOICEclassificationTrace
Diagnose-Spur der letzten Klassifikation: welche Regeln matchten, welche E-Invoice-Felder die Tenant-Identität trafen, oder bei MANUAL der vorherige Doktyp. Zeigt im UI „Warum wurde dieses Dokument so klassifiziert?".
source
LLMRULEMANUALEINVOICEconfidence
winnerScore
winnerName
candidates
documentTypeName
evaluations
patternType
keywordregexbuiltinfield
position
required
matchedSnippet
einvoiceFormat
einvoiceMatchedOn
vendor.ibanvendor.vatIdbuyer.vatIdeinvoiceVendorName
einvoiceVendorIban
einvoiceVendorVatId
einvoiceBuyerName
einvoiceBuyerVatId
previousDocumentTypeId
previousDocumentTypeName
previousSource
manualByUserId
retentionPolicyId
Applied retention policy
retentionExpiresAt
When retention period expires
retentionStartAt
Zeitpunkt, an dem die Aufbewahrungsuhr gestartet ist (abgeleitet aus retentionStartTrigger des Doctypes).
retentionUntil
Berechneter Ablauf der Aufbewahrungspflicht. Vor diesem Zeitpunkt blockiert der Soft-Delete-Endpoint und (bei retentionMode=compliance) auch S3 jede Löschung.
retentionMode
Effektiver Object-Lock-Modus dieses Dokuments (vom Doctype geerbt, beim Lock-Apply eingefroren).
nonegovernancecompliances3VersionId
S3-VersionId des PUT, an dem der Object-Lock haftet. Pflicht, weil Lock immer auf eine konkrete Version greift.
s3ObjectLockApplied
Sanity-Flag: true sobald PutObjectRetention erfolgreich gegen S3 gefeuert wurde. Daily-Integrity-Job verifiziert via GetObjectRetention.
contentSha256
Hex-codierter SHA-256-Hash des Originalinhalts beim Upload. Daily-Integrity-Job vergleicht gegen neu berechneten Hash zur Manipulationsprüfung (GoBD Rz. 110 Unveränderbarkeit).
legalHold
Aufbewahrungs-Sperre (S3 PutObjectLegalHold). Wenn active=true, blockiert jede Löschung — auch nach Ablauf von retentionUntil. Verwendung: Steuerprüfung, Litigation Hold, Audit.
reason
releasedBy
releasedAt
caseRef
Aktenzeichen / Case-ID für Audit-Trail
documentVersions
Previous versions of this document
incomingInvoice
Incoming invoice specific data (Eingangsrechnung)
vendorPartyId
Matched CRM party for vendor
vendorName
vendorTaxId
Steuernummer or USt-IdNr
vendorIban
invoiceNumber
invoiceDate
dueDate
netAmount
vatAmount
grossAmount
currency
paymentTerms
paymentReference
Verwendungszweck / payment reference
zugferdVersion
xRechnungVersion
extractionMethod
ZUGFERDXRECHNUNGLLM_VISIONOCR_LLMPARSERMANUALextractionConfidence
extractionParserId
Which dms_parser was used
bookingReference
datevExportedAt
aiSummary
AI-generated document summary
aiTags
AI-suggested tags
suggestedFolderPath
AI-suggested filing location
suggestedFolderId
AI-suggested folder ID
duplicateOfId
Reference to potential duplicate document
duplicateConfidence
Similarity score for duplicate detection (0-1)
embeddingStatus
Vector embedding generation status
PENDINGPROCESSINGDONEFAILEDlastEmbeddedAt
When embeddings were last generated
entitySuggestions
entitySuggestionStatus
PENDINGCOMPLETEFAILEDexpiresAt
Document expiry date (e.g. TÜV, certificates, warranties)
expiryNotificationDays
Days before expiry to send notification
syncSource
localsharepointlastSyncedAt
syncError
backendId
Storage backend currently holding the bytes.
backendItemId
Backend-specific item id (e.g. Graph driveItem id, S3 key, FS path).
backendETag
Backend ETag at last sync — used for 3-way conflict detection.
appliedFilingPolicyId
Filing policy most recently applied to this document.
resolvedPath
Backend-absolute path at the time of last filing (audit + quick display).
originalBackendPath
Pfad, an dem das Dokument beim Inbound-Sync ursprünglich lag (z.B. "/Kunden/ACME/Rechnungen/file.pdf"). Quelle der Pfad-Hoheit, wenn keine Filing-Policy mit overrideBackendPath greift.
originalBackendId
Backend, das das Dokument ursprünglich geliefert hat (Inbound-Origin). Bleibt stabil, auch wenn ein späterer Move das aktive Backend ändert.
pathSource
Ownership-Modell der Pfad-Hoheit (ADR 0391): "origin" = Backend-Original (Inbound-Sync), "user" = explizite Ordnerwahl beim Upload, "policy" = Filing-Policy-Template. Nur eine Policy mit overrideBackendPath=true darf "origin"/"user" überstimmen.
originuserpolicyfilingStatus
Filing lifecycle state (ADR 0051).
unfiledinboxfiledmisfiledfiling_failedmissing_in_backendsyncState
Conflict-locking state-machine (ADR 0052 §7.4).
cleanpending_outboundpending_inboundconflictrenamingmigratingrequiresHumanReview
Ingestion-Inbox quarantine flag (ADR 0051 §7.2.5).
inboxRouted
Dokument stammt aus einem konfigurierten SharePoint-Posteingangsordner (ADR 0392). Unterdrückt das automatische filingStatus="filed" am Origin-Pfad, damit es ohne greifende Filing-Policy im Posteingang zur Triage landet. Fehlt auf allen Alt-Dokumenten → falsy → unverändertes Verhalten.
classification
Sensitivity classification used by filing policies (§9.4).
publicinternalconfidentialstrictly_confidentialprocessingStartedAt
When the post-ingestion pipeline acquired this lock. Null = idle.
processingJobId
BullMQ jobId of the running pipeline (used for explicit cancellation).
processingStage
Current pipeline stage — surfaced to the user as a progress hint.
ocrclassifyextractfileprocessingExpiresAt
Lock TTL — past this point the lock is considered stale.
processingCancelledAt
Set by POST /dms/documents/:id/unlock. The worker checks this between stages and bails on the next stage boundary.
lastOutboundMoveAt
Timestamp of the most recent successful outbound move/push.
lastOutboundMoveJobId
BullMQ jobId of the last outbound-move attempt (used for diagnostics and idempotency).
outboundMoveAttempts
Total outbound-move attempts (increments on every CAS-lock acquisition).
encryptionOverride
Per-document override of the document type's defaultEncryption. null = inherit from type.
nonezero-knowledgeencryption
Encryption metadata for ZK-protected files. Set on upload, never mutated; rotation requires re-upload.
mode
Currently only zero-knowledge is supported.
zero-knowledgealg
AES-256-GCMiv
Base64-encoded 12-byte IV used to encrypt the file body.
keyId
Optional identifier for the per-document DEK (e.g. UUIDv7 generated client-side).
wrappedKeys
Per-recipient wraps of the per-document DEK. Each entry mirrors vault_customer_keys.memberKeys.
type
userteamroleid
wrappedKey
ephemeralPublicKey
addedAt
addedBy
notes
Free-text notes
Keine Felder passen zum Filter.
Standard-Endpoints
Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:
GET /api/v1/dms_documents— Liste, paginiert + filterbarGET /api/v1/dms_documents/<id>— Einzelne EntityPOST /api/v1/dms_documents— AnlegenPATCH /api/v1/dms_documents/<id>— Teil-UpdateDELETE /api/v1/dms_documents/<id>— Soft-DeleteGET /api/v1/dms_documents/<id>/timeline— Audit + Aktivitäten