> For the complete documentation index, see [llms.txt](https://docs.complycube.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.complycube.com/documentation/documentation/documentation-es/guias-rapidas/api-quick-guide/run-an-aml-screening-check.md).

# Realizar filtrado AML

### Descripción general <a href="#overview" id="overview"></a>

Esta guía te muestra cómo ejecutar una comprobación de AML Screening usando la API de ComplyCube para verificaciones KYC y KYB.

{% hint style="success" %}
Puedes probar esta verificación de inmediato usando nuestra [Colección de demostración de Postman](/documentation/documentation/documentation-es/recursos-de-integracion/postman.md#demo-collection). Es de acceso público y **no requiere una cuenta**.
{% endhint %}

### Pasos de integración <a href="#integration-steps" id="integration-steps"></a>

<figure><img src="/files/30ed842061984594c6daae2ec38e729b0f3bd16b" alt=""><figcaption><p>Guía de la API de AML Screening</p></figcaption></figure>

{% stepper %}
{% step %}

#### Crear un cliente <a href="#create-a-client" id="create-a-client"></a>

El primer paso para crear cualquier verificación es añadir un **cliente** desde tu servidor backend. Un cliente puede representar a un **persona** o una **empresa**. Para personas físicas, debes proporcionar un **nombre** y **apellido**, mientras que para las empresas solo el **nombre** es obligatorio.

La respuesta contendrá un `id` (el ID del cliente). Es necesario para el siguiente paso.

{% hint style="info" %}
Aunque no es estrictamente obligatorio, **recomendamos encarecidamente** incluir la **fecha de nacimiento** al registrar a una persona.
{% endhint %}

**Ejemplo de solicitud para crear un cliente**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.complycube.com/v1/clients \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
          "type": "person",
          "email": "john.doe@example.com",
          "personDetails":{
               "firstName": "John",
               "lastName" :"Doe",
               "dob": "1990-01-01"
          }
        }'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const { ComplyCube } = require("@complycube/api");

const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });

const client = await complycube.client.create({
  type: "person",
  email: "john.doe@example.com",
  personDetails: {
    firstName: "John",
    lastName: "Doe",
    dob: "1990-01-01"
  }
});
```

{% endtab %}

{% tab title="Python" %}

```python
from complycube import ComplyCubeClient

cc_api = ComplyCubeClient(api_key='<YOUR API KEY>')

new_client = {
    'type':'person',
    'email':'john.doe@example.com',
    'personDetails': {
        'firstName':'John',
        'lastName':'Doe',
        'dob':'1990-01-01'
    }
}

client = cc_api.clients.create(**new_client)
```

{% endtab %}

{% tab title="PHP" %}

```php
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');

$result = $ccapi->clients()->create([
    'type' => 'person',
    'email' => 'john.doe@example.com',
    'personDetails' => [
        'firstName' => 'John',
        'lastName' => 'Doe',
        'dob' => '1990-01-01'
    ]
]);
```

{% endtab %}

{% tab title=".NET" %}

```csharp
using ComplyCube.Net;
using ComplyCube.Net.Resources.Clients;

var clientApi = new ClientApi(new ComplyCubeClient("<YOUR_API_KEY>"));

var newclient = new ClientRequest {
  type = "person",
    email = "john.doe@example.com",
    personDetails = new PersonDetails {
      firstName = "John",
        lastName = "Doe",
        dob = "1990-01-01"
    }
};

var client = await clientApi.CreateAsync(newclient);
```

{% endtab %}
{% endtabs %}

**Ejemplo de respuesta**

```json
{
    "id": "5eb04fcd0f3e360008035eb1",
    "type": "person",
    "email": "john.doe@example.com",
    "personDetails": {
        "firstName": "John",
        "lastName": "Doe",
        "dob": "1990-01-01"
    },
    "createdAt": "2025-01-04T17:24:29.146Z",
    "updatedAt": "2025-01-04T17:24:29.146Z"
}
```

{% endstep %}

{% step %}

#### Crear una **verificación de AML Screening** <a href="#create-an-aml-screening-check" id="create-an-aml-screening-check"></a>

Crea una verificación de AML Screening especificando el **ID del cliente** y el **tipo de verificación**. ComplyCube admite dos tipos de AML Screening: [Estándar](/documentation/product-guides/product-guide-es/listas-de-vigilancia-pep-y-medios-adversos/aml-screening-check.md#service-variants) y [Exhaustiva](/documentation/product-guides/product-guide-es/listas-de-vigilancia-pep-y-medios-adversos/aml-screening-check.md#service-variants). El siguiente ejemplo demuestra una **AML Screening exhaustiva**.

La respuesta contendrá un `id` (el ID de la verificación). Es necesario para el siguiente paso.

**Ejemplo de solicitud para crear una verificación**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.complycube.com/v1/checks \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
               "clientId":"5eb04fcd0f3e360008035eb1",
               "type": "extensive_screening_check"
        }'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const check = await complycube.check.create("5eb04fcd0f3e360008035eb1", {
    type: "extensive_screening_check"
});
```

