← Back to schema index

ValidationImportJob

JSON:API envelope for a bulk validation import job. State lifecycle: pending → parsing → preview_ready → committing → completed (or failed / cancelled).

ExtendsJsonApiResourceBase

Properties

FieldTypeDescription
typestringJSON:API resource type (always `validation_import`).
idstringNumeric job ID as a string (JSON:API convention).
attributesobjectImport job attributes.
statusstringCurrent lifecycle state: `pending` = received, awaiting parsing; `parsing` = extracting and validating rows; `preview_ready` = parsing complete, awaiting user review; `committing` = processing approved rows against Banxico; `completed` = all rows processed; `failed` = unrecoverable error; `cancelled` = cancelled by the user.
upload_typestringUploaded file type: `text` = text file (CSV, XLSX, TXT, JSON); `images` = ZIP file containing receipt images.
file_formatstringFormat of the uploaded file (`csv`, `xls`, `xlsx`, `txt`, `json`, `zip_text`, or `zip_images`).
parse_modestringParse mode: `template` = columns in predefined template order; `free` = automatic column detection with an AI model as fallback.
total_rowsintegerTotal rows detected in the file after parsing.
valid_countintegerValid rows in preview (complete data ready to send to Banxico).
correctable_countintegerCorrectable rows in preview (one or more missing or incorrect fields that the user can edit).
fatal_countintegerFatal rows in preview (not processable even after editing, e.g. invalid tracking key).
duplicate_countintegerRows duplicated within the same batch (same clave_rastreo or other repeated key fields).
dispatched_countintegerRows dispatched to the validation stream after commit. Available only in `committing` and `completed` states.
completed_valid_countintegerRows whose Banxico CEP validation returned `valid`.
completed_not_found_countintegerRows whose Banxico CEP validation was not found in its records.
completed_invalid_countintegerRows rejected by Banxico for invalid data.
completed_cep_unavailable_countintegerRows where Banxico CEP was unavailable during validation.
completed_error_countintegerRows with unresolvable terminal errors (network, captcha, preflight failure).
skipped_countintegerRows skipped from processing (cross-batch duplicates or cancelled by the user).
ocr_invokedbooleantrue if receipt OCR was invoked during parsing. Only relevant when `upload_type = images`.
ocr_input_tokensintegerInput tokens consumed by the AI model for batch OCR. 0 if `ocr_invoked = false`.
ocr_output_tokensintegerOutput tokens generated by the AI model for batch OCR. 0 if `ocr_invoked = false`.
error_codestring | nullError code if the job ended in `failed` state. null in all other states.
error_summarystring | nullError description if the job ended in `failed` state. null if the job did not fail.
created_atstring (date-time)ISO 8601 timestamp in UTC with explicit `Z` suffix. Example: `"2026-05-01T05:14:38Z"`. Every datetime field uses this shape. The descriptor at `meta.datetime` makes the contract runtime-assertable.
parsed_atstring | nullISO 8601 timestamp when parsing was completed. `null` if not yet completed.
committed_atstring | nullISO 8601 timestamp when the commit was completed. `null` if not yet performed.
completed_atstring | nullISO 8601 timestamp when all rows were processed. `null` if the job has not completed.

Used in operations

  • GET /v1/validations/imports/{id}
  • GET /v1/validations/imports/{id}/preview