POST
/
invoices
/
{id}
/
unvoid
curl -X POST https://api.contazen.ro/v1/invoices/inv_9z8y7x6w5v/unvoid \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
{
  "success": true,
  "data": {
    "object": "invoice",
    "id": "inv_9z8y7x6w5v",
    "invoice_number": "CTZ-2024-00123",
    "status": "issued",
    "voided": false,
    "unvoided_at": "2024-03-20T10:30:00Z",
    "efactura_available": true,
    "message": "Invoice has been successfully reactivated"
  },
  "meta": {
    "version": "v1",
    "response_time": "45.23ms"
  }
}

Description

Unvoids (reactivates) a previously voided invoice, making it active again. This operation restores the invoice to its pre-void state and, if applicable, restores e-Factura availability if the invoice hasn’t been sent to ANAF.
Important: Only voided invoices can be unvoided. Deleted invoices cannot be recovered as they are permanently removed from the system.

Request

id
string
required
The invoice ID to unvoid

Invoice State Transitions

Current StateCan Unvoid?Result StateNotes
Voided✅ YesActive (Issued/Paid)Restores to pre-void state
Active❌ No-Invoice is already active
Draft❌ No-Drafts cannot be voided/unvoided
Deleted❌ No-Deleted invoices are permanently removed

E-Factura Behavior

When unvoiding a fiscal invoice:
  • If the invoice was not yet sent to ANAF: efactura_available is restored to true
  • If the invoice was already sent to ANAF: efactura_available remains false (cannot resend)
  • Non-fiscal invoices are not affected

Response

success
boolean
Indicates if the request was successful
data
object
Confirmation details
curl -X POST https://api.contazen.ro/v1/invoices/inv_9z8y7x6w5v/unvoid \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
{
  "success": true,
  "data": {
    "object": "invoice",
    "id": "inv_9z8y7x6w5v",
    "invoice_number": "CTZ-2024-00123",
    "status": "issued",
    "voided": false,
    "unvoided_at": "2024-03-20T10:30:00Z",
    "efactura_available": true,
    "message": "Invoice has been successfully reactivated"
  },
  "meta": {
    "version": "v1",
    "response_time": "45.23ms"
  }
}

Use Cases

Accidental Void Recovery

If an invoice was voided by mistake, you can quickly restore it to active status:
// Accidentally voided the wrong invoice
await api.invoices.void('inv_wrong_one');

// Restore it immediately
await api.invoices.unvoid('inv_wrong_one');

Reprocessing Workflow

When you need to temporarily void and then restore invoices for batch processing:
// Void for processing
await api.invoices.void(invoiceId);

// Do some processing...

// Restore if conditions are met
if (shouldRestore) {
  await api.invoices.unvoid(invoiceId);
}