Descubrir llave
Descubre una llave Bre-B de un beneficiario a partir de los datos que ya conoces y devuelve una llave utilizable solo cuando puede comprobar que la llave pertenece a esa misma persona y apunta a esa misma cuenta bancaria.
Ambos resultados responden 200:
state=discovered: se creó una llave de un solo uso para el banco y la cuenta solicitados. Puedes usarla en una sola transferencia saliente; repetir discovery produce una resolución nueva.state=not_discoveredconstate_reason=no_exact_target: no fue posible crear una llave para ese destino. Esto no implica que la persona no tenga otra llave.
Ambos incluyen same_person_keys, posiblemente vacío: llaves confirmadas de
la misma persona que apuntan a otro destino. Discovery se detiene en la primera
llave exacta, de modo que una respuesta discovered solo refleja las
coincidencias observadas antes del ganador y no es exhaustiva. Estas llaves
todavía no pueden usarse para transferir. Para usar una, selecciónala explícitamente y llama a
POST /api/v1/targets/resolve; después compara el banco y la terminación de
cuenta de la llave recién resuelta con los datos mostrados al ordenante antes de autorizar
la transferencia. Discovery no reserva la llave ni garantiza que siga
apuntando al destino observado.
Usa GET /api/v1/banks para convertir un nombre aproximado en el
account.bank_code canónico. Discovery solo acepta el código ACH canónico.
El endpoint aplica rate limit por cliente OAuth y por tenant. Si se supera
cualquiera de los límites, responde 429 rate_limit_exceeded e incluye el
encabezado Retry-After.
Autorización
oauth target_discoveriesEn: header
Scope: target_discoveries
Cuerpo de la solicitud
application/json
Target discovery request
Definiciones de TypeScript
Usa el tipo request body en TypeScript.
The destination account the discovered key must point to.
The identity of the beneficiary as the client knows it.
The originating tenant account. A tenant may hold more than one, so it travels in the body and must belong to the authenticated tenant.
^[A-Za-z]{2,7}_[\w-]{22}$"bbtacc_5tgliBmzjZ6mpQPRbQjfKj"Cuerpo de la respuesta
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://breb-participant.sandbox.mono.la/api/v1/targets/discover" \ -H "Content-Type: application/json" \ -d '{ "account": { "bank_code": "007", "number": "0013123456789" }, "person": { "document_number": "1192793827", "document_type": "CC" }, "tenant_account_id": "bbtacc_5tgliBmzjZ6mpQPRbQjfKj" }'{
"attempts_count": 2,
"resolution_id": "bbtgr_5tgliBmzjZ6mpQPRbQjfKj",
"same_person_keys": [
{
"bank_code": "007",
"creditor_account": {
"currency_code": "COP",
"number_last_four": "4321",
"type": "savings_account"
},
"key_type": "alphanumeric",
"key_value": "@BBVA3104838791",
"participant_nit": "890903938",
"resolution_required": true
}
],
"state": "discovered",
"state_reason": null,
"target": {
"creditor": {
"document_number": "*****789",
"document_type": "CC",
"full_name": "Jua*** Pér***",
"type": "natural"
},
"creditor_account": {
"currency_code": "COP",
"number": "*****4321",
"type": "savings_account"
},
"id": "bbtgt_5tgliBmzjZ6mpQPRbQjfKj",
"key_type": "identification",
"key_value": "1234567890",
"participant_nit": "900123456",
"payment_id": "string",
"resolution_type": "plain_key",
"spbvi": "CRB",
"transaction_amount": {
"amount": 100000000,
"currency": "COP"
}
}
}{
"code": "400 Bad Request",
"errors": [
{
"error_code": "invalid_document_number",
"message": "The document number is not in a comparable format",
"path": null,
"url": null
}
],
"id": "log_7MkWaFqvfosB8fzHhb1Eql",
"message": "Malformed request"
}{
"code": "401 Unauthorized",
"errors": [
{
"error_code": "missing_authorization_header",
"message": "`Authorization` header is missing.",
"path": null,
"url": null
}
],
"id": "log_7MkWaFqvfosB8fzHhb1Eql",
"message": "Authorization header is missing or invalid."
}{
"code": "403 Forbidden",
"errors": [
{
"error_code": "not_authorized",
"message": "Not authorized to have access to this resource.",
"path": null,
"url": null
}
],
"id": "log_7MkWaFqvfosB8fzHhb1Eql",
"message": "Not authorized to have access to this resource"
}{
"code": "404 Not Found",
"errors": [
{
"error_code": "tenant_account_not_found",
"message": "Tenant account not found",
"path": null,
"url": null
}
],
"id": "log_7MkWaFqvfosB8fzHhb1Eql",
"message": "Resource not defined"
}{
"code": "422 Unprocessable Content",
"errors": [
{
"error_code": "unknown_bank",
"message": "Unknown bank",
"path": "#/path/to/field",
"url": null
}
],
"id": "log_7MkWaFqvfosB8fzHhb1Eql",
"message": "Validation errors"
}{
"code": "429 Too Many Requests",
"errors": [
{
"error_code": "rate_limit_exceeded",
"message": "Too many requests. Retry after the indicated time.",
"path": null,
"url": null
}
],
"id": "log_7MkWaFqvfosB8fzHhb1Eql",
"message": "Too many requests"
}{
"code": "500 Internal Server Error",
"errors": [
{
"error_code": "internal_error",
"message": "An unexpected error occurred",
"path": null,
"url": null
}
],
"id": "log_7MkWaFqvfosB8fzHhb1Eql",
"message": "Something went wrong on the Server"
}{
"code": "503 Service Unavailable",
"errors": [
{
"error_code": "service_is_unavailable",
"message": "The service is unavailable, Please try again later",
"path": null,
"url": null
}
],
"id": "log_7MkWaFqvfosB8fzHhb1Eql",
"message": "Service unavailable"
}