> For the complete documentation index, see [llms.txt](https://selenium-4.gitbook.io/nexus-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://selenium-4.gitbook.io/nexus-docs/docs/current-account/retrieve-blocked-funds/main.md).

# Retrieve Blocked Funds (Captives)

| Campo              | Valor                                                       |
| ------------------ | ----------------------------------------------------------- |
| **Service Domain** | Current Account                                             |
| **BIAN Version**   | 14.0.0                                                      |
| **Operation**      | Get Current Account Blocked Funds (Captives)                |
| **Method**         | GET                                                         |
| **API Name**       | Current Account API                                         |
| **Endpoint**       | `GET /v1/current-accounts/{currentAccountId}/blocked-funds` |
| **Autenticação**   | Bearer Token (OAuth2 ou JWT)                                |

***

## 1. Descrição da Operação

A API **Get Current Account Blocked Funds** permite consultar todos os valores cativos (blocked funds) associados a uma conta corrente.

Esta API permite:

* Consultar cativos ativos;
* Consultar cativos pendentes;
* Consultar histórico de cativos;
* Consultar totais;
* Consultar movimentos.

***

## 2. Cabeçalhos HTTP

| Header          | Tipo   | Obrigatório | Descrição                                                                          |
| --------------- | ------ | ----------- | ---------------------------------------------------------------------------------- |
| `Authorization` | string | Sim         | Bearer Token. Ex.: `Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...` |
| `Content-Type`  | string | Sim         | `application/json`                                                                 |
| `Accept`        | string | Sim         | `application/json`                                                                 |
| `x-request-id`  | string | Não         | ID da requisição.                                                                  |

A API utiliza autenticação baseada em Bearer Token (OAuth2 ou JWT).

***

## 3. Path Parameters

| Parâmetro          | Tipo   | Obrigatório | Descrição        |
| ------------------ | ------ | ----------- | ---------------- |
| `currentAccountId` | string | Sim         | Número da conta. |

***

## 4. Query Parameters

| Parâmetro  | Tipo   | Obrigatório | Descrição     |
| ---------- | ------ | ----------- | ------------- |
| `fromDate` | Date   | Não         | Data inicial. |
| `toDate`   | Date   | Não         | Data final.   |
| `status`   | string | Não         | Estado.       |

Exemplo: `GET /current-accounts/8067305810001/blocked-funds`

***

## 5. Payload de Resposta (Response — 200 OK)

```json
{
  "currentAccountFulfillmentArrangement": {
    "accountIdentification": {
      "accountIdentificationType": "BBAN",
      "identifierValue": {
        "value": "8067305810001"
      }
    },
    "accountType": "IndividualCurrentAccount",
    "accountStatus": "Enabled",
    "accountCurrency": {
      "currencyCode": "AOA"
    },
    "customerReference": {
      "agreementIdentification": {
        "identifierValue": {
          "value": "80673058"
        }
      },
      "agreementType": "CustomerAgreement"
    },
    "blockedFunds": {
      "dateTimePeriod": {
        "fromDateTime": {
          "dateTimeContent": "2024-01-01T00:00:00",
          "timeZoneCode": "UTC",
          "dateTimeType": "TransactionDate"
        },
        "toDateTime": {
          "dateTimeContent": "2024-12-31T23:59:59",
          "timeZoneCode": "UTC",
          "dateTimeType": "TransactionDate"
        }
      },
      "blockedFundsBalance": {
        "totalCreditCaptives": {
          "numberOfEntries": 1,
          "amount": {
            "amountValue": {
              "value": 190000.0
            },
            "amountCurrency": {
              "currencyCode": "AOA"
            }
          }
        },
        "totalDebitCaptives": {
          "numberOfEntries": 1,
          "amount": {
            "amountValue": {
              "value": 7000.0
            },
            "amountCurrency": {
              "currencyCode": "AOA"
            }
          }
        },
        "totalPendingCaptives": {
          "numberOfEntries": 1,
          "amount": {
            "amountValue": {
              "value": 15000.0
            },
            "amountCurrency": {
              "currencyCode": "AOA"
            }
          }
        },
        "totalBlockedFunds": {
          "numberOfEntries": 3,
          "amount": {
            "amountValue": {
              "value": 212000.0
            },
            "amountCurrency": {
              "currencyCode": "AOA"
            }
          }
        }
      },
      "blockedFundsEntry": [
        {
          "financialAccountingTransactionType": "Credit",
          "financialAccountingTransactionStatus": "Posted",
          "financialAccountingTransactionAmountAndCurrency": {
            "amount": {
              "amountValue": {
                "value": 190000.0
              },
              "amountCurrency": {
                "currencyCode": "AOA"
              }
            }
          },
          "valueDate": {
            "dateTimeContent": "2024-03-15T10:22:00",
            "timeZoneCode": "UTC"
          }
        },
        {
          "financialAccountingTransactionType": "Debit",
          "financialAccountingTransactionStatus": "Posted",
          "financialAccountingTransactionAmountAndCurrency": {
            "amount": {
              "amountValue": {
                "value": 7000.0
              },
              "amountCurrency": {
                "currencyCode": "AOA"
              }
            }
          },
          "valueDate": {
            "dateTimeContent": "2024-06-10T14:05:00",
            "timeZoneCode": "UTC"
          }
        },
        {
          "financialAccountingTransactionType": "Debit",
          "financialAccountingTransactionStatus": "Pending",
          "financialAccountingTransactionAmountAndCurrency": {
            "amount": {
              "amountValue": {
                "value": 15000.0
              },
              "amountCurrency": {
                "currencyCode": "AOA"
              }
            }
          },
          "valueDate": {
            "dateTimeContent": "2024-11-20T09:00:00",
            "timeZoneCode": "UTC"
          }
        }
      ]
    }
  }
}
```

### 5.1 Descrição dos Campos

| Campo                   | Tipo   | Descrição   |
| ----------------------- | ------ | ----------- |
| `AccountIdentification` | object | Conta.      |
| `BlockedFunds`          | object | Cativos.    |
| `BlockedFundsBalance`   | object | Totais.     |
| `BlockedFundsEntry`     | array  | Movimentos. |

### 5.2 Tabela de Objetos e Cardinalidade

| Objeto         | Campo                   | Tipo   | Cardinalidade | Descrição   |
| -------------- | ----------------------- | ------ | ------------- | ----------- |
| CurrentAccount | `AccountIdentification` | Object | 1..1          | Conta.      |
| CurrentAccount | `AccountType`           | String | 1..1          | Tipo.       |
| CurrentAccount | `AccountStatus`         | String | 1..1          | Estado.     |
| CurrentAccount | `AccountCurrency`       | Object | 1..1          | Moeda.      |
| CurrentAccount | `CustomerReference`     | Object | 1..1          | Cliente.    |
| CurrentAccount | `BlockedFunds`          | Object | 0..1          | Cativos.    |
| BlockedFunds   | `DateTimePeriod`        | Object | 0..1          | Período.    |
| BlockedFunds   | `BlockedFundsBalance`   | Object | 1..1          | Totais.     |
| BlockedFunds   | `BlockedFundsEntry`     | Array  | 0..n          | Movimentos. |

### 5.3 Objecto: `AccountIdentification`

| Campo                       | Tipo   | Cardinalidade | Descrição |
| --------------------------- | ------ | ------------- | --------- |
| `AccountIdentificationType` | String | 1..1          | Tipo.     |
| `IdentifierValue`           | String | 1..1          | Conta.    |

### 5.4 Objecto: `BlockedFundsBalance`

| Campo                  | Tipo   | Cardinalidade | Descrição  |
| ---------------------- | ------ | ------------- | ---------- |
| `TotalCreditCaptives`  | Object | 1..1          | Crédito.   |
| `TotalDebitCaptives`   | Object | 1..1          | Débito.    |
| `TotalPendingCaptives` | Object | 1..1          | Pendentes. |
| `TotalBlockedFunds`    | Object | 1..1          | Total.     |

### 5.5 Objecto: `BlockedFundsEntry[]`

| Campo                                  | Tipo    | Cardinalidade | Descrição |
| -------------------------------------- | ------- | ------------- | --------- |
| `FinancialAccountingTransactionType`   | String  | 1..1          | Tipo.     |
| `FinancialAccountingTransactionStatus` | String  | 1..1          | Estado.   |
| `Amount`                               | Decimal | 1..1          | Valor.    |
| `CurrencyCode`                         | String  | 1..1          | Moeda.    |
| `ValueDate`                            | Date    | 1..1          | Data.     |

Tipos de transação (`FinancialAccountingTransactionType`):

| Tipo     | Descrição  |
| -------- | ---------- |
| `Credit` | Cativo.    |
| `Debit`  | Descativo. |

Estados (`FinancialAccountingTransactionStatus`):

| Estado    | Descrição   |
| --------- | ----------- |
| `Posted`  | Confirmado. |
| `Pending` | Pendente.   |

***

## 6. Códigos HTTP de Resposta

| Código | Estado                | Descrição             |
| ------ | --------------------- | --------------------- |
| 200    | OK                    | Sucesso.              |
| 400    | Bad Request           | Pedido inválido.      |
| 401    | Unauthorized          | Não autorizado.       |
| 403    | Forbidden             | Proibido.             |
| 404    | Not Found             | Conta não encontrada. |
| 500    | Internal Server Error | Erro interno.         |

***

## 7. Envelope Padrão de Erro

**Invalid value**

```json
{
  "error": {
    "status": 400,
    "reason": "INVALID_VALUE",
    "message": "Invalid Srci-Client Id",
    "path": "GET /v1/current-accounts/533610002/blocked-funds",
    "errordetail": [
      {
        "code": "123332",
        "reason": "INVALID_VALUE",
        "message": "Invalid Srci-Client Id"
      }
    ]
  }
}
```

**Erro Interno**

```json
{
  "error": {
    "status": 500,
    "reason": "INVALID_STATE",
    "message": "Internal server error. Typically a server bug. The client should report this error to the Mastercard support team",
    "path": "GET /v1/current-account/533610002/retrieve"
  }
}
```

***

## 8. Regras de Negócio

* Conta deve existir.
* Conta deve estar ativa.
* Cliente deve existir.

***

## 9. Requisitos Não-Funcionais

* HTTPS obrigatório.
* Bearer Token obrigatório.
* Auditoria obrigatória.
* Logging obrigatório.


---

# 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://selenium-4.gitbook.io/nexus-docs/docs/current-account/retrieve-blocked-funds/main.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.
