Corrections and reversals
Full reversal
POST /public/v1/outgoing-invoices/{invoiceId}/reverse creates a full document with the opposite effect. Set issue: false to inspect the generated document before issuing it separately.
Correction: preview, then confirm
POST /public/v1/outgoing-invoices/{invoiceId}/correct/preview calculates a correction plan, binds it to the current chain version, and returns a short-lived planId.
POST /public/v1/outgoing-invoices/{invoiceId}/correct consumes that plan once. It must belong to the same client, organization, and source document.
Raw P10/384 correction
Preview accepts direct XML with IIProxy-Correction-Reason, or a JSON UBL envelope with reason. The document must be a due-payment P10 Invoice with InvoiceTypeCode 384, and its BG-3 reference must identify the current effective document number and date.
Before confirmation, Klik Račun locks the chain root, verifies all earlier documents, rejects stale or parallel plans, blocks corrections while an advance application is active, prevents supplier, customer, and currency changes, revalidates the artifact, and stores an immutable new XML version and digest.
It returns IIPROXY_CORRECTION_ACTION_REQUIRED. This prevents bypassing the document chain; it does not limit raw XML support.