Fehlercodes · ksef · Polen

KSEF-21401Im Rechnungssystem

Document does not conform to the KSeF XSD schema

So lautet die Ablehnung wörtlich: „[KSEF-21401] KSeF error 21401 ("Dokument nie jest zgodny ze schemą (xsd)") is returned when the invoice payload fails XSD schema validation against the FA schema published by the Polish Ministry of Finance. The API rejects the payload before any business validation runs, so no reference number is issued and the invoice is not stored.“

The KSeF ingestion pipeline validates every submission against the currently active FA schema (FA(2) or FA(3) for KSeF 2.0). Validation happens synchronously on /online/Invoice/Send and asynchronously on batch endpoints. When it fails, the API returns HTTP 400 with exceptionCode 21401 and, when available, an exceptionDetailList of XPath locations and XSD messages.

Was Sie bereithaltenNichts. Die Datei muss im Rechnungssystem neu erzeugt werden; wir prüfen sie danach erneut.
Was wir tunRegenerate the invoice against the exact FA schema version declared in the session header, fix each schema violation using the exceptionDetailList (missing required elements, wrong data types, wrong element order, unknown namespaces), and resubmit.
So sieht der Befund ausBeispiel
BefundAufbau fehlerhaft · KSEF-21401
Von IhnenNeu exportierte Datei
DanachNeu exportieren
NachweisSHA-256 und /verify-Link nach der Prüfung