← Back to schema index

Validation

Full record of a SPEI validation as a JSON:API resource. Returned by `GET /v1/validations/{id}` and synchronous `POST /v1/validate`.

ExtendsJsonApiResourceBase

Properties

FieldTypeDescription
type*stringJSON:API resource type. Always `validation`.
id*string (uuid)Unique identifier of the validation (UUID v4).
attributes*objectCanonical validation data.
validation_typestring`direct` for text-parameter requests; `ocr` for receipt image requests.
is_playgroundbooleanWhether the validation ran in playground mode. Playground executions still query Banxico but do not consume quota, emit webhooks, or fire notifications.
statusstringLifecycle state: `queued` — enqueued for worker; `processing` — worker handling; `valid` — CEP found and data matches; `not_found` — Banxico queried, transfer not found; `cep_unavailable` — Banxico unreachable; `invalid` — payload rejected post-enqueue; `failed` — terminal failure; `error` — retriable error (Banxico HTTP 5xx).
banxico_statusstring | nullBanxico-reported status after query. `null` before query.
processing_time_msinteger | nullMilliseconds from enqueue to terminal resolution.
request_dataobjectLiteral snapshot of the original request fields.
created_atstring (date-time)UTC timestamp of enqueue.
completed_atstring | nullUTC timestamp of terminal resolution. `null` while `status` is `queued`/`processing`.
enqueued_atstring | nullTimestamp of bus enqueue.
processing_started_atstring | nullTimestamp of the first worker XCLAIM.
expires_atstring | nullExpiration timestamp for queued validations. After this, the job moves to `failed`.
etag_versioninteger | nullIncremental version used for `If-None-Match` polling.
image_pathstring | nullRelative path of the receipt image. OCR only.
ocr_resultobject | nullRaw OCR result. OCR only.
ocr_confidencenumber | nullOCR confidence 0–1. OCR only; `null` for `direct`.
normalized_dataobject | nullNormalized post-OCR fields used to query Banxico.
normalization_warningsarray | nullWarnings emitted by the normalization pipeline.
is_maskedboolean | nullWhether the receipt has a masked PAN.
banxico_resultobject | nullLiteral payload returned by Banxico CEP.
error_messagestring | nullHuman-readable error message when terminal.
error_codeValidationErrorCode | nullMachine-readable error code when terminal.
batch_idinteger | nullBulk import batch identifier if applicable.
batch_positioninteger | nullPosition within the batch (1-indexed).
retry_stateobjectFull retry cycle state. Always present; if retries are not active, `enabled=false` and policy fields are `null`. Bulk import rows always have `enabled=false`.
enabledbooleanWhether the retry cycle is active for this validation.
max_retriesinteger | nullConfigured maximum number of retries. The upper bound depends on the plan (`retry_max_retries`) or the global default `max_retries_cap` (typically 5–10). `null` if `enabled=false`.
interval_secondsinteger | nullInterval between retries in seconds (300–86400). `null` if `enabled=false`.
outcomesarray | nullValidation outcomes that trigger a retry (`not_found`, `cep_unavailable`, `error`). `null` if `enabled=false`.
attempts_completedintegerNumber of retries completed so far.
next_attempt_atTimestampUTC | nullTimestamp of the next scheduled retry. `null` if the cycle is in a terminal state or if no retries are active.
resolved_atTimestampUTC | nullTimestamp when a retry resolved the validation to `valid`. `null` if the cycle has not ended by resolution.
exhausted_atTimestampUTC | nullTimestamp when retries were exhausted without resolution. `null` if the cycle has not ended by exhaustion.
cancelled_atTimestampUTC | nullTimestamp when the cycle was explicitly cancelled. `null` if not cancelled.
terminal_statestring | nullTerminal state of the cycle: `pending` — active, no final result yet; `resolved` — a retry obtained `valid`; `exhausted` — all attempts used; `cancelled` — cancelled by the user. `null` if the validation has no retry cycle.
linksobjectRelated links (JSON:API `links`).
selfstringURL of the validation.
cep_xmlstring | nullURL of the CEP in XML format. `null` if `status` is not `valid`.
cep_pdfstring | nullURL of the CEP in PDF format. `null` if `status` is not `valid`.

Used in operations

  • POST /v1/validate
  • POST /v1/validate-ocr
  • GET /v1/validations/{id}