Cancel an invoice in the SII: API example

To cancel an invoice the AEAT has registered, send POST /sii/cancel with ejercicio, periodo, serie, numero and fecha_expedicion: it creates a cancellation record.

FieldValue
APISII API
Invoice type or key—
Endpoint/sii/cancel
When to use itRemoving an invoice registered in the SII.

What changes in this case

ejercicio and periodo must be those of the original record, or those of the last modification if there was one. The result is Anulado, or Factura inexistente if the AEAT does not have the invoice.

Cancelling is not correcting: if the operation happened and its amounts change, use a corrective invoice.

JSON request

/sii/cancel
{
  "ejercicio": "2026",
  "periodo": "11",
  "serie": "A",
  "numero": "1",
  "fecha_expedicion": "19-11-2026"
}

Try this case in the test environment

Create your free account and ask soporte@verifacti.com for a SII test NIF; then copy the request and send it with its test API key.

Test environment and test NIF includedRead the documentation