Environment:
Skip to main content

Re-issue a discarded invoice

When you send an invoice to the SDI through the API, the SDI may discard it (status DISCARDED). In that case the invoice was not accepted: you must fix it and re-issue it, typically keeping the same progressive number (the law allows re-issuing with the same number, within the applicable deadlines, after a rejection).

To re-issue via API you must first delete the discarded invoice

An invoice in DISCARDED status keeps its progressive number reserved: as long as the discarded invoice exists, a new request via API with the same numero is blocked.

On the API, the number is not released on its own: re-issuing a discarded invoice requires deleting it first. Deletion is the necessary step that frees the number and lets you re-issue the corrected invoice.

From the web app, instead, the resend flow for a discarded invoice handles the number for you (see below).

Re-issue flow

  1. Issue the invoice with POST /companies/{company_id}/documents/invoice.
  2. The SDI discards the invoice → the document status becomes DISCARDED (you can catch it via webhook or by reading the document).
  3. Delete the discarded invoice with DELETE /companies/{company_id}/documents/{id} to release the progressive number. This is the prerequisite for re-issuing.
  4. Re-issue the corrected invoice with a new POST .../documents/invoice, reusing the same numero if needed.

Alternatively: re-issue from the web app

A discarded invoice issued via API can also be corrected and re-issued from Sibill's web interface, through the normal resend process for a discarded invoice: open the DISCARDED document, fix the data and resend it to the SDI. In this case no API call is needed and you don't have to delete anything.

info

For the step-by-step procedure in the web app, refer to the help-center article Stati delle fatture emesse su Sibill (in Italian).

Which invoices can be deleted

An electronic invoice can be deleted via API only when its status is one of:

  • DRAFT (draft not yet sent), or
  • DISCARDED (rejected by the SDI), or
  • REFUSED (refused), if it has no linked bookkeeping entries yet.

In any other status — including a SENT invoice (sent and awaiting the SDI's response) — the invoice is not deletable.

caution

You cannot delete an invoice that has already been sent and is awaiting the SDI's response (e.g. SENT), or that has already been delivered/accepted by the SDI (e.g. DELIVERED): both are in a state that cannot be modified via DELETE. To reverse a delivered invoice you issue a credit note / adjustment note, not deletion. A DELETE on a non-deletable invoice is rejected.

In short

  • Discarded invoice ⇒ the number stays reserved; via API releasing it requires an explicit deletion.
  • Re-issuing via API with the same number requires a DELETE of the discarded invoice first, then a new POST.
  • Alternatively you can re-issue it from the web app via the resend process, which handles the number automatically.
  • Delete only invoices in DRAFT/DISCARDED (or REFUSED with no bookkeeping entries), never delivered ones.