# LoanAccountsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**_delete**](#_delete) | **DELETE** /loans/{loanAccountId} | Delete loan account|
|[**applyInterest**](#applyinterest) | **POST** /loans/{loanAccountId}:applyInterest | Apply accrued interest|
|[**changeArrearsSettings**](#changearrearssettings) | **POST** /loans/{loanAccountId}:changeArrearsSettings | Change arrears settings for loan account|
|[**changeDueDatesSettings**](#changeduedatessettings) | **POST** /loans/{loanAccountId}:changeDueDatesSettings | Change due dates settings for loan account|
|[**changeFeeRate**](#changefeerate) | **POST** /loans/{loanAccountId}:changeFeeRate | Change loan account fee rate|
|[**changeInterestRate**](#changeinterestrate) | **POST** /loans/{loanAccountId}:changeInterestRate | Change loan account interest rate|
|[**changeLoanTerm**](#changeloanterm) | **POST** /loans/{loanAccountId}:changeLoanTerm | Change loan account term|
|[**changePeriodicPayment**](#changeperiodicpayment) | **POST** /loans/{loanAccountId}:changePeriodicPayment | Change the periodic payment amount for an active loan, so that it is still possible to have principal and interest installments, but with a smaller or greater total due amount than the initial one.|
|[**changeRepaymentValue**](#changerepaymentvalue) | **POST** /loans/{loanAccountId}:changeRepaymentValue | Change repayment value for loan account|
|[**changeState**](#changestate) | **POST** /loans/{loanAccountId}:changeState | Change loan account state|
|[**create**](#create) | **POST** /loans | Create loan account|
|[**createCard**](#createcard) | **POST** /loans/{loanAccountId}/cards | Represents the information needed to create and associate a new card to an account.|
|[**deleteCard**](#deletecard) | **DELETE** /loans/{loanAccountId}/cards/{cardReferenceToken} | Represents the information needed to delete a card associated to an account using its reference token.|
|[**getAll**](#getall) | **GET** /loans | Get loan accounts|
|[**getAllAuthorizationHolds**](#getallauthorizationholds) | **GET** /loans/{loanAccountId}/authorizationholds | Get authorization holds related to a loan account, ordered from newest to oldest by creation date|
|[**getAllCards**](#getallcards) | **GET** /loans/{loanAccountId}/cards | Get cards associated with an account|
|[**getById**](#getbyid) | **GET** /loans/{loanAccountId} | Get loan account|
|[**getVersionsById**](#getversionsbyid) | **GET** /loans/{loanAccountId}:versions | Get all versions of loan account|
|[**migrateExternal**](#migrateexternal) | **POST** /loans/migrate | Create loan account via external migration|
|[**patch**](#patch) | **PATCH** /loans/{loanAccountId} | Partially update loan account|
|[**payOff**](#payoff) | **POST** /loans/{loanAccountId}:payOff | Pay off loan account|
|[**previewPayOffAmounts**](#previewpayoffamounts) | **POST** /loans/{loanAccountId}:previewPayOffAmounts | Preview pay off due amounts in a future date|
|[**refinance**](#refinance) | **POST** /loans/{loanAccountId}:refinance | Refinance loan account|
|[**reschedule**](#reschedule) | **POST** /loans/{loanAccountId}:reschedule | Reschedule loan account|
|[**terminateLoanAccount**](#terminateloanaccount) | **POST** /loans/{loanAccountId}:terminate | Terminate loan account|
|[**undoRefinance**](#undorefinance) | **POST** /loans/{loanAccountId}:undoRefinance | Undo loan account refinance action|
|[**undoReschedule**](#undoreschedule) | **POST** /loans/{loanAccountId}:undoReschedule | Undo loan account reschedule action|
|[**undoWriteOff**](#undowriteoff) | **POST** /loans/{loanAccountId}:undoWriteOff | Undo write off for loan account|
|[**update**](#update) | **PUT** /loans/{loanAccountId} | Update loan account|
|[**writeOff**](#writeoff) | **POST** /loans/{loanAccountId}:writeOff | Write off loan account|

# **_delete**
> _delete()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)

const { status, data } = await apiInstance._delete(
    loanAccountId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|


### Return type

void (empty response body)

### 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 |
|-------------|-------------|------------------|
|**204** | Loan account deleted. |  -  |
|**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)

# **applyInterest**
> applyInterest(applyInterestInput)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let applyInterestInput: ApplyInterestInput; //Represents the information for apply accrued interest action.
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.applyInterest(
    loanAccountId,
    applyInterestInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **applyInterestInput** | **ApplyInterestInput**| Represents the information for apply accrued interest action. | |
| **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

void (empty response body)

### 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. |  -  |
|**204** | Interest applied. |  -  |
|**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)

# **changeArrearsSettings**
> changeArrearsSettings()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let changeArrearsSettingsInput: ChangeArrearsSettingsInput; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **changeArrearsSettingsInput** | **ChangeArrearsSettingsInput**| Represents information for an action to perform on a loan 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

void (empty response body)

### 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. |  -  |
|**204** | Change arrears settings action posted. |  -  |
|**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)

# **changeDueDatesSettings**
> changeDueDatesSettings()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let changeDueDatesSettingsInput: ChangeDueDatesSettingsInput; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **changeDueDatesSettingsInput** | **ChangeDueDatesSettingsInput**| Represents information for an action to perform on a loan 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

void (empty response body)

### 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. |  -  |
|**204** | Change due dates settings action posted. |  -  |
|**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)

# **changeFeeRate**
> changeFeeRate()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let changeFeeRateLoanAccountInput: ChangeFeeRateLoanAccountInput; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **changeFeeRateLoanAccountInput** | **ChangeFeeRateLoanAccountInput**| Represents information for an action to perform on a loan 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

void (empty response body)

### 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. |  -  |
|**204** | Change fee rate action posted. |  -  |
|**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)

# **changeInterestRate**
> changeInterestRate()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let changeInterestRateLoanAccountInput: ChangeInterestRateLoanAccountInput; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **changeInterestRateLoanAccountInput** | **ChangeInterestRateLoanAccountInput**| Represents information for an action to perform on a loan 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

void (empty response body)

### 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. |  -  |
|**204** | Change interest rate action posted. |  -  |
|**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)

# **changeLoanTerm**
> LoanAccountSchedule changeLoanTerm()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let changeLoanTermLoanAccountInput: ChangeLoanTermLoanAccountInput; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **changeLoanTermLoanAccountInput** | **ChangeLoanTermLoanAccountInput**| Represents information for an action to perform on a loan 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

**LoanAccountSchedule**

### 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** | Change loan account term action posted. |  -  |
|**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)

# **changePeriodicPayment**
> changePeriodicPayment()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let changePeriodicPaymentLoanAccountInput: ChangePeriodicPaymentLoanAccountInput; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **changePeriodicPaymentLoanAccountInput** | **ChangePeriodicPaymentLoanAccountInput**| Represents information for an action to perform on a loan 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

void (empty response body)

### 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. |  -  |
|**204** | Change periodic payment action posted. |  -  |
|**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)

# **changeRepaymentValue**
> changeRepaymentValue()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let changeRepaymentValueLoanAccountInput: ChangeRepaymentValueLoanAccountInput; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **changeRepaymentValueLoanAccountInput** | **ChangeRepaymentValueLoanAccountInput**| Represents information for an action to perform on a loan 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

void (empty response body)

### 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. |  -  |
|**204** | Change repayment value action posted. |  -  |
|**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)

# **changeState**
> LoanAccount changeState(loanAccountAction)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let loanAccountAction: LoanAccountAction; //Represents information for an action to perform on a loan 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.changeState(
    loanAccountId,
    loanAccountAction,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountAction** | **LoanAccountAction**| Represents information for an action to perform on a loan 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

**LoanAccount**

### 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 account action posted. |  -  |
|**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)

# **create**
> LoanAccount create(loanAccount)


### Example

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

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

let loanAccount: LoanAccount; //Loan account to be created.
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.create(
    loanAccount,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccount** | **LoanAccount**| Loan account to be created. | |
| **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

**LoanAccount**

### 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** | Loan account created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

[[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)

# **createCard**
> createCard(card)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let card: Card; //The card to be created.
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.createCard(
    loanAccountId,
    card,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **card** | **Card**| The card to be created. | |
| **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

void (empty response body)

### 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 card was 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)

# **deleteCard**
> deleteCard()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let cardReferenceToken: string; //The reference token of the card to be returned. (default to undefined)

const { status, data } = await apiInstance.deleteCard(
    loanAccountId,
    cardReferenceToken
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **cardReferenceToken** | [**string**] | The reference token of the card to be returned. | defaults to undefined|


### Return type

void (empty response body)

### 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 |
|-------------|-------------|------------------|
|**204** | The card was deleted. |  -  |
|**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<LoanAccount> getAll()


### Example

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

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

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)
let creditOfficerUsername: string; //The username of the credit officer to whom the entities are assigned to (optional) (default to undefined)
let branchId: string; //The id/encodedKey of the branch to which the entities are assigned to (optional) (default to undefined)
let centreId: string; //The id/encodedKey of the centre to which the entities are assigned to (optional) (default to undefined)
let accountState: 'PARTIAL_APPLICATION' | 'PENDING_APPROVAL' | 'APPROVED' | 'ACTIVE' | 'ACTIVE_IN_ARREARS' | 'CLOSED' | 'CLOSED_WRITTEN_OFF' | 'CLOSED_REJECTED'; //The state of the loan account to search for (optional) (default to undefined)
let accountHolderType: 'CLIENT' | 'GROUP'; //The type of the account holder: CLIENT/GROUP (optional) (default to undefined)
let accountHolderId: string; //The id of the account holder (optional) (default to undefined)
let sortBy: string; //The criteria based on which the records will be sorted. Expected format is <field:order>, for example, sortBy = field1:ASC,field2:DESC.<br/>Only the following fields can be used: id, loanName, creationDate, lastModifiedDate<br/>Default sorting is done by creationDate:ASC (optional) (default to undefined)

const { status, data } = await apiInstance.getAll(
    offset,
    limit,
    paginationDetails,
    detailsLevel,
    creditOfficerUsername,
    branchId,
    centreId,
    accountState,
    accountHolderType,
    accountHolderId,
    sortBy
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **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|
| **creditOfficerUsername** | [**string**] | The username of the credit officer to whom the entities are assigned to | (optional) defaults to undefined|
| **branchId** | [**string**] | The id/encodedKey of the branch to which the entities are assigned to | (optional) defaults to undefined|
| **centreId** | [**string**] | The id/encodedKey of the centre to which the entities are assigned to | (optional) defaults to undefined|
| **accountState** | [**&#39;PARTIAL_APPLICATION&#39; | &#39;PENDING_APPROVAL&#39; | &#39;APPROVED&#39; | &#39;ACTIVE&#39; | &#39;ACTIVE_IN_ARREARS&#39; | &#39;CLOSED&#39; | &#39;CLOSED_WRITTEN_OFF&#39; | &#39;CLOSED_REJECTED&#39;**]**Array<&#39;PARTIAL_APPLICATION&#39; &#124; &#39;PENDING_APPROVAL&#39; &#124; &#39;APPROVED&#39; &#124; &#39;ACTIVE&#39; &#124; &#39;ACTIVE_IN_ARREARS&#39; &#124; &#39;CLOSED&#39; &#124; &#39;CLOSED_WRITTEN_OFF&#39; &#124; &#39;CLOSED_REJECTED&#39;>** | The state of the loan account to search for | (optional) defaults to undefined|
| **accountHolderType** | [**&#39;CLIENT&#39; | &#39;GROUP&#39;**]**Array<&#39;CLIENT&#39; &#124; &#39;GROUP&#39;>** | The type of the account holder: CLIENT/GROUP | (optional) defaults to undefined|
| **accountHolderId** | [**string**] | The id of the account holder | (optional) defaults to undefined|
| **sortBy** | [**string**] | The criteria based on which the records will be sorted. Expected format is &lt;field:order&gt;, for example, sortBy &#x3D; field1:ASC,field2:DESC.&lt;br/&gt;Only the following fields can be used: id, loanName, creationDate, lastModifiedDate&lt;br/&gt;Default sorting is done by creationDate:ASC | (optional) defaults to undefined|


### Return type

**Array<LoanAccount>**

### 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 accounts 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 |  -  |

[[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)

# **getAllAuthorizationHolds**
> Array<GetAuthorizationHold> getAllAuthorizationHolds()


### Example

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

const configuration = new Configuration();
const apiInstance = new LoanAccountsApi(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 status: 'PENDING' | 'REVERSED' | 'SETTLED' | 'EXPIRED'; //The status of the authorization holds to filter on (optional) (default to undefined)

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

### 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'|
| **status** | [**&#39;PENDING&#39; | &#39;REVERSED&#39; | &#39;SETTLED&#39; | &#39;EXPIRED&#39;**]**Array<&#39;PENDING&#39; &#124; &#39;REVERSED&#39; &#124; &#39;SETTLED&#39; &#124; &#39;EXPIRED&#39;>** | The status of the authorization holds to filter on | (optional) defaults to undefined|


### Return type

**Array<GetAuthorizationHold>**

### 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** | The list of authorization holds has been 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)

# **getAllCards**
> Array<Card> getAllCards()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)

const { status, data } = await apiInstance.getAllCards(
    loanAccountId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|


### Return type

**Array<Card>**

### 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** | The list of cards attached to the account was 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**
> LoanAccount getById()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (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(
    loanAccountId,
    detailsLevel
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | 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

**LoanAccount**

### 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 account returned. |  -  |
|**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)

# **getVersionsById**
> Array<LoanAccount> getVersionsById()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (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.getVersionsById(
    loanAccountId,
    detailsLevel
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | 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<LoanAccount>**

### 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 account with previous versions returned. |  -  |
|**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)

# **migrateExternal**
> LoanAccount migrateExternal(loanAccountExternalMigration)


### Example

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

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

let loanAccountExternalMigration: LoanAccountExternalMigration; //Creates a loan account and schedules migration of external balances and state.
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.migrateExternal(
    loanAccountExternalMigration,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountExternalMigration** | **LoanAccountExternalMigration**| Creates a loan account and schedules migration of external balances and state. | |
| **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

**LoanAccount**

### 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** | Loan account created. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |

[[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)

# **patch**
> patch(patchOperation)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let patchOperation: Array<PatchOperation>; //Patch operations to be applied to a resource.

const { status, data } = await apiInstance.patch(
    loanAccountId,
    patchOperation
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **patchOperation** | **Array<PatchOperation>**| Patch operations to be applied to a resource. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|


### Return type

void (empty response body)

### 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 |
|-------------|-------------|------------------|
|**204** | Loan account updated. |  -  |
|**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)

# **payOff**
> payOff(loanAccountPayOffInput)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let loanAccountPayOffInput: LoanAccountPayOffInput; //Represents the information for loan account pay off action.
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.payOff(
    loanAccountId,
    loanAccountPayOffInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountPayOffInput** | **LoanAccountPayOffInput**| Represents the information for loan account pay off action. | |
| **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

void (empty response body)

### 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. |  -  |
|**204** | Pay off action posted. |  -  |
|**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)

# **previewPayOffAmounts**
> PreviewPayOffDueAmountsInAFutureDateWrapper previewPayOffAmounts()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let previewPayOffDueAmountsInAFutureDateInput: PreviewPayOffDueAmountsInAFutureDateInput; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **previewPayOffDueAmountsInAFutureDateInput** | **PreviewPayOffDueAmountsInAFutureDateInput**| Represents information for an action to perform on a loan 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

**PreviewPayOffDueAmountsInAFutureDateWrapper**

### 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** | Preview pay off due amounts in a future date action posted. |  -  |
|**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)

# **refinance**
> LoanAccount refinance()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let refinanceLoanAccountAction: RefinanceLoanAccountAction; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **refinanceLoanAccountAction** | **RefinanceLoanAccountAction**| Represents information for an action to perform on a loan 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

**LoanAccount**

### 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** | Refinance action posted. |  -  |
|**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)

# **reschedule**
> LoanAccount reschedule()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let rescheduleLoanAccountAction: RescheduleLoanAccountAction; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **rescheduleLoanAccountAction** | **RescheduleLoanAccountAction**| Represents information for an action to perform on a loan 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

**LoanAccount**

### 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** | Reschedule action posted. |  -  |
|**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)

# **terminateLoanAccount**
> terminateLoanAccount()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let terminateLoanAccountInput: TerminateLoanAccountInput; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **terminateLoanAccountInput** | **TerminateLoanAccountInput**| Represents information for an action to perform on a loan 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

void (empty response body)

### 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. |  -  |
|**204** | Terminate loan account action posted. |  -  |
|**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)

# **undoRefinance**
> undoRefinance()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let loanActionDetails: LoanActionDetails; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanActionDetails** | **LoanActionDetails**| Represents information for an action to perform on a loan 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

void (empty response body)

### 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. |  -  |
|**204** | Undo refinance action posted. |  -  |
|**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)

# **undoReschedule**
> undoReschedule()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let loanActionDetails: LoanActionDetails; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanActionDetails** | **LoanActionDetails**| Represents information for an action to perform on a loan 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

void (empty response body)

### 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. |  -  |
|**204** | Undo reschedule action posted. |  -  |
|**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)

# **undoWriteOff**
> undoWriteOff(loanActionDetails)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let loanActionDetails: LoanActionDetails; //Represents input details for a loan account write off.
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.undoWriteOff(
    loanAccountId,
    loanActionDetails,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanActionDetails** | **LoanActionDetails**| Represents input details for a loan account write off. | |
| **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

void (empty response body)

### 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. |  -  |
|**204** | Undo write off action applied. |  -  |
|**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)

# **update**
> LoanAccount update(loanAccount)


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let loanAccount: LoanAccount; //Loan account to be updated.

const { status, data } = await apiInstance.update(
    loanAccountId,
    loanAccount
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccount** | **LoanAccount**| Loan account to be updated. | |
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|


### Return type

**LoanAccount**

### 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** | Loan account updated. |  -  |
|**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)

# **writeOff**
> writeOff()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
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)
let loanActionDetails: LoanActionDetails; //Represents information for an action to perform on a loan account. (optional)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanActionDetails** | **LoanActionDetails**| Represents information for an action to perform on a loan 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

void (empty response body)

### 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. |  -  |
|**204** | Write off action posted. |  -  |
|**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)

