Fehlercodes · ksef · Polen
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.