Error codes · KSeF 2.0 · Poland

KSEF-21180Partly

KSeF session status does not allow this operation

This is the rejection, word for word: „[KSEF-21180] The KSeF 2.0 API rejected your request because the session referenced by referenceNumber is in a state that does not permit the requested action. Typical example: attempting POST /sessions/online/{ref}/invoices while the session status is 415 (closing) or an already-terminal status such as 445 (no valid invoices). The invoice itself was never processed.

Endpoints that surface this error include POST /sessions/online/{referenceNumber}/invoices, POST /sessions/online/{referenceNumber}/close, and POST /sessions/batch/{referenceNumber}/close. The Polish message returned is "Status sesji nie pozwala na wykonanie operacji". The error payload usually includes the numeric session status. States that block invoice submission include 415 (closing initiated), 425/435 (processing terminated), and 445 (finished — no valid invoices).

What to have readyThe correct figures from your bookkeeping; we show you which field is affected.
What we doOpen a fresh session and retry. Never reuse a referenceNumber after the session has moved past status 200.
What the finding looks likeExample
FindingNeeds your check · KSEF-21180
From youThe correct figures
ThenChecked again
ProofSHA-256 and /verify link after the check