VeriFactu records accepted with errors get their own status: ACCEPTED_WITH_ERRORS
A record the AEAT accepted but flagged with errors now reads ACCEPTED_WITH_ERRORS instead of ACCEPTED, on the invoice, the filter and the webhook.
Until now a record the AEAT accepted while reporting errors in it was published as ACCEPTED, with an error_code alongside. It now has its own value, ACCEPTED_WITH_ERRORS, and ACCEPTED means accepted without remarks. This applies to records accepted before this change too.
What else changed
verifactu_status=ACCEPTEDreturns fewer invoices: the ones accepted with errors matchACCEPTED_WITH_ERRORS.verifactu.status.updatedcan carryACCEPTED_WITH_ERRORSinnew_statusandprevious_status. The record stands at the AEAT and its QR is valid, but the flagged data must be reviewed.error_codeis now described once, asVeriFactuErrorCode. It is still a string: the AEAT's numeric code (for example1105) or a BeeL. code such asRECIPIENT_VAT_NOT_IN_VIESwhen the submission was refused before reaching the AEAT. Generated clients may get a new type name.- What to do: if you validate the status against a closed enum, add
ACCEPTED_WITH_ERRORSand treat any value you do not recognise as unknown, since more may be added.
Endpoints
- GET/v1/companies/{company_id}/invoices
verifactu_statusacceptsACCEPTED_WITH_ERRORS - GET/v1/companies/{company_id}/invoices/{invoice_id}
verifactu.submission_statuscan beACCEPTED_WITH_ERRORS
Where to go next
Filter invoices pending collection
`pending_collection_only=true` lists the invoices still waiting for payment, whatever their status: issued, sent, overdue or rectified.
The VeriFactu status webhook reports a new rejection reason and the real previous status
`verifactu.status.updated` is also sent when a rejected record is rejected for a different reason, and `previous_status` now carries the status of the record it replaces.