ErrorsBy category
Invoices errors
All error codes returned by the Invoices endpoints (86 total).
Every error returned by the Invoices endpoints. Click any code for the full example response and localized messages.
| Code | Message |
|---|---|
BULK_PDF_ERROR | Error processing bulk PDF download |
CANCELLATION_VIA_SPECIFIC_ENDPOINT | To cancel an invoice use the specific cancellation endpoint |
CANNOT_DUPLICATE_DELETED_INVOICE | Cannot duplicate a deleted invoice |
CLIENT_NOT_FOUND | Customer not found: {0} |
DELETION_FAILED | Error deleting the invoice |
DUE_DATE_BEFORE_ISSUE_DATE | Due date cannot be before the issue date |
EXEMPT_ZERO_RATE_REQUIRES_REASON | Lines with 0% tax rate must declare an exemption reason. Use one of: EXENTA_ART_20..26, NO_SUJETA_ART_7_9, NO_SUJETA_LOCALIZACION, ISP_ART_84_2_*, OTRO |
EXEMPTION_REGIME_NOT_SUPPORTED_IN_VERIFACTU | The given exemption reason corresponds to a special regime (REAEA, equivalence surcharge, cash basis, investment gold…), not to an art. 20-26 LIVA exemption. VeriFactu models it with clave_regimen, not operacion_exenta. Switch to the appropriate clave_regimen. |
EXEMPTION_REQUIRES_RECIPIENT_ID_TYPE | Exemption {0} requires the recipient to carry an alternative identifier of type {1} |
INVALID_IRPF | Invalid income tax withholding type: ''{0}''. Allowed values: {1} |
INVALID_IVA_SURCHARGE_PAIR | Surcharge {0}% is not valid for VAT {1}%. Allowed pairs: 21↔5.2, 10↔1.4, 4↔0.5 |
INVALID_LINE | The invoice line is not valid: {0} |
INVALID_PERCENTAGE | The percentage {0} is not valid. It must be between 0 and 100 |
INVALID_SURCHARGE | Invalid equivalence surcharge type: ''{0}''. Allowed values: {1} |
INVALID_TAX | The tax type ''{0}'' is not valid |
INVALID_VAT | Invalid VAT type: ''{0}''. Allowed values: {1} |
INVOICE_NO_LINES | The invoice must have at least one line |
INVOICE_NOT_FOUND | Invoice not found |
ISP_INCOMPATIBLE_WITH_SURCHARGE | Reverse-charge (ISP) lines cannot carry equivalence surcharge: the buyer auto-liquidates VAT in their country and Spanish retail surcharge does not apply |
ISSUE_DATE_IN_FUTURE | Issue date cannot be in the future. To issue an invoice on a future date, use POST /v1/invoices/{id}/schedule |
ISSUE_DATE_REQUIRED | Issue date is required |
LINE_EXEMPTION_TEXT_REQUIRED | A descriptive text is required when the exemption reason is OTHER |
LINE_EXEMPTION_WITH_TAX | Line has an exemption reason but the tax rate is not 0%. Current value: {0}% |
LINE_INVALID_DISCOUNT | The discount must be between 0 and 100. Received value: {0} |
LINE_INVALID_QUANTITY | The quantity cannot be zero or null |
LINE_NEGATIVE_PRICE | The unit price cannot be negative |
LINE_TOTAL_INCONSISTENT | Line totals do not reconcile: expected {0}€ (base + VAT + surcharge - IRPF), declared {1}€. Difference exceeds 0.01€ |
LINE_ZERO_PRICE | The unit price cannot be zero |
MARK_SENT_ALREADY_SENT | The invoice is already in SENT status. |
MARK_SENT_FROM_DRAFT_NOT_ALLOWED | Cannot mark an invoice in DRAFT status as SENT. Issue it first. |
MARK_SENT_FROM_INVALID_STATE | Cannot mark as SENT from status {0}. |
MARK_SENT_FROM_LATER_STATE | Cannot mark an invoice in {0} status as SENT. The invoice is already in a later state. |
METADATA_FILTER_TOO_MANY_KEYS | The metadata filter supports at most {0} key/value pairs per request |
NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE | The invoice total cannot be negative. Use corrective invoices (R1-R5) for refunds. |
NO_INVOICES_PROVIDED | No invoices provided |
NO_PDFS_AVAILABLE | No PDFs available for download |
ONLY_DRAFT_EMITTABLE | Only draft invoices can be issued. Current status: {0} |
OPERATION_DATE_AFTER_ISSUE_DATE | Operation date cannot be after the issue date |
OSS_REGIME_INCOMPATIBLE_WITH_ISP | OSS/IOSS regime (key 17) is incompatible with reverse charge. The destination-country VAT is declared separately (Modelo 369), not as S2 |
PAYMENT_DATE_REQUIRED | Payment date is required to mark the invoice as paid |
PDF_HASH_ERROR | Error calculating PDF hash |
PDF_NOT_GENERATED | The invoice PDF has not been generated yet |
PDF_URL_EMPTY | The PDF URL is empty |
PREVIEW_DRAFT_ONLY | PDF preview is only available for draft invoices |
PREVIEW_GENERATION_ERROR | Error generating PDF preview |
RECIPIENT_ADDRESS_REQUIRED | Recipient address is required for standard invoices |
RECIPIENT_FISCAL_NAME_REQUIRED | Recipient legal name is required for standard invoices |
RECIPIENT_ID_REQUIRED | Recipient must have a NIF or alternative identifier |
RECIPIENT_NIF_AND_ID_OTHER_EXCLUSIVE | The recipient cannot carry both a Spanish NIF and an alternative identifier. Use only one |
RECIPIENT_REQUIRED_FOR_ORDINARY | Ordinary invoices require a valid recipient |
RECTIFICATION_REASON_TOO_SHORT | The rectification reason must be at least {0} characters |
RECTIFICATIVA_PARCIAL_SIN_LINEAS | Partial rectificative invoices must include correction lines. Use negative quantities/amounts to subtract, positive to add. |
RECTIFICATIVA_TOTAL_CON_LINEAS | Total rectificative invoices must not include lines. Lines are automatically copied from the original invoice with negative amounts. |
RECURRING_END_DATE_BEFORE_START | The end date must be after the first scheduled generation ({0}) |
RECURRING_INVALID_DAY_OF_MONTH | The day of the month must be between 1 and 31 |
RECURRING_INVOICE_DELETED | Cannot create recurrence from a deleted invoice |
RECURRING_NO_LINES | At least one line must be included |
RECURRING_NOT_FOUND | Recurring invoice not found |
RECURRING_START_DATE_NOT_EDITABLE | Cannot modify the start date because invoices have already been generated |
RECURRING_TYPE_NOT_SUPPORTED | Cannot create a recurrence from a rectificative invoice |
REGIME_REQUIRES_INCOMPATIBLE_EXEMPTION | Regime {0} requires exemption reason {1}; the line does not carry it |
REGIME_REQUIRES_SURCHARGE | Regime {0} requires recargo de equivalencia and the line does not carry it |
REVERT_ONLY_FROM_SENT | Can only revert from SENT status. Current status: {0} |
SCHEDULED_DATE_IN_PAST | The scheduling date cannot be in the past |
SCHEDULED_DATE_REQUIRED | The scheduling date is required |
SERIES_DOCUMENT_TYPE_INCOMPATIBLE | Series ''{0}'' (type {1}) is not compatible with invoices of type {2} |
SERIES_FORMAT_EMPTY | The format cannot be empty |
SERIES_FORMAT_INVALID_PADDING | Invalid padding for {NUM}: {0} |
SERIES_FORMAT_LOWERCASE_VARS | Lowercase variables detected: {0}. Variables must be UPPERCASE (e.g., {CODIGO}, {YYYY}, {MM}, {NUM}) |
SERIES_FORMAT_NUM_REQUIRED | Variable {NUM} is required in the format. Sequential numbering is required by law |
SERIES_FORMAT_UNRECOGNIZED_VARS | Unrecognized variables: {0}. Valid variables: {CODIGO}, {YYYY}, {YY}, {MM}, {NUM}, {NUM:X} |
SERIES_INACTIVE | The invoice series ''{0}'' is inactive |
SERIES_NOT_FOUND | Invoice series ''{0}'' not found |
SIMPLIFICADA_FORBIDS_CROSS_BORDER | Simplified invoices cannot cover intra-EU or OSS operations: identify the recipient and issue an ordinary invoice |
SIMPLIFICADA_FORBIDS_IRPF | Simplified invoices cannot carry IRPF withholding (AEAT: retention must not be reported) |
SIMPLIFICADA_FORBIDS_ISP | Simplified invoices cannot carry reverse-charge: the anonymous recipient cannot auto-liquidate |
STATUS_NOT_DELETABLE | Cannot delete an invoice in status {0} |
STATUS_NOT_IMPLEMENTED | Status ''{0}'' is not implemented |
STATUS_NOT_MODIFIABLE | The invoice status cannot be modified |
SURCHARGE_REQUIRES_REGIME | Recargo de equivalencia is only compatible with regime 18; the line is on regime {0} |
TEMPLATE_MISSING_REQUIRED_VARIABLE | Template requires variable: {0} |
TEMPLATE_UNKNOWN_VARIABLE | Template contains unknown variable: {0} |
TRANSITION_NOT_SUPPORTED | Transition to status {0} is not supported |
TYPE_CHANGE_CORRECTIVE_FORBIDDEN | Cannot change type to/from CORRECTIVE |
TYPE_REQUIRED | Invoice type is required |
ZIP_GENERATION_ERROR | Error generating ZIP file |