Skip to navigation

Retrieve validation results

View as Markdown

Retrieve the latest validation result for a document, by either the Staple documentId or the CFDI uuid. Returns the same shape as the Validate Mexico E-Invoice endpoint, reconstructed from the most recent stored validation record.

Endpoint

GET /v2/einvoice/mexico/status/{idOrUuid}

Path Parameters

NameInTypeRequiredDescription
idOrUuidpathStringRequiredEither the Staple documentId (e.g. 245234) or the CFDI uuid (e.g. 699628be-2f06-4bc9-adc2-860b51eecbca). The endpoint resolves either form

Request Headers

AttributeTypeOptionDescription
x-api-keyStringRequiredA unique string
AuthorizationStringRequiredBearer token
AcceptStringOptionalapplication/json

Response (Success)

{
"documentId": "245234",
"uuid": "699628be-2f06-4bc9-adc2-860b51eecbca",
"validation_result": "VALID",
"validatedAt": "2026-07-09T08:29:06.785Z",
"invalid_reason": null,
"steps": {
"schema": { "result": "PASS", "detail": null },
"satStatus": { "result": "PASS", "detail": null },
"rfc": { "result": "PASS", "detail": null }
}
}

Response (INVALID)

{
"documentId": "245234",
"uuid": "699628be-2f06-4bc9-adc2-860b51eecbca",
"validation_result": "INVALID",
"validatedAt": "2026-07-09T08:29:06.785Z",
"invalid_reason": "Cancelled E-Invoice",
"steps": {
"schema": { "result": "PASS", "detail": null },
"satStatus": { "result": "FAIL", "detail": "Cancelled E-Invoice" }
}
}

Response Fields

FieldTypeDescription
documentIdStringThe document id the validation belongs to
uuidStringCFDI Folio Fiscal (UUID)
validation_resultStringVALID or INVALID
validatedAtStringISO timestamp of the validation run
invalid_reasonStringnull
stepsObjectPer-step results — schema, satStatus, rfc

steps.\* Fields

FieldTypeDescription
resultStringPASS or FAIL
detailStringnull

Only the steps that ran in that validation are present.

Notes

  • Returns the most recent validation run — a document may be validated multiple times (the history is append-only).

  • Resolution: a value matching the UUID format is looked up by uuid; otherwise it is treated as a numeric documentId.

  • This is a read-only lookup — it does not trigger a new validation (use the Validate endpoint for that).

Errors

StatusWhen
400 Bad RequestidOrUuid missing, or is neither a valid CFDI uuid nor a numeric documentId
401 / 403Missing/invalid x-api-key or Authorization, or no access to the document
404 Not FoundNo validation record exists for the given documentId/uuid (no validation has been run yet)

That’s all four Mexico endpoints documented (import → creation status → validate → validation status). Want me to paste the Get Document Creation Status endpoint too (the polling one), or provide the Postman example request/response pairs for these so you can fill the right-panel Examples quickly?

Authentication

x-api-keystring
API key issued by Staple.

Path parameters

docidOrUUIDstringRequired

Response

Successful response