validate_invoice_chain
Audit a VERI*FACTU invoice chain by recomputing fingerprints, verifying record links, and reporting breaks, altered records, duplicates, and invalid data.
Instructions
Audit a VERI*FACTU chain of records (in generation order) given as JSON objects.
Each record has the fields of verifactu_hash plus Huella (stored fingerprint) and optionally
HuellaAnterior or RegistroAnterior {IDEmisorFactura, NumSerieFactura, FechaExpedicionFactura, Huella} and
PrimerRegistro ("S"). For every record the fingerprint is recomputed and compared, and the link to the
previous record checked. Reports chain breaks, altered records, PrimerRegistro misuse, duplicate invoices,
cancellations of unknown invoices, timestamps going backwards, invalid NIF/dates/amounts/TipoFactura.
continues_from: last fingerprint of the previous batch, to audit a chain in pieces. Up to 20,000 records.
last_huella is what the next record must link to.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| records | Yes | ||
| continues_from | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||