# LoanTransactionsApi

All URIs are relative to *http://localhost:8889/api*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**adjust**](#adjust) | **POST** /loans/transactions/{loanTransactionId}:adjust | Adjust loan transaction|
|[**applyFee**](#applyfee) | **POST** /loans/{loanAccountId}/fee-transactions | Apply a fee on a loan account|
|[**applyLock**](#applylock) | **POST** /loans/{loanAccountId}/lock-transactions | Lock loan account income sources (interest, fees, penalties)|
|[**applyPaymentMade**](#applypaymentmade) | **POST** /loans/{loanAccountId}/payment-made-transactions | Make payment in redraw balance for loan account|
|[**applyUnlock**](#applyunlock) | **POST** /loans/{loanAccountId}/unlock-transactions | Unlock loan account income sources (interest, fees, penalties)|
|[**getAll**](#getall) | **GET** /loans/{loanAccountId}/transactions | Get loan transactions|
|[**getById**](#getbyid) | **GET** /loans/transactions/{loanTransactionId} | Get loan transaction|
|[**getTransactionsForAllVersions**](#gettransactionsforallversions) | **GET** /loans/{loanAccountId}/transactions:versions | Get loan transactions for all loan account versions|
|[**makeDepositOnCreditBalance**](#makedepositoncreditbalance) | **POST** /loans/{loanAccountId}/creditbalance-deposit-transactions | Represents the information for creating a transaction of type &#x60;CREDIT_BALANCE_DEPOSIT&#x60;.|
|[**makeDisbursement**](#makedisbursement) | **POST** /loans/{loanAccountId}/disbursement-transactions | Make a disbursement on a loan|
|[**makePrincipalOverpayment**](#makeprincipaloverpayment) | **POST** /loans/{loanAccountId}/principal-overpayment-transactions | Make non-scheduled principal overpayment transaction on loan account|
|[**makeRedrawRepayment**](#makeredrawrepayment) | **POST** /loans/{loanAccountId}/redraw-repayment-transactions | Make a redraw repayment transaction on a loan|
|[**makeRefund**](#makerefund) | **POST** /loans/{loanAccountId}/refund-transactions | Make refund transaction on loan account|
|[**makeRepayment**](#makerepayment) | **POST** /loans/{loanAccountId}/repayment-transactions | Make repayment transaction on loan account|
|[**makeWithdrawal**](#makewithdrawal) | **POST** /loans/{loanAccountId}/withdrawal-transactions | Make withdrawal from redraw balance|
|[**search**](#search) | **POST** /loans/transactions:search | Search loan transactions|

# **adjust**
> LoanTransaction adjust(loanTransactionAdjustmentDetails)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    LoanTransactionAdjustmentDetails
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanTransactionId: string; //The ID or encoded key of the loan transaction to be returned. (default to undefined)
let loanTransactionAdjustmentDetails: LoanTransactionAdjustmentDetails; //Details of the adjustment.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.adjust(
    loanTransactionId,
    loanTransactionAdjustmentDetails,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanTransactionAdjustmentDetails** | **LoanTransactionAdjustmentDetails**| Details of the adjustment. | |
| **loanTransactionId** | [**string**] | The ID or encoded key of the loan transaction to be returned. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**200** | Loan transaction adjusted. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan transaction not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **applyFee**
> LoanTransaction applyFee(feeLoanTransactionInput)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    FeeLoanTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let feeLoanTransactionInput: FeeLoanTransactionInput; //Represents the information for creating a transaction of type `FEE_APPLIED` on a loan.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.applyFee(
    loanAccountId,
    feeLoanTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **feeLoanTransactionInput** | **FeeLoanTransactionInput**| Represents the information for creating a transaction of type &#x60;FEE_APPLIED&#x60; on a loan. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Fee applied transaction created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **applyLock**
> LockLoanTransactionsWrapper applyLock(lockLoanAccountInput)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    LockLoanAccountInput
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let lockLoanAccountInput: LockLoanAccountInput; //Represents the information for locking an account.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.applyLock(
    loanAccountId,
    lockLoanAccountInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **lockLoanAccountInput** | **LockLoanAccountInput**| Represents the information for locking an account. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LockLoanTransactionsWrapper**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Lock transactions created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **applyPaymentMade**
> LoanTransaction applyPaymentMade(paymentMadeTransactionInput)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    PaymentMadeTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let paymentMadeTransactionInput: PaymentMadeTransactionInput; //Represents the information for creating a transaction of the type `PAYMENT_MADE`.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.applyPaymentMade(
    loanAccountId,
    paymentMadeTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **paymentMadeTransactionInput** | **PaymentMadeTransactionInput**| Represents the information for creating a transaction of the type &#x60;PAYMENT_MADE&#x60;. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Payment made transaction created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **applyUnlock**
> LockLoanTransactionsWrapper applyUnlock(unlockLoanAccountInput)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    UnlockLoanAccountInput
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let unlockLoanAccountInput: UnlockLoanAccountInput; //Represents the information for unlocking an account.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.applyUnlock(
    loanAccountId,
    unlockLoanAccountInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **unlockLoanAccountInput** | **UnlockLoanAccountInput**| Represents the information for unlocking an account. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LockLoanTransactionsWrapper**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Unlock transactions created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getAll**
> Array<LoanTransaction> getAll()


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let offset: number; //Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results (optional) (default to undefined)
let limit: number; //Pagination, the number of elements to retrieve, used in combination with offset to paginate results (optional) (default to undefined)
let paginationDetails: 'ON' | 'OFF'; //Flag specifying whether the pagination  details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs (optional) (default to 'OFF')
let detailsLevel: 'BASIC' | 'FULL'; //The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. (optional) (default to undefined)

const { status, data } = await apiInstance.getAll(
    loanAccountId,
    offset,
    limit,
    paginationDetails,
    detailsLevel
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **offset** | [**number**] | Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results | (optional) defaults to undefined|
| **limit** | [**number**] | Pagination, the number of elements to retrieve, used in combination with offset to paginate results | (optional) defaults to undefined|
| **paginationDetails** | [**&#39;ON&#39; | &#39;OFF&#39;**]**Array<&#39;ON&#39; &#124; &#39;OFF&#39;>** | Flag specifying whether the pagination  details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs | (optional) defaults to 'OFF'|
| **detailsLevel** | [**&#39;BASIC&#39; | &#39;FULL&#39;**]**Array<&#39;BASIC&#39; &#124; &#39;FULL&#39;>** | The level of details to return: &#x60;FULL&#x60; means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and &#x60;BASIC&#x60; will return only the first level elements of the object. | (optional) defaults to undefined|


### Return type

**Array<LoanTransaction>**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Loan transactions list returned. |  * Items-Limit - Pagination details, the requested page size <br>  * Items-Offset - Pagination details, the index of the first returned item <br>  * Items-Total - Pagination details, the total available items <br>  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getById**
> LoanTransaction getById()


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanTransactionId: string; //The ID or encoded key of the loan transaction to be returned. (default to undefined)
let detailsLevel: 'BASIC' | 'FULL'; //The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. (optional) (default to undefined)

const { status, data } = await apiInstance.getById(
    loanTransactionId,
    detailsLevel
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanTransactionId** | [**string**] | The ID or encoded key of the loan transaction to be returned. | defaults to undefined|
| **detailsLevel** | [**&#39;BASIC&#39; | &#39;FULL&#39;**]**Array<&#39;BASIC&#39; &#124; &#39;FULL&#39;>** | The level of details to return: &#x60;FULL&#x60; means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and &#x60;BASIC&#x60; will return only the first level elements of the object. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Loan transaction returned. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan transaction not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getTransactionsForAllVersions**
> Array<LoanTransaction> getTransactionsForAllVersions()


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let offset: number; //Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results (optional) (default to undefined)
let limit: number; //Pagination, the number of elements to retrieve, used in combination with offset to paginate results (optional) (default to undefined)
let paginationDetails: 'ON' | 'OFF'; //Flag specifying whether the pagination  details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs (optional) (default to 'OFF')
let detailsLevel: 'BASIC' | 'FULL'; //The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. (optional) (default to undefined)

const { status, data } = await apiInstance.getTransactionsForAllVersions(
    loanAccountId,
    offset,
    limit,
    paginationDetails,
    detailsLevel
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **offset** | [**number**] | Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results | (optional) defaults to undefined|
| **limit** | [**number**] | Pagination, the number of elements to retrieve, used in combination with offset to paginate results | (optional) defaults to undefined|
| **paginationDetails** | [**&#39;ON&#39; | &#39;OFF&#39;**]**Array<&#39;ON&#39; &#124; &#39;OFF&#39;>** | Flag specifying whether the pagination  details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs | (optional) defaults to 'OFF'|
| **detailsLevel** | [**&#39;BASIC&#39; | &#39;FULL&#39;**]**Array<&#39;BASIC&#39; &#124; &#39;FULL&#39;>** | The level of details to return: &#x60;FULL&#x60; means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and &#x60;BASIC&#x60; will return only the first level elements of the object. | (optional) defaults to undefined|


### Return type

**Array<LoanTransaction>**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Loan transactions list returned. |  * Items-Limit - Pagination details, the requested page size <br>  * Items-Offset - Pagination details, the index of the first returned item <br>  * Items-Total - Pagination details, the total available items <br>  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **makeDepositOnCreditBalance**
> LoanTransaction makeDepositOnCreditBalance(creditBalanceDepositTransactionInput)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    CreditBalanceDepositTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let creditBalanceDepositTransactionInput: CreditBalanceDepositTransactionInput; //Represents the information for creating a transaction of type `CREDIT_BALANCE_DEPOSIT`.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.makeDepositOnCreditBalance(
    loanAccountId,
    creditBalanceDepositTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **creditBalanceDepositTransactionInput** | **CreditBalanceDepositTransactionInput**| Represents the information for creating a transaction of type &#x60;CREDIT_BALANCE_DEPOSIT&#x60;. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Deposit to Credit Balance transaction created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **makeDisbursement**
> LoanTransaction makeDisbursement(disbursementLoanTransactionInput)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    DisbursementLoanTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let disbursementLoanTransactionInput: DisbursementLoanTransactionInput; //Input details for the disbursement transaction.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.makeDisbursement(
    loanAccountId,
    disbursementLoanTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **disbursementLoanTransactionInput** | **DisbursementLoanTransactionInput**| Input details for the disbursement transaction. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | The loan has been disbursed and a disbursement transaction has been created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **makePrincipalOverpayment**
> LoanTransaction makePrincipalOverpayment(principalOverpaymentLoanTransactionInput)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    PrincipalOverpaymentLoanTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let principalOverpaymentLoanTransactionInput: PrincipalOverpaymentLoanTransactionInput; //Represents the information for creating a transaction of type `PRINCIPAL_OVERPAYMENT`.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.makePrincipalOverpayment(
    loanAccountId,
    principalOverpaymentLoanTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **principalOverpaymentLoanTransactionInput** | **PrincipalOverpaymentLoanTransactionInput**| Represents the information for creating a transaction of type &#x60;PRINCIPAL_OVERPAYMENT&#x60;. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Principal overpayment transaction created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **makeRedrawRepayment**
> LoanTransaction makeRedrawRepayment(redrawRepaymentTransactionInputDTO)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    RedrawRepaymentTransactionInputDTO
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let redrawRepaymentTransactionInputDTO: RedrawRepaymentTransactionInputDTO; //Represents the information for creating a transaction of type `REDRAW_REPAYMENT`.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.makeRedrawRepayment(
    loanAccountId,
    redrawRepaymentTransactionInputDTO,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **redrawRepaymentTransactionInputDTO** | **RedrawRepaymentTransactionInputDTO**| Represents the information for creating a transaction of type &#x60;REDRAW_REPAYMENT&#x60;. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Redraw repayment transaction created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **makeRefund**
> LoanTransaction makeRefund(refundLoanTransactionInput)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    RefundLoanTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let refundLoanTransactionInput: RefundLoanTransactionInput; //Represents the information for creating a transaction of type `REFUND`.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.makeRefund(
    loanAccountId,
    refundLoanTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **refundLoanTransactionInput** | **RefundLoanTransactionInput**| Represents the information for creating a transaction of type &#x60;REFUND&#x60;. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Refund transaction created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **makeRepayment**
> LoanTransaction makeRepayment(repaymentLoanTransactionInput)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    RepaymentLoanTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let repaymentLoanTransactionInput: RepaymentLoanTransactionInput; //Represents the information for creating a transaction of type `REPAYMENT`.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.makeRepayment(
    loanAccountId,
    repaymentLoanTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **repaymentLoanTransactionInput** | **RepaymentLoanTransactionInput**| Represents the information for creating a transaction of type &#x60;REPAYMENT&#x60;. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Repayment transaction created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **makeWithdrawal**
> LoanTransaction makeWithdrawal(withdrawalRedrawTransactionInput)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    WithdrawalRedrawTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let withdrawalRedrawTransactionInput: WithdrawalRedrawTransactionInput; //Represents the information for creating a transaction of type `WITHDRAWAL_REDRAW`.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.makeWithdrawal(
    loanAccountId,
    withdrawalRedrawTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **withdrawalRedrawTransactionInput** | **WithdrawalRedrawTransactionInput**| Represents the information for creating a transaction of type &#x60;WITHDRAWAL_REDRAW&#x60;. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

**LoanTransaction**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**201** | Withdrawal redraw transaction created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **search**
> Array<LoanTransaction> search(loanTransactionSearchCriteria)


### Example

```typescript
import {
    LoanTransactionsApi,
    Configuration,
    LoanTransactionSearchCriteria
} from './api';

const configuration = new Configuration();
const apiInstance = new LoanTransactionsApi(configuration);

let loanTransactionSearchCriteria: LoanTransactionSearchCriteria; //Criteria to be used to search the loan transactions.
let offset: number; //Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results (optional) (default to undefined)
let limit: number; //Pagination, the number of elements to retrieve, used in combination with offset to paginate results (optional) (default to undefined)
let paginationDetails: 'ON' | 'OFF'; //Flag specifying whether the pagination  details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs (optional) (default to 'OFF')
let cursor: string; //Pagination, cursor to start searching at when retrieving elements, used in combination with limit to paginate results (optional) (default to undefined)
let detailsLevel: 'BASIC' | 'FULL'; //The level of details to return: `FULL` means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and `BASIC` will return only the first level elements of the object. (optional) (default to undefined)

const { status, data } = await apiInstance.search(
    loanTransactionSearchCriteria,
    offset,
    limit,
    paginationDetails,
    cursor,
    detailsLevel
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanTransactionSearchCriteria** | **LoanTransactionSearchCriteria**| Criteria to be used to search the loan transactions. | |
| **offset** | [**number**] | Pagination, index to start searching at when retrieving elements, used in combination with limit to paginate results | (optional) defaults to undefined|
| **limit** | [**number**] | Pagination, the number of elements to retrieve, used in combination with offset to paginate results | (optional) defaults to undefined|
| **paginationDetails** | [**&#39;ON&#39; | &#39;OFF&#39;**]**Array<&#39;ON&#39; &#124; &#39;OFF&#39;>** | Flag specifying whether the pagination  details should be provided in response headers. Please note that by default it is disabled (OFF), in order to improve the performance of the APIs | (optional) defaults to 'OFF'|
| **cursor** | [**string**] | Pagination, cursor to start searching at when retrieving elements, used in combination with limit to paginate results | (optional) defaults to undefined|
| **detailsLevel** | [**&#39;BASIC&#39; | &#39;FULL&#39;**]**Array<&#39;BASIC&#39; &#124; &#39;FULL&#39;>** | The level of details to return: &#x60;FULL&#x60; means the full details of the object will be returned (custom field values, address, contact info, or any other related objects) and &#x60;BASIC&#x60; will return only the first level elements of the object. | (optional) defaults to undefined|


### Return type

**Array<LoanTransaction>**

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Result of a loan transaction search. |  * Items-Limit - Pagination details, the requested page size <br>  * Items-Next-Cursor - The next cursor to be used by the subsequent calls <br>  * Items-Offset - Pagination details, the index of the first returned item <br>  * Items-Total - Pagination details, the total available items <br>  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | No loan transaction could be found using the supplied criteria. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

