Validate an invoice payload
Dry-runs an invoice creation payload through the exact validations the create endpoint applies, including the register check the recipient tax id gets when it is a Spanish NIF or an EU VAT number, without persisting anything. Failures return the same errors the create endpoint would; success returns the totals the invoice would carry. A passing validation does not reserve an invoice number and cannot fully guarantee the subsequent creation.
Autorizaciones
API key sent as a bearer token in the Authorization header.
Cuerpo
The invoice payload to validate.
- Option 1
- Option 2
The invoice to issue. The invoice number, issue date and totals are assigned server-side; the optional operation_date is the only date the caller sets. Issuance is immediate and the AEAT registration progresses asynchronously (poll verifactu.status). Include a rectifies block to issue a rectificativa instead of an ordinary invoice.
The lines to bill. At least one.
1 - 500 elementsA complete invoice: the recipient is identified and their tax id is validated against the census when it is a Spanish NIF or an EU VAT number. On a linked rectificativa (a rectifies.invoice_id) of a complete original, the recipient is inherited from the corrected invoice and may be omitted; when supplied on a substitution it restates the recipient. On a linked rectificativa type must match the corrected invoice: complete over a simplified original is refused with upgrade_to_complete_not_allowed, and simplified over a complete original with downgrade_to_simplified_not_allowed.
"complete"Your own reference for this invoice, such as an order id: 1 to 255 characters, no control characters. Unique per environment: a later request carrying the same value is rejected with external_id_already_used no matter how old the original is, which is the guard against duplicates that the 24-hour Idempotency-Key window cannot give. Once used, a value stays taken even after the invoice is voided. Echoed as external_id on the invoice.
1 - 255^[^\p{Cc}]{1,255}$"order-84312"
Number series to issue on (see the Number Series resource). Defaults to the environment default series. For an ordinary invoice this must be a standard series; for a rectificativa (a rectifies block) it must be a rectifying series. Rejected with num_series_not_applicable_for_order_invoice on a linked rectificativa against an order-linked invoice, which always numbers on the rectifying series its integration owns for that kind of correction.
"ns_clx456def789"
Turns this request into a rectificativa (corrective invoice). Reference the original with exactly one of invoice_id (issued through Finseed) or external (issued elsewhere). Omit the whole block to issue an ordinary invoice.
Date the underlying operation took place, as a calendar day (YYYY-MM-DD) interpreted in the Europe/Madrid timezone. Must be an existing calendar day between 2025-01-01 and today. When omitted, or when it equals the issue date, the invoice carries the issue date as its operation date. Not supported together with a rectifies block.
^(\d{4})-(\d{2})-(\d{2})$"2025-06-15"
Applies the Spanish recargo de equivalencia regime: every VAT line gains its legally paired surcharge (21%→5.2%, 10%→1.4%, 4%→0.5%), computed server-side.
false
Free-form text printed at the bottom of the invoice PDF.
2000"Pago a 30 días."
The identified recipient of a complete invoice.
Respuesta
The payload is valid, with the totals it would carry.
Successful dry-run of an invoice creation payload.