updating charges and loan charges documentation
This commit is contained in:
+618
-265
@@ -470,6 +470,22 @@
|
||||
<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>
|
||||
@@ -1529,7 +1545,7 @@ function executeAjaxRequest(url, verbType, jsonData, basicAuthKey, successFuncti
|
||||
<b>Error Message returned when attempting to create an Office without passing any parameters</b>
|
||||
{
|
||||
"developerMessage": "The request was invalid. This typically will happen due to validation errors which are provided.",
|
||||
"developerDocLink": "https://github.com/keithwoodlock/mifosx/wiki/HTTP-API-Error-codes",
|
||||
"developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes",
|
||||
"httpStatusCode": "400",
|
||||
"defaultUserMessage": "Validation errors exist.",
|
||||
"userMessageGlobalisationCode": "validation.msg.validation.errors.exist",
|
||||
@@ -4260,255 +4276,7 @@ Request Body:
|
||||
</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>
|
||||
<!--Start of guarantors functionality-->
|
||||
|
||||
<a id="guarantors" name="guarantors" class="old-syle-anchor"> </a>
|
||||
<div class="method-section">
|
||||
@@ -5116,6 +4884,431 @@ No Request Body:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- start of Loan charges content-->
|
||||
<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>Its typical for MFIs to add extra costs for their loan products. They
|
||||
can be either Fees or Penalties.</p>
|
||||
<p>Loan Charges are instances of <a href="#charges">Charges</a> and
|
||||
represent either fees and penalties for loan products. Refer <a href="#charges">Charges</a>
|
||||
for documentation of the various properties of a charge, Only additional properties (
|
||||
specific to the context of a Charge being associated with a Loan) are
|
||||
described here</p>
|
||||
<table class=matrixHeading>
|
||||
<tr class="matrixHeadingBG">
|
||||
<td><div class="mifosXHeading2">Field Descriptions</div></td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>amountPaid</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>The Total amount which has been paid for this Charge
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>amountWaived</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>The Total amount that has been waived for this Charge
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>amountWrittenOff</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>Total amount written off from this Charge
|
||||
</td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>amountOutstanding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>The Total outstanding amount for this Charge
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a id="loans_charges_list" name="loans_charges_list"
|
||||
class="old-syle-anchor"> </a>
|
||||
<div class="method-section">
|
||||
<div class="method-description">
|
||||
<h4>List Loan Charges</h4>
|
||||
<p>Example Requests:</p>
|
||||
<div class=apiClick>loans/1/charges</div>
|
||||
<br>
|
||||
<br>
|
||||
<div class=apiClick>loans/1/charges?fields=name,amountOrPercentage</div>
|
||||
</div>
|
||||
<div class="method-example">
|
||||
<code class="method-declaration">
|
||||
GET https://DomainName/api/v1/loans/{loanId}/charges
|
||||
</code>
|
||||
<code class="method-response">
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"chargeId": 1,
|
||||
"name": "Loan Processing fee",
|
||||
"chargeTimeType": {
|
||||
"id": 1,
|
||||
"code": "chargeTimeType.disbursement",
|
||||
"value": "Disbursement"
|
||||
},
|
||||
"chargeCalculationType": {
|
||||
"id": 1,
|
||||
"code": "chargeCalculationType.flat",
|
||||
"value": "Flat"
|
||||
},
|
||||
"percentage": 0,
|
||||
"amountPercentageAppliedTo": 0,
|
||||
"currency": {
|
||||
"code": "USD",
|
||||
"name": "US Dollar",
|
||||
"decimalPlaces": 2,
|
||||
"displaySymbol": "$",
|
||||
"nameCode": "currency.USD",
|
||||
"displayLabel": "US Dollar ($)"
|
||||
},
|
||||
"amount": 100,
|
||||
"amountPaid": 0,
|
||||
"amountWaived": 0,
|
||||
"amountWrittenOff": 0,
|
||||
"amountOutstanding": 100,
|
||||
"amountOrPercentage": 100,
|
||||
"penalty": false
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"chargeId": 2,
|
||||
"name": "Collection Fee",
|
||||
"chargeTimeType": {
|
||||
"id": 2,
|
||||
"code": "chargeTimeType.specifiedDueDate",
|
||||
"value": "Specified due date"
|
||||
},
|
||||
"dueDate": [
|
||||
2013,
|
||||
3,
|
||||
29
|
||||
],
|
||||
"chargeCalculationType": {
|
||||
"id": 1,
|
||||
"code": "chargeCalculationType.flat",
|
||||
"value": "Flat"
|
||||
},
|
||||
"percentage": 0,
|
||||
"amountPercentageAppliedTo": 0,
|
||||
"currency": {
|
||||
"code": "USD",
|
||||
"name": "US Dollar",
|
||||
"decimalPlaces": 2,
|
||||
"displaySymbol": "$",
|
||||
"nameCode": "currency.USD",
|
||||
"displayLabel": "US Dollar ($)"
|
||||
},
|
||||
"amount": 100,
|
||||
"amountPaid": 0,
|
||||
"amountWaived": 0,
|
||||
"amountWrittenOff": 0,
|
||||
"amountOutstanding": 100,
|
||||
"amountOrPercentage": 100,
|
||||
"penalty": false
|
||||
}
|
||||
]
|
||||
</code>
|
||||
</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 Charges 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": 2,
|
||||
"name": "Collection Fee",
|
||||
"active": true,
|
||||
"penalty": false,
|
||||
"currency": {
|
||||
"code": "USD",
|
||||
"name": "US Dollar",
|
||||
"decimalPlaces": 2,
|
||||
"displaySymbol": "$",
|
||||
"nameCode": "currency.USD",
|
||||
"displayLabel": "US Dollar ($)"
|
||||
},
|
||||
"amount": 100,
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Late payment penalty",
|
||||
"active": true,
|
||||
"penalty": true,
|
||||
"currency": {
|
||||
"code": "USD",
|
||||
"name": "US Dollar",
|
||||
"decimalPlaces": 2,
|
||||
"displaySymbol": "$",
|
||||
"nameCode": "currency.USD",
|
||||
"displayLabel": "US Dollar ($)"
|
||||
},
|
||||
"amount": 1,
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Loan Processing fee",
|
||||
"active": true,
|
||||
"penalty": false,
|
||||
"currency": {
|
||||
"code": "USD",
|
||||
"name": "US Dollar",
|
||||
"decimalPlaces": 2,
|
||||
"displaySymbol": "$",
|
||||
"nameCode": "currency.USD",
|
||||
"displayLabel": "US Dollar ($)"
|
||||
},
|
||||
"amount": 100,
|
||||
"chargeTimeType": {
|
||||
"id": 1,
|
||||
"code": "chargeTimeType.disbursement",
|
||||
"value": "Disbursement"
|
||||
},
|
||||
"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_retrieve" name="loans_charges_retrieve"
|
||||
class="old-syle-anchor"> </a>
|
||||
<div class="method-section">
|
||||
<div class="method-description">
|
||||
<h4>Retrieve a Loan Charge</h4>
|
||||
<p>Example Requests:</p>
|
||||
<div class=apiClick>/loans/1/charges/1</div>
|
||||
<br>
|
||||
<br>
|
||||
<div class=apiClick>/loans/1/charges/1?fields=name,amountOrPercentage</div>
|
||||
</div>
|
||||
<div class="method-example">
|
||||
<code class="method-declaration">
|
||||
GET https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}
|
||||
</code>
|
||||
<code class="method-response">
|
||||
{
|
||||
"id": 1,
|
||||
"chargeId": 1,
|
||||
"name": "Loan Processing fee",
|
||||
"chargeTimeType": {
|
||||
"id": 1,
|
||||
"code": "chargeTimeType.disbursement",
|
||||
"value": "Disbursement"
|
||||
},
|
||||
"chargeCalculationType": {
|
||||
"id": 1,
|
||||
"code": "chargeCalculationType.flat",
|
||||
"value": "Flat"
|
||||
},
|
||||
"percentage": 0,
|
||||
"amountPercentageAppliedTo": 0,
|
||||
"currency": {
|
||||
"code": "USD",
|
||||
"name": "US Dollar",
|
||||
"decimalPlaces": 2,
|
||||
"displaySymbol": "$",
|
||||
"nameCode": "currency.USD",
|
||||
"displayLabel": "US Dollar ($)"
|
||||
},
|
||||
"amount": 100,
|
||||
"amountPaid": 0,
|
||||
"amountWaived": 0,
|
||||
"amountWrittenOff": 0,
|
||||
"amountOutstanding": 100,
|
||||
"amountOrPercentage": 100,
|
||||
"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
|
||||
for Loan Charges</div></td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>chargeId, amount, dueDate</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:
|
||||
{
|
||||
"chargeId": "2",
|
||||
"locale": "en",
|
||||
"amount": "100",
|
||||
"dateFormat": "dd MMMM yyyy",
|
||||
"dueDate": "29 April 2013"
|
||||
}
|
||||
</code>
|
||||
<code class="method-response">
|
||||
{
|
||||
"officeId": 1,
|
||||
"clientId": 1,
|
||||
"loanId": 1,
|
||||
"resourceId": 31
|
||||
}
|
||||
</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>
|
||||
<p>Currently Loan Charges may be updated only if the Loan
|
||||
is not yet approved
|
||||
</p>
|
||||
</div>
|
||||
<div class="method-example">
|
||||
<code class="method-declaration">
|
||||
PUT https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}
|
||||
</code>
|
||||
<code class="method-request">
|
||||
PUT loans/1/charges/12
|
||||
Content-Type: application/json
|
||||
Request Body:
|
||||
{
|
||||
"dateFormat": "dd MMMM yyyy",
|
||||
"locale": "en",
|
||||
"amount": "60",
|
||||
"dueDate": "27 March 2013"
|
||||
}
|
||||
</code>
|
||||
<code class="method-response">
|
||||
{
|
||||
"officeId": 1,
|
||||
"clientId": 1,
|
||||
"loanId": 1,
|
||||
"resourceId": 6,
|
||||
"changes": {
|
||||
"dueDate": "27 March 2013",
|
||||
"dateFormat": "dd MMMM yyyy",
|
||||
"locale": "en",
|
||||
"amount": 60.0
|
||||
}
|
||||
}
|
||||
</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>
|
||||
<p>
|
||||
<b>Note:</b>Currently, A Loan Charge may only be removed from Loans that are not
|
||||
yet approved.
|
||||
</p>
|
||||
</div>
|
||||
<div class="method-example">
|
||||
<code class="method-declaration">
|
||||
DELETE https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}
|
||||
</code>
|
||||
<code class="method-request">
|
||||
DELETE loans/1/charges/2
|
||||
Content-Type: application/json
|
||||
No Request Body:
|
||||
</code>
|
||||
<code class="method-response">
|
||||
{
|
||||
"officeId": 1,
|
||||
"clientId": 1,
|
||||
"loanId": 1,
|
||||
"resourceId": 2
|
||||
}
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- start of offices content -->
|
||||
<a id="offices" name="offices" class="old-syle-anchor"> </a>
|
||||
<div class="method-section">
|
||||
@@ -6808,7 +7001,7 @@ Request Body:
|
||||
<div class="method-description">
|
||||
<h3>Staff</h3>
|
||||
<p>Allows you to model staff members. At present the key role
|
||||
of signifigance is whether this staff member is a loan officer or
|
||||
of significance is whether this staff member is a loan officer or
|
||||
not.</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6925,21 +7118,156 @@ Request Body:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--Charges section starts here-->
|
||||
<a id="charges" name="charges" class="old-syle-anchor"> </a>
|
||||
<div class="method-section">
|
||||
<div class="method-description">
|
||||
<h3>Charges</h3>
|
||||
<p>
|
||||
Its typical for MFIs to add extra costs to their financial
|
||||
products. There are typically <b>Fees</b> or <b>Penalites</b>.
|
||||
Its typical for MFIs to add extra costs for their financial
|
||||
products. There are typically <b>Fees</b> or <b>Penalties</b>.
|
||||
</p>
|
||||
<p>Charges is what we use to model both fees and penalities.
|
||||
<p>Charges is what we use to model both fees and penalties.
|
||||
For now charges can only be associated with loan products / loans.</p>
|
||||
<table class=matrixHeading>
|
||||
<tr class="matrixHeadingBG">
|
||||
<td><div class="mifosXHeading2">Field Descriptions</div></td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>Name associated with this charge.</td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>active</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>Boolean flag determines if the Charge is currently active.</td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>penalty</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>Boolean flag determines if the Charge is a penalty.</td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>currency</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>Details of the currency associated with this charge.
|
||||
Refer <a href="#charges_template">Charges Template</a> for additional details</td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>amount</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>Field holds the details of the actual amount to be collected
|
||||
in the case of "Flat Charges" or the percentage amount to be collected in
|
||||
case of "Percentage Amount Charges". Refer <a href="#charges_template">Charges Template</a>
|
||||
for details of the Available Charge Types</td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>chargeTimeType</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>The time at which the charge becomes Due.
|
||||
Refer <a href="#charges_template">Charges Template</a> for additional details</td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>chargeAppliesTo</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>The Entity for which the charge can be applied (Loans etc).
|
||||
Refer <a href="#charges_template">Charges Template</a> for additional details</td>
|
||||
</tr>
|
||||
<tr class=alt>
|
||||
<td>chargeCalculationType</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class=fielddesc>Rules for calculating the amount for a particular Charge.
|
||||
Refer <a href="#charges_template">Charges Template</a> for additional details</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a id="charges_create" name="staff_create" class="old-syle-anchor"> </a>
|
||||
<a id="charges_template" name="charges_template"
|
||||
class="old-syle-anchor"> </a>
|
||||
<div class="method-section">
|
||||
<div class="method-description">
|
||||
<h4>Retrieve Charges Details 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>charges/template</div>
|
||||
</div>
|
||||
<div class="method-example">
|
||||
<code class="method-declaration">
|
||||
GET https://DomainName/api/v1/charges/template
|
||||
</code>
|
||||
<code class="method-response">
|
||||
{
|
||||
"active": false,
|
||||
"penalty": false,
|
||||
"currencyOptions":
|
||||
[
|
||||
{
|
||||
"code": "USD",
|
||||
"name": "US Dollar",
|
||||
"decimalPlaces": 2,
|
||||
"displaySymbol": "$",
|
||||
"nameCode": "currency.USD",
|
||||
"displayLabel": "US Dollar ($)"
|
||||
}
|
||||
],
|
||||
"chargeCalculationTypeOptions":
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"code": "chargeCalculationType.flat",
|
||||
"value": "Flat"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"code": "chargeCalculationType.percent.of.amount",
|
||||
"value": "% Amount"
|
||||
}
|
||||
],
|
||||
"chargeAppliesToOptions":
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"code": "chargeAppliesTo.loan",
|
||||
"value": "Loan"
|
||||
}
|
||||
],
|
||||
"chargeTimeTypeOptions":
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"code": "chargeTimeType.disbursement",
|
||||
"value": "Disbursement"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"code": "chargeTimeType.specifiedDueDate",
|
||||
"value": "Specified due date"
|
||||
}
|
||||
]
|
||||
}
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a id="charges_create" name="charges_create" class="old-syle-anchor"> </a>
|
||||
<div class="method-section">
|
||||
<div class="method-description">
|
||||
<h4>Create/Define a Charge</h4>
|
||||
@@ -6965,7 +7293,32 @@ Request Body:
|
||||
"active": true
|
||||
}
|
||||
</code>
|
||||
<code class="method-response">{ "resourceId": 1 }</code>
|
||||
<code class="method-response">
|
||||
{
|
||||
"resourceId": 1
|
||||
}
|
||||
</code>
|
||||
<code class="method-request">
|
||||
POST charges
|
||||
Content-Type: application/json
|
||||
Request Body:
|
||||
{
|
||||
"locale": "en",
|
||||
"name": "Default Penalty",
|
||||
"amount": "2",
|
||||
"currencyCode": "USD",
|
||||
"chargeAppliesTo": "1",
|
||||
"chargeTimeType": "2",
|
||||
"chargeCalculationType": "2",
|
||||
"active": "true",
|
||||
"penalty": "true"
|
||||
}
|
||||
</code>
|
||||
<code class="method-response">
|
||||
{
|
||||
"resourceId": 4
|
||||
}
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7118,8 +7471,8 @@ Content-Type: application/json
|
||||
<div class="method-section">
|
||||
<div class="method-description">
|
||||
<h3>Savings Product:</h3>
|
||||
<p>An MFIs savings product offerings are modelled using this API.</p>
|
||||
<p>When creating savings accounts, the details from the savings product are used to autofill details of savings account.</p>
|
||||
<p>An MFIs savings product offerings are modeled using this API.</p>
|
||||
<p>When creating savings accounts, the details from the savings product are used to auto fill details of savings account.</p>
|
||||
<table class=matrixHeading>
|
||||
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Field Descriptions</div></td></tr>
|
||||
|
||||
@@ -7130,7 +7483,7 @@ Content-Type: application/json
|
||||
<tr><td class=fielddesc>A description of the product offering.</td></tr>
|
||||
|
||||
<tr class=alt><td>currencyCode</td></tr>
|
||||
<tr><td class=fielddesc>Three letter ISO code reprsenting currency.</td></tr>
|
||||
<tr><td class=fielddesc>Three letter ISO code representing currency.</td></tr>
|
||||
|
||||
<tr class=alt><td>digitsAfterDecimal</td></tr>
|
||||
<tr><td class=fielddesc>Override the currency default value for digitsAfterDecimal.</td></tr>
|
||||
@@ -7724,7 +8077,7 @@ Request Body:
|
||||
<h4>Arguments</h4>
|
||||
<dl class="argument-list">
|
||||
<dt>associations</dt>
|
||||
<dd>optional, <span>Either 'all' or a comma separated list of savings 'associations' (itemised below).</span></dd>
|
||||
<dd>optional, <span>Either 'all' or a comma separated list of savings 'associations' (itemized below).</span></dd>
|
||||
<dd><br>Associations are just extra pieces of data that you might or might not want to retrieve.<br><br></dd>
|
||||
<dd><b>'all':</b> Gets data related to all associations e.g. ?associations=all.</dd>
|
||||
<dd><b>'transactions':</b> Gets data related to transactions on the account e.g. ?associations=transactions</dd>
|
||||
@@ -7813,7 +8166,7 @@ No Request Body:
|
||||
<div class="method-section">
|
||||
<div class="method-description">
|
||||
<h2>Delete a Savings Account</h2>
|
||||
<p>At present we support <b>hard</b> delete of savings account but this is likely to change to a savings account <b>closure</b> or <b>de-activation</b> process/command.</p>
|
||||
<p>At present we support <b>hard</b> delete of savings account but this is likely to change to a savings account <b>closure</b> or <b>De-activation</b> process/command.</p>
|
||||
</div>
|
||||
<div class="method-example">
|
||||
<code class="method-declaration">DELETE https://Domain Name/api/v1/savingsaccounts/{accountsId}</code>
|
||||
@@ -7959,7 +8312,7 @@ No Request Body:
|
||||
'plugged-in' table. The API checks for permission and for 'data
|
||||
scoping' (only data within the users' office hierarchy can be
|
||||
managed by the user).</p>
|
||||
<p>The Mifos X Reference App uses a JQuery plugin called
|
||||
<p>The Mifos X Reference App uses a JQuery plug-in called
|
||||
stretchydatatables (which in turn uses this datatables resource)
|
||||
to provide a pretty flexible CRUD (Create, Read, Update, Delete)
|
||||
User Interface.</p>
|
||||
@@ -9927,7 +10280,7 @@ No Request Body
|
||||
<code class="method-response">
|
||||
{
|
||||
"developerMessage": "Invalid authentication details were passed in api request.",
|
||||
"developerDocLink": "https://github.com/keithwoodlock/mifosx/wiki/HTTP-API-Error-codes",
|
||||
"developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes",
|
||||
"httpStatusCode": "401",
|
||||
"defaultUserMessage": "Unauthenticated. Please login.",
|
||||
"userMessageGlobalisationCode": "error.msg.not.authenticated",
|
||||
@@ -11720,7 +12073,7 @@ Content-Type: application/json
|
||||
<tr class="alt">
|
||||
<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><a href="#loans_charges_create">Add a Loan Charge</a></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
|
||||
Reference in New Issue
Block a user