> For the complete documentation index, see [llms.txt](https://docs.caf.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caf.io/caf-api/connect/transactions/background-check/kyc/risk.md).

# Risk

## Criminal background - Federal Police (PF3)

Issuing a criminal background check with the Federal Police.

**Section:** `pfBackgroundCheckFederalPolice`

**Required parameter:** `cpf, name, motherName, birthDate`

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

| Attribute              | Type   | Description                                   |
| ---------------------- | ------ | --------------------------------------------- |
| statusCode             | String | Query status                                  |
| data                   | Object | Return data                                   |
| data.idNumber          | String | CPF of the person                             |
| data.status            | String | Status of the certificate (found / not found) |
| data.certificateNumber | String | Certificate number                            |
| data.certificateText   | String | Description of the certificate (content)      |
| data.emissionDate      | String | Date of issue of the certificate              |
| data.validity          | String | Validity of the certificate                   |
| {% endtab %}           |        |                                               |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "data": {
    "message": "Consulta realizada com sucesso",
    "idNumber": "0XX52XX90XX",
    "certificateText": "A Polícia Federal CERTIFICA, após pesquisa no Sistema Nacional de Informações Criminais - SINIC, que até a presente data,  NÃO CONSTA  decisão judicial condenatória com trânsito em julgado* em nome de  JOHN DOE,  nascido(a) aos 08/05/1999, CPF XXX.XXX.390-XX.",
    "status": "NADA CONSTA",
    "certificateNumber": "141XXXXX2022",
    "emissionDate": "07:48 de 22/12/2022",
    "validity": "90 DAYS"
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                                   | Description                                                                                              |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| has\_no\_criminal\_background\_federal | The rule will be invalid if the CPF has criminal records in the Federal Police.                          |
| has\_no\_inconsistent\_data            | The rule will become invalid if there is inconsistency in the data sent for querying the Federal Police. |
| has\_no\_criminal\_background          | Checks if the CPF has criminal records/background.                                                       |
| {% endtab %}                           |                                                                                                          |
| {% endtabs %}                          |                                                                                                          |

## CNJ Deprivation of Freedom Warrant (PF90)

Returns information about the existence of warrants (Arrest, Internment) with the National Council of Justice (CNJ).

**Section:** `pfArrestWarrant`

**Required parameter:** `cpf`

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

| Attribute                          | Type   | Description                                                                  |
| ---------------------------------- | ------ | ---------------------------------------------------------------------------- |
| statusCode                         | String | Query status                                                                 |
| data                               | Object | Return data                                                                  |
| data.message                       | String | Descriptive with query status                                                |
| data.status                        | String | Status related to the existence or not of warrants (exists / does not exist) |
| data.warrants                      | Array  | Warrant List                                                                 |
| data.warrants\[x].warrantNumber    | String | Warrant number                                                               |
| data.warrants\[x].name             | String | Name                                                                         |
| data.warrants\[x].status           | String | Situation                                                                    |
| data.warrants\[x].date             | String | Date                                                                         |
| data.warrants\[x].issuingAuthority | String | Issuing Agency                                                               |
| {% endtab %}                       |        |                                                                              |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "data": {
    "message": "Consulta realizada com sucesso - Não foram encontrados mandados de prisão ou de internação pendentes de cumprimento para: NÚMERO DO DOCUMENTO DE IDENTIFICAÇÃO: XXX52XX90XX. Pesquisa realizada em 22/12/2022 às 07h48",
    "status": "NADA CONSTA",
    "warrants": []
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                 | Description                                                                  |
| -------------------- | ---------------------------------------------------------------------------- |
| has\_arrest\_warrant | Checks the existence of warrants with the National Council of Justice (CNJ). |
| {% endtab %}         |                                                                              |
| {% endtabs %}        |                                                                              |

## Lawsuits (PF48)

It returns detailed information about lawsuits involving individuals or companies. The data source may include information such as: case details, involved parties, accusation details, and procedural history.

**Section:** `pfProcessesAlt`

**Required parameter:** `cpf`

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

| Attribute                                          | Type         | Description                   |
| -------------------------------------------------- | ------------ | ----------------------------- |
| statusCode                                         | String       | Query status                  |
| data                                               | Object       | Return data                   |
| data.message                                       | String       | Description with query status |
| data.total                                         | Number       | Total number of processes     |
| data.results                                       | Array        | Processes list returned       |
| data.results\[x].id                                | String       | Query identifier              |
| data.results\[x].criminalCategory                  | String       | Category of process           |
| data.results\[x].lawsuitClass                      | String       | Class                         |
| data.results\[x].distributionDate                  | String       | Distribution date             |
| data.results\[x].statusDate                        | String       | Status date                   |
| data.results\[x].lawsuitDegree                     | String       | Degree of lawsuit             |
| data.results\[x].physicalLocation                  | String       | Physical location             |
| data.results\[x].oldLawsuitNumber                  | String       | Old Case Number               |
| data.results\[x].judgingBody                       | String       | Trial court                   |
| data.results\[x].lawsuitId                         | String       | Case number                   |
| data.results\[x].isDigitalLawsuit                  | Boolean      | If the case is digital        |
| data.results\[x].lawBranch                         | String       | Branch of Law                 |
| data.results\[x].segment                           | String       | Segment                       |
| data.results\[x].isJusticeSecret                   | Boolean      | If it is a legal secret       |
| data.results\[x].complementaryStatus               | String       | Complementary status          |
| data.results\[x].observationStatus                 | String       | Observation status            |
| data.results\[x].court                             | String       | Court                         |
| data.results\[x].state                             | String       | STATE                         |
| data.results\[x].sourceUnit                        | String       | Unit of origin                |
| data.results\[x].lawsuitUrl                        | String       | Process URL                   |
| data.results\[x].lawsuitValue                      | Object       | Process value return          |
| data.results\[x].lawsuitValue.currency             | String       | Currency (R$, U$, etc)        |
| data.results\[x].lawsuitValue.value                | Number       | Value                         |
| data.results\[x].subjects                          | String Array | Subjects list                 |
| data.results\[x].moves                             | Array        | Process' movement list        |
| data.results\[x].moves\[x].date                    | String       | Date of the movement          |
| data.results\[x].moves\[x].description             | String       | Description of the movement   |
| data.results\[x].actives                           | Array        | Assets list                   |
| data.results\[x].actives\[x].cnpj                  | String       | CNPJ                          |
| data.results\[x].actives\[x].cpf                   | String       | CPF                           |
| data.results\[x].actives\[x].name                  | String       | Name                          |
| data.results\[x].actives\[x].type                  | String       | Type                          |
| data.results\[x].actives\[x].lawyers               | Array        | List of Lawyers               |
| data.results\[x].actives\[x].lawyers\[x].oab       | String       | OAB Number                    |
| data.results\[x].actives\[x].lawyers\[x].name      | String       | Name                          |
| data.results\[x].actives\[x].lawyers\[x].cpf       | String       | CPF                           |
| data.results\[x].passives                          | Array        | List of liabilities           |
| data.results\[x].passives\[x].cnpj                 | String       | CNPJ                          |
| data.results\[x].passives\[x].cpf                  | String       | CPF                           |
| data.results\[x].passives\[x].name                 | String       | Name                          |
| data.results\[x].passives\[x].type                 | String       | Type                          |
| data.results\[x].passives\[x].lawyers              | Array        | List of Lawyers               |
| data.results\[x].passives\[x].lawyers\[x].oab      | String       | OAB Number                    |
| data.results\[x].passives\[x].lawyers\[x].name     | String       | Name                          |
| data.results\[x].passives\[x].lawyers\[x].cpf      | String       | CPF                           |
| data.results\[x].otherParties                      | Array        | Other parties list            |
| data.results\[x].otherParties\[x].cnpj             | String       | CNPJ                          |
| data.results\[x].otherParties\[x].cpf              | String       | CPF                           |
| data.results\[x].otherParties\[x].name             | String       | Name                          |
| data.results\[x].otherParties\[x].type             | String       | Type                          |
| data.results\[x].otherParties\[x].lawyers          | Array        | List of Lawyers               |
| data.results\[x].otherParties\[x].lawyers\[x].oab  | String       | OAB Number                    |
| data.results\[x].otherParties\[x].lawyers\[x].name | String       | Name                          |
| data.results\[x].otherParties\[x].lawyers\[x].cpf  | String       | CPF                           |
| data.results\[x].authorType                        | String       | Author Type                   |
| data.results\[x].authorParty                       | String       | Author Party                  |
| {% endtab %}                                       |              |                               |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "data": {
    "message": "Consulta realizada com sucesso",
    "total": 7,
    "results": [
      {
        "id": "XXXXXXXXfdda79638XXXXX",
        "criminalCategory": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
        "lawsuitClass": "ACAO PENAL PROCEDIMENTO ORDINARIO",
        "distributionDate": "2017-11-24",
        "statusDate": "",
        "lawsuitDegree": "1",
        "physicalLocation": "",
        "oldLawsuitNumber": "",
        "judgingBody": "VARA UNICA",
        "lawsuitId": "XXXXXX",
        "isDigitalLawsuit": false,
        "lawBranch": "CIVEL / ADMINISTRATIVO",
        "segment": "JUSTICA ESTADUAL",
        "isJusticeSecret": false,
        "complementaryStatus": "EM ANDAMENTO",
        "observationStatus": "ATIVO",
        "court": "TJ PA",
        "state": "PA",
        "sourceUnit": "XXXXX",
        "subjects": ["XXXXX"],
        "moves": [
          {
            "date": "2018-06-19",
            "description": "NOTIFICACAO DE NAO CUMPRIMENTO DE ALVARA DE SOLTURA"
          },
          {
            "date": "2018-05-25",
            "description": "MANDADO DE INTIMACAO"
          },
          {
            "date": "2018-05-25",
            "description": "ALVARA DE SOLTURA"
          },
          {
            "date": "2018-05-23",
            "description": "A SECRETARIA DE ORIGEM"
          },
          {
            "date": "2018-05-23",
            "description": "DECISAO"
          }
        ],
        "actives": [
          {
            "cnpj": "XXXXXX",
            "name": "MINISTERIO PUBLICO ESTADUAL",
            "type": "PROMOTOR A"
          },
          {
            "cpf": "XXX.XXX.XXX-XX",
            "name": "XXXXXX",
            "type": "VITIMA"
          }
        ],
        "passives": [
          {
            "cpf": "XXX.XXX.XXX-XX",
            "name": "XXXXXX",
            "type": "REU"
          }
        ],
        "otherParties": [
          {
            "cpf": "XXX.XXX.XXX-XX",
            "name": "XXXXXX",
            "type": "AGRAVANTE"
          }
        ],
        "authorType": "REU",
        "authorParty": "PASSIVO"
      }
    ]
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                                             | Description                                                          |
| ------------------------------------------------ | -------------------------------------------------------------------- |
| has\_no\_processes                               | Checks if the CPF/CNPJ is linked to processes.                       |
| has\_no\_processes\_active\_party                | Check if the CPF is linked to processes as an active party.          |
| has\_no\_processes\_passive\_party               | Check if the CPF is linked to processes as a passive party.          |
| has\_no\_processes\_other\_party                 | Check if the CPF is linked to processes as other parties.            |
| has\_no\_defendant\_processes                    | Checks if the CPF/CNPJ is linked to proceedings as a defendant.      |
| has\_no\_criminal\_processes                     | Checks if the CPF/CNPJ is linked to criminal proceedings.            |
| has\_author\_type\_null\_in\_criminal\_processes | Checks if there is an empty 'authorType' field in any criminal case. |
| {% endtab %}                                     |                                                                      |
| {% endtabs %}                                    |                                                                      |

## Processes with keywords (PF49)

Returns information about lawsuits that the person has, of any type (criminal, civil, labor, ...).

**Section:** `pfProcessesWithKeywords`

**Required parameter:** `cpf`

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

| Attribute                                          | Type         | Description                    |
| -------------------------------------------------- | ------------ | ------------------------------ |
| statusCode                                         | String       | Query status                   |
| data                                               | Object       | Return data                    |
| data.message                                       | String       | Description with query status  |
| data.total                                         | Number       | Total number of processes      |
| data.foundWords                                    | Array        | Keywords found                 |
| data.results                                       | Array        | Processes list returned        |
| data.results\[x].id                                | String       | Query identifier               |
| data.results\[x].matchedWords                      | Array        | Keywords found in this lawsuit |
| data.results\[x].criminalCategory                  | String       | Category of process            |
| data.results\[x].lawsuitClass                      | String       | Class                          |
| data.results\[x].distributionDate                  | String       | Distribution date              |
| data.results\[x].statusDate                        | String       | Status date                    |
| data.results\[x].lawsuitDegree                     | String       | Degree of lawsuit              |
| data.results\[x].physicalLocation                  | String       | Physical location              |
| data.results\[x].oldLawsuitNumber                  | String       | Old Case Number                |
| data.results\[x].judgingBody                       | String       | Trial court                    |
| data.results\[x].lawsuitId                         | String       | Case number                    |
| data.results\[x].isDigitalLawsuit                  | Boolean      | If the case is digital         |
| data.results\[x].lawBranch                         | String       | Branch of Law                  |
| data.results\[x].segment                           | String       | Segment                        |
| data.results\[x].isJusticeSecret                   | Boolean      | If it is a legal secret        |
| data.results\[x].complementaryStatus               | String       | Complementary status           |
| data.results\[x].observationStatus                 | String       | Observation status             |
| data.results\[x].court                             | String       | Court                          |
| data.results\[x].state                             | String       | STATE                          |
| data.results\[x].sourceUnit                        | String       | Unit of origin                 |
| data.results\[x].lawsuitUrl                        | String       | Process URL                    |
| data.results\[x].lawsuitValue                      | Object       | Process value return           |
| data.results\[x].lawsuitValue.currency             | String       | Currency (R$, U$, etc)         |
| data.results\[x].lawsuitValue.value                | Number       | Value                          |
| data.results\[x].subjects                          | String Array | Subjects list                  |
| data.results\[x].moves                             | Array        | Process' movement list         |
| data.results\[x].moves\[x].date                    | String       | Date of the movement           |
| data.results\[x].moves\[x].description             | String       | Description of the movement    |
| data.results\[x].actives                           | Array        | Assets list                    |
| data.results\[x].actives\[x].cnpj                  | String       | CNPJ                           |
| data.results\[x].actives\[x].cpf                   | String       | CPF                            |
| data.results\[x].actives\[x].name                  | String       | Name                           |
| data.results\[x].actives\[x].type                  | String       | Type                           |
| data.results\[x].actives\[x].lawyers               | Array        | List of Lawyers                |
| data.results\[x].actives\[x].lawyers\[x].oab       | String       | OAB Number                     |
| data.results\[x].actives\[x].lawyers\[x].name      | String       | Name                           |
| data.results\[x].actives\[x].lawyers\[x].cpf       | String       | CPF                            |
| data.results\[x].passives                          | Array        | List of liabilities            |
| data.results\[x].passives\[x].cnpj                 | String       | CNPJ                           |
| data.results\[x].passives\[x].cpf                  | String       | CPF                            |
| data.results\[x].passives\[x].name                 | String       | Name                           |
| data.results\[x].passives\[x].type                 | String       | Type                           |
| data.results\[x].passives\[x].lawyers              | Array        | List of Lawyers                |
| data.results\[x].passives\[x].lawyers\[x].oab      | String       | OAB Number                     |
| data.results\[x].passives\[x].lawyers\[x].name     | String       | Name                           |
| data.results\[x].passives\[x].lawyers\[x].cpf      | String       | CPF                            |
| data.results\[x].otherParties                      | Array        | Other parties list             |
| data.results\[x].otherParties\[x].cnpj             | String       | CNPJ                           |
| data.results\[x].otherParties\[x].cpf              | String       | CPF                            |
| data.results\[x].otherParties\[x].name             | String       | Name                           |
| data.results\[x].otherParties\[x].type             | String       | Type                           |
| data.results\[x].otherParties\[x].lawyers          | Array        | List of Lawyers                |
| data.results\[x].otherParties\[x].lawyers\[x].oab  | String       | OAB Number                     |
| data.results\[x].otherParties\[x].lawyers\[x].name | String       | Name                           |
| data.results\[x].otherParties\[x].lawyers\[x].cpf  | String       | CPF                            |
| data.results\[x].authorType                        | String       | Author Type                    |
| data.results\[x].authorParty                       | String       | Author Party                   |
| {% endtab %}                                       |              |                                |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "data": {
    "message": "Consulta realizada com sucesso",
    "total": 7,
    "foundWords": [
      "XXXXX"
    ],
    "results": [
      {
        "id": "XXXXXXXXfdda79638XXXXX",
        "matchedWords": [
          "XXXXX"
        ],
        "criminalCategory": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
        "lawsuitClass": "ACAO PENAL PROCEDIMENTO ORDINARIO",
        "distributionDate": "2017-11-24",
        "statusDate": "",
        "lawsuitDegree": "1",
        "physicalLocation": "",
        "oldLawsuitNumber": "",
        "judgingBody": "VARA UNICA",
        "lawsuitId": "XXXXXX",
        "isDigitalLawsuit": false,
        "lawBranch": "CIVEL / ADMINISTRATIVO",
        "segment": "JUSTICA ESTADUAL",
        "isJusticeSecret": false,
        "complementaryStatus": "EM ANDAMENTO",
        "observationStatus": "ATIVO",
        "court": "TJ PA",
        "state": "PA",
        "sourceUnit": "XXXXX",
        "subjects": ["XXXXX"],
        "moves": [
          {
            "date": "2018-06-19",
            "description": "NOTIFICACAO DE NAO CUMPRIMENTO DE ALVARA DE SOLTURA"
          },
          {
            "date": "2018-05-25",
            "description": "MANDADO DE INTIMACAO"
          },
          {
            "date": "2018-05-25",
            "description": "ALVARA DE SOLTURA"
          },
          {
            "date": "2018-05-23",
            "description": "A SECRETARIA DE ORIGEM"
          },
          {
            "date": "2018-05-23",
            "description": "DECISAO"
          }
        ],
        "actives": [
          {
            "cnpj": "XXXXXX",
            "name": "MINISTERIO PUBLICO ESTADUAL",
            "type": "PROMOTOR A"
          },
          {
            "cpf": "XXX.XXX.XXX-XX",
            "name": "XXXXXX",
            "type": "VITIMA"
          }
        ],
        "passives": [
          {
            "cpf": "XXX.XXX.XXX-XX",
            "name": "XXXXXX",
            "type": "REU"
          }
        ],
        "otherParties": [
          {
            "cpf": "XXX.XXX.XXX-XX",
            "name": "XXXXXX",
            "type": "AGRAVANTE"
          }
        ],
        "authorType": "REU",
        "authorParty": "PASSIVO"
      }
    ]
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                     | Description                                                                                |
| ------------------------ | ------------------------------------------------------------------------------------------ |
| has\_processes\_keywords | The rule will become invalid if any of the configured keywords are found in the processes. |
| {% endtab %}             |                                                                                            |
| {% endtabs %}            |                                                                                            |

## KYC & Compliance (PF17)

This source includes information necessary to meet regulatory and legal requirements related to know-your-client processes. It provides data on politically exposed persons (PEPs), sanctions, and restrictions, both nationally and internationally. The dataset includes flags indicating whether an individual is a PEP or has any associated restrictions, along with historical records of such situations. If someone was a PEP in the past, the flag will not be marked, but the historical record will still be available for analysis.

list of databases where we consult:

* Acordos de Leniência (Controladoria-Geral da União)
* Banco Central - Inabilitados
* Canada Sanctions
* CEAF
* CEIS
* CEPIM
* CNEP
* COAF
* Conselho Nacional de Justiça
* CVM - Alerta Suspensão
* CVM - Penalidade Temporaria
* CVM - Termo Compromisso
* Embargos do Ibama
* EU
* FBI
* GOVUK
* IMPEDIDOS de Licitar e Contratar Banco
* INTERPOL
* Inidôneos TCU (Tribunal de Contas da União)
* MTE (Trabalho Escravo)
* OFAC
* Processo Administrativo Disciplinar (BSM Supervisão)
* SEAPE-DF
* Tribunal de Contas do Estado de São Paulo
* UNSC

**Section:** `pfKycCompliance`

**Required parameter:** `cpf`

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

| Attribute                                         | Type    | Description                                                                                            |
| ------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------ |
| statusCode                                        | String  | Query status ([details](/caf-api/connect/transactions/background-check/data-structure.md#status-code)) |
| data                                              | Object  | Return data                                                                                            |
| data.message                                      | String  | Description of the query status                                                                        |
| data.pepHistory                                   | Array   | List of objects with political exposure history                                                        |
| data.pepHistory\[x].level                         | String  | PEP (Politically Exposed Person) level                                                                 |
| data.pepHistory\[x].jobTitle                      | String  | Position                                                                                               |
| data.pepHistory\[x].department                    | String  | Department                                                                                             |
| data.pepHistory\[x].motive                        | String  | Reason                                                                                                 |
| data.pepHistory\[x].cpf                           | String  | CPF                                                                                                    |
| data.pepHistory\[x].source                        | String  | Source                                                                                                 |
| data.pepHistory\[x].link                          | String  | Link                                                                                                   |
| data.pepHistory\[x].startDate                     | String  | Date the person became an SPP                                                                          |
| data.pepHistory\[x].endDate                       | String  | Date the person ceased to be a SPP                                                                     |
| data.pepHistory\[x].creationDate                  | String  | Date created                                                                                           |
| data.pepHistory\[x].lastUpdateDate                | String  | Date last updated                                                                                      |
| data.sanctionsHistory                             | Array   | Object list with sanction and restriction history                                                      |
| data.sanctionsHistory\[x].source                  | String  | Sanction source                                                                                        |
| data.sanctionsHistory\[x].type                    | String  | Type of sanction                                                                                       |
| data.sanctionsHistory\[x].matchRate               | String  | Indication of how closely the name resembles                                                           |
| data.sanctionsHistory\[x].startDate               | String  | Start date                                                                                             |
| data.sanctionsHistory\[x].endDate                 | String  | End Date                                                                                               |
| data.sanctionsHistory\[x].originalName            | String  | Original name associated with the individual                                                           |
| data.sanctionsHistory\[x].sanctionName            | String  | Name registered on the international sanctions list                                                    |
| data.sanctionsHistory\[x].nationalities           | String  | Nationalities associated with the individual                                                           |
| data.sanctionsHistory\[x].image                   | String  | Individual's photo                                                                                     |
| data.sanctionsHistory\[x].height                  | String  | Height of Individual                                                                                   |
| data.sanctionsHistory\[x].eyes                    | String  | Eye Color                                                                                              |
| data.sanctionsHistory\[x].hair                    | String  | Hair Color                                                                                             |
| data.sanctionsHistory\[x].distinguishingMarks     | String  | Characteristics                                                                                        |
| data.sanctionsHistory\[x].description             | String  | General Description of Sanction                                                                        |
| data.sanctionsHistory\[x].considerations          | String  | Sanction considerations                                                                                |
| data.isCurrentlyPEP                               | Boolean | Indicates whether the person is currently an EPP                                                       |
| data.isCurrentlySanctioned                        | Boolean | Indicates whether the person is currently under any sanctions                                          |
| data.last30DaysSanctions                          | Number  | Number of sanctions and restrictions encountered during the past 30 days                               |
| data.last90DaysSanctions                          | Number  | Number of sanctions and restrictions encountered during the past 90 days                               |
| data.last180DaysSanctions                         | Number  | Number of sanctions and restrictions encountered during the last 180 days                              |
| data.last365DaysSanctions                         | Number  | Number of sanctions and restrictions encountered during the last 365 days                              |
| data.lastYearPEPOccurence                         | Number  | Number of PEP registrations found in the last year                                                     |
| data.last3YearsPEPOccurence                       | Number  | Number of PEP registers found in the last 3 years                                                      |
| data.last5YearsPEPOccurence                       | Number  | Number of PEP registers found in the last 5 years                                                      |
| data.last5PlusYearsPEPOccurence                   | Number  | Number of PEP records found in the last 5 years or more                                                |
| data.firstPEPOccurenceDate                        | String  | Date of first PEP record found for the individual                                                      |
| data.lastPEPOccurenceDate                         | String  | Date of last record of PEP found for the individual                                                    |
| data.isCurrentlyElectoralDonor                    | Boolean | Indicates whether the person donates to political campaigns                                            |
| data.isHistoricalElectoralDonor                   | Boolean | Indicates whether the person has donated to political campaigns                                        |
| data.totalElectoralDonationsLastTwoElections      | Number  | Number of donations made in the last two election cycles                                               |
| data.totalElectoralDonations                      | Number  | Total amount of donations made                                                                         |
| data.totalElectoralDonationAmountLastTwoElections | Number  | Sum of the amount donated in the last two election cycles                                              |
| data.totalElectoralDonationAmount                 | Number  | Total amount donated                                                                                   |
| {% endtab %}                                      |         |                                                                                                        |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "data": {
    "message": "Consulta realizada com sucesso",
    "pepHistory": [
      {
        "level": "1",
        "jobTitle": "VEREADOR (SUPLENTE)",
        "department": "XX XXXX XX",
        "motive": "CITY EMPLOYEE",
        "source": "TSE",
        "startDate": "2017-01-01T00:00:00Z",
        "endDate": "2025-12-31T00:00:00Z",
        "creationDate": "2022-11-17T01:03:54Z",
        "lastUpdateDate": "2022-11-17T01:03:54Z"
      },
      {
        "level": "1",
        "jobTitle": "VEREADOR",
        "department": "CÂMARA MUNICIPAL DE XXX",
        "motive": "CITY EMPLOYEE",
        "source": "http://caf.io",
        "startDate": "2016-01-01T00:00:00+00:00",
        "endDate": "2025-01-01T00:00:00+00:00",
        "creationDate": "2019-01-21T12:11:02.589Z",
        "lastUpdateDate": "2020-06-18T15:16:09.235Z"
      }
    ],
    "sanctionsHistory": []
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule               | Description                                                   |
| ------------------ | ------------------------------------------------------------- |
| has\_no\_sanctions | Check that no sanctions have been found on restrictive lists. |
| has\_no\_pep       | Checks whether the CPF or CNPJ holder has political exposure. |
| {% endtab %}       |                                                               |

{% tab title="Beta Testing Data" %}

| CPF           | DESCRIPTION                   | StatusCode |
| ------------- | ----------------------------- | ---------- |
| 19321675019   | TIMEOUT                       | 50         |
| 98302514705   | INVALID                       | 02         |
| 23993556011   | UNDER 18 YEARS                | 02         |
| 59872132070   | UNDER 12 YEARS                | 02         |
| 40442820135   | REGULAR                       | 01         |
| 63017285995   | REGULAR                       | 01         |
| 91708635203   | REGULAR                       | 01         |
| 58136053391   | REGULAR                       | 01         |
| 20751061000   | WITH SANCTION                 | 01         |
| 72713429072   | WITH PEPS                     | 01         |
| 46227846023   | IS CURRENTLY ELECTORAL DONOR  | 01         |
| 46227846023   | IS HISTORICAL ELECTORAL DONOR | 01         |
| 30078021057   | WAS PREVIOUSLY SANCTIONED     | 01         |
| {% endtab %}  |                               |            |
| {% endtabs %} |                               |            |

## Related News (PF25)

Returns public news related to this person on the internet. Bearing in mind that as the search is textual and takes the name into account, additional care is required with homonyms.

**Section:** `pfMediaProfileAndExposure`

**Required parameter:** `cpf`

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

| Attribute                                               | Type   | Description                                                                                            |
| ------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------ |
| statusCode                                              | String | Query status ([details](/caf-api/connect/transactions/background-check/data-structure.md#status-code)) |
| data                                                    | Object | Return data                                                                                            |
| data.message                                            | String | Description with query status                                                                          |
| data.mediaExposureLevel                                 | String | Media exposure level                                                                                   |
| data.celebrityLevel                                     | String | Celebrity level                                                                                        |
| data.unpopularityLevel                                  | String | Level of unpopularity                                                                                  |
| data.newsItems                                          | Array  | List of news captured for the entity                                                                   |
| data.newsItems\[x].title                                | String | Title of the news                                                                                      |
| data.newsItems\[x].sourceName                           | String | Name of the source responsible for the news                                                            |
| data.newsItems\[x].url                                  | String | URL of the news                                                                                        |
| data.newsItems\[x].sentimentAnalysis                    | Object | Sentiment analysis                                                                                     |
| data.newsItems\[x].sentimentAnalysis.label              | String | Label (positive, negative) attributed to the content in general                                        |
| data.newsItems\[x].sentimentAnalysis.peopleCount        | String | Number of people identified in the content                                                             |
| data.newsItems\[x].sentimentAnalysis.placesCount        | String | Number of places identified in the content                                                             |
| data.newsItems\[x].sentimentAnalysis.organizationsCount | String | Number of companies identified in the content                                                          |
| data.newsItems\[x].sentimentAnalysis.entities           | Object | Dictionary with entity names and labels of the content                                                 |
| data.newsItems\[x].categories                           | Array  | List of categories of the news                                                                         |
| data.newsItems\[x].captureDate                          | String | Date in which the news was captured                                                                    |
| data.newsItems\[x].publicationDate                      | String | News publication date                                                                                  |
| data.creationDate                                       | String | Creation date                                                                                          |
| data.lastUpdateDate                                     | String | Date of last update                                                                                    |
| {% endtab %}                                            |        |                                                                                                        |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "data": {
    "message": "Consulta realizada com sucesso",
    "mediaExposureLevel": "G",
    "celebrityLevel": "G",
    "unpopularityLevel": "H",
    "newsItems": [
      {
        "title": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "sourceName": "XXXXXXXXXXX",
        "url": "https://caf.io",
        "sentimentAnalysis": {
          "label": "POSITIVE",
          "peopleCount": "13",
          "placesCount": "3",
          "organizationsCount": "4",
          "entities": {
            "PEOPLE": {
              "XXXX XXXXXXX": {
                "Label": "SLIGHTLY_POSITIVE"
              },
              "XXXX XXXXXXX": {
                "Label": "POSITIVE"
              }
            },
            "PLACES": {
              "BRASIL": {
                "Label": "SLIGHTLY_POSITIVE"
              },
              "AMERICA LATINA": {
                "Label": "SLIGHTLY_POSITIVE"
              }
            },
            "ORGANIZATIONS": {
              "XXXXXXX": {
                "Label": "POSITIVE"
              },
              "XXXXXXX": {
                "Label": "SLIGHTLY_POSITIVE"
              }
            }
          }
        },
        "categories": ["economy"],
        "captureDate": "2018-11-03T07:08:47.138Z",
        "publicationDate": "2014-10-02T08:02:00Z"
      }
    ],
    "creationDate": "2012-09-17T18:42:00Z",
    "lastUpdateDate": "2022-08-04T08:29:08.738Z"
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                     | Description                                  |
| ------------------------ | -------------------------------------------- |
| has\_no\_media\_exposure | Checks if the CPF holder has media exposure. |
| {% endtab %}             |                                              |
| {% endtabs %}            |                                              |

## Procedural protocols at CADE

Check the CADE (Administrative Council for Economic Defense) website and check if the CPF consulted has linked procedural protocols.

**Section:** `pfProcessOnCade`

**Required parameter:** `cpf`

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

| Attribute                                         | Type   | Description                                                                                            |
| ------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------ |
| statusCode                                        | String | Query status ([details](/caf-api/connect/transactions/background-check/data-structure.md#status-code)) |
| data                                              | Object | Return data                                                                                            |
| data.message                                      | String | Description with query status                                                                          |
| data.proceduralProtocols                          | Array  | List of protocols found for the queried cpf                                                            |
| data.proceduralProtocols\[x].demandOrigin         | String | Query origin                                                                                           |
| data.proceduralProtocols\[x].protocolNumber       | String | Protocol number                                                                                        |
| data.proceduralProtocols\[x].source               | String | Generator Unit                                                                                         |
| data.proceduralProtocols\[x].emissionDate         | String | Date of issue                                                                                          |
| data.proceduralProtocols\[x].documentRequested    | String | Requested document                                                                                     |
| data.proceduralProtocols\[x].documentRequestedUrl | String | Url for the requested document                                                                         |
| {% endtab %}                                      |        |                                                                                                        |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "data": {
    "message": "Consulta realizada com sucesso. Não foram encontrados protocolos vinculados ao documento informado."
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                   | Description                                                           |
| ---------------------- | --------------------------------------------------------------------- |
| has\_process\_on\_cade | The rule will be invalid if there are procedural protocols with CADE. |
| {% endtab %}           |                                                                       |
| {% endtabs %}          |                                                                       |

## OFAC Sanctions List

Search the Specially Designated Nationals and Blocked Persons (SDN) List of the Office of Foreign Assets Control (OFAC). The query is made by name and is an international query.

**Section:** `pfOfacSanctionsList`

**Required parameter:** `name`

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

| Attribute                                             | Type   | Description                                                                                            |
| ----------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------ |
| statusCode                                            | String | Query status ([details](/caf-api/connect/transactions/background-check/data-structure.md#status-code)) |
| data                                                  | Object | Return data                                                                                            |
| data.message                                          | String | Description with query status                                                                          |
| data.sanctionsList                                    | Array  | List of protocols found for the queried cpf                                                            |
| data.sanctionsList\[x].type                           | String | Type                                                                                                   |
| data.sanctionsList\[x].firstName                      | String | First Name                                                                                             |
| data.sanctionsList\[x].lastName                       | String | Last Name                                                                                              |
| data.sanctionsList\[x].title                          | String | Title                                                                                                  |
| data.sanctionsList\[x].dateOfBirth                    | String | Date of birth                                                                                          |
| data.sanctionsList\[x].placeOfBirth                   | String | Place of Birth                                                                                         |
| data.sanctionsList\[x].list                           | String | List to which the name belongs                                                                         |
| data.sanctionsList\[x].program                        | String | Program to which the name belongs                                                                      |
| data.sanctionsList\[x].remarks                        | String | Remarks                                                                                                |
| data.sanctionsList\[x].nationality                    | String | Nationality                                                                                            |
| data.sanctionsList\[x].citizenship                    | String | Citizenship                                                                                            |
| data.sanctionsList\[x].identifications                | Array  | List of known identifications of the name informed                                                     |
| data.sanctionsList\[x].identifications\[x].type       | String | Type of identification                                                                                 |
| data.sanctionsList\[x].identifications\[x].number     | String | Document number                                                                                        |
| data.sanctionsList\[x].identifications\[x].country    | String | Document's country of origin                                                                           |
| data.sanctionsList\[x].identifications\[x].issueDate  | String | Document date of issue                                                                                 |
| data.sanctionsList\[x].identifications\[x].expireDate | String | Document's expiration date                                                                             |
| data.sanctionsList\[x].aliases                        | Array  | List of surnames by which the name entered can also be identified                                      |
| data.sanctionsList\[x].aliases\[x].type               | String | Type of surname                                                                                        |
| data.sanctionsList\[x].aliases\[x].category           | String | Category of surname                                                                                    |
| data.sanctionsList\[x].aliases\[x].name               | String | First or last name (can be false document)                                                             |
| data.sanctionsList\[x].addresses                      | Array  | List of known addresses for the name entered                                                           |
| data.sanctionsList\[x].addresses\[x].address          | String | Address                                                                                                |
| data.sanctionsList\[x].addresses\[x].city             | String | City                                                                                                   |
| data.sanctionsList\[x].addresses\[x].stateOrProvince  | String | State or province                                                                                      |
| data.sanctionsList\[x].addresses\[x].postalCode       | String | Postal code (ZIP)                                                                                      |
| data.sanctionsList\[x].addresses\[x].country          | String | Country                                                                                                |
| {% endtab %}                                          |        |                                                                                                        |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "data": {
    "message": "Consulta realizada com sucesso. Nenhum resultado encontrado para esta busca."
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                          | Description                                                   |
| ----------------------------- | ------------------------------------------------------------- |
| is\_on\_ofac\_sanctions\_list | Checks if there are any records at OFAC for the name entered. |
| {% endtab %}                  |                                                               |
| {% endtabs %}                 |                                                               |

## Private restriction list (PF78)

Query the presence in the private list of restrictions.

**Section:** `pfDenyListPrivate`

**Required parameter:** `cpf`

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

| Attribute        | Type    | Description                                                                                            |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------ |
| statusCode       | String  | Query status ([details](/caf-api/connect/transactions/background-check/data-structure.md#status-code)) |
| data             | Object  | Return data                                                                                            |
| data.message     | String  | Descriptive with query status                                                                          |
| data.recordFound | Boolean | Indication of presence in the private restriction list                                                 |
| data.cpf         | String  | CPF                                                                                                    |
| data.name        | String  | Name                                                                                                   |
| {% endtab %}     |         |                                                                                                        |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "data": {
    "message": "Consulta realizada com sucesso",
    "recordFound": false
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                | Description                                                             |
| ------------------- | ----------------------------------------------------------------------- |
| its\_on\_deny\_list | The rule will be invalid if the consulted CPF/CNPJ is on the Deny List. |
| {% endtab %}        |                                                                         |
| {% endtabs %}       |                                                                         |

## People Prevented from Betting - Sports Relationship (PF79)

Returns whether the CPF consulted is of a person prevented from betting or with a possible link to a person prevented from betting, providing the relationship level, team, year, activity and other information.

**Section:** `peopleSportRelated`

**Required parameter:** `cpf`

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

| Attribute                    | Type   | Description                                                                                            |
| ---------------------------- | ------ | ------------------------------------------------------------------------------------------------------ |
| statusCode                   | String | Query status ([details](/caf-api/connect/transactions/background-check/data-structure.md#status-code)) |
| data                         | Object | Return data                                                                                            |
| data.message                 | String | Descriptive with query status                                                                          |
| data.sportsRelationshipType  | Array  | Indicates the type of relationships the person has with the sports                                     |
| data.sport                   | Array  | Indicates the type of sport the person found is related to                                             |
| data.documentType            | String | Type of document found                                                                                 |
| data.name                    | String | Name of the person related to the sport                                                                |
| data.relationship            | String | Indicates the type of relationship in the case of third parties with the athlete                       |
| data.relationshipDocument    | String | CPF of the person related to the athlete                                                               |
| data.relationshipType        | Array  | Type of athlete's relationship with sport                                                              |
| data.relationshipName        | String | Name of the athlete related to the third person                                                        |
| data.sportsEntity            | String | Indicates the entity with which the athlete is related                                                 |
| data.sportLastBondYear       | String | Year of last connection with sport                                                                     |
| data.updateDate              | String | Indicates the date on which the relationship record was updated                                        |
| data.tournaments             | Array  | Tournaments in which the athlete is involved                                                           |
| data.tournaments\[x].team    | String | Team name                                                                                              |
| data.tournaments\[x].year    | String | Tournament year                                                                                        |
| data.tournaments\[x].name    | String | Tournament name                                                                                        |
| data.sportRadarRef           | Array  | Name and IDs associated with the athlete's current club on Sportsradar                                 |
| data.sportRadarRef\[x].name  | String | Team name                                                                                              |
| data.sportRadarRef\[x].srIds | Array  | Associated IDs                                                                                         |
| data.sportRadarRef\[x].name  | String | Year                                                                                                   |
| {% endtab %}                 |        |                                                                                                        |

{% tab title="Example" %}

```json
{
  "code": "01",
  "data": {
    "message": "Consulta realizada com sucesso.",
    "sportsRelationshipType": ["jogador"],
    "sport": ["futebol"],
    "documentType": "cpf",
    "name": "Davi Ruinzinho Duarte",
    "relationship": "",
    "relationshipDocument": "",
    "relationshipType": [],
    "relationshipName": "",
    "sportsEntity": "Tabajara Futebol Clube",
    "sportLastBondYear": "2024",
    "updateDate": "2024-01-01",
    "tournaments": [
      {
        "team": "Tabajara Futebol Clube",
        "year": "2024",
        "name": "Campeonato Brasileiro Serie Z"
      }
    ],
    "sportRadarRef": [
      {
        "name": "Tabajara Futebol Clube",
        "srIds": [32769, 354040],
        "year": "2024"
      }
    ]
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                       | Description                                         |
| -------------------------- | --------------------------------------------------- |
| is\_sport\_related\_person | Checks whether the individual is related to sports. |
| {% endtab %}               |                                                     |
| {% endtabs %}              |                                                     |

## People Prevented from Betting - Sports Relationship + Betting Houses + Ministry of Finance (PF80)

This source consolidates information from public sources related to sporting activities, betting houses and data from the Ministry of Finance. It checks whether the CPF entered is associated with other people, identifies the degree of relationship between them and provides additional relevant information.

**Section:** `peopleComplianceBet`

**Required parameter:** `cpf`

**Optional parameter:** `birthDate` *This information is required in some sources to complete the execution of minors*

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

| Attribute                                                                                                  | Type    | Description                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| statusCode                                                                                                 | String  | Query status ([details](/caf-api/connect/transactions/background-check/data-structure.md#status-code))                                          |
| data                                                                                                       | Object  | Return data                                                                                                                                     |
| data.message                                                                                               | String  | Descriptive with query status                                                                                                                   |
| data.queryDate                                                                                             | String  | Date when the query was executed                                                                                                                |
| data.queryId                                                                                               | String  | Unique identifier of the query                                                                                                                  |
| data.results                                                                                               | Array   | Results of the query                                                                                                                            |
| data.results\[x].matchKeys                                                                                 | String  | Keys used for matching the query                                                                                                                |
| data.results\[x].onlineBettingCompliance                                                                   | Object  | Compliance data related to online betting                                                                                                       |
| data.results\[x].onlineBettingCompliance.sportsExposure                                                    | Object  | Exposure details related to sports                                                                                                              |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports                                             | Array   | List of sports related to the query                                                                                                             |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].sportName                               | String  | Name of the sport                                                                                                                               |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].region                                  | String  | Region related to the sport                                                                                                                     |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].totalRelatedEntities                    | Number  | Total number of related entities                                                                                                                |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities                         | Array   | List of entities related to the sport                                                                                                           |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities\[x].docNumber           | String  | Document number of the related entity                                                                                                           |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities\[x].docType             | String  | Document type of the related entity (CPF, RG)                                                                                                   |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities\[x].relationshipLevel   | String  | Level of relationship with the entity (INDIRECT 1ST LEVEL, INDIRECT 2ND LEVEL, BUSINESS PARTNER)                                                |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities\[x].institutionName     | String  | Name of the institution                                                                                                                         |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities\[x].institutionActivity | String  | Activity of the institution                                                                                                                     |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities\[x].role                | String  | Role of the entity (ASSISTANT COACH, COACH, COUNCIL MEMBER, DIRECTOR, EX-PRESIDENT, MANAGER, PLAYER, PRESIDENT, REFEREE, STAFF, VICE-PRESIDENT) |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities\[x].isActive            | Boolean | Whether the entity is active                                                                                                                    |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities\[x].startDate           | String  | Start date of the relationship                                                                                                                  |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities\[x].endDate             | String  | End date of the relationship                                                                                                                    |
| data.results\[x].onlineBettingCompliance.sportsExposure.sports\[x].relatedEntities\[x].source              | String  | Source of the relationship information                                                                                                          |
| data.results\[x].onlineBettingCompliance.forbiddenBet                                                      | Object  | Data related to forbidden betting                                                                                                               |
| data.results\[x].onlineBettingCompliance.forbiddenBet.name                                                 | String  | Name of the person                                                                                                                              |
| data.results\[x].onlineBettingCompliance.forbiddenBet.age                                                  | String  | Age of the person                                                                                                                               |
| data.results\[x].onlineBettingCompliance.forbiddenBet.isFromMinisterioDaFazenda                            | Boolean | Whether the person is from the Ministry of Finance                                                                                              |
| data.results\[x].onlineBettingCompliance.forbiddenBet.isBookmakerOwner                                     | Boolean | Whether the person is a bookmaker owner                                                                                                         |
| data.results\[x].onlineBettingCompliance.forbiddenBet.bookmakerOwnerMotives                                | Array   | Reasons for being a bookmaker owner                                                                                                             |
| data.results\[x].onlineBettingCompliance.forbiddenBet.bookmakerOwnerMotives\[x].source                     | String  | Source of the information                                                                                                                       |
| data.results\[x].onlineBettingCompliance.forbiddenBet.bookmakerOwnerMotives\[x].cnpj                       | String  | CNPJ of the related company                                                                                                                     |
| data.results\[x].onlineBettingCompliance.forbiddenBet.bookmakerOwnerMotives\[x].companyName                | String  | Name of the related company                                                                                                                     |
| data.results\[x].onlineBettingCompliance.forbiddenBet.bookmakerOwnerMotives\[x].economicActivityCodes      | String  | Economic activity codes of the company                                                                                                          |
| data.results\[x].onlineBettingCompliance.forbiddenBet.bookmakerOwnerMotives\[x].additionalDetails          | Object  | Additional details of the company                                                                                                               |
| data.results\[x].onlineBettingCompliance.forbiddenBet.ministryOfFazendaMotives                             | Object  | Details from the Ministry of Finance                                                                                                            |
| data.evidence                                                                                              | Array   | List of evidence related to the query                                                                                                           |
| data.evidence\[x].id                                                                                       | String  | Unique identifier of the evidence                                                                                                               |
| data.evidence\[x].source                                                                                   | String  | Source of the evidence                                                                                                                          |
| data.status                                                                                                | Object  | Status of the compliance checks                                                                                                                 |
| data.status.onlineBettingCompliance                                                                        | Array   | List of status messages for online betting compliance                                                                                           |
| data.status.onlineBettingCompliance\[x].code                                                               | Number  | Status code of the compliance check                                                                                                             |
| data.status.onlineBettingCompliance\[x].message                                                            | String  | Status message of the compliance check                                                                                                          |
| data.elapsedMilliseconds                                                                                   | Number  | Time taken to execute the query, in milliseconds                                                                                                |
| {% endtab %}                                                                                               |         |                                                                                                                                                 |

{% tab title="Example" %}

```json
{
  "data": {
    "message": "Consulta realizada com sucesso.",
    "results": [
      {
        "matchKeys": "doc{12345678910}",
        "onlineBettingCompliance": {
          "sportsExposure": {
            "sports": [
              {
                "sportName": "SOCCER",
                "region": "EUROPE",
                "totalRelatedEntities": 2,
                "relatedEntities": [
                  {
                    "relationshipLevel": "DIRECT",
                    "institutionName": "Barcelona",
                    "institutionActivity": "CLUBES SOCIAIS, ESPORTIVOS E SIMILARES",
                    "isActive": false,
                    "startDate": "2014-07-01T00:00:00Z",
                    "endDate": "2020-08-30T00:00:00Z",
                    "source": "BIDUEFA"
                  },
                  {
                    "relationshipLevel": "DIRECT",
                    "institutionName": "PSG",
                    "institutionActivity": "CLUBES SOCIAIS, ESPORTIVOS E SIMILARES",
                    "isActive": true,
                    "startDate": "2020-09-01T00:00:00Z",
                    "endDate": null,
                    "source": "BIDLFP"
                  }
                ]
              }
            ]
          },
          "forbiddenBet": {
            "name": "LIONEL SILVA",
            "age": "36",
            "isBookmakerOwner": false,
            "bookmakerOwnerMotives": [],
            "isFromMinisterioDaFazenda": false
          }
        }
      }
    ],
    "status": {
      "onlineBettingCompliance": [
        {
          "code": 0,
          "message": "OK"
        }
      ]
    },
    "elapsedMilliseconds": 123,
    "evidence": [],
    "message": "Consulta realizada com sucesso.",
    "queryDate": "2024-12-10T13:45:00.123Z",
    "queryId": "abcd1234-5678-90ef-ghij-klmnopqrstuv"
  }
}

```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                         | Description                                                                                                                                                                |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| is\_prevented\_from\_betting | Checks if the individual is legally prohibited from placing bets, that is, if they have any connection with betting houses, the sports sector, or the Ministry of Finance. |
| {% endtab %}                 |                                                                                                                                                                            |
| {% endtabs %}                |                                                                                                                                                                            |

## Lawsuits - NEW (PF52)

It returns all available court cases through an expanded query, guaranteeing maximum information coverage.

**Section:** `pfLegalRecordsExtended`

**Required parameter:** `cpf`

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

| Attribute                                                            | Type    | Description                   |
| -------------------------------------------------------------------- | ------- | ----------------------------- |
| statusCode                                                           | String  | Query status                  |
| data                                                                 | Object  | Return data                   |
| data.message                                                         | String  | Description with query status |
| data.lawsuits                                                        | Array   | Processes list returned       |
| data.lawsuits\[x].cnjCode                                            | String  | CNJ code                      |
| data.lawsuits\[x].secrecyLevel                                       | Number  | Secrecy level                 |
| data.lawsuits\[x].amount                                             | Number  | Lawsuit amount                |
| data.lawsuits\[x].area                                               | String  | Lawsuit area                  |
| data.lawsuits\[x].instance                                           | Number  | Lawsuit degree                |
| data.lawsuits\[x].phase                                              | String  | Lawsuit phase                 |
| data.lawsuits\[x].status                                             | String  | Lawsuit status                |
| data.lawsuits\[x].judge                                              | String  | Lawsuit judge                 |
| data.lawsuits\[x].name                                               | String  | Abbreviation of the parties   |
| data.lawsuits\[x].courtAcronym                                       | String  | Court acronym                 |
| data.lawsuits\[x].courtDistrict                                      | String  | Court district                |
| data.lawsuits\[x].state                                              | String  | Lawsuit state                 |
| data.lawsuits\[x].city                                               | String  | Lawsuit city                  |
| data.lawsuits\[x].distributionDate                                   | String  | Distribution date             |
| data.lawsuits\[x].justiceDescription                                 | String  | Justice description           |
| data.lawsuits\[x].isCriminal                                         | Boolean | Criminal lawsuit indication   |
| data.lawsuits\[x].mainPartySide                                      | String  | Side of the searched party    |
| data.lawsuits\[x].lastStep                                           | Object  | Lawsuit last step             |
| data.lawsuits\[x].lastStep.stepId                                    | String  | Last step identifier          |
| data.lawsuits\[x].lastStep.stepDate                                  | String  | Last step date                |
| data.lawsuits\[x].lastStep.content                                   | String  | Last step content             |
| data.lawsuits\[x].lastStep.stepType                                  | String  | Last step type                |
| data.lawsuits\[x].lastStep.stepsCount                                | Number  | Last step count               |
| data.lawsuits\[x].relatedLawsuits                                    | Array   | Related lawsuits              |
| data.lawsuits\[x].relatedLawsuits\[x].code                           | String  | Related lawsuits code         |
| data.lawsuits\[x].relatedLawsuits\[x].instance                       | String  | Related lawsuits instance     |
| data.lawsuits\[x].steps                                              | Array   | Steps                         |
| data.lawsuits\[x].steps\[x].stepDate                                 | String  | Step date                     |
| data.lawsuits\[x].steps\[x].stepType                                 | String  | Step type                     |
| data.lawsuits\[x].steps\[x].content                                  | String  | Step content                  |
| data.lawsuits\[x].steps\[x].private                                  | String  | Step private                  |
| data.lawsuits\[x].subjects                                           | Array   | Subjects                      |
| data.lawsuits\[x].subjects\[x].code                                  | String  | Subject code                  |
| data.lawsuits\[x].subjects\[x].subject                               | String  | Subject description           |
| data.lawsuits\[x].courts                                             | Array   | Courts                        |
| data.lawsuits\[x].courts\[x].code                                    | String  | Court code                    |
| data.lawsuits\[x].courts\[x].court                                   | String  | Court description             |
| data.lawsuits\[x].classifications                                    | Array   | Classifications               |
| data.lawsuits\[x].classifications\[x].code                           | String  | Classification code           |
| data.lawsuits\[x].classifications\[x].classification                 | String  | Classification description    |
| data.lawsuits\[x].parties                                            | Array   | Parties                       |
| data.lawsuits\[x].parties\[x].type                                   | String  | Party type                    |
| data.lawsuits\[x].parties\[x].side                                   | String  | Party side                    |
| data.lawsuits\[x].parties\[x].party                                  | String  | Party description             |
| data.lawsuits\[x].parties\[x].mainDocument                           | String  | Party main document           |
| data.lawsuits\[x].parties\[x].documents                              | Array   | Party Documents               |
| data.lawsuits\[x].parties\[x].documents\[x].documentType             | String  | Party document type           |
| data.lawsuits\[x].parties\[x].documents\[x].document                 | String  | Party document                |
| data.lawsuits\[x].parties\[x].lawyers                                | Array   | Party lawyers                 |
| data.lawsuits\[x].parties\[x].lawyers\[x].name                       | String  | Lawyer name                   |
| data.lawsuits\[x].parties\[x].lawyers\[x].mainDocument               | String  | Lawyers main document         |
| data.lawsuits\[x].parties\[x].lawyers\[x].documents                  | Array   | Lawyers documents             |
| data.lawsuits\[x].parties\[x].lawyers\[x].documents\[x].documentType | String  | Lawyers document type         |
| data.lawsuits\[x].parties\[x].lawyers\[x].documents\[x].document     | String  | Lawyers document              |
| {% endtab %}                                                         |         |                               |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "message": "Consulta realizada com sucesso",
  "data": {
    "lawsuits": [
      {
        "cnjCode": "099999-09.0990.9.99.9900",
        "secrecyLevel": 0,
        "amount": 1000,
        "area": "DIREITO PROCESSUAL CIVIL",
        "status": "Ativo",
        "phase": "Inicial",
        "judge": "",
        "instance": 1,
        "name": "JONH DOE X JANE DOE",
        "courtAcronym": "TJSP",
        "courtDistrict": "VARA DA COMARCA DE SÃO PAULO",
        "state": "sp",
        "city": "SÃO PAULO",
        "distributionDate": "2024-03-12T09:57:51.000Z",
        "justiceDescription": "JUSTIÇA ESTADUAL",
        "isCriminal": false,
        "mainPartySide": "ATIVO",
        "steps": [],
        "subjects": [
          {
            "code": "10671",
            "subject": "Obrigação de Fazer / Não Fazer"
          }
        ],
        "courts": [
          {
            "code": "5117",
            "court": "VARA DA COMARCA DE SÃO PAULO"
          }
        ],
        "classifications": [
          {
            "code": "436",
            "classification": ""
          }
        ],
        "parties": [
          {
            "type": "Réu",
            "side": "Passive",
            "party": "JANE DOE",
            "mainDocument": "99999999999",
            "documents": [
              {
                "documentType": "cpf",
                "document": "99999999999"
              }
            ],
            "lawyers": [
              {
                "name": "JOSE DOE",
                "mainDocument": "",
                "documents": []
              }
            ]
          },
          {
            "type": "Autor",
            "side": "Active",
            "party": "JOHN DOE",
            "mainDocument": "88888888888",
            "documents": [
              {
                "documentType": "cpf",
                "document": "88888888888"
              }
            ],
            "lawyers": [
              {
                "name": "JOÃO DOE",
                "mainDocument": "",
                "documents": []
              }
            ]
          },
          {
            "type": "Advogado",
            "side": "Passive",
            "party": "JOSE DOE",
            "mainDocument": "",
            "documents": [],
            "lawyers": []
          },
          {
            "type": "Advogado",
            "side": "Active",
            "party": "JOÃO DOE",
            "mainDocument": "",
            "documents": [],
            "lawyers": []
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                                             | Description                                                          |
| ------------------------------------------------ | -------------------------------------------------------------------- |
| has\_no\_processes                               | Checks if the CPF/CNPJ is linked to processes.                       |
| has\_no\_processes\_active\_party                | Check if the CPF is linked to processes as an active party.          |
| has\_no\_processes\_passive\_party               | Check if the CPF is linked to processes as a passive party.          |
| has\_no\_processes\_other\_party                 | Check if the CPF is linked to processes as other parties.            |
| has\_no\_defendant\_processes                    | Checks if the CPF/CNPJ is linked to proceedings as a defendant.      |
| has\_no\_criminal\_processes                     | Checks if the CPF/CNPJ is linked to criminal proceedings.            |
| has\_author\_type\_null\_in\_criminal\_processes | Checks if there is an empty 'authorType' field in any criminal case. |
| {% endtab %}                                     |                                                                      |
| {% endtabs %}                                    |                                                                      |

## Lawsuits with Keywords - NEW (PF53)

It returns all available court cases through an expanded query, guaranteeing maximum information coverage.

**Section:** `pfLegalRecordsExtendedKeywords`

**Required parameter:** `cpf`

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

| Attribute                                                            | Type    | Description                    |
| -------------------------------------------------------------------- | ------- | ------------------------------ |
| statusCode                                                           | String  | Query status                   |
| data                                                                 | Object  | Return data                    |
| data.message                                                         | String  | Description with query status  |
| data.foundKeywords                                                   | Array   | Keywords found                 |
| data.lawsuits                                                        | Array   | Processes list returned        |
| data.lawsuits\[x].matchedWords                                       | Array   | Keywords found in this lawsuit |
| data.lawsuits\[x].cnjCode                                            | String  | CNJ code                       |
| data.lawsuits\[x].secrecyLevel                                       | Number  | Secrecy level                  |
| data.lawsuits\[x].amount                                             | Number  | Lawsuit amount                 |
| data.lawsuits\[x].area                                               | String  | Lawsuit area                   |
| data.lawsuits\[x].instance                                           | Number  | Lawsuit degree                 |
| data.lawsuits\[x].phase                                              | String  | Lawsuit phase                  |
| data.lawsuits\[x].status                                             | String  | Lawsuit status                 |
| data.lawsuits\[x].judge                                              | String  | Lawsuit judge                  |
| data.lawsuits\[x].name                                               | String  | Abbreviation of the parties    |
| data.lawsuits\[x].courtAcronym                                       | String  | Court acronym                  |
| data.lawsuits\[x].courtDistrict                                      | String  | Court district                 |
| data.lawsuits\[x].state                                              | String  | Lawsuit state                  |
| data.lawsuits\[x].city                                               | String  | Lawsuit city                   |
| data.lawsuits\[x].distributionDate                                   | String  | Distribution date              |
| data.lawsuits\[x].justiceDescription                                 | String  | Justice description            |
| data.lawsuits\[x].isCriminal                                         | Boolean | Criminal lawsuit indication    |
| data.lawsuits\[x].mainPartySide                                      | String  | Side of the searched party     |
| data.lawsuits\[x].lastStep                                           | Object  | Lawsuit last step              |
| data.lawsuits\[x].lastStep.stepId                                    | String  | Last step identifier           |
| data.lawsuits\[x].lastStep.stepDate                                  | String  | Last step date                 |
| data.lawsuits\[x].lastStep.content                                   | String  | Last step content              |
| data.lawsuits\[x].lastStep.stepType                                  | String  | Last step type                 |
| data.lawsuits\[x].lastStep.stepsCount                                | Number  | Last step count                |
| data.lawsuits\[x].relatedLawsuits                                    | Array   | Related lawsuits               |
| data.lawsuits\[x].relatedLawsuits\[x].code                           | String  | Related lawsuits code          |
| data.lawsuits\[x].relatedLawsuits\[x].instance                       | String  | Related lawsuits instance      |
| data.lawsuits\[x].steps                                              | Array   | Steps                          |
| data.lawsuits\[x].steps\[x].stepDate                                 | String  | Step date                      |
| data.lawsuits\[x].steps\[x].stepType                                 | String  | Step type                      |
| data.lawsuits\[x].steps\[x].content                                  | String  | Step content                   |
| data.lawsuits\[x].steps\[x].private                                  | String  | Step private                   |
| data.lawsuits\[x].subjects                                           | Array   | Subjects                       |
| data.lawsuits\[x].subjects\[x].code                                  | String  | Subject code                   |
| data.lawsuits\[x].subjects\[x].subject                               | String  | Subject description            |
| data.lawsuits\[x].courts                                             | Array   | Courts                         |
| data.lawsuits\[x].courts\[x].code                                    | String  | Court code                     |
| data.lawsuits\[x].courts\[x].court                                   | String  | Court description              |
| data.lawsuits\[x].classifications                                    | Array   | Classifications                |
| data.lawsuits\[x].classifications\[x].code                           | String  | Classification code            |
| data.lawsuits\[x].classifications\[x].classification                 | String  | Classification description     |
| data.lawsuits\[x].parties                                            | Array   | Parties                        |
| data.lawsuits\[x].parties\[x].type                                   | String  | Party type                     |
| data.lawsuits\[x].parties\[x].side                                   | String  | Party side                     |
| data.lawsuits\[x].parties\[x].party                                  | String  | Party description              |
| data.lawsuits\[x].parties\[x].mainDocument                           | String  | Party main document            |
| data.lawsuits\[x].parties\[x].documents                              | Array   | Party Documents                |
| data.lawsuits\[x].parties\[x].documents\[x].documentType             | String  | Party document type            |
| data.lawsuits\[x].parties\[x].documents\[x].document                 | String  | Party document                 |
| data.lawsuits\[x].parties\[x].lawyers                                | Array   | Party lawyers                  |
| data.lawsuits\[x].parties\[x].lawyers\[x].name                       | String  | Lawyer name                    |
| data.lawsuits\[x].parties\[x].lawyers\[x].mainDocument               | String  | Lawyers main document          |
| data.lawsuits\[x].parties\[x].lawyers\[x].documents                  | Array   | Lawyers documents              |
| data.lawsuits\[x].parties\[x].lawyers\[x].documents\[x].documentType | String  | Lawyers document type          |
| data.lawsuits\[x].parties\[x].lawyers\[x].documents\[x].document     | String  | Lawyers document               |
| {% endtab %}                                                         |         |                                |

{% tab title="Example" %}

```json
{
  "statusCode": "01",
  "message": "Consulta realizada com sucesso",
  "data": {
    "foundKeywords": [
      "Indenização por dano moral"
    ],
    "lawsuits": [
      {
        "type": "lawsuit",
        "matchedWords": [
          "Indenização por dano moral"
        ],
        "cnjCode": "099999-09.0990.9.99.9900",
        "secrecyLevel": 0,
        "amount": 1000,
        "area": "DIREITO PROCESSUAL CIVIL",
        "status": "Ativo",
        "phase": "Inicial",
        "judge": "",
        "instance": 1,
        "name": "JONH DOE X JANE DOE",
        "courtAcronym": "TJSP",
        "courtDistrict": "VARA DA COMARCA DE SÃO PAULO",
        "state": "sp",
        "city": "SÃO PAULO",
        "distributionDate": "2024-03-12T09:57:51.000Z",
        "justiceDescription": "JUSTIÇA ESTADUAL",
        "isCriminal": false,
        "mainPartySide": "ATIVO",
        "steps": [],
        "subjects": [
          {
            "code": "10671",
            "subject": "Obrigação de Fazer / Não Fazer"
          },
          {
            "code": "10001",
            "subject": "Indenização por dano moral"
          }
        ],
        "courts": [
          {
            "code": "5117",
            "court": "VARA DA COMARCA DE SÃO PAULO"
          }
        ],
        "classifications": [
          {
            "code": "436",
            "classification": ""
          }
        ],
        "parties": [
          {
            "type": "Réu",
            "side": "Passive",
            "party": "JANE DOE",
            "mainDocument": "99999999999",
            "documents": [
              {
                "documentType": "cpf",
                "document": "99999999999"
              }
            ],
            "lawyers": [
              {
                "name": "JOSE DOE",
                "mainDocument": "",
                "documents": []
              }
            ]
          },
          {
            "type": "Autor",
            "side": "Active",
            "party": "JOHN DOE",
            "mainDocument": "88888888888",
            "documents": [
              {
                "documentType": "cpf",
                "document": "88888888888"
              }
            ],
            "lawyers": [
              {
                "name": "JOÃO DOE",
                "mainDocument": "",
                "documents": []
              }
            ]
          },
          {
            "type": "Advogado",
            "side": "Passive",
            "party": "JOSE DOE",
            "mainDocument": "",
            "documents": [],
            "lawyers": []
          },
          {
            "type": "Advogado",
            "side": "Active",
            "party": "JOÃO DOE",
            "mainDocument": "",
            "documents": [],
            "lawyers": []
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="Validations Rules" %}

| Rule                     | Description                                                                                |
| ------------------------ | ------------------------------------------------------------------------------------------ |
| has\_processes\_keywords | The rule will become invalid if any of the configured keywords are found in the processes. |
| {% endtab %}             |                                                                                            |
| {% endtabs %}            |                                                                                            |


---

# 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.caf.io/caf-api/connect/transactions/background-check/kyc/risk.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.
