# LoanAccountDocumentsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getLoanAccountDocument**](#getloanaccountdocument) | **GET** /loans/{loanAccountId}/templates/{templateId} | Get loan account document|
|[**getPdfDocument**](#getpdfdocument) | **GET** /loans/{loanAccountId}/templates/{templateId}/pdf | Download loan account document PDF|

# **getLoanAccountDocument**
> string getLoanAccountDocument()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let templateId: string; //The ID of the loan product template. (default to undefined)
let startDate: string; //The first date to consider when the document contains a list of transactions. Required when the document contains a transaction history. (optional) (default to undefined)
let endDate: string; //The last date to consider when the document contains a list of transactions. Required when the document contains a transaction history. (optional) (default to undefined)

const { status, data } = await apiInstance.getLoanAccountDocument(
    loanAccountId,
    templateId,
    startDate,
    endDate
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **templateId** | [**string**] | The ID of the loan product template. | defaults to undefined|
| **startDate** | [**string**] | The first date to consider when the document contains a list of transactions. Required when the document contains a transaction history. | (optional) defaults to undefined|
| **endDate** | [**string**] | The last date to consider when the document contains a list of transactions. Required when the document contains a transaction history. | (optional) defaults to undefined|


### Return type

**string**

### 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 document returned. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account or template 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)

# **getPdfDocument**
> File getPdfDocument()


### Example

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

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

let loanAccountId: string; //The ID or encoded key of the loan account. (default to undefined)
let templateId: string; //The ID of the loan product template. (default to undefined)
let startDate: string; //The first date to consider when the document contains a list of transactions. Required when the document contains a transaction history. (optional) (default to undefined)
let endDate: string; //The last date to consider when the document contains a list of transactions. Required when the document contains a transaction history. (optional) (default to undefined)

const { status, data } = await apiInstance.getPdfDocument(
    loanAccountId,
    templateId,
    startDate,
    endDate
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **loanAccountId** | [**string**] | The ID or encoded key of the loan account. | defaults to undefined|
| **templateId** | [**string**] | The ID of the loan product template. | defaults to undefined|
| **startDate** | [**string**] | The first date to consider when the document contains a list of transactions. Required when the document contains a transaction history. | (optional) defaults to undefined|
| **endDate** | [**string**] | The last date to consider when the document contains a list of transactions. Required when the document contains a transaction history. | (optional) defaults to undefined|


### Return type

**File**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | PDF of the loan account document returned. |  * Content-Disposition - \&quot;The format is - attachment; filename&#x3D;\\\&quot;{fileName}.extension\\\&quot;\&quot;; <br>  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | Loan account or template 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)

