Skip to main content
POST
Validate an invoice payload

Autorizaciones

Authorization
string
header
requerido

API key sent as a bearer token in the Authorization header.

Cuerpo

application/json

The invoice payload to validate.

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.

line_items
object[]
requerido

The lines to bill. At least one.

Required array length: 1 - 500 elements
type
string
requerido

A complete invoice: the recipient is identified and their tax id is validated against the census. On a linked rectificativa (a rectifies.invoice_id) the recipient is inherited from the corrected invoice and may be omitted; when supplied on a substitution it restates the recipient.

Allowed value: "complete"
number_series_id
string

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.

Ejemplo:

"ns_clx456def789"

rectifies
object

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.

operation_date
string

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.

Pattern: ^(\d{4})-(\d{2})-(\d{2})$
Ejemplo:

"2025-06-15"

recargo_equivalencia
boolean

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.

Ejemplo:

false

Free-form text printed at the bottom of the invoice PDF.

Maximum string length: 2000
Ejemplo:

"Pago a 30 días."

recipient
object

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.

valid
boolean
requerido

Always true on a 200: the payload passed every validation the create endpoint runs. Failures return the same error responses the create endpoint would.

totals
object
requerido

The exact totals the invoice would carry if created with this payload.