{% endtab %}

{% tab title="Python" %}

```python
check = cc_api.complycube.checks.create(
    "5eb04fcd0f3e360008035eb1",
    type="extensive_screening_check"
)
```

{% endtab %}

{% tab title="PHP" %}

```php
$result = $ccapi->checks()->create(
    '5eb04fcd0f3e360008035eb1',
    ['type' => 'extensive_screening_check']
);
```

{% endtab %}

{% tab title=".NET" %}

```csharp
var checkRequest = new CheckRequest {
  clientId = "5eb04fcd0f3e360008035eb1",
  type = "extensive_screening_check"
};

var check = await checkApi.CreateAsync(checkRequest);
```

{% endtab %}
{% endtabs %}

**Ejemplo de respuesta**

```json
{
    "id": "5ebd40714f23960008c81527",
    "entityName": "John Doe",
    "type": "extensive_screening_check",
    "clientId": "5eb04fcd0f3e360008035eb1",
    "status": "pending",
    "createdAt": "2025-01-04T17:25:21.116Z",
    "updatedAt": "2025-01-04T17:25:21.116Z"
}
```

{% endstep %}

{% step %}

#### Recuperar resultados

ComplyCube ejecutará entonces la verificación. Puedes obtener su [resultado y desglose detallado](/documentation/api-reference/check-types/aml-screening-check.md#result-object) a través de la API, o revisar los resultados en el Portal.

Si has [configurado webhooks](/documentation/documentation/documentation-es/recursos-de-integracion/webhooks.md), también recibirás una notificación una vez que la verificación se complete.

**Ejemplo de solicitud para recuperar el resultado de la verificación**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET https://api.complycube.com/v1/checks/5ebd40714f23960008c81527 \
     -H 'Authorization: <YOUR_API_KEY>'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const check = await complycube.check.get("5ebd40714f23960008c81527");
```

{% endtab %}

{% tab title="Python" %}

```python
check = cc_api.checks.get('5ebd40714f23960008c81527')
```

{% endtab %}

{% tab title="PHP" %}

```php
$check = $ccapi->checks()->get('5ebd40714f23960008c81527');
```

{% endtab %}

{% tab title=".NET" %}

```csharp
var check = await checkApi.GetAsync("5ebd40714f23960008c81527");
```

{% endtab %}
{% endtabs %}

**Ejemplo de respuesta**

```json
{
    "id": "65c12a6426d2ab000814037e",
    "entityName": "John Doe",
    "type": "standard_screening_check",
    "clientId": "5eb04fcd0f3e360008035eb1",
    "status": "complete",
    "result": {
        "outcome": "clear",
        "breakdown": {
            "summary": {
                "pep": {
                    "level1": "clear",
                    "level2": "clear",
                    "level3": "clear",
                    "level4": "clear"
                },
                "watchlist":{
                    "sanctionsLists": "clear",
                    "otherOfficialLists": "clear",
                    "warCrimes": "clear",
                    "terror": "clear",
                    "otherExclusionLists": "clear",
                    "sanctionsControlAndOwnership": "clear"
                },
                "adverseMedia": {
                    "environmentProduction": "clear",
                    "socialLabour": "clear",
                    "competitiveFinancial": "clear",
                    "regulatory": "clear"
                },
                "otherLists": {
                    "associatedEntity": "clear",
                    "organisedCrime": "clear",
                    "financialCrime": "clear",
                    "taxCrime": "clear",
                    "corruption": "clear",
                    "trafficking": "clear"
                }
            }
        }
    },
    "createdAt": "2025-01-04T17:25:21.116Z",
    "updatedAt": "2025-01-04T17:25:21.116Z"
}
```

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.complycube.com/documentation/documentation/documentation-es/guias-rapidas/api-quick-guide/run-an-aml-screening-check.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
