API · v1 · stabil
CODEMETA OS Developer Center
Konsole öffnen
Module

DMS

Das DMS ist die zentrale Ablage für Dateien — Verträge, Rechnungen, Personalakte, Compliance-Nachweise. Versionen, Anhänge und Inhalts-Layer liegen direkt am dms_document-Datensatz; die Datei-Storage-Schicht ist über den separaten File-Upload-Flow getrennt.

Resources – Inhalte

ResourcePfadPermission-Präfix
Dokumente/api/v1/dms_documentsdms_document
Ordner/api/v1/dms_foldersdms_folder
Dokumenttypen/api/v1/dms_document_typesdms_document_type
Annotationen/api/v1/dms_annotationsdms_annotation
Kommentare/api/v1/dms_commentsdms_comment
Templates/api/v1/dms_templatesdms_template
Form-Layouts/api/v1/dms_form_layoutsdms_form_layout
Sharing-Links/api/v1/dms_sharesdms_share
Signaturen/api/v1/dms_signaturesdms_signature
Signatur-Anfragen/api/v1/dms_signing_requestsdms_signing_request

Resources – Verarbeitung & Storage

ResourcePfadPermission-Präfix
Filing-Regeln/api/v1/dms_filing_rulesdms_filing_rule
Parser/api/v1/dms_parsersdms_parser
Extraction-Feedback/api/v1/dms_extraction_feedbackdms_extraction_feedback
Retention-Policies/api/v1/dms_retention_policiesdms_retention_policy
Storage-Backends/api/v1/dms_storage_backendsdms_storage_backend
DATEV-Exports/api/v1/dms_datev_exportsdms_datev_export
SharePoint-Sync-Logs/api/v1/dms_sharepoint_sync_logsdms_sharepoint_sync_log
Sync-Konflikte/api/v1/dms_sync_conflictsdms_sync_conflict

Schemas

Document

dms_documents4 Permissions

Schema for validating DMS document entities (Dokumentenverwaltung)

title string erforderlich

Document title

1–500 Zeichen
description string optional

Optional description or summary

nullable
documentTypeId uuid optional

Reference to dms_document_types (custom document type)

nullable
documentType string optional

Legacy document type string (deprecated, use documentTypeId)

nullable
customFields object optional

Custom field values defined by the document type schema

nullable
status string erforderlich

Document lifecycle status

DRAFTNEEDS_REVIEWAPPROVEDREJECTEDBOOKEDARCHIVED
Default: "DRAFT"
partyId uuid optional

Linked CRM party

nullable
contactPartyId uuid optional

Linked contact person

nullable
contractId uuid optional

Linked contract

nullable
projectId uuid optional

Linked project

nullable
employeeId uuid optional

Linked employee profile

nullable
assignedToId uuid optional

Assigned user for review

nullable
customerVisible boolean optional

When true, document is published on the project customer portal (requires project.customerAccess feature releasedDocuments).

Default: false
customerUploaded boolean optional

True if the document was uploaded by a customer via the public portal.

Default: false
uploadedByPartyId uuid optional

Customer party that uploaded this file (set when customerUploaded = true).

nullable
orgUnitId uuid optional

Owning org unit

nullable
tags string[] optional

Manual + auto tags

Default: []
folderId uuid optional

Reference to dms_folders entity

nullable
folderPath string optional

Virtual folder path (e.g. /invoices/2026/)

max 1000 Zeichennullable
checkedOutBy uuid optional

User ID who has this document checked out

read-onlynullable
checkedOutAt datetime optional

When the document was checked out

read-onlynullable
lockExpiresAt datetime optional

Auto-release lock after this time (default 24h)

read-onlynullable
fileId uuid optional

Reference to files collection

nullable
mimeType string optional

MIME type of the document file

nullable
sizeBytes number optional

File size in bytes

≥ 0nullable
s3Key string optional

S3 storage key

nullable
thumbnailS3Key string optional

S3 key for thumbnail image

nullable
pageCount number optional

Number of pages (PDF)

≥ 0nullable
extractedText string optional

Full text extracted from document for search

nullable
textExtractionStatus string optional

Text extraction pipeline status

PENDINGCOMPLETEFAILED
nullable
ocrStatus string optional

OCR processing status

