# Chile

Chile eKYC verification matches submitted individual data against Chile's Official Census as the source of truth. See the [eKYC API Reference](https://developer.incode.com/docs/ekyc-api-reference) for common response semantics that apply across all sources.

## Available sources

| Source                  | API source string | Description                                              |
| ----------------------- | ----------------- | -------------------------------------------------------- |
| Chile - Official Census | `CL_1`            | Verifies submitted data against Chile's Official Census. |

## Chile - Official Census

### Request parameters

| Parameter     | Required  | Description                                                                                 |
| ------------- | --------- | ------------------------------------------------------------------------------------------- |
| `source`      | Mandatory | Must be `CL_1`.                                                                             |
| `country`     | Mandatory | Must be `CL`.                                                                               |
| `idNum`       | Mandatory | Chilean RUT (Rol Único Tributario). Eight digits plus a verification digit or the letter K. |
| `firstName`   | Mandatory | First name of the individual.                                                               |
| `middleName`  | Optional  | Middle name of the individual.                                                              |
| `surName`     | Mandatory | Last name of the individual.                                                                |
| `dateOfBirth` | Optional  | Format: `yyyy-mm-dd`.                                                                       |

### Response fields

Chile - Official Census anchors verification on the source-of-truth register. See the [eKYC API Reference](https://developer.incode.com/docs/ekyc-api-reference) for common match field definitions and status values.

| Field             | Statuses                              | Description                                                               |
| ----------------- | ------------------------------------- | ------------------------------------------------------------------------- |
| `firstNameMatch`  | `exact`, `fuzzy`, `nomatch`           | Matches first name submitted against the value in the source of truth.    |
| `middleNameMatch` | `exact`, `fuzzy`, `nomatch`, `nodata` | Matches middle name submitted against the value in the source of truth.   |
| `lastNameMatch`   | `exact`, `fuzzy`, `nomatch`           | Matches last name submitted against the value in the source of truth.     |
| `fullNameMatch`   | `exact`, `fuzzy`, `nomatch`           | Matches full name submitted against the value in the source of truth.     |
| `dobMatch`        | `exact`, `fuzzy`, `nomatch`, `nodata` | Matches date of birth submitted against the value in the source of truth. |
| `idNumMatch`      | `exact`, `fuzzy`, `nomatch`, `nodata` | Matches RUT submitted against the value in the source of truth.           |
| `overallLevel`    | `low`, `medium`, `high`               | Overall risk level. See below for calculation logic.                      |

### overallLevel calculation

`overallLevel` is calculated based on the risk associated with the submitted full name and RUT:

- `low` when `fullNameMatch` and `idNumMatch` are both `exact`.
- `high` when `fullNameMatch` and `idNumMatch` are both `nomatch`.
- `medium` for all other combinations.

Contact your Incode representative to customize the `overallLevel` calculation for your use case.

### Sample response

```json
{
    "kyc": [
        { "key": "firstNameMatch", "status": "exact" },
        { "key": "middleNameMatch", "status": "exact" },
        { "key": "lastNameMatch", "status": "fuzzy" },
        { "key": "fullNameMatch", "status": "fuzzy" },
        { "key": "dobMatch", "status": "exact" },
        { "key": "idNumMatch", "status": "exact" },
        { "key": "overallLevel", "status": "low" }
    ]
}
```

<br />
