> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gu1.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Enrichment Overview

> Execute marketplace enrichment integrations to gather additional entity data from external providers — using gu1 marketplace providers for KYC, KYB, and PEP.

## What is Enrichment?

Enrichment is the process of enhancing entity data by gathering additional information from external data providers. gu1 integrates with dozens of official government registries, credit bureaus, identity verification services, and other trusted data sources to provide comprehensive entity profiles.

## How It Works

1. **Select Entity**: Choose the entity you want to enrich (by internal ID or your external ID)
2. **Choose Providers**: Select one or more enrichment integration codes
3. **Execute**: gu1 calls the external providers in parallel and normalizes the responses
4. **Results**: Get standardized enrichment data, quality metrics, and costs

## Key Features

### Batch Execution

Execute multiple enrichments in a single API call for better performance and convenience.

### Cost Transparency

Each enrichment returns its individual cost in cents, and you get a total for the batch.

### Quality Metrics

Every enrichment includes:

* **Completeness**: How much of the requested data was found (0-1)
* **Confidence**: Provider's confidence in the data accuracy (0-1)

### Automatic Audit Trail

All enrichments are automatically logged with:

* Timestamp
* Provider used
* Fields enriched
* Execution time
* Cost

### Rules Engine Integration

Successful enrichments automatically trigger the rules engine with the `enrichment_completed` event, allowing you to create automated workflows.

## Available Endpoints

<Card title="Execute by Internal ID" icon="database" href="/en/api-reference/enrichment/execute-by-id">
  Execute enrichments using gu1's internal entity UUID
</Card>

<Card title="Execute by External ID" icon="id-card" href="/en/api-reference/enrichment/execute-by-external-id">
  Execute enrichments using your own entity identifier
</Card>

## Common Integration Codes

### Argentina

* `ar_repet_enrichment` - Official person data from REPET
* `ar_renaper_enrichment` - National identity registry
* `ar_bcra_enrichment` - Central bank financial data
* `ar_bcra_deudas_enrichment` - Central bank debt information
* `ar_afip_enrichment` - Tax authority data
* `ar_nosis_enrichment` - Credit bureau report

### Brazil

* `br_serasa_enrichment` - Serasa credit data
* `br_spc_enrichment` - SPC credit bureau
* `br_receita_federal_enrichment` - Federal revenue data
* `br_cpf_enrichment` - CPF validation and data
* `br_cnpj_enrichment` - CNPJ company data

### Global

* `global_worldcheck_enrichment` - Sanctions and PEP screening
* `global_dowjones_enrichment` - Risk and compliance data

See [Integration Provider Codes](/en/api-reference/integrations/provider-codes) for the complete list.

## Use Cases

### KYC/KYB Onboarding

Gather official identity and company data during customer onboarding:

```javascript theme={null}
const result = await enrichEntity(customerId, [
  'ar_repet_enrichment',
  'ar_renaper_enrichment'
]);
```

### Credit Assessment

Pull financial and credit data for risk evaluation:

```javascript theme={null}
const result = await enrichEntity(customerId, [
  'ar_bcra_enrichment',
  'ar_nosis_enrichment'
]);
```

### Compliance Screening

Screen for sanctions, PEP status, and adverse media:

```javascript theme={null}
const result = await enrichEntity(entityId, [
  'global_worldcheck_enrichment',
  'global_dowjones_enrichment'
]);
```

### Ongoing Monitoring

Periodically refresh entity data for continuous monitoring:

```javascript theme={null}
// Run monthly
const result = await enrichEntity(entityId, [
  'ar_bcra_deudas_enrichment',
  'ar_afip_enrichment'
]);
```

## Best Practices

### 1. Batch Related Enrichments

Execute related enrichments together for better performance:

```javascript theme={null}
// Good - batch related enrichments
await enrichEntity(id, [
  'ar_repet_enrichment',
  'ar_renaper_enrichment',
  'ar_bcra_enrichment'
]);

// Less optimal - separate calls
await enrichEntity(id, ['ar_repet_enrichment']);
await enrichEntity(id, ['ar_renaper_enrichment']);
await enrichEntity(id, ['ar_bcra_enrichment']);
```

### 2. Handle Partial Failures

Check individual results as some providers may fail while others succeed:

```javascript theme={null}
const result = await enrichEntity(id, providers);

result.results.forEach(r => {
  if (r.success) {
    // Process successful enrichment
    console.log(`✓ ${r.integrationName}`);
  } else {
    // Log failed enrichment
    console.warn(`✗ ${r.integrationName}: ${r.error.message}`);
  }
});
```

### 3. Track Costs

Monitor enrichment costs to optimize your integration usage:

```javascript theme={null}
const result = await enrichEntity(id, providers);

console.log(`Total cost: $${result.totalCostCents / 100}`);

// Track per-provider costs
result.results.forEach(r => {
  if (r.costCents > 0) {
    console.log(`${r.integrationName}: $${r.costCents / 100}`);
  }
});
```

### 4. Use External IDs for Convenience

If you work with your own identifiers, use the external ID endpoint:

```javascript theme={null}
// Simpler - use your ID
await enrichEntityByExternalId('customer_12345', providers);

// vs storing/looking up UUID
const uuid = await getEntityUUID('customer_12345');
await enrichEntity(uuid, providers);
```

### 5. Leverage Quality Metrics

Use completeness and confidence scores to assess data quality:

```javascript theme={null}
result.results.forEach(r => {
  if (r.success) {
    const quality = r.result.dataQuality;

    if (quality.completeness < 0.5) {
      console.warn('Low data completeness');
    }

    if (quality.confidence < 0.8) {
      console.warn('Low confidence - manual review recommended');
    }
  }
});
```

## Error Handling

Enrichments can fail for various reasons:

### Entity Not Found

```json theme={null}
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Entity not found"
  }
}
```

### Provider Errors

Individual provider failures don't fail the entire batch:

```json theme={null}
{
  "success": true,
  "results": [
    {
      "success": false,
      "error": {
        "code": "NO_DATA_FOUND",
        "message": "No data found for this entity"
      }
    }
  ]
}
```

### Rate Limiting

Some providers have rate limits - failures include retry information:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Provider rate limit exceeded",
    "retryAfter": 3600
  }
}
```

## Next Steps

* Explore [Execute by ID](/en/api-reference/enrichment/execute-by-id) for internal UUID-based enrichment
* Learn about [Execute by External ID](/en/api-reference/enrichment/execute-by-external-id) for simplified integration
* Browse [Provider Codes](/en/api-reference/integrations/provider-codes) to see all available enrichments
* Set up [Rules](/en/api-reference/rules/create) to automate actions after enrichment
