> For the complete documentation index, see [llms.txt](https://docs.waldo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.waldo.ai/api-reference/fraud-history.md).

# Fraud History

## Retrieve fraud history

<mark style="color:blue;">`GET`</mark> `https://api.waldo.ai/history/fraud/: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": 1724152019860,
    "score": 0.9
  },
  "history": [
    {
      "date": 1724152019860,
      "score": 0.9
    }
  ]
}
```

{% 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": "Fraud history not found."
}
```

{% endtab %}
{% endtabs %}
