MIFOSX-172: finish off update to api-docs around loans, loan transactions and loan charges apis.
This commit is contained in:
+468
-103
@@ -348,7 +348,7 @@
|
|||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr class="alt">
|
||||||
<td><a href="#loans">LOAN</a></td>
|
<td><a href="#loans">Loans</a></td>
|
||||||
<td>loans?calculateLoanSchedule</td>
|
<td>loans?calculateLoanSchedule</td>
|
||||||
<td><a href="#loans_calculate">Calculate Loan Repayment Schedule</a></td>
|
<td><a href="#loans_calculate">Calculate Loan Repayment Schedule</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@@ -369,9 +369,9 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td><a href="#loans_retrieve">Retrieve a Loan</a></td>
|
<td><a href="#loans_retrieve">Retrieve a Loan</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><a href="#loans_delete">Delete a Loan</a></td>
|
<td><a href="#loans_delete">Delete a Loan Application</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}?command=approve</td>
|
<td>loans/{loanId}?command=approve</td>
|
||||||
<td><a href="#loans_approve">Approve Loan Application</a></td>
|
<td><a href="#loans_approve">Approve Loan Application</a></td>
|
||||||
@@ -387,7 +387,7 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}?command=reject</td>
|
<td>loans/{loanId}?command=reject</td>
|
||||||
<td><a href="#loans_reject">Reject Loan Application</a></td>
|
<td><a href="#loans_reject">Reject Loan Application</a></td>
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}?command=disburse</td>
|
<td>loans/{loanId}?command=disburse</td>
|
||||||
<td><a href="#loans_disburse">Disburse Loan</a></td>
|
<td><a href="#loans_disburse">Disburse Loan</a></td>
|
||||||
@@ -419,11 +419,18 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="#loans_transactions">Loan Transactions</a></td>
|
||||||
|
<td>loans/{loanId}/transactions?command=repayment</td>
|
||||||
|
<td><a href="#loans_transaction_repayment">Enter a repayment</a></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr class="alt">
|
<tr class="alt">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}/transactions</td>
|
<td>loans/{loanId}/transactions?command=waiveInterest</td>
|
||||||
<td><a href="#loans_repayment_etc">Make a Repayment /
|
<td><a href="#loans_transaction_waiveinterest">Waive Interest</a></td>
|
||||||
Loan Waiver</a></td>
|
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@@ -431,33 +438,18 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}/transactions/{transactionId}</td>
|
<td>loans/{loanId}/transactions/{transactionId}</td>
|
||||||
<td><a href="#loans_repaymentadjust_etc">Adjust a
|
<td></td>
|
||||||
Repayment or Waiver</a></td>
|
<td><a href="#loans_transaction_retrieve">Retrieve a transactions details</a></td>
|
||||||
<td><a href="#loans_repaymentretrieve_etc">Retrieve a
|
|
||||||
Repayment or Waiver Details</a></td>
|
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="alt">
|
||||||
<td><a href="#guarantors">Guarantors</a></td>
|
<td></td>
|
||||||
<td>loans/{loanId}/guarantors</td>
|
<td>loans/{loanId}/transactions/{transactionId}</td>
|
||||||
<td><a href="#guarantors_create">Create a Guarantor
|
<td><a href="#loans_transaction_adjust">Adjust a Transaction</a></td>
|
||||||
</a></td>
|
|
||||||
<td><a href="#guarantors_list">List Guarantors
|
|
||||||
</a></td>
|
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}/guarantors/{guarantorId}</td>
|
|
||||||
<td></td>
|
|
||||||
<td><a href="#guarantors_retrieve">Retrieve a Guarantor
|
|
||||||
</a></td>
|
|
||||||
<td><a href="#guarantors_update">Update a Guarantor
|
|
||||||
</a></td>
|
|
||||||
<td><a href="#guarantors_delete">Delete a Guarantor
|
|
||||||
</a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -1027,8 +1019,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr class="alt">
|
||||||
<td>loans/{loanId}/transactions/template</td>
|
<td>loans/{loanId}/transactions/template</td>
|
||||||
<td><a href="#loans_repaymenttemplate_etc">Retrieve
|
<td><a href="#loans_repaymenttemplate_etc">Retrieve Loan Transaction Template</a></td>
|
||||||
Loan Repayment/Loan Waiver Template</a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>offices/template</td>
|
<td>offices/template</td>
|
||||||
@@ -2459,7 +2450,6 @@ DELETE groups/7
|
|||||||
<!-- group end anchor grpxxxx -->
|
<!-- group end anchor grpxxxx -->
|
||||||
|
|
||||||
<!-- start of loans api docs -->
|
<!-- start of loans api docs -->
|
||||||
|
|
||||||
<a id="loans" name="loans" class="old-syle-anchor"> </a>
|
<a id="loans" name="loans" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
@@ -2584,7 +2574,6 @@ DELETE groups/7
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<a id="loans_template" name="loans_template" class="old-syle-anchor"> </a>
|
<a id="loans_template" name="loans_template" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
@@ -3175,7 +3164,6 @@ Request Body:
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ok -->
|
|
||||||
<a id="loans_approve" name="loans_approve" class="old-syle-anchor"> </a>
|
<a id="loans_approve" name="loans_approve" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
@@ -3490,7 +3478,7 @@ Content-Type: application/json
|
|||||||
<a id="loans_delete" name="loans_delete" class="old-syle-anchor"> </a>
|
<a id="loans_delete" name="loans_delete" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
<h4>Delete a Loan</h4>
|
<h4>Delete a Loan Application</h4>
|
||||||
<p>
|
<p>
|
||||||
<b>Note:</b> Only loans in "Submitted and awaiting approval"
|
<b>Note:</b> Only loans in "Submitted and awaiting approval"
|
||||||
status can be deleted.
|
status can be deleted.
|
||||||
@@ -3516,11 +3504,37 @@ No Request Body:
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Loan Transactions API-->
|
||||||
|
<a id="loans_transactions" name="loans_transactions" class="old-syle-anchor"> </a>
|
||||||
|
<div class="method-section">
|
||||||
|
<div class="method-description">
|
||||||
|
<h3>Loan Transactions</h3>
|
||||||
|
<p>Capabilities include loan repayment's, interest waivers and the ability to 'adjust' an existing transaction. An 'adjust'ment of a transaction is really a 'reversal' of existing transaction followed by creation of a new transaction with the provided details.</p>
|
||||||
|
<table class=matrixHeading>
|
||||||
|
<tr class="matrixHeadingBG">
|
||||||
|
<td><div class="mifosXHeading2">Field Descriptions</div></td>
|
||||||
|
</tr>
|
||||||
|
<tr class=alt>
|
||||||
|
<td>transactionAmount</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class=fielddesc>The amount of the transaction.</td>
|
||||||
|
</tr>
|
||||||
|
<tr class=alt>
|
||||||
|
<td>transactionDate</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class=fielddesc>The date of the transaction.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<a id="loans_repaymenttemplate_etc"
|
<a id="loans_repaymenttemplate_etc"
|
||||||
name="loans_repaymenttemplate_etc" class="old-syle-anchor"> </a>
|
name="loans_repaymenttemplate_etc" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
<h4>Retrieve Loan Repayment/Loan Waiver Template</h4>
|
<h4>Retrieve Loan Transaction Template</h4>
|
||||||
<p>This is a convenience resource. It can be useful when
|
<p>This is a convenience resource. It can be useful when
|
||||||
building maintenance user interface screens for client
|
building maintenance user interface screens for client
|
||||||
applications. The template data returned consists of any or all
|
applications. The template data returned consists of any or all
|
||||||
@@ -3582,47 +3596,91 @@ GET https://DomainName/api/v1/loans/{loanId}/transactions/template"
|
|||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="loans_repayment_etc" name="loans_repayment_etc"
|
|
||||||
class="old-syle-anchor"> </a>
|
<a id="loans_transaction_repayment" name="loans_transaction_repayment" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
<h4>Make a Repayment / Loan Waiver</h4>
|
<h4>Make a Repayment </h4>
|
||||||
<dl class="argument-list">
|
|
||||||
<dt>command</dt>
|
|
||||||
<dd>
|
|
||||||
String<span> Optional, case-insensitive</span>
|
|
||||||
</dd>
|
|
||||||
<dd>'repayment' : Make Loan Repayment.</dd>
|
|
||||||
<dd>'waiver' : Loan Waiver.</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">
|
<code class="method-declaration">
|
||||||
POST https://DomainName/api/v1/loans/{loanId}/transactions
|
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=repayment
|
||||||
</code>
|
</code>
|
||||||
<code class="method-request">
|
<code class="method-request">
|
||||||
POST loans/1/transactions?command=repayment
|
POST loans/5/transactions?command=repayment
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Request Body:
|
Request Body:
|
||||||
{
|
{
|
||||||
|
"locale": "en_GB",
|
||||||
|
"dateFormat": "dd MMMM yyyy",
|
||||||
|
"transactionDate": "14 May 2012",
|
||||||
|
"transactionAmount": "559.88",
|
||||||
|
"note": "Optional note related to the transaction."
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
<code class="method-response">
|
||||||
|
{
|
||||||
|
"officeId": 1,
|
||||||
|
"clientId": 1,
|
||||||
|
"loanId": 5,
|
||||||
|
"resourceId": 3,
|
||||||
|
"changes": {
|
||||||
|
"transactionDate": "14 May 2012",
|
||||||
|
"transactionAmount": "559.88",
|
||||||
"locale": "en_GB",
|
"locale": "en_GB",
|
||||||
"dateFormat": "dd MMMM yyyy",
|
"dateFormat": "dd MMMM yyyy",
|
||||||
"transactionDate": "14 May 2012",
|
"note": "Optional note related to the transaction."
|
||||||
"transactionAmount": "559.88",
|
}
|
||||||
"note": "Repayment at branch"
|
|
||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
<code class="method-response">{ "resourceId": 37 } </code>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a id="loans_repaymentretrieve_etc"
|
<a id="loans_transaction_waiveinterest" name="loans_transaction_waiveinterest" class="old-syle-anchor"> </a>
|
||||||
name="loans_repaymentretrieve_etc" class="old-syle-anchor"> </a>
|
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
<h4>Retrieve a Repayment or Waiver Details</h4>
|
<h4>Waive Interest</h4>
|
||||||
|
</div>
|
||||||
|
<div class="method-example">
|
||||||
|
<code class="method-declaration">
|
||||||
|
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=waiveInterest
|
||||||
|
</code>
|
||||||
|
<code class="method-request">
|
||||||
|
POST loans/5/transactions?command=waiveInterest
|
||||||
|
Content-Type: application/json
|
||||||
|
Request Body:
|
||||||
|
{
|
||||||
|
"locale": "en_GB",
|
||||||
|
"dateFormat": "dd MMMM yyyy",
|
||||||
|
"transactionDate": "14 May 2012",
|
||||||
|
"transactionAmount": "400",
|
||||||
|
"note": "Optional note related to the waiving of interest."
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
<code class="method-response">
|
||||||
|
{
|
||||||
|
"officeId": 1,
|
||||||
|
"clientId": 1,
|
||||||
|
"loanId": 5,
|
||||||
|
"resourceId": 5,
|
||||||
|
"changes": {
|
||||||
|
"transactionDate": "14 May 2012",
|
||||||
|
"transactionAmount": "400",
|
||||||
|
"locale": "en_GB",
|
||||||
|
"dateFormat": "dd MMMM yyyy",
|
||||||
|
"note": "Optional note related to the interest waiver."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="loans_transaction_retrieve" name="loans_transaction_retrieve" class="old-syle-anchor"> </a>
|
||||||
|
<div class="method-section">
|
||||||
|
<div class="method-description">
|
||||||
|
<h4>Retrieve a Transaction Details</h4>
|
||||||
<p>Example Request:</p>
|
<p>Example Request:</p>
|
||||||
<div class=apiClick>loans/1/transactions/2</div>
|
<div class=apiClick>loans/5/transactions/3</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">
|
<code class="method-declaration">
|
||||||
@@ -3630,37 +3688,45 @@ GET https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId}
|
|||||||
</code>
|
</code>
|
||||||
<code class="method-response">
|
<code class="method-response">
|
||||||
{
|
{
|
||||||
"id": 10,
|
"id": 3,
|
||||||
"date": [
|
"type": {
|
||||||
2009,
|
"id": 2,
|
||||||
1,
|
"code": "loanTransactionType.repayment",
|
||||||
29
|
"value": "Repayment",
|
||||||
],
|
"disbursement": false,
|
||||||
"total": {
|
"repaymentAtDisbursement": false,
|
||||||
"currencyCode": "XOF",
|
"repayment": true,
|
||||||
"digitsAfterDecimal": 0,
|
"contra": false,
|
||||||
"amount": 300000,
|
"waiveInterest": false,
|
||||||
"defaultName": "CFA Franc BCEAO",
|
"waiveCharges": false,
|
||||||
"nameCode": "currency.XOF",
|
"writeOff": false,
|
||||||
"displaySymbol": "CFA",
|
"recoveryRepayment": false
|
||||||
"zero": false,
|
},
|
||||||
"greaterThanZero": true,
|
"date": [
|
||||||
"displaySymbolValue": "300000 CFA"
|
2012,
|
||||||
},
|
5,
|
||||||
"transactionOffsetFromToday": -1218
|
14
|
||||||
|
],
|
||||||
|
"currency": {
|
||||||
|
"code": "USD",
|
||||||
|
"name": "US Dollar",
|
||||||
|
"decimalPlaces": 2,
|
||||||
|
"displaySymbol": "$",
|
||||||
|
"nameCode": "currency.USD",
|
||||||
|
"displayLabel": "US Dollar ($)"
|
||||||
|
},
|
||||||
|
"amount": 559.88,
|
||||||
|
"interestPortion": 559.88
|
||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a id="loans_repaymentadjust_etc" name="loans_repaymentadjust_etc"
|
|
||||||
class="old-syle-anchor"> </a>
|
<a id="loans_transaction_adjust" name="loans_transaction_adjust" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
<h4>Adjust a Repayment or Waiver</h4>
|
<h4>Adjust a Transaction</h4>
|
||||||
<p>
|
<p><b>Note:</b> there is no need to specify command={transactionType} parameter.</p>
|
||||||
<b>Note:</b> there is no need to specify command={transactionType}
|
|
||||||
parameter.
|
|
||||||
</p>
|
|
||||||
<table class=matrixHeading>
|
<table class=matrixHeading>
|
||||||
<tr class="matrixHeadingBG">
|
<tr class="matrixHeadingBG">
|
||||||
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
|
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
|
||||||
@@ -3683,15 +3749,267 @@ Request Body:
|
|||||||
"dateFormat": "dd MMMM yyyy",
|
"dateFormat": "dd MMMM yyyy",
|
||||||
"transactionDate": "25 May 2012",
|
"transactionDate": "25 May 2012",
|
||||||
"transactionAmount": "50,000.00",
|
"transactionAmount": "50,000.00",
|
||||||
"note": "adj note"
|
"note": "An optional note about why your adjusting or changing the transaction."
|
||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
<code class="method-response">
|
<code class="method-response">
|
||||||
{ "resourceId": 16 }
|
{
|
||||||
|
"resourceId": 16
|
||||||
|
}
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Loan Charges API-->
|
||||||
|
<a id="loans_charges" name="loans_charges" class="old-syle-anchor"> </a>
|
||||||
|
<div class="method-section">
|
||||||
|
<div class="method-description">
|
||||||
|
<h3>Loan Charges</h3>
|
||||||
|
<p>Loan charges can be fees or penalities. They can be defined using the charges api and associated with loan products.</p>
|
||||||
|
<p></p>
|
||||||
|
<table class=matrixHeading>
|
||||||
|
<tr class="matrixHeadingBG">
|
||||||
|
<td><div class="mifosXHeading2">Field Descriptions</div></td>
|
||||||
|
</tr>
|
||||||
|
<tr class=alt>
|
||||||
|
<td>chargeId</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class=fielddesc>The id of the charge definition.</td>
|
||||||
|
</tr>
|
||||||
|
<tr class=alt>
|
||||||
|
<td>amount</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class=fielddesc>The flat amount or percenatge amount of the charge. (depending on its type)</td>
|
||||||
|
</tr>
|
||||||
|
<tr class=alt>
|
||||||
|
<td>dueDate</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class=fielddesc>The date the loan charge is due for collection. Relevant for charges defined as <b>specified due date</b>.</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="loans_charges_template" name="loans_charges_template" class="old-syle-anchor"> </a>
|
||||||
|
<div class="method-section">
|
||||||
|
<div class="method-description">
|
||||||
|
<h4>Retrieve Loan Charge Template</h4>
|
||||||
|
<p>This is a convenience resource. It can be useful when
|
||||||
|
building maintenance user interface screens for client
|
||||||
|
applications. The template data returned consists of any or all
|
||||||
|
of:
|
||||||
|
<ul>
|
||||||
|
<li class=normalli>Field Defaults</li>
|
||||||
|
<li class=normalli>Allowed Value Lists</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
<p>Example Request:</p>
|
||||||
|
<div class=apiClick>loans/1/charges/template</div>
|
||||||
|
</div>
|
||||||
|
<div class="method-example">
|
||||||
|
<code class="method-declaration">
|
||||||
|
GET https://DomainName/api/v1/loans/{loanId}/charges/template
|
||||||
|
</code>
|
||||||
|
<code class="method-response">
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"amountPaid": 0,
|
||||||
|
"amountWaived": 0,
|
||||||
|
"amountWrittenOff": 0,
|
||||||
|
"chargeOptions": [
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "Bank Fee (per installment)",
|
||||||
|
"active": true,
|
||||||
|
"penalty": false,
|
||||||
|
"currency": {
|
||||||
|
"code": "UGX",
|
||||||
|
"name": "Uganda Shilling",
|
||||||
|
"decimalPlaces": 2,
|
||||||
|
"displaySymbol": "USh",
|
||||||
|
"nameCode": "currency.UGX",
|
||||||
|
"displayLabel": "Uganda Shilling (USh)"
|
||||||
|
},
|
||||||
|
"amount": 1500,
|
||||||
|
"chargeTimeType": {
|
||||||
|
"id": 2,
|
||||||
|
"code": "chargeTimeType.specifiedDueDate",
|
||||||
|
"value": "Specified due date"
|
||||||
|
},
|
||||||
|
"chargeAppliesTo": {
|
||||||
|
"id": 1,
|
||||||
|
"code": "chargeAppliesTo.loan",
|
||||||
|
"value": "Loan"
|
||||||
|
},
|
||||||
|
"chargeCalculationType": {
|
||||||
|
"id": 1,
|
||||||
|
"code": "chargeCalculationType.flat",
|
||||||
|
"value": "Flat"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"penalty": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="loans_charges_create" name="loans_charges_create" class="old-syle-anchor"> </a>
|
||||||
|
<div class="method-section">
|
||||||
|
<div class="method-description">
|
||||||
|
<h4>Create a Loan Charge</h4>
|
||||||
|
<table class=matrixHeading>
|
||||||
|
<tr class="matrixHeadingBG">
|
||||||
|
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
|
||||||
|
</tr>
|
||||||
|
<tr class=alt>
|
||||||
|
<td>chargeId, amount, dueDate (depending on chargeTimeType of charge definition)</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="method-example">
|
||||||
|
<code class="method-declaration">
|
||||||
|
POST https://DomainName/api/v1//loans/{loanId}/charges
|
||||||
|
</code>
|
||||||
|
<code class="method-request">
|
||||||
|
POST /loans/1/charges
|
||||||
|
Content-Type: application/json
|
||||||
|
Request Body:
|
||||||
|
{
|
||||||
|
"locale": "en",
|
||||||
|
"dateFormat": "dd MMMM yyyy",
|
||||||
|
"chargeId": 1,
|
||||||
|
"amount": "333",
|
||||||
|
"dueDate": "21 November 2011"
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
<code class="method-response">
|
||||||
|
{
|
||||||
|
"officeId": 1,
|
||||||
|
"clientId": 1,
|
||||||
|
"loanId": 1,
|
||||||
|
"resourceId": 14
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="loans_charges_update" name="loans_charges_update" class="old-syle-anchor"> </a>
|
||||||
|
<div class="method-section">
|
||||||
|
<div class="method-description">
|
||||||
|
<h4>Update a Loan Charge</h4>
|
||||||
|
</div>
|
||||||
|
<div class="method-example">
|
||||||
|
<code class="method-declaration">
|
||||||
|
PUT https://DomainName/api/v1//loans/{loanId}/charges/{loanChargeId}
|
||||||
|
</code>
|
||||||
|
<code class="method-request">
|
||||||
|
PUT /loans/1/charges/14
|
||||||
|
Content-Type: application/json
|
||||||
|
Request Body:
|
||||||
|
{
|
||||||
|
"locale": "en",
|
||||||
|
"amount": "650"
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
<code class="method-response">
|
||||||
|
{
|
||||||
|
"officeId": 1,
|
||||||
|
"clientId": 1,
|
||||||
|
"loanId": 1,
|
||||||
|
"resourceId": 14,
|
||||||
|
"changes": {
|
||||||
|
"amount": 650,
|
||||||
|
"locale": "en"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="loans_charges_delete" name="loans_charges_delete" class="old-syle-anchor"> </a>
|
||||||
|
<div class="method-section">
|
||||||
|
<div class="method-description">
|
||||||
|
<h4>Delete a Loan Charge</h4>
|
||||||
|
</div>
|
||||||
|
<div class="method-example">
|
||||||
|
<code class="method-declaration">
|
||||||
|
DELETE https://DomainName/api/v1//loans/{loanId}/charges/{loanChargeId}
|
||||||
|
</code>
|
||||||
|
<code class="method-request">
|
||||||
|
DELETE /loans/1/charges/14
|
||||||
|
Content-Type: application/json
|
||||||
|
</code>
|
||||||
|
<code class="method-response">
|
||||||
|
{
|
||||||
|
"officeId": 1,
|
||||||
|
"clientId": 1,
|
||||||
|
"loanId": 1,
|
||||||
|
"resourceId": 14
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="loans_charges_retrieve" name="loans_charges_retrieve" class="old-syle-anchor"> </a>
|
||||||
|
<div class="method-section">
|
||||||
|
<div class="method-description">
|
||||||
|
<h4>Retrieve a Loan Charge</h4>
|
||||||
|
</div>
|
||||||
|
<div class="method-example">
|
||||||
|
<code class="method-declaration">
|
||||||
|
GET https://DomainName/api/v1//loans/{loanId}/charges/{loanChargeId}
|
||||||
|
</code>
|
||||||
|
<code class="method-request">
|
||||||
|
GET /loans/1/charges/1
|
||||||
|
Content-Type: application/json
|
||||||
|
</code>
|
||||||
|
<code class="method-response">
|
||||||
|
{
|
||||||
|
"id": 14,
|
||||||
|
"chargeId": 1,
|
||||||
|
"name": "Bank Fee (per installment)",
|
||||||
|
"chargeTimeType": {
|
||||||
|
"id": 2,
|
||||||
|
"code": "chargeTimeType.specifiedDueDate",
|
||||||
|
"value": "Specified due date"
|
||||||
|
},
|
||||||
|
"dueDate": [
|
||||||
|
2011,
|
||||||
|
11,
|
||||||
|
21
|
||||||
|
],
|
||||||
|
"chargeCalculationType": {
|
||||||
|
"id": 1,
|
||||||
|
"code": "chargeCalculationType.flat",
|
||||||
|
"value": "Flat"
|
||||||
|
},
|
||||||
|
"percentage": 0,
|
||||||
|
"amountPercentageAppliedTo": 0,
|
||||||
|
"currency": {
|
||||||
|
"code": "UGX",
|
||||||
|
"name": "Uganda Shilling",
|
||||||
|
"decimalPlaces": 2,
|
||||||
|
"displaySymbol": "USh",
|
||||||
|
"nameCode": "currency.UGX",
|
||||||
|
"displayLabel": "Uganda Shilling (USh)"
|
||||||
|
},
|
||||||
|
"amount": 650,
|
||||||
|
"amountPaid": 0,
|
||||||
|
"amountWaived": 0,
|
||||||
|
"amountWrittenOff": 0,
|
||||||
|
"amountOutstanding": 650,
|
||||||
|
"amountOrPercentage": 650,
|
||||||
|
"penalty": false
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<a id="guarantors" name="guarantors" class="old-syle-anchor"> </a>
|
<a id="guarantors" name="guarantors" class="old-syle-anchor"> </a>
|
||||||
<div class="method-section">
|
<div class="method-section">
|
||||||
<div class="method-description">
|
<div class="method-description">
|
||||||
@@ -10526,8 +10844,7 @@ Content-Type: application/json
|
|||||||
<td><div class="matrixHeadingVerbs">POST</div></td>
|
<td><div class="matrixHeadingVerbs">POST</div></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><div class=matrixHeadingCommands>create/complex
|
<td><div class=matrixHeadingCommands>create/complex update</div></td>
|
||||||
update</div></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
<td><table>
|
<td><table>
|
||||||
@@ -10556,7 +10873,7 @@ Content-Type: application/json
|
|||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr class="alt">
|
||||||
<td><a href="#clients">CLIENT</a></td>
|
<td><a href="#clients">Clients</a></td>
|
||||||
<td>clients</td>
|
<td>clients</td>
|
||||||
<td><a href="#clients_create">Create a Client</a></td>
|
<td><a href="#clients_create">Create a Client</a></td>
|
||||||
<td><a href="#clients_list">List Clients</a></td>
|
<td><a href="#clients_list">List Clients</a></td>
|
||||||
@@ -10596,15 +10913,16 @@ Content-Type: application/json
|
|||||||
<td><a href="#clients_updatenote">Update a Client Note</a></td>
|
<td><a href="#clients_updatenote">Update a Client Note</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<!-- loans api full matrix-->
|
||||||
<tr class="alt">
|
<tr class="alt">
|
||||||
<td><a href="#loans">LOAN</a></td>
|
<td><a href="#loans">Loans</a></td>
|
||||||
<td>loans?calculateLoanSchedule</td>
|
<td>loans?calculateLoanSchedule</td>
|
||||||
<td><a href="#loans_calculate">Calculate Loan Repayment Schedule</a></td>
|
<td><a href="#loans_calculate">Calculate Loan Repayment Schedule</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans</td>
|
<td>loans</td>
|
||||||
<td><a href="#loans_create">Submit a new Loan Application</a></td>
|
<td><a href="#loans_create">Submit a new Loan Application</a></td>
|
||||||
@@ -10618,9 +10936,9 @@ Content-Type: application/json
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td><a href="#loans_retrieve">Retrieve a Loan</a></td>
|
<td><a href="#loans_retrieve">Retrieve a Loan</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><a href="#loans_delete">Delete a Loan</a></td>
|
<td><a href="#loans_delete">Delete a Loan Application</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}?command=approve</td>
|
<td>loans/{loanId}?command=approve</td>
|
||||||
<td><a href="#loans_approve">Approve Loan Application</a></td>
|
<td><a href="#loans_approve">Approve Loan Application</a></td>
|
||||||
@@ -10636,7 +10954,7 @@ Content-Type: application/json
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}?command=reject</td>
|
<td>loans/{loanId}?command=reject</td>
|
||||||
<td><a href="#loans_reject">Reject Loan Application</a></td>
|
<td><a href="#loans_reject">Reject Loan Application</a></td>
|
||||||
@@ -10652,7 +10970,7 @@ Content-Type: application/json
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}?command=disburse</td>
|
<td>loans/{loanId}?command=disburse</td>
|
||||||
<td><a href="#loans_disburse">Disburse Loan</a></td>
|
<td><a href="#loans_disburse">Disburse Loan</a></td>
|
||||||
@@ -10668,11 +10986,18 @@ Content-Type: application/json
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="#loans_transactions">Loan Transactions</a></td>
|
||||||
|
<td>loans/{loanId}/transactions?command=repayment</td>
|
||||||
|
<td><a href="#loans_transaction_repayment">Enter a repayment</a></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr class="alt">
|
<tr class="alt">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}/transactions</td>
|
<td>loans/{loanId}/transactions?command=waiveInterest</td>
|
||||||
<td><a href="#loans_repayment_etc">Make a Repayment / Loan
|
<td><a href="#loans_transaction_waiveinterest">Waive Interest</a></td>
|
||||||
Waiver</a></td>
|
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
@@ -10680,13 +11005,54 @@ Content-Type: application/json
|
|||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>loans/{loanId}/transactions/{transactionId}</td>
|
<td>loans/{loanId}/transactions/{transactionId}</td>
|
||||||
<td><a href="#loans_repaymentadjust_etc">Adjust a
|
<td></td>
|
||||||
Repayment or Waiver</a></td>
|
<td><a href="#loans_transaction_retrieve">Retrieve a transactions details</a></td>
|
||||||
<td><a href="#loans_repaymentretrieve_etc">Retrieve a
|
|
||||||
Repayment or Waiver Details</a></td>
|
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="alt">
|
||||||
|
<td></td>
|
||||||
|
<td>loans/{loanId}/transactions/{transactionId}</td>
|
||||||
|
<td><a href="#loans_transaction_adjust">Adjust a Transaction</a></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="#loans_charges">Loan Charges</a></td>
|
||||||
|
<td>loans/{loanId}/charges</td>
|
||||||
|
<td><a href="#loans_charges_create">Add a loan charge</a></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="alt">
|
||||||
|
<td></td>
|
||||||
|
<td>loans/{loanId}/charges/{loanChargeId}</td>
|
||||||
|
<td></td>
|
||||||
|
<td><a href="#loans_charges_retrieve">Retrieve a Loan Charge</a></td>
|
||||||
|
<td><a href="#loans_charges_update">Modify a Loan Charge</a></td>
|
||||||
|
<td><a href="#loans_charges_delete">Delete a Loan Charge</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="#guarantors">Loan Guarantors</a></td>
|
||||||
|
<td>loans/{loanId}/guarantors</td>
|
||||||
|
<td><a href="#guarantors_create">Create a Guarantor
|
||||||
|
</a></td>
|
||||||
|
<td><a href="#guarantors_list">List Guarantors
|
||||||
|
</a></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="alt">
|
||||||
|
<td></td>
|
||||||
|
<td>loans/{loanId}/guarantors/{guarantorId}</td>
|
||||||
|
<td></td>
|
||||||
|
<td><a href="#guarantors_retrieve">Retrieve a Guarantor</a></td>
|
||||||
|
<td><a href="#guarantors_update">Update a Guarantor</a></td>
|
||||||
|
<td><a href="#guarantors_delete">Delete a Guarantor</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr class="alt">
|
<tr class="alt">
|
||||||
<td><a href="#offices">OFFICE</a></td>
|
<td><a href="#offices">OFFICE</a></td>
|
||||||
<td>offices</td>
|
<td>offices</td>
|
||||||
@@ -10957,8 +11323,7 @@ Content-Type: application/json
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="alt">
|
<tr class="alt">
|
||||||
<td>loans/{loanId}/transactions/template</td>
|
<td>loans/{loanId}/transactions/template</td>
|
||||||
<td><a href="#loans_repaymenttemplate_etc">Retrieve Loan
|
<td><a href="#loans_repaymenttemplate_etc">Retrieve Tranaction Template</a></td>
|
||||||
Repayment/Loan Waiver Template</a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>offices/template</td>
|
<td>offices/template</td>
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@ public class LoanChargesApiResource {
|
|||||||
@Path("template")
|
@Path("template")
|
||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
public String retrieveNewLoanChargeDetails(@Context final UriInfo uriInfo) {
|
public String retrieveTemplate(@Context final UriInfo uriInfo) {
|
||||||
|
|
||||||
context.authenticatedUser().validateHasReadPermission(resourceNameForPermissions);
|
context.authenticatedUser().validateHasReadPermission(resourceNameForPermissions);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user