> For the complete documentation index, see [llms.txt](https://docs.bullcredtech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bullcredtech.com/api-reference/apis-en/api-reference-client/get-customers-available-loan-amount.md).

# Available Loan Amount

**GET** `/customers/{cpf}/available-loan-amount`

Returns the amount the customer still has available to take as a new loan, considering the maximum limit approved in their latest credit analysis and the contracts already disbursed after that approval.

The calculation uses only data already stored by Bull, without consulting external services. The query is instant.

## URL parameters

| Parameter | Type   | Description                                 |
| --------- | ------ | ------------------------------------------- |
| `cpf`     | string | Customer's CPF (digits only, 11 characters) |

## Request Example

```http
GET /customers/12345678909/available-loan-amount HTTP/1.1
Authorization: Bearer your_token
```

## Success Response (200 OK)

```json
{
  "cpf": "12345678909",
  "available_loan_amount": 1234.56,
  "approved_at": "2026-04-20T14:30:00.000Z"
}
```

### Response Fields

| Field                   | Type              | Description                                             |
| ----------------------- | ----------------- | ------------------------------------------------------- |
| `cpf`                   | string            | Queried CPF                                             |
| `available_loan_amount` | number            | Amount available for a new loan. Never negative.        |
| `approved_at`           | string (ISO 8601) | Credit analysis date/time considered in the calculation |

## Response without Credit Analysis (204 No Content)

When the CPF has no approved credit analysis, the API responds `204 No Content` with no response body.

In this scenario, the customer needs to go through the credit analysis flow before obtaining an available amount.

## How the amount is calculated

The available amount is calculated as follows:

1. Identify the maximum limit approved in the CPF's latest credit analysis
2. Subtract the sum of the amounts disbursed in contracts issued after that approval
3. The result is never negative (minimum of `0`)

The query considers contracts from any channel linked to the CPF, ensuring a consolidated view of the credit already used by the customer.

## Possible Errors

| Code | Message                                |
| ---- | -------------------------------------- |
| 400  | Invalid CPF. Enter only the 11 digits. |

## Notes

* Instant response: the calculation uses only data already stored
* The amount is dynamic: new disbursed contracts reduce the available amount in real time
* Useful for showing the customer how much they can still contract before starting a new proposal


---

# 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.bullcredtech.com/api-reference/apis-en/api-reference-client/get-customers-available-loan-amount.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.
