{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/toku/json-schema/toku-create-beneficiaries-response-schema.json",
  "title": "CreateBeneficiariesResponse",
  "description": "Resultado de una carga masiva de Beneficiaries, fila por fila.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/toku-beneficiaries-api-openapi.yml#/components/schemas/CreateBeneficiariesResponse",
  "properties": {
    "accounts_created": {
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/BeneficiaryAccount"
          },
          {
            "$ref": "#/$defs/BeneficiaryAccountTokenized"
          }
        ]
      },
      "title": "Accounts Created",
      "type": "array"
    },
    "accounts_created_count": {
      "title": "Accounts Created Count",
      "type": "integer"
    },
    "accounts_errors": {
      "items": {
        "$ref": "#/$defs/AccountCreationError"
      },
      "title": "Accounts Errors",
      "type": "array"
    },
    "accounts_failed_count": {
      "default": 0,
      "title": "Accounts Failed Count",
      "type": "integer"
    },
    "accounts_omitted": {
      "items": {
        "$ref": "#/$defs/AccountOmission"
      },
      "title": "Accounts Omitted",
      "type": "array"
    },
    "accounts_omitted_count": {
      "default": 0,
      "title": "Accounts Omitted Count",
      "type": "integer"
    },
    "beneficiaries_created": {
      "items": {
        "$ref": "#/$defs/Beneficiary"
      },
      "title": "Beneficiaries Created",
      "type": "array"
    },
    "beneficiaries_created_count": {
      "description": "Cantidad de Beneficiaries creados.",
      "title": "Beneficiaries Created Count",
      "type": "integer"
    },
    "beneficiaries_errors": {
      "items": {
        "$ref": "#/$defs/BeneficiaryCreationError"
      },
      "title": "Beneficiaries Errors",
      "type": "array"
    },
    "beneficiaries_failed_count": {
      "description": "Cantidad de Beneficiaries que no se pudieron crear.",
      "title": "Beneficiaries Failed Count",
      "type": "integer"
    },
    "beneficiaries_omitted": {
      "items": {
        "$ref": "#/$defs/BeneficiaryOmission"
      },
      "title": "Beneficiaries Omitted",
      "type": "array"
    },
    "beneficiaries_omitted_count": {
      "description": "Cantidad de Beneficiaries omitidos por existir previamente.",
      "title": "Beneficiaries Omitted Count",
      "type": "integer"
    },
    "id_beneficiary_batch": {
      "description": "Identificador del lote que agrupa todo lo creado en esta llamada.",
      "format": "uuid",
      "title": "Id Beneficiary Batch",
      "type": "string"
    }
  },
  "required": [
    "id_beneficiary_batch",
    "beneficiaries_created_count",
    "beneficiaries_omitted_count",
    "beneficiaries_failed_count",
    "accounts_created_count"
  ],
  "type": "object",
  "$defs": {
    "AccountCreationError": {
      "description": "A beneficiary account row that could not be created during bulk creation.",
      "properties": {
        "beneficiary_external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "external_id of the beneficiary the account belongs to.",
          "title": "Beneficiary External Id"
        },
        "code": {
          "allOf": [
            {
              "$ref": "#/$defs/BulkCreationErrorCode"
            }
          ],
          "description": "Motivo por el que la fila no se pudo crear: `VALIDATION_ERROR` es que no cumple el formato o las reglas del país, y `PERSISTENCE_ERROR` que era válida y falló al guardarse, así que reintentarla puede funcionar. Es un código estable, pensado para que lo traduzcas a tu propio texto."
        },
        "external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "external_id of the rejected account row.",
          "title": "External Id"
        },
        "message": {
          "description": "Texto en inglés de la falla; respaldo si no traduces el `code`.",
          "title": "Message",
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "title": "AccountCreationError",
      "type": "object"
    },
    "AccountOmission": {
      "description": "A beneficiary account row skipped during bulk creation because it already existed (not an error).",
      "properties": {
        "beneficiary_external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "external_id of the beneficiary the account belongs to.",
          "title": "Beneficiary External Id"
        },
        "code": {
          "allOf": [
            {
              "$ref": "#/$defs/BulkCreationOmissionCode"
            }
          ],
          "default": "ALREADY_EXISTS",
          "description": "Motivo por el que la fila se omitió. `ALREADY_EXISTS` es que coincide con un registro que ya existía y este quedó intacto, así que reenviar la misma carga no duplica nada. Una omisión es informativa, no un error."
        },
        "external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "external_id of the skipped account row.",
          "title": "External Id"
        },
        "message": {
          "description": "Texto en inglés de por qué se omitió la fila; respaldo si no traduces el `code`.",
          "title": "Message",
          "type": "string"
        }
      },
      "required": [
        "message"
      ],
      "title": "AccountOmission",
      "type": "object"
    },
    "ApprovalFlowsStatus": {
      "description": "Aggregated approval status for a ``BeneficiaryAccount``.\n\n``INITIALIZING`` is a transient state set at creation time. Downstream consumers must treat ``INITIALIZING`` as blocking (same gating as ``PENDING``/``REJECTED``).",
      "enum": [
        "INITIALIZING",
        "APPROVED",
        "REJECTED",
        "PENDING",
        "SKIPPED"
      ],
      "title": "ApprovalFlowsStatus",
      "type": "string"
    },
    "Beneficiary": {
      "properties": {
        "_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PydanticObjectId"
            },
            {
              "type": "null"
            }
          ],
          "description": "MongoDB document ObjectID"
        },
        "country_code": {
          "$ref": "#/$defs/CountryIso"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created At"
        },
        "created_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created By"
        },
        "deleted_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deleted At"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email"
        },
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "id_beneficiary": {
          "format": "uuid",
          "title": "Id Beneficiary",
          "type": "string"
        },
        "id_beneficiary_batch": {
          "format": "uuid",
          "title": "Id Beneficiary Batch",
          "type": "string"
        },
        "identity_document": {
          "anyOf": [
            {
              "$ref": "#/$defs/IdentityDocument"
            },
            {
              "type": "null"
            }
          ]
        },
        "metadata": {
          "additionalProperties": true,
          "title": "Metadata",
          "type": "object"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "organization_id": {
          "title": "Organization Id",
          "type": "string"
        },
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone"
        },
        "types": {
          "items": {
            "$ref": "#/$defs/BeneficiaryType"
          },
          "title": "Types",
          "type": "array"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Updated At"
        }
      },
      "required": [
        "id_beneficiary_batch",
        "organization_id",
        "external_id",
        "country_code",
        "name"
      ],
      "title": "Beneficiary",
      "type": "object"
    },
    "BeneficiaryAccount": {
      "properties": {
        "_id": {
          "anyOf": [
            {
              "$ref": "#/$defs/PydanticObjectId"
            },
            {
              "type": "null"
            }
          ],
          "description": "MongoDB document ObjectID"
        },
        "approval_flows_status": {
          "allOf": [
            {
              "$ref": "#/$defs/ApprovalFlowsStatus"
            }
          ],
          "default": "SKIPPED",
          "description": "Estado agregado del flujo de aprobación: resume en un solo valor todas las aprobaciones que la cuenta necesita antes de quedar operativa. Solo `APPROVED` y `SKIPPED` la habilitan; `PENDING`, `REJECTED` e `INITIALIZING` bloquean por igual."
        },
        "beneficiary": {
          "anyOf": [
            {
              "properties": {
                "collection": {
                  "title": "Collection",
                  "type": "string"
                },
                "id": {
                  "title": "Id",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "collection"
              ],
              "type": "object"
            },
            {
              "additionalProperties": true,
              "type": "object"
            }
          ],
          "title": "Beneficiary"
        },
        "beneficiary_name": {
          "title": "Beneficiary Name",
          "type": "string"
        },
        "country_code": {
          "$ref": "#/$defs/CountryIso"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created At"
        },
        "currency_code": {
          "$ref": "#/$defs/CurrencyIso"
        },
        "deleted_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deleted At"
        },
        "details": {
          "$ref": "#/$defs/BeneficiaryAccountDetails"
        },
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "gateway_references": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Identifier this account already holds on each payout gateway, keyed by gateway name (the OXXO Pay customer of a cash account is the first one). A reference here is what freezes the beneficiary's email: the gateway keeps the email its customer was created with. The key is a plain string rather than an enum because this service is deliberately gateway-agnostic, and an enum would leave an account written by a gateway it does not know yet unreadable for every consumer, not only for cashout.",
          "title": "Gateway References",
          "type": "object"
        },
        "id_beneficiary": {
          "format": "uuid",
          "title": "Id Beneficiary",
          "type": "string"
        },
        "id_beneficiary_account": {
          "format": "uuid",
          "title": "Id Beneficiary Account",
          "type": "string"
        },
        "organization_id": {
          "title": "Organization Id",
          "type": "string"
        },
        "supporting_documents": {
          "items": {
            "$ref": "#/$defs/SupportingDocument"
          },
          "title": "Supporting Documents",
          "type": "array"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Updated At"
        },
        "verification": {
          "anyOf": [
            {
              "$ref": "#/$defs/BeneficiaryAccountVerification"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "organization_id",
        "id_beneficiary",
        "beneficiary",
        "external_id",
        "country_code",
        "beneficiary_name",
        "currency_code",
        "details"
      ],
      "title": "BeneficiaryAccount",
      "type": "object"
    },
    "BeneficiaryAccountDetails": {
      "description": "Where the money goes. A ``CASH_ACCOUNT`` pays the beneficiary in cash, so it has no bank account behind it and carries neither ``bank_code`` nor ``account_number``; every other type carries both. ``BeneficiaryAccountDetailsIn`` enforces that at creation.",
      "properties": {
        "account_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Account Number"
        },
        "bank_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bank Code"
        },
        "tokenized_account_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tokenized Account Number"
        },
        "type": {
          "$ref": "#/$defs/BeneficiaryAccountType"
        }
      },
      "required": [
        "type"
      ],
      "title": "BeneficiaryAccountDetails",
      "type": "object"
    },
    "BeneficiaryAccountTokenized": {
      "description": "Projection returned by bulk creation when the organization has tokenization enabled.\n\n``tokenized_account_number`` is null when the account has nothing to tokenize — a cash account has no account number — or when the encryption failed for that row. The whole response is built in one comprehension, so requiring it here sinks the entire upload over a single account.",
      "properties": {
        "external_id": {
          "title": "External Id",
          "type": "string"
        },
        "id_beneficiary": {
          "format": "uuid",
          "title": "Id Beneficiary",
          "type": "string"
        },
        "id_beneficiary_account": {
          "format": "uuid",
          "title": "Id Beneficiary Account",
          "type": "string"
        },
        "tokenized_account_number": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tokenized Account Number"
        }
      },
      "required": [
        "id_beneficiary",
        "external_id",
        "id_beneficiary_account"
      ],
      "title": "BeneficiaryAccountTokenized",
      "type": "object"
    },
    "BeneficiaryAccountType": {
      "description": "Tipo de la cuenta de destino de un Beneficiary Account. Qué valores se aceptan depende del país de la cuenta: en Chile, `CHECKING_ACCOUNT` (cuenta corriente), `VISTA_ACCOUNT` (cuenta vista) y `SAVINGS_ACCOUNT` (cuenta de ahorro); en México, `BANK_ACCOUNT`, cuyo número de cuenta es una CLABE de 18 dígitos; `CIE_AGREEMENT`, un convenio CIE de BBVA de 7 dígitos; `INTERNATIONAL_ACCOUNT`, una cuenta internacional de 20 a 30 dígitos cuyo `bank_code` es el código ABA del banco, de 9 a 11 dígitos; `BBVA_ACCOUNT`, una cuenta BBVA de 10 u 11 dígitos; y `CASH_ACCOUNT` (cuenta de efectivo), que paga al beneficiario en efectivo y por eso no tiene cuenta bancaria de destino. `DEBIT_CARD` quedó como valor heredado y hoy se rechaza en los dos países.",
      "enum": [
        "BANK_ACCOUNT",
        "CASH_ACCOUNT",
        "DEBIT_CARD",
        "CIE_AGREEMENT",
        "INTERNATIONAL_ACCOUNT",
        "BBVA_ACCOUNT",
        "CHECKING_ACCOUNT",
        "VISTA_ACCOUNT",
        "SAVINGS_ACCOUNT"
      ],
      "title": "BeneficiaryAccountType",
      "type": "string"
    },
    "BeneficiaryAccountVerification": {
      "properties": {
        "invalid_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Invalid Reason"
        },
        "received_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Received At"
        },
        "requested_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requested At"
        },
        "status": {
          "$ref": "#/$defs/VerificationStatus",
          "default": "PENDING_VERIFICATION"
        },
        "status_log": {
          "items": {
            "$ref": "#/$defs/VerificationStatusLog"
          },
          "title": "Status Log",
          "type": "array"
        },
        "vcc_fetch_results_identity": {
          "anyOf": [
            {
              "$ref": "#/$defs/VccFetchResultsIdentity"
            },
            {
              "type": "null"
            }
          ],
          "description": "VCC fetch-results snapshot written when fetch-results is applied."
        },
        "verification_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Verification Id"
        },
        "verification_request_id": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Verification Request Id"
        },
        "voucher_url": {
          "anyOf": [
            {
              "$ref": "#/$defs/PayoutsBeneficiaryService_VoucherURL"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "title": "BeneficiaryAccountVerification",
      "type": "object"
    },
    "BeneficiaryCreationError": {
      "description": "A beneficiary row that could not be created during bulk creation.",
      "properties": {
        "code": {
          "allOf": [
            {
              "$ref": "#/$defs/BulkCreationErrorCode"
            }
          ],
          "description": "Motivo por el que la fila no se pudo crear: `VALIDATION_ERROR` es que no cumple el formato o las reglas del país, y `PERSISTENCE_ERROR` que era válida y falló al guardarse, así que reintentarla puede funcionar. Es un código estable, pensado para que lo traduzcas a tu propio texto."
        },
        "external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "external_id of the rejected beneficiary row.",
          "title": "External Id"
        },
        "message": {
          "description": "Texto en inglés de la falla; respaldo si no traduces el `code`.",
          "title": "Message",
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "title": "BeneficiaryCreationError",
      "type": "object"
    },
    "BeneficiaryOmission": {
      "description": "A beneficiary row skipped during bulk creation because it already existed (not an error).",
      "properties": {
        "code": {
          "allOf": [
            {
              "$ref": "#/$defs/BulkCreationOmissionCode"
            }
          ],
          "default": "ALREADY_EXISTS",
          "description": "Motivo por el que la fila se omitió. `ALREADY_EXISTS` es que coincide con un registro que ya existía y este quedó intacto, así que reenviar la misma carga no duplica nada. Una omisión es informativa, no un error."
        },
        "external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "external_id of the skipped beneficiary row.",
          "title": "External Id"
        },
        "message": {
          "description": "Texto en inglés de por qué se omitió la fila; respaldo si no traduces el `code`.",
          "title": "Message",
          "type": "string"
        }
      },
      "required": [
        "message"
      ],
      "title": "BeneficiaryOmission",
      "type": "object"
    },
    "BeneficiaryType": {
      "description": "Categorías con que la Organization clasifica a un Beneficiary según la relación que tiene con él. Son etiquetas descriptivas: un Beneficiary puede llevar varias y ninguna cambia cómo se le paga ni qué validaciones se le aplican.",
      "enum": [
        "VENDOR",
        "INSURANCE_PARTY",
        "AGENT",
        "BORROWER",
        "EMPLOYEE"
      ],
      "title": "BeneficiaryType",
      "type": "string"
    },
    "BulkCreationErrorCode": {
      "description": "Machine-readable reason a row could not be created during bulk creation.\n\nStable identifiers meant to be mapped to localized copy by API/UI consumers (e.g. the webapp translates the code; the API exposes both code and message). The ``message`` carried alongside each error is the human-readable English fallback for consumers without a translation layer.\n\nDuplicates are not errors: a row whose natural key already exists is reported as an omission (see ``BulkCreationOmissionCode``), never here.",
      "enum": [
        "VALIDATION_ERROR",
        "PERSISTENCE_ERROR"
      ],
      "title": "BulkCreationErrorCode",
      "type": "string"
    },
    "BulkCreationOmissionCode": {
      "description": "Machine-readable reason a row was skipped during bulk creation.\n\nAn omission is informational, not an error: the row matched an existing record (same natural key) and was intentionally left untouched.",
      "enum": [
        "ALREADY_EXISTS"
      ],
      "title": "BulkCreationOmissionCode",
      "type": "string"
    },
    "CountryIso": {
      "description": "País, en código [ISO 3166-1 alfa-2](https://es.wikipedia.org/wiki/ISO_3166-1_alfa-2). Se limita a los países donde Toku opera: `CL` (Chile), `MX` (México) y `BR` (Brasil). El país determina qué medios de pago y qué productos de cobro están disponibles.",
      "enum": [
        "CL",
        "MX",
        "BR"
      ],
      "title": "CountryIso",
      "type": "string"
    },
    "CurrencyIso": {
      "description": "Moneda, en código [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). Cubre las monedas de los países donde Toku opera —`CLP` (peso chileno), `MXN` (peso mexicano) y `BRL` (real)— más `USD` y `CLF`, la Unidad de Fomento chilena. La moneda determina cuántos decimales admiten los montos: `CLP` no admite decimales, `MXN`, `BRL` y `USD` admiten dos, y `CLF` cuatro.",
      "enum": [
        "CLP",
        "CLF",
        "MXN",
        "BRL",
        "USD"
      ],
      "title": "CurrencyIso",
      "type": "string"
    },
    "IdentityDocument": {
      "properties": {
        "number": {
          "title": "Number",
          "type": "string"
        },
        "type": {
          "allOf": [
            {
              "$ref": "#/$defs/IdentityDocumentType"
            }
          ],
          "description": "Tipo de documento con el que se identifica al Beneficiary. Tiene que corresponder al `country_code`: Chile solo admite `RUT`; México admite `RFC`, el registro tributario, `CURP`, la clave de registro poblacional, y `TAX_ID`, el registro tributario genérico para un Beneficiary sin RFC. Si no corresponde, la solicitud se rechaza."
        }
      },
      "required": [
        "type",
        "number"
      ],
      "title": "IdentityDocument",
      "type": "object"
    },
    "IdentityDocumentType": {
      "description": "Tipos de documento con que se identifica a un Beneficiary. Cada uno corresponde a un país: `RUT` es el rol único tributario chileno y solo se acepta en Chile; `RFC` es el registro tributario mexicano, `CURP` la clave de registro poblacional y `TAX_ID` el registro tributario genérico para un Beneficiary sin RFC, y los tres solo se aceptan en México.",
      "enum": [
        "CURP",
        "RFC",
        "RUT",
        "TAX_ID"
      ],
      "title": "IdentityDocumentType",
      "type": "string"
    },
    "PayoutsBeneficiaryService_VoucherURL": {
      "description": "VCC voucher URLs cached on the account once verification completes (DB-layer type).",
      "properties": {
        "pdf": {
          "title": "Pdf",
          "type": "string"
        }
      },
      "required": [
        "pdf",
        "xml"
      ],
      "title": "PayoutsBeneficiaryService_VoucherURL",
      "type": "object"
    },
    "PydanticObjectId": {
      "maxLength": 24,
      "minLength": 24,
      "pattern": "^[0-9a-f]{24}$",
      "type": "string"
    },
    "SupportingDocument": {
      "description": "A backup/supporting document attached to a beneficiary.\n\nThe file lives in a PRIVATE GCS bucket: we store the object path (``gs_path``) and the download flow goes through webapp-backend, which issues a short-lived signed URL on demand (gated by beneficiary permissions). No public URL is persisted.",
      "properties": {
        "content_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Type"
        },
        "filename": {
          "title": "Filename",
          "type": "string"
        },
        "gs_path": {
          "title": "Gs Path",
          "type": "string"
        },
        "uploaded_at": {
          "format": "date-time",
          "title": "Uploaded At",
          "type": "string"
        }
      },
      "required": [
        "filename",
        "gs_path"
      ],
      "title": "SupportingDocument",
      "type": "object"
    },
    "VccFetchResultsIdentity": {
      "description": "VCC fetch-results snapshot (voucher_information + customer_data_validation scores).",
      "properties": {
        "account_holder_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "From VCC voucher_information.receiver_name.",
          "title": "Account Holder Name"
        },
        "account_holder_rfc": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "From VCC voucher_information.curp.",
          "title": "Account Holder Rfc"
        },
        "receiver_name_match_score": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "From VCC customer_data_validation.receiver_name_match_score.",
          "title": "Receiver Name Match Score"
        },
        "rfc_match_score": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "From VCC customer_data_validation.rfc_match_score.",
          "title": "Rfc Match Score"
        }
      },
      "title": "VccFetchResultsIdentity",
      "type": "object"
    },
    "VerificationStatus": {
      "description": "Estado de la verificación bancaria de un Beneficiary Account. La cuenta nace en `PENDING_VERIFICATION`, queda en `PROCESSING` mientras se espera el resultado, y termina en `VALIDATED`, que la habilita para recibir pagos, o en `INVALID`, que la deja rechazada. Editar los datos bancarios la devuelve a `PENDING_VERIFICATION` y reinicia el ciclo.\n\nLa verificación automática hoy corre solo en México; en Chile la cuenta se queda en `PENDING_VERIFICATION` hasta que un operador la aprueba o rechaza.",
      "enum": [
        "PROCESSING",
        "VALIDATED",
        "INVALID",
        "PENDING_VERIFICATION"
      ],
      "title": "VerificationStatus",
      "type": "string"
    },
    "VerificationStatusLog": {
      "description": "VerificationStatusLog database model.",
      "properties": {
        "from_status": {
          "$ref": "#/$defs/VerificationStatus"
        },
        "operator_email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Email of the operator who triggered a manual status override; null for automatic transitions.",
          "title": "Operator Email"
        },
        "source": {
          "anyOf": [
            {
              "$ref": "#/$defs/VerificationStatusSource"
            },
            {
              "type": "null"
            }
          ],
          "description": "Qué originó el cambio de estado: `AUTOMATIC_VCC` es que la verificación de titularidad lo aprobó, `MANUAL_OVERRIDE` que lo aprobó un operador, `VERIFICATION_SKIPPED` que la Organization está configurada para omitir la verificación, es decir que nadie revisó la cuenta, `NO_BANK_ACCOUNT_TO_VERIFY` que no había nada que revisar porque la cuenta no tiene cuenta bancaria de destino, como la cuenta de efectivo, y `API` que la Organization cambió el estado desde su integración. Las entradas escritas antes de que existiera este campo no traen valor."
        },
        "timestamp": {
          "format": "date-time",
          "title": "Timestamp",
          "type": "string"
        },
        "to_status": {
          "$ref": "#/$defs/VerificationStatus"
        }
      },
      "required": [
        "from_status",
        "to_status"
      ],
      "title": "VerificationStatusLog",
      "type": "object"
    },
    "VerificationStatusSource": {
      "description": "Qué originó un cambio de estado de la verificación. Queda registrado en cada entrada de `VerificationStatusLog`, de modo que toda cuenta `VALIDATED` es atribuible: `AUTOMATIC_VCC` es que la verificación de titularidad la aprobó, `MANUAL_OVERRIDE` que la aprobó un operador, `MANUAL_RETRY` que un operador pidió volver a correr la verificación sobre una cuenta rechazada —la cuenta vuelve a `PENDING_VERIFICATION`, no queda aprobada—, `VERIFICATION_SKIPPED` que la Organization está configurada para omitir la verificación —es decir, que nadie revisó la cuenta—, `NO_BANK_ACCOUNT_TO_VERIFY` que no había nada que revisar, porque la cuenta no tiene cuenta bancaria de destino, como la cuenta de efectivo, y `API` que la Organization cambió el estado desde su integración, sin un operador de Toku.\n\n`VERIFICATION_SKIPPED` y `NO_BANK_ACCOUNT_TO_VERIFY` se distinguen a propósito: una Organization que renunció a un control que sí le aplicaba no es el mismo hecho, para una auditoría, que una cuenta a la que ese control nunca le aplicó. Las entradas escritas antes de que existiera este campo no traen valor.",
      "enum": [
        "AUTOMATIC_VCC",
        "MANUAL_OVERRIDE",
        "MANUAL_RETRY",
        "VERIFICATION_SKIPPED",
        "NO_BANK_ACCOUNT_TO_VERIFY",
        "API"
      ],
      "title": "VerificationStatusSource",
      "type": "string"
    }
  }
}