Retrieve validation results

View as Markdown
# Get Mexico Validation Status 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 | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `idOrUuid` | path | String | Required | Either the Staple `documentId` (e.g. `245234`) or the CFDI `uuid` (e.g. `699628be-2f06-4bc9-adc2-860b51eecbca`). The endpoint resolves either form | ## Request Headers | Attribute | Type | Option | Description | | --- | --- | --- | --- | | `x-api-key` | String | Required | A unique string | | `Authorization` | String | Required | Bearer token | | `Accept` | String | Optional | `application/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 | Field | Type | Description | | --- | --- | --- | | `documentId` | String | The document id the validation belongs to | | `uuid` | String | CFDI Folio Fiscal (UUID) | | `validation_result` | String | `VALID` or `INVALID` | | `validatedAt` | String | ISO timestamp of the validation run | | `invalid_reason` | String | null | | `steps` | Object | Per-step results — `schema`, `satStatus`, `rfc` | ### `steps.\*` Fields | Field | Type | Description | | --- | --- | --- | | `result` | String | `PASS` or `FAIL` | | `detail` | String | null | 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 | Status | When | | --- | --- | | `400 Bad Request` | `idOrUuid` missing, or is neither a valid CFDI uuid nor a numeric documentId | | `401 / 403` | Missing/invalid `x-api-key` or `Authorization`, or no access to the document | | `404 Not Found` | No 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