NOT_NEEDEDPENDINGCOMPLETEFAILED
nullable
ocrMethod string optional

Which OCR method produced the text

tesseractai-vision
nullable
ocrConfidence number optional

OCR confidence score (0-100)

0 – 100nullable
ocrError string optional

Reason why the last OCR attempt failed (exception message or diagnostic hint)

nullable
searchablePdfS3Key string optional

S3 key for the searchable PDF (original + invisible OCR text layer)

nullable
classificationConfidence number optional

Classification confidence score 0-1

0 – 1nullable
classificationSource string optional

How the document was classified. EINVOICE = ZUGFeRD/XRechnung Pre-Classifier matched the embedded SellerTradeParty/BuyerTradeParty against the tenant identity.

LLMRULEMANUALEINVOICE
nullable
classificationTrace object optional

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?".

nullable
source string optional
LLMRULEMANUALEINVOICE
at datetime optional
confidence number optional
0 – 1nullable
winnerScore number optional
nullable
winnerName string optional
nullable
candidates object[] optional
nullable
documentTypeId string optional
documentTypeName string optional
nullable
score number optional
vetoed boolean optional
isWinner boolean optional
evaluations object[] optional
pattern string optional
patternType string optional
keywordregexbuiltin
weight number optional
field string optional
nullable
position string optional
nullable
required boolean optional
nullable
matched boolean optional
matchedSnippet string optional
nullable
contributedScore number optional
einvoiceFormat string optional
nullable
einvoiceMatchedOn string optional
vendor.ibanvendor.vatIdbuyer.vatId
nullable
einvoiceVendorName string optional
nullable
einvoiceVendorIban string optional
nullable
einvoiceVendorVatId string optional
nullable
einvoiceBuyerName string optional
nullable
einvoiceBuyerVatId string optional
nullable
previousDocumentTypeId string optional
nullable
previousDocumentTypeName string optional
nullable
previousSource string optional
nullable
manualByUserId string optional
nullable
retentionPolicyId uuid optional

Applied retention policy

nullable
retentionExpiresAt datetime optional

When retention period expires

nullable
retentionStartAt datetime optional

Zeitpunkt, an dem die Aufbewahrungsuhr gestartet ist (abgeleitet aus retentionStartTrigger des Doctypes).

read-onlynullable
retentionUntil datetime optional

Berechneter Ablauf der Aufbewahrungspflicht. Vor diesem Zeitpunkt blockiert der Soft-Delete-Endpoint und (bei retentionMode=compliance) auch S3 jede Löschung.

read-onlynullable
retentionMode string optional

Effektiver Object-Lock-Modus dieses Dokuments (vom Doctype geerbt, beim Lock-Apply eingefroren).

nonegovernancecompliance
read-onlynullable
s3VersionId string optional

S3-VersionId des PUT, an dem der Object-Lock haftet. Pflicht, weil Lock immer auf eine konkrete Version greift.

max 200 Zeichenread-onlynullable
s3ObjectLockApplied boolean optional

Sanity-Flag: true sobald PutObjectRetention erfolgreich gegen S3 gefeuert wurde. Daily-Integrity-Job verifiziert via GetObjectRetention.

Default: falseread-only
contentSha256 string optional

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).

Patternread-onlynullable
legalHold object optional

Aufbewahrungs-Sperre (S3 PutObjectLegalHold). Wenn active=true, blockiert jede Löschung — auch nach Ablauf von retentionUntil. Verwendung: Steuerprüfung, Litigation Hold, Audit.

read-onlynullable
active boolean erforderlich
reason string optional
max 500 Zeichennullable
setBy uuid erforderlich
setAt datetime erforderlich
releasedBy uuid optional
nullable
releasedAt datetime optional
nullable
caseRef string optional

Aktenzeichen / Case-ID für Audit-Trail

max 200 Zeichennullable
documentVersions object[] optional

Previous versions of this document

Default: []
versionNumber number erforderlich
≥ 1
s3Key string erforderlich
uploadedBy uuid erforderlich
uploadedAt datetime erforderlich
changeNote string optional
nullable
sizeBytes number optional
nullable
linkedEntities object[] optional

Links to other entities

Default: []
entityType string erforderlich
entityId uuid erforderlich
role string optional
nullable
incomingInvoice object optional

Incoming invoice specific data (Eingangsrechnung)

