Compute VeriFactu record hash
verifactu_hashCalculates the VERI*FACTU SHA-256 fingerprint (huella) for one invoice record and links it to the previous chain hash, returning field errors that AEAT would reject.
Instructions
Compute the VERI*FACTU fingerprint (huella, SHA-256) of one invoicing record.
record (AEAT field names; snake_case aliases accepted): alta: IDEmisorFactura, NumSerieFactura, FechaExpedicionFactura (DD-MM-AAAA), TipoFactura (F1, F2, F3, R1-R5), CuotaTotal, ImporteTotal (as written in the XML, decimal point), FechaHoraHusoGenRegistro (AAAA-MM-DDThh:mm:ss+hh:mm). anulación (TipoRegistro="anulacion"): IDEmisorFacturaAnulada, NumSerieFacturaAnulada, FechaExpedicionFacturaAnulada, FechaHoraHusoGenRegistro. previous_huella: fingerprint of the previous record of the chain; empty for the first record. Returns the fingerprint, the exact string hashed and any field problems (an error means the AEAT would reject the record).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"record": "<record>"
},
"name": "verifactu_hash"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| record | Yes | ||
| previous_huella | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||