# NodeSwaggerApi.LoansApi

All URIs are relative to *https://api.supremepay.lk:3011/api/admin*

Method | HTTP request | Description
------------- | ------------- | -------------
[**addAdditionalCharges**](LoansApi.md#addAdditionalCharges) | **POST** /loans/process/charges/additionals | 
[**createLoanPayment**](LoansApi.md#createLoanPayment) | **POST** /loans/payments | 
[**deleteAdditionalCharges**](LoansApi.md#deleteAdditionalCharges) | **DELETE** /loans/process/charges/additionals/{id} | 
[**deleteKycReference**](LoansApi.md#deleteKycReference) | **DELETE** /loans/process/kyc/{id} | 
[**deleteLoanProfile**](LoansApi.md#deleteLoanProfile) | **DELETE** /loans/profile/{id} | 
[**deleteLoanScheme**](LoansApi.md#deleteLoanScheme) | **DELETE** /loans/schemes/{id} | 
[**deleteRequestedLoan**](LoansApi.md#deleteRequestedLoan) | **DELETE** /loans/process/{id} | 
[**getAdditionalChargesbyLoanId**](LoansApi.md#getAdditionalChargesbyLoanId) | **GET** /loans/process/charges/additionals/{id} | 
[**getKycReferenceByUserId**](LoansApi.md#getKycReferenceByUserId) | **GET** /loans/process/users/kyc/{id} | 
[**getKycReferencesByLoanId**](LoansApi.md#getKycReferencesByLoanId) | **GET** /loans/process/kyc/{id} | 
[**getLaonPayment**](LoansApi.md#getLaonPayment) | **GET** /loans/payments | 
[**getLoanProfileDetails**](LoansApi.md#getLoanProfileDetails) | **GET** /loans/profile | 
[**getLoanProfileDetailsById**](LoansApi.md#getLoanProfileDetailsById) | **GET** /loans/profile/{id} | 
[**getLoanSchemeById**](LoansApi.md#getLoanSchemeById) | **GET** /loans/schemes/{id} | 
[**getRequestedLoanById**](LoansApi.md#getRequestedLoanById) | **GET** /loans/process/{id} | 
[**getRequestedLoanDetails**](LoansApi.md#getRequestedLoanDetails) | **GET** /loans/process | 
[**getRequestedLoanUsers**](LoansApi.md#getRequestedLoanUsers) | **GET** /loans/process/users | 
[**getUserByLoanId**](LoansApi.md#getUserByLoanId) | **GET** /loans/process/users/{id} | 
[**getUserLoanScheme**](LoansApi.md#getUserLoanScheme) | **GET** /loans/schemes | 
[**getUsersOtherLoansbyId**](LoansApi.md#getUsersOtherLoansbyId) | **GET** /loans/process/users/{id}/other/loans | 
[**saveLoanScheme**](LoansApi.md#saveLoanScheme) | **POST** /loans/schemes | 
[**setDefaultLoanScheme**](LoansApi.md#setDefaultLoanScheme) | **PUT** /loans/schemes/default | 
[**updateAdditionalCharges**](LoansApi.md#updateAdditionalCharges) | **PUT** /loans/process/charges/additionals | 
[**updateKycReferenceStatus**](LoansApi.md#updateKycReferenceStatus) | **PUT** /loans/process/status/kyc | 
[**updateLoanScheme**](LoansApi.md#updateLoanScheme) | **PUT** /loans/schemes | 
[**updateLoanStatus**](LoansApi.md#updateLoanStatus) | **PUT** /loans/process/status | 
[**updateRequestedLoan**](LoansApi.md#updateRequestedLoan) | **PUT** /loans/process | 
[**updateloanProfile**](LoansApi.md#updateloanProfile) | **PUT** /loans/profile | 


<a name="addAdditionalCharges"></a>
# **addAdditionalCharges**
> LoanAdditionalCharges addAdditionalCharges(documentchargeData)



add aditional Loan document charges

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var documentchargeData = new NodeSwaggerApi.LoanAdditionalCharges(); // LoanAdditionalCharges | Loan document charge details


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.addAdditionalCharges(documentchargeData, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **documentchargeData** | [**LoanAdditionalCharges**](LoanAdditionalCharges.md)| Loan document charge details | 

### Return type

[**LoanAdditionalCharges**](LoanAdditionalCharges.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="createLoanPayment"></a>
# **createLoanPayment**
> LoanPayment createLoanPayment(loanPaymentDetails)



Create Loan Payment

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var loanPaymentDetails = new NodeSwaggerApi.LoanPayment(); // LoanPayment | loan payment details


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createLoanPayment(loanPaymentDetails, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **loanPaymentDetails** | [**LoanPayment**](LoanPayment.md)| loan payment details | 

### Return type

[**LoanPayment**](LoanPayment.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="deleteAdditionalCharges"></a>
# **deleteAdditionalCharges**
> deleteAdditionalCharges(id)



Deletes a additonal charges document

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want specific delete additonal charges document  you want to give additonal charges document  id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteAdditionalCharges(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific delete additonal charges document  you want to give additonal charges document  id | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="deleteKycReference"></a>
# **deleteKycReference**
> deleteKycReference(id)



Deletes a kyc reference

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want specific delete kyc reference  you want to give kyc reference  id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteKycReference(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific delete kyc reference  you want to give kyc reference  id | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="deleteLoanProfile"></a>
# **deleteLoanProfile**
> deleteLoanProfile(id)



Deletes a loan profile

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want delete specific loan profile you want to give loan profile id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteLoanProfile(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want delete specific loan profile you want to give loan profile id | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="deleteLoanScheme"></a>
# **deleteLoanScheme**
> deleteLoanScheme(id)



Deletes a loan scheme

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want delete specific loan scheme you want to give loan scheme id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteLoanScheme(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want delete specific loan scheme you want to give loan scheme id | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="deleteRequestedLoan"></a>
# **deleteRequestedLoan**
> deleteRequestedLoan(id)



Deletes a Kyc Reference

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want specific delete kyc reference  you want to give kyc reference  id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteRequestedLoan(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific delete kyc reference  you want to give kyc reference  id | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getAdditionalChargesbyLoanId"></a>
# **getAdditionalChargesbyLoanId**
> LoanAdditionalCharges getAdditionalChargesbyLoanId(id)



Returns requested loan additional charges details according to the id

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want specific requested loan additional charges  you want to give requested loan id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getAdditionalChargesbyLoanId(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific requested loan additional charges  you want to give requested loan id | 

### Return type

[**LoanAdditionalCharges**](LoanAdditionalCharges.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getKycReferenceByUserId"></a>
# **getKycReferenceByUserId**
> KycReference getKycReferenceByUserId(id)



Returns requested user kyc references details according to the user id

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want specific requested user kyc references you want to give requested user id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getKycReferenceByUserId(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific requested user kyc references you want to give requested user id | 

### Return type

[**KycReference**](KycReference.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getKycReferencesByLoanId"></a>
# **getKycReferencesByLoanId**
> KycReference getKycReferencesByLoanId(id)



Returns requested loan kyc reference details according to the id

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want specific requested loan kyc reference  you want to give requested loan id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getKycReferencesByLoanId(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific requested loan kyc reference  you want to give requested loan id | 

### Return type

[**KycReference**](KycReference.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getLaonPayment"></a>
# **getLaonPayment**
> [LoanPayment] getLaonPayment(fromDate, toDate, opts)



Get loan payment

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var fromDate = "fromDate_example"; // String | from date in date range(from date and to date can be same)

var toDate = "toDate_example"; // String | to date in date range(from date and to date can be same)

var opts = { 
  'userId': "userId_example", // String | user id of loan payment
  'loanId': "loanId_example", // String | loan id of loan payment
  'paymentNumber': "paymentNumber_example", // String | payment number of loan payment
  'paymentStatus': "paymentStatus_example", // String | status of loan payment
  'page': 0, // Number | The number of items to skip before starting to collect the result set
  'perpage': 10 // Number | The numbers of items in return result
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getLaonPayment(fromDate, toDate, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **fromDate** | **String**| from date in date range(from date and to date can be same) | 
 **toDate** | **String**| to date in date range(from date and to date can be same) | 
 **userId** | **String**| user id of loan payment | [optional] 
 **loanId** | **String**| loan id of loan payment | [optional] 
 **paymentNumber** | **String**| payment number of loan payment | [optional] 
 **paymentStatus** | **String**| status of loan payment | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items in return result | [optional] [default to 10]

### Return type

[**[LoanPayment]**](LoanPayment.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getLoanProfileDetails"></a>
# **getLoanProfileDetails**
> LoanScheme getLoanProfileDetails(opts)



Returns loan profile details

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var opts = { 
  'destination': "mobitel", // String | Order by destination.
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getLoanProfileDetails(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **destination** | **String**| Order by destination. | [optional] [default to mobitel]
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**LoanScheme**](LoanScheme.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getLoanProfileDetailsById"></a>
# **getLoanProfileDetailsById**
> LoanScheme getLoanProfileDetailsById(id)



Returns loan scheme details according to the id

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want specific loan scheme you want to give loan scheme id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getLoanProfileDetailsById(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific loan scheme you want to give loan scheme id | 

### Return type

[**LoanScheme**](LoanScheme.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getLoanSchemeById"></a>
# **getLoanSchemeById**
> LoanScheme getLoanSchemeById(id)



Returns loan scheme details according to the id

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want specific loan scheme you want to give loan scheme id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getLoanSchemeById(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific loan scheme you want to give loan scheme id | 

### Return type

[**LoanScheme**](LoanScheme.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getRequestedLoanById"></a>
# **getRequestedLoanById**
> Preloan getRequestedLoanById(id)



Returns requested loan details according to the id

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want specific requested loan you want to give requested loan id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getRequestedLoanById(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific requested loan you want to give requested loan id | 

### Return type

[**Preloan**](Preloan.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getRequestedLoanDetails"></a>
# **getRequestedLoanDetails**
> Preloan getRequestedLoanDetails(opts)



Returns requested loan details

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var opts = { 
  'sort': "desc", // String | Sort order.
  'loanstatus': "loanstatus_example", // String | select by loan type.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getRequestedLoanDetails(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sort** | **String**| Sort order. | [optional] [default to desc]
 **loanstatus** | **String**| select by loan type. | [optional] 
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**Preloan**](Preloan.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getRequestedLoanUsers"></a>
# **getRequestedLoanUsers**
> UserProfile getRequestedLoanUsers(opts)



Returns requested loan users

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var opts = { 
  'sort': "desc", // String | Sort order.
  'loanstatus': "loanstatus_example", // String | select by loan type.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getRequestedLoanUsers(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sort** | **String**| Sort order. | [optional] [default to desc]
 **loanstatus** | **String**| select by loan type. | [optional] 
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**UserProfile**](UserProfile.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getUserByLoanId"></a>
# **getUserByLoanId**
> UserProfile getUserByLoanId(id)



Returns requested user details according to the user id

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | if you want specific user details you want to give requested user id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getUserByLoanId(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific user details you want to give requested user id | 

### Return type

[**UserProfile**](UserProfile.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getUserLoanScheme"></a>
# **getUserLoanScheme**
> LoanScheme getUserLoanScheme(opts)



Returns loan scheme details

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var opts = { 
  'destination': "mobitel", // String | Order by destination.
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getUserLoanScheme(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **destination** | **String**| Order by destination. | [optional] [default to mobitel]
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**LoanScheme**](LoanScheme.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getUsersOtherLoansbyId"></a>
# **getUsersOtherLoansbyId**
> Preloan getUsersOtherLoansbyId(id, opts)



Returns requested user other loans details according to the user id

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var id = "id_example"; // String | user id.

var opts = { 
  'approveStatus': "desc" // String | Sort order.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getUsersOtherLoansbyId(id, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| user id. | 
 **approveStatus** | **String**| Sort order. | [optional] [default to desc]

### Return type

[**Preloan**](Preloan.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="saveLoanScheme"></a>
# **saveLoanScheme**
> LoanScheme saveLoanScheme(loanScheme)



Save loan scheme

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var loanScheme = new NodeSwaggerApi.LoanScheme(); // LoanScheme | loan scheme  details


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.saveLoanScheme(loanScheme, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **loanScheme** | [**LoanScheme**](LoanScheme.md)| loan scheme  details | 

### Return type

[**LoanScheme**](LoanScheme.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="setDefaultLoanScheme"></a>
# **setDefaultLoanScheme**
> setDefaultLoanScheme(opts)



set default loanscheme

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var opts = { 
  'body': new NodeSwaggerApi.LoanScheme() // LoanScheme | Updated loan scheme object
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.setDefaultLoanScheme(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**LoanScheme**](LoanScheme.md)| Updated loan scheme object | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="updateAdditionalCharges"></a>
# **updateAdditionalCharges**
> LoanAdditionalCharges updateAdditionalCharges(documentchargeData)



add aditional Loan document charges

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var documentchargeData = new NodeSwaggerApi.LoanAdditionalCharges(); // LoanAdditionalCharges | Loan document charge details


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateAdditionalCharges(documentchargeData, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **documentchargeData** | [**LoanAdditionalCharges**](LoanAdditionalCharges.md)| Loan document charge details | 

### Return type

[**LoanAdditionalCharges**](LoanAdditionalCharges.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="updateKycReferenceStatus"></a>
# **updateKycReferenceStatus**
> updateKycReferenceStatus(opts)



Updates a update Kyc Reference status

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var opts = { 
  'body': new NodeSwaggerApi.KycReference() // KycReference | Updated Kyc Reference status object
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateKycReferenceStatus(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**KycReference**](KycReference.md)| Updated Kyc Reference status object | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="updateLoanScheme"></a>
# **updateLoanScheme**
> updateLoanScheme(opts)



Updates a single loan scheme

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var opts = { 
  'body': new NodeSwaggerApi.LoanScheme() // LoanScheme | Updated loan scheme object
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateLoanScheme(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**LoanScheme**](LoanScheme.md)| Updated loan scheme object | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="updateLoanStatus"></a>
# **updateLoanStatus**
> updateLoanStatus(opts)



Updates a loan approve status

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var opts = { 
  'body': new NodeSwaggerApi.Preloan() // Preloan | Updated requested loan object
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateLoanStatus(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Preloan**](Preloan.md)| Updated requested loan object | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="updateRequestedLoan"></a>
# **updateRequestedLoan**
> updateRequestedLoan(opts)



Updates a single requested loan

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var opts = { 
  'body': new NodeSwaggerApi.Preloan() // Preloan | Updated requested loan object
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateRequestedLoan(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Preloan**](Preloan.md)| Updated requested loan object | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="updateloanProfile"></a>
# **updateloanProfile**
> LoanProfile updateloanProfile(loanProfile)



update Loan Profile

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.LoansApi();

var loanProfile = new NodeSwaggerApi.LoanProfile(); // LoanProfile | loan profile  details


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateloanProfile(loanProfile, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **loanProfile** | [**LoanProfile**](LoanProfile.md)| loan profile  details | 

### Return type

[**LoanProfile**](LoanProfile.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

