Einvoice XML Validation
Run SAT validation on an already-created document. Executes three steps in order and records the outcome (audit log + validation-history row):
-
Schema — CFDI 4.0 structure + required attributes.
-
SAT status — queries SAT’s
ConsultaCFDIServicefor the invoice status (Vigente= valid). -
RFC — the receiver RFC matches the configured company RFC.
The document must have finished importing (creation status = SUCCESS) before it can be validated.
Endpoint
POST /v2/einvoice/mexico/validate
Request Headers
Request Payload
Response (Success — VALID)
Response (INVALID)
Response Fields
steps.\* Fields
Only the steps that actually ran are present. Validation stops at the first failing step, so e.g. a schema failure returns steps.schema only; a SAT failure returns schema + satStatus.
Notes
-
documentIdis the main identifier for this endpoint. -
Validation can only run once the document’s creation
status = SUCCESS(document isRECEIVED/COMPLETED). -
Common
satStatus.detailvalues:Cancelled E-Invoice,E-Invoice Not Found,Unknown SAT Status:,SAT service unavailable: no response after 3 attempts. -
Every call is recorded as a validation-history row and an audit-trail entry (
validated_document).
Errors
Want the example request/response pairs formatted for Postman (so you can drop them into saved Examples — e.g. one VALID, one INVALID – Cancelled, one 400 – not processed), or shall I paste the status endpoint next?