nullable
vendorPartyId uuid optional

Matched CRM party for vendor

nullable
vendorName string optional
nullable
vendorTaxId string optional

Steuernummer or USt-IdNr

nullable
vendorIban string optional
nullable
invoiceNumber string optional
nullable
invoiceDate date optional
nullable
dueDate date optional
nullable
netAmount string optional
Patternnullable
vatAmount string optional
Patternnullable
grossAmount string optional
Patternnullable
currency string optional
max 3 ZeichenDefault: "EUR"
lineItems object[] optional
Default: []
description string optional
quantity string optional
Patternnullable
unitPrice string optional
Patternnullable
vatRate number optional
nullable
netAmount string optional
Patternnullable
articleNumber string optional
nullable
paymentTerms string optional
nullable
paymentReference string optional

Verwendungszweck / payment reference

nullable
zugferdVersion string optional
nullable
xRechnungVersion string optional
nullable
extractionMethod string optional
ZUGFERDXRECHNUNGLLM_VISIONOCR_LLMPARSERMANUAL
nullable
extractionConfidence number optional
0 – 1nullable
extractionParserId uuid optional

Which dms_parser was used

nullable
corrections object[] optional

User corrections for feedback loop

Default: []
field string erforderlich
originalValue any optional
correctedValue any erforderlich
correctedBy uuid erforderlich
correctedAt datetime erforderlich
bookingReference string optional
nullable
datevExportedAt datetime optional
nullable
aiSummary string optional

AI-generated document summary

nullable
aiTags string[] optional

AI-suggested tags

nullable
suggestedFolderPath string optional

AI-suggested filing location

max 1000 Zeichennullable
suggestedFolderId uuid optional

AI-suggested folder ID

nullable
duplicateOfId uuid optional

Reference to potential duplicate document

nullable
duplicateConfidence number optional

Similarity score for duplicate detection (0-1)

0 – 1nullable
embeddingStatus string optional

Vector embedding generation status

PENDINGPROCESSINGDONEFAILED
nullable
lastEmbeddedAt datetime optional

When embeddings were last generated

nullable
entitySuggestions object[] optional
Default: nullnullable
entityType string erforderlich
entityId string erforderlich
displayName string erforderlich
confidence number erforderlich
0 – 1
reason string optional
nullable
entitySuggestionStatus string optional
PENDINGCOMPLETEFAILED
nullable
expiresAt datetime optional

Document expiry date (e.g. TÜV, certificates, warranties)

nullable
expiryNotificationDays integer optional

Days before expiry to send notification

1 – 365Default: nullnullable
sharePointItemId string optional
nullable
sharePointDriveId string optional
nullable
sharePointWebUrl string optional
nullable
sharePointChangeTag string optional
nullable
sharePointLastModifiedAt datetime optional
nullable
syncSource string optional
localsharepoint
nullable
lastSyncedAt datetime optional
nullable
syncError string optional
nullable
sharePointCreatedByAadId string optional
read-onlynullable
sharePointCreatedByUpn string optional
read-onlynullable
sharePointCreatedByEmail string optional
read-onlynullable
sharePointCreatedByDisplayName string optional
read-onlynullable
sharePointCreatedByUserId uuid optional

Resolved Codemeta user ID matching the SharePoint uploader (via AAD object ID, UPN, or email). Null when no match found.

read-onlynullable
backendId uuid optional

Storage backend currently holding the bytes.

nullable
backendItemId string optional

Backend-specific item id (e.g. Graph driveItem id, S3 key, FS path).

max 500 Zeichennullable
backendETag string optional

Backend ETag at last sync — used for 3-way conflict detection.

max 500 Zeichennullable
appliedFilingPolicyId uuid optional

Filing policy most recently applied to this document.

nullable
resolvedPath string optional

Backend-absolute path at the time of last filing (audit + quick display).

max 2000 Zeichennullable
originalBackendPath string optional

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.

max 2000 Zeichennullable
originalBackendId uuid optional

Backend, das das Dokument ursprünglich geliefert hat (Inbound-Origin). Bleibt stabil, auch wenn ein späterer Move das aktive Backend ändert.

nullable
pathSource string optional

Welcher Pfad gewinnt aktuell als resolvedPath: "origin" = Backend-Original (Inbound), "policy" = Filing-Policy-Template.

