Ejecutar Enriquecimiento por ID de Entidad
curl --request POST \
--url http://api.gu1.ai/integration-execution/marketplace/enrichment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityId": "<string>",
"integrationCodes": [
"<string>"
],
"enrichmentGroupRefs": [
"<string>"
],
"parameters": {}
}
'import requests
url = "http://api.gu1.ai/integration-execution/marketplace/enrichment"
payload = {
"entityId": "<string>",
"integrationCodes": ["<string>"],
"enrichmentGroupRefs": ["<string>"],
"parameters": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityId: '<string>',
integrationCodes: ['<string>'],
enrichmentGroupRefs: ['<string>'],
parameters: {}
})
};
fetch('http://api.gu1.ai/integration-execution/marketplace/enrichment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://api.gu1.ai/integration-execution/marketplace/enrichment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entityId' => '<string>',
'integrationCodes' => [
'<string>'
],
'enrichmentGroupRefs' => [
'<string>'
],
'parameters' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/integration-execution/marketplace/enrichment"
payload := strings.NewReader("{\n \"entityId\": \"<string>\",\n \"integrationCodes\": [\n \"<string>\"\n ],\n \"enrichmentGroupRefs\": [\n \"<string>\"\n ],\n \"parameters\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://api.gu1.ai/integration-execution/marketplace/enrichment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entityId\": \"<string>\",\n \"integrationCodes\": [\n \"<string>\"\n ],\n \"enrichmentGroupRefs\": [\n \"<string>\"\n ],\n \"parameters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/integration-execution/marketplace/enrichment")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityId\": \"<string>\",\n \"integrationCodes\": [\n \"<string>\"\n ],\n \"enrichmentGroupRefs\": [\n \"<string>\"\n ],\n \"parameters\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"entityId": "<string>",
"results": [
{}
],
"totalCostCents": 123,
"totalExecutionTime": 123
}Referencia API
Ejecutar Enriquecimiento por ID de Entidad
Ejecuta integraciones de enriquecimiento del marketplace en una entidad usando su ID interno — usando proveedores marketplace de gu1 para KYC, KYB y datos PEP.
POST
/
integration-execution
/
marketplace
/
enrichment
Ejecutar Enriquecimiento por ID de Entidad
curl --request POST \
--url http://api.gu1.ai/integration-execution/marketplace/enrichment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entityId": "<string>",
"integrationCodes": [
"<string>"
],
"enrichmentGroupRefs": [
"<string>"
],
"parameters": {}
}
'import requests
url = "http://api.gu1.ai/integration-execution/marketplace/enrichment"
payload = {
"entityId": "<string>",
"integrationCodes": ["<string>"],
"enrichmentGroupRefs": ["<string>"],
"parameters": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entityId: '<string>',
integrationCodes: ['<string>'],
enrichmentGroupRefs: ['<string>'],
parameters: {}
})
};
fetch('http://api.gu1.ai/integration-execution/marketplace/enrichment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://api.gu1.ai/integration-execution/marketplace/enrichment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'entityId' => '<string>',
'integrationCodes' => [
'<string>'
],
'enrichmentGroupRefs' => [
'<string>'
],
'parameters' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/integration-execution/marketplace/enrichment"
payload := strings.NewReader("{\n \"entityId\": \"<string>\",\n \"integrationCodes\": [\n \"<string>\"\n ],\n \"enrichmentGroupRefs\": [\n \"<string>\"\n ],\n \"parameters\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://api.gu1.ai/integration-execution/marketplace/enrichment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"entityId\": \"<string>\",\n \"integrationCodes\": [\n \"<string>\"\n ],\n \"enrichmentGroupRefs\": [\n \"<string>\"\n ],\n \"parameters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/integration-execution/marketplace/enrichment")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entityId\": \"<string>\",\n \"integrationCodes\": [\n \"<string>\"\n ],\n \"enrichmentGroupRefs\": [\n \"<string>\"\n ],\n \"parameters\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"entityId": "<string>",
"results": [
{}
],
"totalCostCents": 123,
"totalExecutionTime": 123
}Descripción General
Ejecuta una o más integraciones de enriquecimiento del marketplace en una entidad específica para recopilar datos adicionales de proveedores externos. Este endpoint acepta el UUID interno de la entidad y soporta la ejecución en lote de múltiples enriquecimientos en una sola solicitud. Nota:enrichmentGroupRefs aplica solo a esta API de ejecución del marketplace (y a POST .../enrichment-by-external-id). Los flujos de creación de entidades (manual o automática) siguen aceptando solo códigos de enriquecimiento explícitos, no slugs de grupo.
Endpoint
POST http://api.gu1.ai/integration-execution/marketplace/enrichment
Autenticación
Requiere una clave API válida en el encabezado de autorización:Authorization: Bearer YOUR_API_KEY
Cuerpo de la Solicitud
string
required
El UUID de la entidad a enriquecer
array<string>
Lista explícita de códigos de integración de enriquecimiento a ejecutar (misma semántica que antes). Ver Códigos de Proveedores de Integración.Podés enviar solo
integrationCodes, solo enrichmentGroupRefs o ambos. Si enviás ambos, la API expande los grupos a códigos, concatena integrationCodes y deduplica manteniendo el orden de primera aparición. Al menos uno de integrationCodes o enrichmentGroupRefs debe ser no vacío.array<string>
Referencias a grupos de enriquecimiento definidos para tu organización en el Marketplace (lista guardada de códigos de integración). Cada valor es el slug del grupo o el UUID del grupo.Se respeta el orden: por cada referencia se agregan los códigos del grupo en el orden guardado; luego se fusionan los
integrationCodes. Expandir grupos no saltea el catálogo ni las reglas de org: cada código resultante sigue siendo evaluado por el orquestador (p. ej. debe estar habilitado para la organización salvo rutas de fallback específicas), igual que si pasaras los códigos directamente.object
Parámetros adicionales opcionales para pasar a las integraciones
Respuesta
boolean
Si la operación de enriquecimiento en lote se completó exitosamente
string
El UUID de la entidad enriquecida
array
Array de resultados de enriquecimiento, uno por cada código de integraciónCada resultado contiene:
success(boolean) - Si este enriquecimiento específico tuvo éxitoenrichmentId(string) - UUID del registro de ejecución del enriquecimientointegrationCode(string) - El código de integración que fue ejecutadointegrationName(string) - Nombre legible de la integraciónresult(object) - Datos de enriquecimiento (solo si fue exitoso)fieldsEnriched(array) - Lista de campos de entidad que fueron enriquecidosdataQuality(object) - Métricas de calidadcompleteness(number) - Puntuación de completitud de datos (0-1)confidence(number) - Puntuación de confianza (0-1)
summary(string) - Resumen legibleenrichmentData(object) - Los datos de enriquecimiento reales
executionTime(number) - Tiempo de ejecución en milisegundoscostCents(number) - Costo de este enriquecimiento en centavoserror(object) - Detalles del error (solo si falló)code(string) - Código de errormessage(string) - Mensaje de error
number
Costo total de todos los enriquecimientos en centavos
number
Tiempo total de ejecución para todos los enriquecimientos en milisegundos
Ejemplos
Ejecutar un Solo Enriquecimiento
curl -X POST http://api.gu1.ai/integration-execution/marketplace/enrichment \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entityId": "550e8400-e29b-41d4-a716-446655440000",
"integrationCodes": ["ar_repet_enrichment"]
}'
const response = await fetch(
'http://api.gu1.ai/integration-execution/marketplace/enrichment',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
entityId: '550e8400-e29b-41d4-a716-446655440000',
integrationCodes: ['ar_repet_enrichment']
})
}
);
const result = await response.json();
console.log(result);
import requests
response = requests.post(
'http://api.gu1.ai/integration-execution/marketplace/enrichment',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'entityId': '550e8400-e29b-41d4-a716-446655440000',
'integrationCodes': ['ar_repet_enrichment']
}
)
result = response.json()
print(result)
Ejecutar Múltiples Enriquecimientos (Lote)
curl -X POST http://api.gu1.ai/integration-execution/marketplace/enrichment \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entityId": "550e8400-e29b-41d4-a716-446655440000",
"integrationCodes": [
"ar_repet_enrichment",
"ar_bcra_enrichment",
"ar_nosis_enrichment"
]
}'
Ejemplo de Respuesta - Enriquecimiento Exitoso
{
"success": true,
"entityId": "550e8400-e29b-41d4-a716-446655440000",
"results": [
{
"success": true,
"enrichmentId": "enr_abc123def456",
"integrationCode": "ar_repet_enrichment",
"integrationName": "Argentina REPET Person Data",
"result": {
"fieldsEnriched": [
"name",
"taxId",
"address",
"legalStatus"
],
"dataQuality": {
"completeness": 0.95,
"confidence": 0.92
},
"summary": "Successfully enriched person data from REPET",
"enrichmentData": {
"name": "María González",
"taxId": "20-12345678-9",
"address": {
"street": "Av. Corrientes 1234",
"city": "Buenos Aires",
"province": "CABA",
"country": "AR"
},
"legalStatus": "active"
}
},
"executionTime": 1250,
"costCents": 50
}
],
"totalCostCents": 50,
"totalExecutionTime": 1250
}
Ejemplo de Respuesta - Lote con Resultados Mixtos
{
"success": true,
"entityId": "550e8400-e29b-41d4-a716-446655440000",
"results": [
{
"success": true,
"enrichmentId": "enr_abc123",
"integrationCode": "ar_repet_enrichment",
"integrationName": "Argentina REPET Person Data",
"result": {
"fieldsEnriched": ["name", "taxId"],
"dataQuality": {
"completeness": 0.85,
"confidence": 0.90
},
"summary": "Data enriched successfully",
"enrichmentData": {
"name": "María González",
"taxId": "20-12345678-9"
}
},
"executionTime": 1200,
"costCents": 50
},
{
"success": false,
"integrationCode": "ar_bcra_enrichment",
"integrationName": "Argentina BCRA Financial Data",
"executionTime": 800,
"costCents": 0,
"error": {
"code": "NO_DATA_FOUND",
"message": "No financial data found for this entity"
}
},
{
"success": true,
"enrichmentId": "enr_xyz789",
"integrationCode": "ar_nosis_enrichment",
"integrationName": "Argentina Nosis Credit Report",
"result": {
"fieldsEnriched": ["creditScore", "riskLevel"],
"dataQuality": {
"completeness": 1.0,
"confidence": 0.95
},
"summary": "Credit report retrieved",
"enrichmentData": {
"creditScore": 720,
"riskLevel": "low"
}
},
"executionTime": 1500,
"costCents": 75
}
],
"totalCostCents": 125,
"totalExecutionTime": 3500
}
Respuestas de Error
404 Entidad No Encontrada
{
"success": false,
"results": [],
"totalCostCents": 0,
"totalExecutionTime": 0,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Entity not found"
}
}
401 No Autorizado
{
"success": false,
"error": {
"code": "MISSING_ORGANIZATION",
"message": "Organization ID is required"
}
}
400 Solicitud Incorrecta
{
"success": false,
"results": [],
"totalCostCents": 0,
"totalExecutionTime": 0,
"error": {
"code": "VALIDATION_ERROR",
"message": "At least one integration code is required"
}
}
Casos de Uso
Enriquecimiento de Datos KYC
Enriquecer una entidad de persona con datos oficiales del gobierno:const enrichmentResult = await fetch(
'http://api.gu1.ai/integration-execution/marketplace/enrichment',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
entityId: customerId,
integrationCodes: [
'ar_repet_enrichment', // Official identity data
'ar_renaper_enrichment' // National registry
]
})
}
).then(res => res.json());
if (enrichmentResult.success) {
console.log('Customer data enriched');
console.log('Total cost:', enrichmentResult.totalCostCents / 100, 'USD');
// Check each enrichment result
enrichmentResult.results.forEach(result => {
if (result.success) {
console.log(`✓ ${result.integrationName} completed`);
} else {
console.log(`✗ ${result.integrationName} failed: ${result.error?.message}`);
}
});
}
Debida Diligencia de Empresa
Recopilar datos completos de empresa desde múltiples fuentes:enrichment_data = requests.post(
'http://api.gu1.ai/integration-execution/marketplace/enrichment',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'entityId': company_id,
'integrationCodes': [
'ar_afip_enrichment', # Tax authority data
'ar_bcra_enrichment', # Central bank data
'ar_commercial_registry' # Commercial registry
]
}
).json()
# Process successful enrichments
successful = [r for r in enrichment_data['results'] if r['success']]
failed = [r for r in enrichment_data['results'] if not r['success']]
print(f"Completed: {len(successful)}/{len(enrichment_data['results'])}")
print(f"Total cost: ${enrichment_data['totalCostCents'] / 100:.2f}")
Notas Importantes
- Ejecución en Lote: Múltiples enriquecimientos se ejecutan en paralelo para mejor rendimiento
- Seguimiento de Costos: El costo de cada enriquecimiento se rastrea individualmente y se suma en
totalCostCents - Éxito Parcial: El lote puede tener éxito incluso si algunos enriquecimientos individuales fallan
- Auditoría Automática: Todos los enriquecimientos se registran automáticamente en el registro de auditoría
- Activación de Reglas: Los enriquecimientos exitosos activan el motor de reglas con el evento
enrichment_completed - Idempotencia: Ejecutar el mismo enriquecimiento múltiples veces puede devolver resultados en caché a menos que se use
forceRefresh
Endpoints Relacionados
- Ejecutar Enriquecimiento por ID Externo - Usa tu propio identificador de entidad
- Obtener Entidad - Ver datos de entidad enriquecida
- Listar Proveedores de Integración - Códigos de enriquecimiento disponibles
Was this page helpful?