# KYC History

## Retrieve KYC/AML history

<mark style="color:blue;">`GET`</mark> `https://api.waldo.ai/history/kyc/:customerId`

#### Path Parameters

| Field                                        | Type   | Description          |
| -------------------------------------------- | ------ | -------------------- |
| customerId<mark style="color:red;">\*</mark> | String | Waldo AI customer id |

#### Headers

| Name                                            | Type   | Description                                |
| ----------------------------------------------- | ------ | ------------------------------------------ |
| Authorization<mark style="color:red;">\*</mark> | String | The token in the format `Bearer eyJhbG...` |
| Content-Type<mark style="color:red;">\*</mark>  | String | Expected type is `application/json`        |

#### Response

{% tabs %}
{% tab title="200: OK KYC History Available" %}

```json
{
    "active": {
        "date": 1724244780545,
        "outcome": "REVIEW",
        "documentType": "driving_licence",
        "issuingDate": "2018-08-16",
        "type": "document"
    },
    "history": [
        {
            "date": 1724144769269,
            "outcome": "PASSED",
            "type": "kyc"
        },
        {
            "date": 1724244780545,
            "outcome": "REVIEW",
            "documentType": "driving_licence",
            "issuingDate": "2018-08-16",
            "type": "document"
        }
    ]
}
```

{% endtab %}

{% tab title="403: Forbidden Missing authorization header" %}

```json
{
  "code": "NOT_AUTHORIZED",
  "message": "Not authorized."
}
```

{% endtab %}

{% tab title="401: Unauthorized Invalid token or expired" %}

```json
{
  "code": "INVALID_TOKEN",
  "message": "Invalid token."
}
```

{% endtab %}

{% tab title="403: Forbidden Service not authorized" %}

```json
{
  "code": "NOT_AUTHORIZED",
  "message": "You are not authorized to perform this action. Please contact support for assistance."
}
```

{% endtab %}

{% tab title="403: Forbidden Inactive API key" %}

```json
{
  "code": "API_KEY_REVOKED",
  "message": "This API key has been revoked. Please visit the Waldo AI dashboard to review your API key."
}
```

{% endtab %}

{% tab title="400: Bad Request Missing query parameters" %}
The query should include the following parameters:  `customerId`

```json
{
  "code": "INVALID_DATA",
  "message": "Invalid customer ID."
}
```

{% endtab %}

{% tab title="404: Customer not found" %}
Customer was not found, or has not been evaluated yet.

```json
{
  "code": "NOT_FOUND",
  "message": "KYC history not found."
}
```

{% endtab %}
{% endtabs %}