originpolicy
nullable
filingStatus string optional

Filing lifecycle state (ADR 0051).

unfiledinboxfiledmisfiledfiling_failedmissing_in_backend
Default: "unfiled"
syncState string optional

Conflict-locking state-machine (ADR 0052 §7.4).

cleanpending_outboundpending_inboundconflictrenamingmigrating
Default: "clean"
requiresHumanReview boolean optional

Ingestion-Inbox quarantine flag (ADR 0051 §7.2.5).

Default: false
classification string optional

Sensitivity classification used by filing policies (§9.4).

publicinternalconfidentialstrictly_confidential
nullable
processingStartedAt datetime optional

When the post-ingestion pipeline acquired this lock. Null = idle.

nullable
processingJobId string optional

BullMQ jobId of the running pipeline (used for explicit cancellation).

max 200 Zeichennullable
processingStage string optional

Current pipeline stage — surfaced to the user as a progress hint.

ocrclassifyextractfile
nullable
processingExpiresAt datetime optional

Lock TTL — past this point the lock is considered stale.

nullable
processingCancelledAt datetime optional

Set by POST /dms/documents/:id/unlock. The worker checks this between stages and bails on the next stage boundary.

nullable
lastOutboundMoveAt datetime optional

Timestamp of the most recent successful outbound move/push.

nullable
lastOutboundMoveJobId string optional

BullMQ jobId of the last outbound-move attempt (used for diagnostics and idempotency).

max 200 Zeichennullable
outboundMoveAttempts integer optional

Total outbound-move attempts (increments on every CAS-lock acquisition).

≥ 0Default: 0
encryptionOverride string optional

Per-document override of the document type's defaultEncryption. null = inherit from type.

nonezero-knowledge
nullable
encryption object optional

Encryption metadata for ZK-protected files. Set on upload, never mutated; rotation requires re-upload.

nullable
mode string erforderlich

Currently only zero-knowledge is supported.

zero-knowledge
alg string erforderlich
AES-256-GCM
Default: "AES-256-GCM"
iv string erforderlich

Base64-encoded 12-byte IV used to encrypt the file body.

max 32 Zeichen
keyId string optional

Optional identifier for the per-document DEK (e.g. UUIDv7 generated client-side).

max 64 Zeichennullable
wrappedKeys object[] erforderlich

Per-recipient wraps of the per-document DEK. Each entry mirrors vault_customer_keys.memberKeys.

min 1 Items
type string erforderlich
userteamrole
id string erforderlich
max 200 Zeichen
wrappedKey string erforderlich
max 1024 Zeichen
ephemeralPublicKey string optional
max 1024 Zeichennullable
addedAt datetime optional
nullable
addedBy uuid optional
nullable
notes string optional

Free-text notes

nullable

Datei-Upload

Dateien werden über die separate File-API hochgeladen, nicht über den Standard-CRUD-Endpoint. Der Flow:

  1. POST /files/v1/uploads — initiiert einen Upload, gibt eine signierte Pre-Sign-URL zurück.
  2. Sie laden die Datei direkt zur Storage-Schicht (PUT).
  3. POST /files/v1/uploads/<id>/finalize — bestätigt den Upload.
  4. POST /api/v1/dms_documents — verknüpft das Dokument mit der Datei.

Versionierung

Versionen liegen als typisierte Liste am Dokument-Datensatz. Eine neue Version laden Sie über die File-API hoch und ergänzen sie über ein PATCH /api/v1/dms_documents/<id> an die Versions-Liste.

Public-Links für externe Zugriffe (z. B. eine Rechnung an einen Kunden):

POST /api/v1/dms_shares
{
  "documentId": "0193…",
  "expiresAt": "2026-06-01T00:00:00Z",
  "passwordProtected": true,
  "downloadAllowed": true
}

Die Antwort enthält einen Slug. Der Empfänger ruft den Link unter /api/v1/public/sharing/<slug> auf.

Signatur-Anfragen

Innerhalb des DMS lassen sich Signatur-Anfragen direkt am Dokument auslösen — dms_signing_requests. Für komplexere Workflows mit mehreren Unterzeichnern, Templates und PAdES-konformer Signatur nutzen Sie das eSign-Modul.

Verwandt

Suche