# InstallmentsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getAll**](#getall) | **GET** /installments | Get installments for &#x60;ACTIVE&#x60; or &#x60;ACTIVE_IN_ARREARS&#x60; loan accounts|

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


### Example

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

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

let dueFrom: string; //The date of the installments to search from (default to undefined)
let dueTo: string; //The date of the installments to search to (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 productTypeKey: string; //The encoded key of the product type to search for (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 accounts to search for (optional) (default to undefined)
let installmentState: 'PENDING' | 'LATE' | 'PAID' | 'PARTIALLY_PAID' | 'GRACE'; //The state of the installments to search for (optional) (default to undefined)

const { status, data } = await apiInstance.getAll(
    dueFrom,
    dueTo,
    offset,
    limit,
    paginationDetails,
    productTypeKey,
    accountState,
    installmentState
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **dueFrom** | [**string**] | The date of the installments to search from | defaults to undefined|
| **dueTo** | [**string**] | The date of the installments to search to | 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'|
| **productTypeKey** | [**string**] | The encoded key of the product type to search for | (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 accounts to search for | (optional) defaults to undefined|
| **installmentState** | [**&#39;PENDING&#39; | &#39;LATE&#39; | &#39;PAID&#39; | &#39;PARTIALLY_PAID&#39; | &#39;GRACE&#39;**]**Array<&#39;PENDING&#39; &#124; &#39;LATE&#39; &#124; &#39;PAID&#39; &#124; &#39;PARTIALLY_PAID&#39; &#124; &#39;GRACE&#39;>** | The state of the installments to search for | (optional) defaults to undefined|


### Return type

**Array<Installment>**

### 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** | installments list retrieved |  * 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 product 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)

