Verifactu Direct API · cancellation and rejected records
These are two exceptional operations that rarely form part of day-to-day workflows. All example data is fictitious.
Cancel an invoice
Uncommon operation
Cancellation is only for an invoice issued by mistake, one that should never have existed. It is not used to correct errors in an invoice: issue a corrective invoice (R1–R5 registration) for that purpose.
This is an independent record: identify the invoice by (serie, numero, fecha_expedicion). Its registration does not need to have been created in Bilteo.
curl -X POST https://api.test.bilteo.com/api/v1/external-invoices/cancel \
-H "Authorization: Bearer bk_live_xxx" -H "Content-Type: application/json" \
-d '{ "serie": "FV", "numero": "1042", "fecha_expedicion": "2026-02-10" }'
# → 201, { "state": "pending", "verifactu_record_id": "VF…" }If the cancelled invoice is not registered with the AEAT because it was issued or registered elsewhere, add "sin_registro_previo": "S".
Fix a rejected record
Exceptional operation
This correction is very uncommon and outside the normal workflow. Use it only when the AEAT rejected a record because of a submission error, usually an integration bug. It is not a corrective invoice and does not change the fiscal content of an invoice delivered to a customer. It only applies when a corrective invoice or another mechanism under the Spanish Invoicing Regulation is not required. If the invoice is not rejected, this is not the operation you need.
If an invoice is rejected, submit the corrected invoice again to the samePOST /external-invoices endpoint with "rechazo_previo": "X" and the same serie/numero. Bilteo records it as a correction (Subsanacion="S") and reuses the invoice instead of duplicating it.
{ "serie": "FV", "numero": "1042", "fecha_expedicion": "2026-02-10",
"tipo_factura": "F1", "descripcion": "Monthly maintenance",
"rechazo_previo": "X",
"nif": "B72648193", "nombre": "Talleres Marverde SL",
"lineas": [ { "base_imponible": "350", "tipo_impositivo": "21", "cuota_repercutida": "73.50" } ],
"importe_total": "423.50" }rechazo_previo values: N (there was an accepted record), X (not registered with the AEAT) and S (a previous correction was rejected).