> For the complete documentation index, see [llms.txt](https://akiba-digital.gitbook.io/akiba-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://akiba-digital.gitbook.io/akiba-api-docs/api-documentation/risk-analysis/insights/default-prediction.md).

# Default prediction

Calculates the likelihood of a customer to default on a lending product

### Predict Default

Default prediction allows lenders to understand when likely a customer is going to default on a loan repayment and after how many predicted missed repayments.

## Returns default likelihood of customer&#x20;

<mark style="color:blue;">`GET`</mark> `https://api.akibadigital.com/v1/default/{customer_id}/`

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Token<mark style="color:red;">\*</mark>        | String |                  |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json |

{% tabs %}
{% tab title="404: Not Found Customer not founder " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="403: Forbidden Customer has no bank data to predict from" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="400: Bad Request Insert valid customer\_id" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="200: OK Default prediction successfully retrieved" %}

```javascript
{
    "now_prediction": 0.2964672868854194,
    "30_day_prediction": 0.2964672868854194,
    "60_day_prediction": 0.2964672868854194, 
    "90_day_prediction": 0.2964672868854194, 
    "missed_payments_default": 2.44,
    "confidence": 0.8030592042
}
```

{% endtab %}

{% tab title="204: No Content Customer's default prediction not yet available" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}
