---
title: "Returns a validation batch"
method: GET
path: "/validation/batches/{validation_batch_id}"
tags: ["Account Validation"]
---

# Returns a validation batch

`GET /validation/batches/{validation_batch_id}`

## Request

- Base URL: `https://api.validator.shinkansen.finance/v1`
- URL: `https://api.validator.shinkansen.finance/v1/validation/batches/{validation_batch_id}`
- Auth: API key in header `Shinkansen-Validator-Api-Key`

Returns the batch and every validation request it contains, in their
current state. Requests that are not `pending` include their `response`.
Useful to check a batch whose webhook you did not receive.

## Response `200`

Validation batch found.

- PublicBatch: Validation batch with all its requests (public endpoint)
  - `id` string, required: The id of the validation batch, as you sent it.
  - `source_type` 'api' | 'file' | 'other', required: How the batch was created: `api` through this endpoint, `file` or `other` through the Shinkansen Dashboard.
  - `source_name` string, required
  - `status` 'pending' | 'performed', required: The status of the batch as a whole: * `pending` while at least one of its validation requests is pending. * `performed` once none is pending. Shinkansen checks batches every minute, so a batch is closed up to a minute after its last result. Requests that failed or timed out count as finished.
  - `timeout_at` string, date-time, nullable: When the batch times out (batches created through this endpoint only). Requests still pending at that time are closed as `error`, with `return_code` `unable_to_validate` and `return_message` `batch_timed_out`.
  - `closed_at` string, date-time, nullable: When the batch changed to `performed`. `null` while pending.
  - `validation_requests` RequestWithAllFields[], required: Every validation request of the batch, in its current state.
    - `id` string, uuid, required: The id of the validation request. Set by customer. Must be unique. It is used for idempotency: You can retry the same request with the same id and Shinkansen Validator will process it only once.
    - `perform_account_access_check` boolean: When set to `true`, Shinkansen will transfer a random amount (between $1 and $99 CLP) instead of the fixed $1. After the transfer is confirmed, the transferred amount (`access_check_amount`) will be included in the response. The customer can then ask the end user how much they received to verify account ownership. Only available for CLP currency. Requires the `validator_variable_amount_cl` product to be enabled.
    - `account_details` AccountDetails, required: Validation Account Details
      - `name` string: Name of the account holder.
      - `identification` object: The identifier for a legal or natural person
        - `id_schema` string, required: Identification schema. See https://docs.shinkansen.tech/docs/tipos-de-identificacion
        - `id` string, required: The actual identification "number" (but not always just numbers). For `"MXRFC"` schema (Mexican RFCs), it can contain numbers and letters (13 for natural persons, 12 for legal entities). For `"MXCURP"` schema (Mexican CURPs) identifying natural persons, it can contain numbers and letters (18 characters). For `"COCC"`, `"COTI"`, `"CONUIP"`, and `"COCE"` schemas (all identifying natural personal in Colombia), use only numbers. For `"CONIT"` schema (Colombian NITs, for legal entities), also use only numbers. For `"PASS"` schema (Passports, used in Colombia for some accounts in name of foreign natural persons), it can contain numbers and letters (and generally whatever is literally printed as a passport number). For `"CLID"` schema (Chilean RUTs, for legal entities and natural persons) you must use the XXXXXXXX-X format: `^\d{8}[-][0-9kK]$`. See https://docs.shinkansen.tech/docs/tipos-de-identificacion for more details.
      - `financial_institution` object: The identifier for a financial institution
        - `fin_id_schema` string, required: Identification schema for financial institution, namely, any participant in Shinkansen Network. Use `"SHINKANSEN"` for Shinkansen's native network ids and full support on any participant and service of the Shinkansen network. Other schemas might be used when interfacing with other networks but they are *not* recommended unless you *really* know what you are doing or have been explicitly instructed to do so by Shinkansen.
        - `fin_id` string, required: Identification according to schema. When the `"SHINKANSEN"` schema is used (as recommended), this is the ID assigned by Shinkansen to the participant in the network. In the context of the `header`, it refers to the Shinkansen network participant that sends (Sender) or receives (Receiver) the message. In the context of the `transactions`, it refers to the financial institution from which the resources leave or where the resources arrive. The ID assigned by Shinkansen to the financial institution can be found in https://docs.shinkansen.tech/docs/instituciones-financieras. When sending a transaction to Shinkansen, this value must always be SHINKANSEN. When sending a payout order to Shinkansen Treasury, this value must be SHINKANSEN_TREASURY
      - `account` string, required: The account number
      - `account_type` string, required: Account type. See https://docs.shinkansen.tech/docs/tipos-de-cuentas for possible values.
      - `currency` string, required: Currency ISO 4217 code (e.g: `"CLP"`)
      - `email` string, email: E-mail of the legal or natural person owning the account. Used for email notifications. REQUIRED for validations in 🇨🇱
    - `inserted_at` string, date-time, required: The timestamp when the validation request was created. Set by Shinkansen Validator.
    - `updated_at` string, date-time, required: The timestamp when the validation request was last updated. Set by Shinkansen Validator.
    - `status` 'pending' | 'performed' | 'error', required: The validation status. Set by Shinkansen Validator. One of: * pending: The validation is still pending. A response hasn't been generated yet and will not be present * performed: The validation was performed. Therefore the validation response will be present and its `return_code` is `valid_account_details`, `invalid_account_details` or, 🇲🇽 only, `no_id_on_bank`. * error: The validation couldn't be performed due to an error. Therefore the validation `response` code is `unable_to_validate`. You can retry by posting a new validation request with a different id and same content.
    - `access_check_amount` number: The random amount (in CLP) that was transferred to the account for ownership verification. Only present when `perform_account_access_check` is `true` and `status` is `performed`. Not included when status is `pending` or `error`. The customer should ask the end user how much they received and compare it with this value.
    - `response` RequestResponse: Validation response
      - `return_code` 'valid_account_details' | 'invalid_account_details' | 'unable_to_validate' | 'no_id_on_bank', required: The validation return code. Set by Shinkansen Validator. One of: * valid_account_details: The account details are valid ✅ * invalid_account_details: The account details are invalid ❌ * unable_to_validate: Unable to validate the account details ❓ * no_id_on_bank: 🇲🇽 only. The account exists, but the bank did not report the account holder's RFC or CURP, so the holder could not be identified (when the request only had the CLABE) or compared (when the request included an RFC or CURP). The holder name and bank reported by the bank are still returned. See `found_account_details`.
      - `return_message` string, required: A human-readable validation response message. Set by Shinkansen Validator.
      - `available_account_check_types` string[]: Account access checks available for the account. Set by Shinkansen Validator. Usually empty.
      - `invalid_account_details_reason` 'account_not_found' | 'account_detail_mismatch' | 'invalid_account_holder_id' | 'invalid_account' | 'unknown' | 'null', nullable: Invalid details reason code. Set by Shinkansen Validator. Could be nil or empty string. One of: * account_not_found: The account was not found from the provided details. * account_detail_mismatch: The account details are invalid either because the account number or the identity of the account holder does not match. * invalid_account_holder_id: The account holder ID is invalid. * invalid_account: The account number is invalid. * unknown: Shinkansen Validator was unable to determine the reason, but the account details are invalid.
      - `found_account_details` object: 🇲🇽 only. What the bank's transfer receipt (CEP) says about the account holder: the name and the RFC or CURP the bank reported, plus the bank Shinkansen derived from the CLABE prefix (the receipt does not name it). The id is trimmed and upper-cased; otherwise it is as reported. Present when the result came from the CEP: `valid_account_details`, `invalid_account_details` with `account_detail_mismatch`, and `no_id_on_bank`. Absent on `account_not_found` (the bank rejected the transfer, so there is no receipt), on `unable_to_validate` and while the validation is `pending`. When the request only had the CLABE, these details are also copied into `account_details`. When the request included an RFC or CURP, `account_details` keeps the request's values and this is where you can see what the bank reported.
        - `name` string, required: Name of the account holder reported by the bank.
        - `identification` object, nullable, required: RFC (`MXRFC`) or CURP (`MXCURP`) of the account holder reported by the bank. An 18-character id is a CURP; any other id of 9 or more characters is an RFC, which may or may not include its 3-character homoclave. `null` when the bank reported no usable id (missing, empty, a placeholder such as `NA`, or shorter than 9 characters); `return_code` is then `no_id_on_bank`.
          - `id_schema` 'MXRFC' | 'MXCURP', required
          - `id` string, required
        - `financial_institution` FinancialInstitutionId, required: The identifier for a financial institution
          - `fin_id_schema` string, required: Identification schema for financial institution, namely, any participant in Shinkansen Network. Use `"SHINKANSEN"` for Shinkansen's native network ids and full support on any participant and service of the Shinkansen network. Other schemas might be used when interfacing with other networks but they are *not* recommended unless you *really* know what you are doing or have been explicitly instructed to do so by Shinkansen.
          - `fin_id` string, required: Identification according to schema. When the `"SHINKANSEN"` schema is used (as recommended), this is the ID assigned by Shinkansen to the participant in the network. In the context of the `header`, it refers to the Shinkansen network participant that sends (Sender) or receives (Receiver) the message. In the context of the `transactions`, it refers to the financial institution from which the resources leave or where the resources arrive. The ID assigned by Shinkansen to the financial institution can be found in https://docs.shinkansen.tech/docs/instituciones-financieras. When sending a transaction to Shinkansen, this value must always be SHINKANSEN. When sending a payout order to Shinkansen Treasury, this value must be SHINKANSEN_TREASURY
  - `inserted_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `403`: Forbidden (e.g: wrong API Key)
- `404`: No batch with that id for your organization (empty body).

---

[API](https://skmtc.dev/shinkansen/apis/validator-shinkansen-endpoints.md) - [All operations](https://skmtc.dev/shinkansen/apis/validator-shinkansen-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/shinkansen/apis/validator-shinkansen-endpoints/revisions/4502fbbb6325?raw)
