blob: ac6cd712d1bb45d147c40983b80b56b43cea40aa [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="apidocs.css" type="text/css" media="screen" title="Mifos X API Docs" charset="utf-8" />
<script type="text/javascript" src="jquery-1.7.min.js"></script>
<title>Mifos X API Documentation</title>
<script>
QueryParameters = (function() {
var result = {};
if (window.location.search) {
// split up the query string and store in an associative array
var params = window.location.search.slice(1).split("&");
for ( var i = 0; i < params.length; i++) {
var tmp = params[i].split("=");
result[tmp[0]] = unescape(tmp[1]);
}
}
return result;
}());
getLocation = function(href) {
var l = document.createElement("a");
l.href = href;
return l;
};
baseURL = "";
defQueryParams = "tenantIdentifier=default&pretty=true";
function clickAPILink(apiLink) {
var currentLink = baseURL + apiLink;
if (apiLink.indexOf("?") < 0)
currentLink += "?" + defQueryParams;
else
currentLink += "&" + defQueryParams;
if ((/MSIE (\d+\.\d+);/.test(navigator.userAgent))
|| (apiLink.indexOf("exportCSV") > -1)
|| (apiLink.indexOf("type=CSV") > -1)
|| (apiLink.indexOf("type=XLS") > -1)) { // test for MSIE (not a great browser for the api docs anyhow) or a file download
location.href = currentLink;
} else
window.open(currentLink);
}
function clickAPILinkNotPretty(apiLink) {
var fixedQueryParams = "tenantIdentifier=default";
var currentLink = baseURL + apiLink;
if (apiLink.indexOf("?") < 0)
currentLink += "?" + fixedQueryParams;
else
currentLink += "&" + fixedQueryParams;
if ((/MSIE (\d+\.\d+);/.test(navigator.userAgent))
|| (apiLink.indexOf("exportCSV") > -1)
|| (apiLink.indexOf("type=CSV") > -1)
|| (apiLink.indexOf("type=XLS") > -1)) { // test for MSIE (not a great browser for the api docs anyhow) or a file download
location.href = currentLink;
} else
window.open(currentLink);
}
function getBaseURL(docURL) {
var localhostUrl = "https://localhost:8443/mifosng-provider/api/v1/";
var openmfDemoUrl = "/mifosng-provider/api/v1/";
var baseUrl = "";
if (docURL.substring(0, 4).toLowerCase() == "http") {
var l = getLocation(docURL);
if (l.hostname == "demo.openmf.org") {
baseUrl = openmfDemoUrl;
} else {
baseUrl = "https://" + l.hostname
+ ":8443/mifosng-provider/api/v1/"
}
} else {
//assume running locally
baseUrl = localhostUrl;
}
return baseUrl;
}
</script>
</head>
<body>
<div id="page-wrapper">
<div id="flybar">
<div id="nav-logo">1.9.0.RELEASE API</div>
<div class="flybar-nav">
<h2 class="flybar-button">Overview</h2>
<div class="flybar-menu-overview">
<div class="toc-column1">
<div class="toc-section">
<ul>
<li><a href="#top">Mifos X API Documentation</a></li>
<li><a href="#interact">Try The API From Your Browser</a></li>
<li><a href="#genopts">Generic Options</a></li>
<li><a href="#creates_and_updates">Creating and Updating</a></li>
<li><a href="#dates_and_numbers">Updating Dates and Numbers</a></li>
<li><a href="#field_descriptions">Field Descriptions</a></li>
<li><a href="#authentication_overview">Authentication Overview</a></li>
<li><a href="#errors">Errors</a></li>
<li><a href="#fullapi_matrix">Full API Matrix</a></li>
<li><a href="#betaapi_matrix">Beta API Matrix</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Client</h2>
<div id="toc-menu-client" class="flybar-menu">
<div class="tocMatrix">
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex
update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table></td>
</tr>
<tr class="alt">
<td><a href="#clients">Client</a></td>
<td>clients</td>
<td><a href="#clients_create">Create a Client</a></td>
<td><a href="#clients_list">List Clients</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}</td>
<td></td>
<td><a href="#clients_retrieve">Retrieve a Client</a></td>
<td><a href="#clients_update">Update a Client</a></td>
<td><a href="#clients_delete">Delete a Client</a></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}?command=activate</td>
<td><a href="#clients_activate">Activate a Client</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}?command=close</td>
<td><a href="#clients_close">Close a Client</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}?command=assignStaff</td>
<td><a href="#clients_assignStaff">Assign Staff</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}?command=unassignStaff</td>
<td><a href="#clients_unassignStaff">Unassign Staff</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}?command=proposeTransfer</td>
<td><a href="#clients_propose_transfer">Propose a Client Transfer</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}?command=withdrawTransfer</td>
<td><a href="#clients_withdraw_transfer">Withdraw Client Transfer Proposal</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}?command=acceptTransfer</td>
<td><a href="#clients_accept_transfer">Accept Client Transfer</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}?command=rejectTransfer</td>
<td><a href="#clients_reject_transfer">Reject Client Transfer</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}/accounts</td>
<td></td>
<td><a href="#clients_loansummary">Retrieve client accounts overview</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#client_identifiers">Client Identifiers</a></td>
<td>clients/{clientId}/identifiers</td>
<td><a href="#client_identifiers_create">Create an Identifier for a Client</a></td>
<td><a href="#client_identifiers_list">List all Identifiers for a Client</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}/identifiers/{identifierId}</td>
<td></td>
<td><a href="#client_identifiers_retrieve">Retrieve a Client Identifier</a></td>
<td><a href="#client_identifiers_update">Update a Client Identifier</a></td>
<td><a href="#client_identifiers_delete">Delete a Client Identifier</a></td>
</tr>
<tr class="alt">
<td><a href="#client_images">Client Images</a></td>
<td>clients/{clientId}/images</td>
<td><a href="#client_images_create">Upload an Image for a Client (as DATA URI)</a></td>
<td><a href="#client_images_retrieve">Get Client Image (DATA URI)</a></td>
<td><a href="#client_images_update">Update Client Image (DATA URI)</a></td>
<td><a href="#client_images_delete">Delete Client Image</a></td>
</tr>
<tr>
<td></td>
<td></td>
<td><a href="#client_images_create_form">
Upload an Image for a Client (Multi-part form data)</a>
</td>
<td><a href="#client_images_retrieve_binary">Get Client Image (Binary file)</a></td>
<td><a href="#client_images_update_form">
Update Client Image (Multi-part form data)</a>
</td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Loan</h2>
<div id="toc-menu-loan" class="flybar-menu">
<div class="tocMatrix">
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex
update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table></td>
</tr>
<tr class="alt">
<td><a href="#loans">Loans</a></td>
<td>loans?calculateLoanSchedule</td>
<td><a href="#loans_calculate">Calculate Loan Repayment Schedule</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans</td>
<td><a href="#loans_create">Submit a new Loan Application</a></td>
<td><a href="#loans_list">List Loans/Loan Applications</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}</td>
<td></td>
<td><a href="#loans_retrieve">Retrieve a Loan</a></td>
<td></td>
<td><a href="#loans_delete">Delete a Loan Application</a></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}?command=approve</td>
<td><a href="#loans_approve">Approve Loan Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}?command=undoApproval</td>
<td><a href="#loans_approve_undo">Undo Loan Application Approval</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}?command=reject</td>
<td><a href="#loans_reject">Reject Loan Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}?command=withdraw</td>
<td><a href="#loans_withdraw">Withdraw Loan Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}?command=disburse</td>
<td><a href="#loans_disburse">Disburse Loan</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}?command=undoDisbursal</td>
<td><a href="#loans_disburse_undo">Undo Loan Application Disbursal</a></td>
<td></td>
<td></td>
<td></td>
</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">
<td></td>
<td>loans/{loanId}/transactions?command=waiveInterest</td>
<td><a href="#loans_transaction_waiveinterest">Waive Interest</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}/transactions?command=writeoff</td>
<td><a href="#loans_transaction_write-off_loan">Write-off Loan</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}/transactions/{transactionId}</td>
<td></td>
<td><a href="#loans_transaction_retrieve">Retrieve a transactions details</a></td>
<td></td>
<td></td>
</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>
<td><a href="#collaterals">Loan Collateral</a></td>
<td>loans/{loanId}/collaterals</td>
<td><a href="#collaterals_create">Create a Collateral
</a></td>
<td><a href="#collaterals_list">List collaterals
</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}/collaterals/{collateralId}</td>
<td></td>
<td><a href="#collaterals_retrieve">Retrieve a Collateral</a></td>
<td><a href="#collaterals_update">Update a Collateral</a></td>
<td><a href="#collaterals_delete">Delete a Collateral</a></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Group</h2>
<div id="toc-menu-loan" class="flybar-menu">
<div class="tocMatrix">
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex
update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table></td>
</tr>
<tr class="alt">
<td><a href="#groups">Group</a></td>
<td>groups</td>
<td><a href="#groups_create">Create a Group</a></td>
<td><a href="#groups_list">List Groups</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>groups/template</td>
<td></td>
<td><a href="#groups_template">Retrieve Group Template</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>groups/{groupId}</td>
<td></td>
<td><a href="#groups_retrieve">Retrieve a Group</a></td>
<td><a href="#groups_update">Update a Group</a></td>
<td><a href="#groups_delete">Delete a Group</a></td>
</tr>
<tr>
<td></td>
<td>groups/{groupId}?command=activate</td>
<td><a href="#groups_activate">Activate a Group</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>groups/{groupId}?command=associateClients</td>
<td><a href="#groups_associate_clients">Associate Clients</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>groups/{groupId}?command=disassociateClients</td>
<td><a href="#groups_disassociate_clients">Disassociate Clients</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>groups/{groupId}/accounts</td>
<td></td>
<td><a href="#groups_accounts">Retrive Group accounts summary</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>groups/{groupId}?command=transferClients</td>
<td><a href="#groups_transfer_clients">Bulk Transfer Clients across Groups</a></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Accounting</h2>
<div id="toc-menu-accounting" class="flybar-menu">
<div class="tocMatrix">
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex
update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table></td>
</tr>
<tr class="alt">
<td><a href="#glaccounts">General Ledger Account</a></td>
<td>glaccounts</td>
<td><a href="#glaccounts_create">Create a New Ledger Account</a></td>
<td><a href="#glaccounts_list">List Ledger Accounts</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>glaccounts/{glaccountId}</td>
<td></td>
<td><a href="#glaccounts_retrieve">Retrieve a Ledger Account</a></td>
<td><a href="#glaccounts_update">Update a Ledger Account</a></td>
<td><a href="#glaccounts_delete">Delete a Ledger Account</a></td>
</tr>
<tr class="alt">
<td><a href="#glclosures">Accounting Closure</a></td>
<td>glclosures</td>
<td><a href="#glclosures_create">Create an Accounting Closure</a></td>
<td><a href="#glclosures_list">List Accounting Closures</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>glclosures/{glclosureId}</td>
<td></td>
<td><a href="#glclosures_retrieve">Retrieve an Accounting Closure</a></td>
<td><a href="#glclosures_update">Update an Accounting Closure</a></td>
<td><a href="#glclosures_delete">Delete an Accounting Closure</a></td>
</tr>
<tr class="alt">
<td><a href="#journalentries">Journal Entries</a></td>
<td>journalentries</td>
<td><a href="#journalentries_create">Create Journal Entries</a></td>
<td><a href="#journalentries_list">List Journal Entries</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>journalentries/{entryId}</td>
<td></td>
<td><a href="#journalentries_retrieve">Retrieve a single Entry</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>journalentries/{transactionId}/reversal</td>
<td><a href="#journalentries_reverse">Reverse Journal Entries</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#accountingrules">Accounting Rules</a></td>
<td>accountingrules</td>
<td><a href="#accountingrules_create">Create a Accounting Rule</a></td>
<td><a href="#accountingrules_list">List Accounting Rules</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>accountingrules/{accountingruleId}</td>
<td></td>
<td><a href="#accountingrules_retrieve">Retrieve a Accounting Rule</a></td>
<td><a href="#accountingrules_update">Update a Accounting Rule</a></td>
<td><a href="#accountingrules_delete">Delete a Accounting Rule</a></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Org</h2>
<div id="toc-menu-org" class="flybar-menu">
<div class="tocMatrix">
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex
update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table></td>
</tr>
<tr class="alt">
<td><a href="#offices">Office</a></td>
<td>offices</td>
<td><a href="#offices_create">Create an Office</a></td>
<td><a href="#offices_list">List Offices</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>offices/{officeId}</td>
<td></td>
<td><a href="#offices_retrieve">Retrieve an Office</a></td>
<td><a href="#offices_update">Update an Office</a></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#loanproducts">Loan Product</a></td>
<td>loanproducts</td>
<td><a href="#loanproducts_create">Create a Loan
Product</a></td>
<td><a href="#loanproducts_list">List Loan Products</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loanproducts/{productId}</td>
<td></td>
<td><a href="#loanproducts_retrieve">Retrieve a Loan
Product</a></td>
<td><a href="#loanproducts_update">Update a Loan
Product</a></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#configs">Currency</a></td>
<td>currencies</td>
<td></td>
<td><a href="#configs_currencyretrieve">Retrieve
Currency Configuration</a></td>
<td><a href="#configs_currencyupdate">Update Currency
Configuration</a></td>
<td></td>
</tr>
<tr>
<td><a href="#funds">Funds</a></td>
<td>funds</td>
<td><a href="#funds_create">Create a Fund</a></td>
<td><a href="#funds_retrieve">List Funds</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>funds/{fundId}</td>
<td></td>
<td><a href="#fund_retrieve">Retrieve a Fund</a></td>
<td><a href="#fund_update">Update a Fund</a></td>
<td></td>
</tr>
<tr>
<td><a href="#staff">Staff</a></td>
<td>staff</td>
<td><a href="#staff_create">Create a Staff Member</a></td>
<td><a href="#staff_list">List Staff</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>staff/{staffId}</td>
<td></td>
<td><a href="#staff_retrieve">Retrieve a Staff Member</a></td>
<td><a href="#staff_update">Update a Staff Member</a></td>
<td></td>
</tr>
<tr>
<td><a href="#charges">Charges</a></td>
<td>charges</td>
<td><a href="#charges_create">Create a Charge</a></td>
<td><a href="#charges_list">List Charges</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>charges/{chargeId}</td>
<td></td>
<td><a href="#charges_retrieve">Retrieve a Charge</a></td>
<td><a href="#charges_update">Update a Charge</a></td>
<td><a href="#charges_delete">Delete a Charge</a></td>
</tr>
<tr>
<td><a href="#loanproductmix">Loan Product Mix</a></td>
<td>loanproducts?associations=productMixes</td>
<td></td>
<td><a href="#loanproductmix_list">List Loan Products Mix</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loanproducts/{productId}/productmix</td>
<td><a href="#loanproductmix_create">Create a Loan Product Mix</a></td>
<td><a href="#loanproductmix_retrieve">Retrieve Loan Products Mix</a></td>
<td><a href="#loanproductmix_update">Update Loan Product Mix</a></td>
<td><a href="#loanproductmix_delete">Delete Loan Products Mix</a></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">User</h2>
<div id="toc-menu-user" class="flybar-menu">
<div class="tocMatrix">
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex
update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table></td>
</tr>
<tr>
<td><a href="#authentication">Authentication</a></td>
<td>authentication</td>
<td><a href="#authenticate_request">Verify Authentication</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#users">User</a></td>
<td>users</td>
<td><a href="#users_create">Create a User</a></td>
<td><a href="#users_list">List Users</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>users/{userId}</td>
<td></td>
<td><a href="#users_retrieve">Retrieve a User</a></td>
<td><a href="#users_update">Update a User</a></td>
<td><a href="#users_delete">Delete a User</a></td>
</tr>
<tr class="alt">
<td><a href="#roles">Role</a></td>
<td>roles</td>
<td><a href="#roles_create">Create a New Role</a></td>
<td><a href="#roles_list">List Roles</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>roles/{roleId}</td>
<td></td>
<td><a href="#roles_retrieve">Retrieve a Role</a></td>
<td><a href="#roles_update">Update a Role</a></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>roles/{roleId}/permissions</td>
<td></td>
<td><a href="#rolespermissions_retrieve">Retrieve a
Role's Permissions</a></td>
<td><a href="#rolespermissions_update">Update a Role's
Permissions</a></td>
<td></td>
</tr>
<tr>
<td><a href="#permissions">Permission</a></td>
<td>permissions</td>
<td></td>
<td><a href="#permissions_list">List Application Permissions</a></td>
<td><a href="#permissions_update">Enable/Disable Permissions for Maker Checker</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">System</h2>
<div id="toc-menu-system" class="flybar-menu">
<div class="tocMatrix">
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex
update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table></td>
</tr>
<tr class="alt">
<td><a href="#configs_global">Global Configuration</a></td>
<td>configurations</td>
<td></td>
<td><a href="#configs_globalconfig_retrieve">Retrieve
Global Configuration</a></td>
<td><a href="#configs_globalconfig_update">Update
Global Configuration</a></td>
<td></td>
</tr>
<tr>
<td><a href="#configs_codes">Codes</a></td>
<td>codes</td>
<td><a href="#configs_codes_create">Create a Code</a></td>
<td><a href="#configs_codes_retrieve">List Codes</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>codes/{codeId}</td>
<td></td>
<td><a href="#configs_code_retrieve">Retrieve a Code</a></td>
<td><a href="#configs_code_update">Update a Code</a></td>
<td><a href="#configs_code_delete">Delete a Code</a></td>
</tr>
<tr>
<td><a href="#configs_codes_codevalues">Code Values</a></td>
<td>codes/{codeId}/codevalues</td>
<td><a href="#configs_codes_codevalues_create">Create a Code Value</a></td>
<td><a href="#configs_codes_codevalues_list">List Code Values</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>codes/{codeId}/codevalues/{codevalueId}</td>
<td></td>
<td><a href="#configs_codes_codevalues_retrieve">Retrieve a Code Value</a></td>
<td><a href="#configs_codes_codevalues_update">Update a Code Value</a></td>
<td><a href="#configs_codes_codevalues_delete">Delete a Code Value</a></td>
</tr>
<tr>
<td><a href="#audits">Audits</a></td>
<td>audits</td>
<td></td>
<td><a href="#audits_list">List Audits</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>audits/{auditId}</td>
<td></td>
<td><a href="#audits_retrieve">Retrieve an Audit Entry</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#makercheckers">Makercheckers</a></td>
<td>makercheckers</td>
<td></td>
<td><a href="#makercheckers_list">List Maker Checker Entries</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>makercheckers/{auditId}</td>
<td></td>
<td></td>
<td></td>
<td><a href="#makercheckers_delete">Delete Maker Checker Entry</a></td>
</tr>
<tr>
<td></td>
<td>makercheckers/{auditId}?command=approve</td>
<td><a href="#makercheckers_approve">Approve Maker Checker Entry</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#scheduler_jobs">Scheduler jobs</a></td>
<td>jobs</td>
<td></td>
<td><a href="#scheduler_jobs_list">List Scheduler jobs</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>jobs/{jobId}</td>
<td></td>
<td><a href="#retrieve_scheduler_job">Retrieve a job</a></td>
<td><a href="#update_scheduler_job">Update a job</a></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>jobs/{jobId}?command=executeJob</td>
<td><a href="#run_job">Run a job</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>jobs/{jobid}/runhistory?offset=0&limit=200</td>
<td></td>
<td><a href="#retrieve_job_runhistory">Retrieve job history</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>scheduler</td>
<td></td>
<td><a href="#retrieve_scheduler_status">Retrieve scheduler status</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>scheduler?command=start</td>
<td><a href="#activate_scheduler">Activate a scheduler service</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>scheduler?command=stop</td>
<td><a href="#suspend_scheduler">Suspend a scheduler service</td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Non-Core</h2>
<div id="toc-menu-noncore" class="flybar-menu">
<div class="tocMatrix">
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex
update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table></td>
</tr>
<tr>
<td><a href="#datatables">Data Table</a></td>
<td>datatables</td>
<td><a href="#datatables_createTable">Create Data Table</a></td>
<td><a href="#datatables_list">List Data Tables</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>datatables/{datatable}</td>
<td></td>
<td><a href="#datatables_getTable">Retrieve Data Table Details</a></td>
<td><a href="#datatables_updateTable">Update Data Table</a></td>
<td><a href="#datatables_deleteTable">Delete Data Table</a></td>
</tr>
<tr class="alt">
<td></td>
<td>datatables/register/{datatable}/{apptable}</td>
<td><a href="#datatables_register">Register Data Table</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>datatables/deregister/{datatable}</td>
<td><a href="#datatables_deregister">Deregister Data
Table</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>datatables/{datatable}/{apptableId}</td>
<td><a href="#datatables_create">Create Entry in Data
Table</a></td>
<td><a href="#datatables_retrieve">Retrieve Entry(s)
from Data Table</a></td>
<td><a href="#datatables_update">Update Entry in Data
Table (One to One)</a></td>
<td><a href="#datatables_delete">Delete Entry(s) in
Data Table</a></td>
</tr>
<tr>
<td></td>
<td>datatables/{datatable}/{apptableId}/{datatableId}</td>
<td></td>
<td><a href="#datatables_update_1M">Update Entry in
Data Table (One to Many)</a></td>
<td></td>
<td><a href="#datatables_delete_1M">Delete Entry in
Data Table (One to Many)</a></td>
</tr>
<tr>
<td><a href="#notes">Notes</a></td>
<td>{resource}/{resourceId}/notes</td>
<td><a href="#resources_addnote">Add a Resource Note</td>
<td><a href="#resource_notelist">Retrieve a Resource's Notes</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>{resource}/{resourceId}/notes/{noteId}</td>
<td></td>
<td><a href="#resources_retrievenote">List All
Notes for a Resource</a></td>
<td><a href="#resources_updatenote">Update a Resource Note</a></td>
<td><a href="#resources_deletenote">Delete a Resource Note</a></td>
</tr>
<tr>
<td><a href="#documents">Documents</a></td>
<td>{entityType}/{entityId}/documents</td>
<td><a href="#documents_create">Create a Document</td>
<td><a href="#documents_list">List All Document Details</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>{entityType}/{entityId}/documents/{documentId}</td>
<td></td>
<td><a href="#documents_retrieve">Retrieve a Documents Details</a></td>
<td><a href="#documents_update">Update a Document</a></td>
<td><a href="#documents_delete">Delete a Document</a></td>
</tr>
<tr class="alt">
<td></td>
<td>{entityType}/{entityId}/documents/{documentId}/attachment</td>
<td></td>
<td><a href="#documents_retrieve_file">Retrieve
binary file associated with a
Document</a>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#search">Search</a></td>
<td>search</td>
<td></td>
<td><a href="#search_resource">Search Resources</td>
<td></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Report</h2>
<div id="toc-menu-report" class="flybar-menu">
<div class="tocMatrix">
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex
update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table></td>
</tr>
<tr>
<td><a href="#reports">Report</a></td>
<td>reports</td>
<td><a href="#reports_create">Create a Report</a></td>
<td><a href="#reports_list">List Reports</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>reports/{id}</td>
<td></td>
<td><a href="#reports_retrieve">Retrieve a Report</a></td>
<td><a href="#reports_update">Update a Report</a></td>
<td><a href="#reports_delete">Delete a Report</a></td>
</tr>
<tr>
<td><a href="#runreports">Run Report</a></td>
<td>runreports/{reportName}</td>
<td></td>
<td><a href="#report_run">Run a Report</a></td>
<td></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Template</h2>
<div id="toc-menu-template" class="flybar-menu">
<div class="tocMatrix">
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
</tr>
<tr class="alt">
<td>clients/template</td>
<td><a href="#clients_template">Retrieve Client Template</a></td>
</tr>
<tr class="alt">
<td>groups/template</td>
<td><a href="#groups_template">Retrieve Group Template</a></td>
</tr>
<tr >
<td>loanproducts/template</td>
<td><a href="#loanproducts_template">Retrieve Loan Product Template</a></td>
</tr>
<tr >
<td>loanproducts/template?isProductMixTemplate=true</td>
<td><a href="#loanproductmix_template">Retrieve Loan Product Mix Template</a></td>
</tr>
<tr class="alt">
<td>loans/template?clientId={clientId}</td>
<td><a href="#loans_template">Retrieve Loan Template</a></td>
</tr>
<tr>
<td>loans/{loanId}/transactions/template</td>
<td><a href="#loans_repaymenttemplate_etc">Retrieve Loan Transaction Template</a></td>
</tr>
<tr>
<td>offices/template</td>
<td><a href="#offices_template">Retrieve Office Template</a></td>
</tr>
<tr class="alt">
<td>users/template</td>
<td><a href="#users_template">Retrieve User Template</a></td>
</tr>
<tr>
<td>audits/searchtemplate</td>
<td><a href="#audits_searchtemplate">Retrieve Audit Search Template</a></td>
</tr>
<tr class="alt">
<td>makercheckers/searchtemplate</td>
<td><a href="#makercheckers_searchtemplate">Retrieve Maker Checker Search Template</a></td>
</tr>
<tr>
<td>reports/template</td>
<td><a href="#reports_template">Retrieve Report Template</a></td>
</tr>
<tr>
<td>accountingrules/template</td>
<td><a href="#accountingrules_template">Retrieve Accounting Rule Template</a></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div id="main-content-wrapper">
<a id="top" name="top" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Mifos X API Documentation</h3>
<p>Mifos X is a secure, multi-tenanted microfinance platform.</p>
<p>
The goal of the Mifos X API is to empower developers to build apps
on top of the Mifos X Platform. The <a
href="https://demo.openmf.org" target="_blank">reference app</a>
(username: mifos, password: password) works on the same demo
'tenant' as the interactive links in this documentation.
</p>
<p>
The API is organized around <a
href="http://en.wikipedia.org/wiki/Representational_State_Transfer"
target="_blank">REST</a>.
</p>
<p>
The API is designed to have: <br> - predictable,
resource-oriented URLs<br> - to use HTTP response codes to
indicate API errors<br> - to use built-in HTTP features, like
HTTP authentication and HTTP verbs, which can be understood by
off-the-shelf HTTP clients.
</p>
<p>
<a href="http://www.json.org/" target="_blank">JSON</a> is
returned in all responses from the API, including errors.
</p>
<p>
Much of the API presentation and design ideas are owed to the
excellent <a
href="http://info.apigee.com/Portals/62317/docs/web%20api.pdf"
target="_blank">Apigee "Web API Design" eBook/PDF</a> and the
very good <a href="https://stripe.com/docs/api" target="_blank">Stripe
API reference</a>.
</p>
</div>
</div>
<a id="interact" name="interact" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Try The API From Your Browser</h3>
<p>GET (read) examples can be run directly from this
documentation. It is just a matter of clicking a link. Most
browsers display the output on the same page (or another tab if
you right click and select that option). Internet Explorer will
probably treat the output as if you wanted to download a file. In
that case just elect to open the output in a text editor.</p>
<p>
If you want to check out the POST, PUT and DELETE (update)
examples a good approach is to take a moment to install a REST
plugin for your browser e.g. <a
href="https://addons.mozilla.org/en-US/firefox/addon/restclient/"
target="_blank">RESTClient</a> for FireFox
</p>
The REST plugins will allow you to
<ul>
<li class=normalli>Select the "Verb" (e.g. POST)</li>
<li class=normalli>Enter the resource name (e.g. offices)</li>
<li class=normalli>Add a header to indicate you are sending
JSON data as part of the request body (Content-Type:
application/json)</li>
<li class=normalli>Add a header to indicate your 'tenant'
(X-Mifos-Platform-TenantId: default)</li>
<li class=normalli>Paste the example JSON into a Request Body</li>
<li class=normalli>Send the Request (and receive a Response)</li>
</ul>
</div>
</div>
<a id="genopts" name="genopts" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Generic Options</h3>
<h4>Convenience Templates</h4>
<p>There are a list of convenience resources (see Template
menu option). These resources end with "/template" and can be
useful when building maintenance user interface screens for client
applications. The template data returned may consist of any or all
of:
<ul>
<li class=normalli>Field Defaults</li>
<li class=normalli>Allowed Value Lists</li>
</ul>
</p>
<p>
Also, many "Retrieve a" type resources (<a
href="#clients_retrieve">Retrieve a Client</a> for example) allow
the parameter option "template=true". This appends any "Allowed
Value Lists" which can be useful when building update
functionality.
</p>
<h4>Restrict Returned Fields</h4>
<p>Parameter "fields={fieldlist}" can be used on GET requests
to restrict the fields returned.</p>
<p>Normal Request:</p>
<div class=apiClickNotPretty>offices/1</div>
<p></p>
<p>Request (restricting fields returned):</p>
<div class=apiClick>offices/1?fields=id,name</div>
<p></p>
<h4>Pretty JSON Formatting</h4>
<p>Parameter "pretty=true" can be used to display JSON from GET
requests in an easy-to-read format. This parameter is used in this
documentation.</p>
<p>Easy-to-read JSON output for POSTs, PUTs and DELETEs will
available in the REST plugin you use e.g. RESTClient for FireFox</p>
<p>Normal Request (with pretty printing/formatting):</p>
<div class=apiClick>offices/1?pretty=true</div>
<p></p>
</div>
</div>
<a id="creates_and_updates" name="creates_and_updates"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Creating and Updating</h3>
<p>When you want to 'Create a ...' you have to at least supply
the mandatory fields. The mandatory fields are listed in this
documentation under the relevant 'Create a ...' heading.</p>
<p>When you want to 'Update a ...' you can update individual
fields or a combination of fields (subject to data integrity
rules).</p>
</div>
</div>
<a id="dates_and_numbers" name="dates_and_numbers"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Updating Dates and Numbers</h3>
<h4>Dates</h4>
<p>
Dates are returned in GET requests as an array e.g. [ 2007, 4,
11]. However, the API accepts them as strings in POST and PUT
requests. If there are any dates in your POST or PUT requests, you
need to provide the "locale" and "dateFormat". This can be any
date pattern supported by <a
href="http://joda-time.sourceforge.net/api-release/org/joda/time/format/DateTimeFormat.html">Joda-Time</a>.
This capability can help you when saving data in your client
application as you shouldn't need to do any date format conversion
prior to issuing your POST or PUT request.
</p>
<code>JSON examples:
{
"locale": "en_US",
"dateFormat": "dd MMMM yyyy",
"openingDate": "01 July 2007"
}
{
"locale": "en_US",
"dateFormat": "yyyy-MM-dd",
"openingDate": "2007-03-21"
}
</code>
<h4>Numbers</h4>
<p>You must provide a "locale" when updating numbers. Numbers
are not "Ids" or "Types" but are typically money amounts or
percentages that relate to loans. In any case, the API will send
back an error message if you forget.</p>
<code>JSON examples:
{
"locale": "en_US",
"principal": "240,400.88"
}
{
"locale": "fr_CH",
"principal": "240 400.88"
}
</code>
</div>
</div>
<a id="field_descriptions" name="field_descriptions"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Field Descriptions</h3>
<p>
Most fields are self-explanatory. Fields that aren't are described
under the relevant resource heading e.g. <a href="#authentication">AUTHENTICATION</a>
</p>
</div>
</div>
<a id="authentication_overview" name="authentication_overview"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Authentication Overview</h3>
<p>
Authentication to the API occurs via <a
href="http://en.wikipedia.org/wiki/Basic_access_authentication">HTTP
Basic Auth</a>.
</p>
<p>
The platform has been configured to reject plain HTTP requests and
to expect all API requests to be made over <a
href="http://en.wikipedia.org/wiki/HTTP_Secure">HTTPS</a>. All
requests must be authenticated.
</p>
</div>
<div class="method-example">
<code>
// A Javascript/Jquery example of how to login to Mifos X and use its api.
// Typically, the javascript application would
// 1) Display a login page to retrieve the username and password.
// 2) Send the username and password to a function
// such as setBasicAuthKey below which sets the HTTP Basic Auth key.
// 3) The HTTP Basic Auth key is used in all subsequent requests
// (see the function executeAjaxRequest below).
function setBasicAuthKey(username, password) {
var jqxhr = $.ajax({
url : "authentication?username=" + username + "&password=" + password,
type : 'POST',
contentType : "application/json; charset=utf-8",
dataType : 'json',
data : "{}",
cache : false,
success : function(data, textStatus, jqXHR) {
basicAuthKey = data.base64EncodedAuthenticationKey;
},
error : function(jqXHR, textStatus, errorThrown) {
//error processing
}
});
}
function executeAjaxRequest(url, verbType, jsonData, basicAuthKey, successFunction, errorFunction) {
var jqxhr = $.ajax({
url : url,
type : verbType, //POST, GET, PUT or DELETE
contentType : "application/json; charset=utf-8",
dataType : 'json',
data : jsonData,
cache : false,
beforeSend : function(xhr) {
xhr.setRequestHeader("Authorization", "Basic " + basicAuthKey);
},
success : successFunction,
error : errorFunction
});
}
</code>
</div>
</div>
<a id="errors" name="errors" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Errors</h3>
<p>All errors are returned in JSON.</p>
</div>
<div class="method-example">
<h6>HTTP Status Code Summary</h6>
<ul>
<li><strong>200</strong> OK - Everything Worked.</li>
<li><strong>400</strong> Bad Request - Invalid Parameter or
Data Integrity Issue.</li>
<li><strong>401</strong> Authentication Error.</li>
<li><strong>403</strong> Unauthorized Request.</li>
<li><strong>404</strong> Resource Not Found</li>
<li><strong>500</strong> Platform Internal Server Error.</li>
</ul>
</div>
<div class="method-example">
<code class="method-response">
<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/openMF/mifosx/wiki/HTTP-API-Error-codes",
"httpStatusCode": "400",
"defaultUserMessage": "Validation errors exist.",
"userMessageGlobalisationCode": "validation.msg.validation.errors.exist",
"errors": [
{
"developerMessage": "The parameter name cannot be blank.",
"defaultUserMessage": "The parameter name cannot be blank.",
"userMessageGlobalisationCode": "validation.msg.office.name.cannot.be.blank",
"parameterName": "name",
"value": null,
"args": []
},
{
"developerMessage": "The parameter openingDate cannot be blank.",
"defaultUserMessage": "The parameter openingDate cannot be blank.",
"userMessageGlobalisationCode": "validation.msg.office.openingDate.cannot.be.blank",
"parameterName": "openingDate", "value": null, "args": []
},
{
"developerMessage": "The parameter parentId cannot be blank.",
"defaultUserMessage": "The parameter parentId cannot be blank.",
"userMessageGlobalisationCode":
"validation.msg.office.parentId.cannot.be.blank", "parameterName":
"parentId", "value": null, "args": []
}
]
}
</code>
</div>
</div>
<!-- start of clients api docs -->
<a id="clients" name="clients" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Clients</h3>
<p>Clients are people and businesses that have applied (or may apply) to an MFI for loans.</p>
<p>Clients can be created in <b>Pending</b> or straight into <b>Active</b> state.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>accountNo</td>
</tr>
<tr>
<td class=fielddesc>If provided during client creation, its
value is set as account no. for client account, otherwise an
auto generated account no. is put in place based on the
configured strategy.</td>
</tr>
<tr class=alt>
<td>externalId</td>
</tr>
<tr>
<td class=fielddesc>A place to put an external reference for
this client e.g. The ID another system uses.<br> If
provided, it must be unique.
</td>
</tr>
<tr class=alt>
<td>active</td>
</tr>
<tr>
<td class=fielddesc>Indicates whether this client is to be created as <b>active</b> client. If active=true, then <b>activationDate</b> must be provided. If active=false, then the client is created as <b>pending</b>.
</td>
</tr>
<tr class=alt>
<td>activationDate</td>
</tr>
<tr>
<td class=fielddesc>The date on which the client became <b>active</b>.
</td>
</tr>
<tr class=alt>
<td>firstname</td>
</tr>
<tr>
<td class=fielddesc>Facility to break up name into parts
suitable for humans.</td>
</tr>
<tr class=alt>
<td>middlename</td>
</tr>
<tr>
<td class=fielddesc>Facility to break up name into parts
suitable for humans.</td>
</tr>
<tr class=alt>
<td>lastname</td>
</tr>
<tr>
<td class=fielddesc>Facility to break up name into parts
suitable for humans.</td>
</tr>
<tr class=alt>
<td>fullname</td>
</tr>
<tr>
<td class=fielddesc>Facility to set name of a client or
business that doesnt suit the firstname,middlename,lastname
structure.</td>
</tr>
<tr class=alt>
<td>staffId</td>
</tr>
<tr>
<td class=fielddesc>The staffId of the staff member dealing with the client office. The staff member is not specifically the loan officer.</td>
</tr>
</table>
</div>
</div>
<a id="clients_template" name="clients_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Client 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>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>officeId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dt>staffInSelectedOfficeOnly</dt>
<dd>
Boolean <span>optional</span>
</dd>
<dd>Defaults to false if not provided. If <strong>staffInSelectedOfficeOnly=true</strong> only staff
who are associated with the selected branch are returned.</dd>
<dt>commandParam</dt>
<dd>
String <span>optional</span>
</dd>
<dd>If <strong>commandParam=close</strong> retrieves all closureReasons which are associated with
<strong>"ClientClosureReason"</strong> value.</dd>
</dl>
<p>Example Request:</p>
<div class=apiClick>clients/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/template
</code>
<code class="method-response">
{
"activationDate": [
2013,
4,
17
],
"officeId": 1,
"officeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
]
}
</code>
</div>
</div>
<a id="clients_create" name="clients_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Client</h4>
<p>
<b>Note:</b> You can enter either:<br>
firstname/middlename/lastname - for a person (middlename is
optional) OR<br> fullname - for a business or organisation
(or person known by one name).<br>
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>firstname and lastname OR fullname,<br> officeId,<br> active=true and activationDate OR active=false,<br>
</td>
</tr>
</table>
<br />
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Optional Fields</div></td>
</tr>
<tr class=alt>
<td>groupId, externalId, accountNo, staffId</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/clients
</code>
<code class="method-request">
POST clients
Content-Type: application/json Request Body:
{
"officeId": 1,
"firstname": "Petra",
"lastname": "Yton",
"externalId": "786YYH7",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"active": true,
"activationDate": "04 March 2009"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 1
}
</code>
</div>
<div class="method-example">
<code class="method-request">
POST clients
Content-Type: application/json
Request Body:
{
"officeId": 1,
"fullname": "Client of group",
"groupId": 1,
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"active": true,
"activationDate": "04 March 2009"
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 1,
"clientId": 2,
"resourceId": 2
}
</code>
</div>
</div>
<a id="clients_activate" name="clients_activate" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Activate a Client</h4>
<p>Clients can be created in a <i>Pending</i> state. This API exists to enable client activation (for when a client becomes approved member of microfinance institue).</p>
<p>If the client happens to be alrady active this API will result in an error.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/clients/{clientId}?command=activate</code>
<code class="method-request">POST clients/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activationDate": "01 March 2011"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="clients_close" name="clients_close" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Close a Client</h4>
<p>Clients can be closed if they dont have any non-closed loans/savingsAccount. This API exists to close a client .</p>
<p>If the client have any corresponding active loans/savingsAccount this API will result in an error.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/clients/{clientId}?command=close</code>
<code class="method-request">POST clients/1?command=close
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closureDate":"25 June 2013",
"closureReasonId":"11"
}
</code>
<code class="method-response">
{
"clientId":15,
"resourceId":15
}
</code>
</div>
</div>
<a id="clients_assignStaff" name="clients_assignStaff" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Assign a Staff</h4>
<p>Allows you to assign <i>Staff</i> for existed Client.</p>
<p>The selected Staff member should be belongs to the client's office.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/clients/{clientId}?command=assignStaff</code>
<code class="method-request">POST clients/1?command=assignStaff
Content-Type: application/json
Request Body:
{
"staffId": "1"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 1,
"changes": {"staffId":1}
}
</code>
</div>
</div>
<a id="clients_unassignStaff" name="clients_unassignStaff" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Unassign a Staff</h4>
<p>Allows you to unassign the <i>Staff</i>.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/clients/{clientId}?command=unassignStaff</code>
<code class="method-request">POST clients/1?command=unassignStaff
Content-Type: application/json
Request Body:
{
"staffId":"1"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 1,
"changes": {"staffId":1}
}
</code>
</div>
</div>
<a id="clients_propose_transfer" name="clients_propose_transfer" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Propose a Client Transfer</h4>
<p>Allows you to propose the transfer of a <i>Client</i> to a different <i>Offices</i>.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/clients/{clientId}?command=proposeTransfer</code>
<code class="method-request">POST clients/1?command=proposeTransfer
Content-Type: application/json
Request Body:
{
"destinationOfficeId":"2",
"note":"Client Relocating to Bangalore"
}
</code>
<code class="method-response">
{
"clientId": 2,
"resourceId": 2
}
</code>
</div>
</div>
<a id="clients_withdraw_transfer" name="clients_withdraw_transfer" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Withdraw a Client Transfer</h4>
<p>Allows you to withdraw the proposed the transfer of a <i>Client</i> to a different <i>Offices</i>.</p>
<p>Withdrawal can happen only if the destination Branch (to which the transfer was
<a href="#clients_propose_transfer">proposed</a>) has not already
<a href="#clients_accept_transfer">accepted</a> the transfer proposal </p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/clients/{clientId}?command=withdrawTransfer</code>
<code class="method-request">POST clients/1?command=withdrawTransfer
Content-Type: application/json
Request Body:
{
"note":"Sorry, data entry error"
}
</code>
<code class="method-response">
{
"clientId": 2,
"resourceId": 2
}
</code>
</div>
</div>
<a id="clients_reject_transfer" name="clients_reject_transfer" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Reject a Client Transfer</h4>
<p>Allows the Destination Branch to reject the <a href="#clients_propose_transfer">proposed</a> Client Transfer.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/clients/{clientId}?command=rejectTransfer</code>
<code class="method-request">POST clients/1?command=rejectTransfer
Content-Type: application/json
Request Body:
{
"note":"We cannot accept tranfers of clients having loans with less than 1 repayment left"
}
</code>
<code class="method-response">
{
"clientId": 2,
"resourceId": 2
}
</code>
</div>
</div>
<a id="clients_accept_transfer" name="clients_accept_transfer" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Reject a Client Transfer</h4>
<p>Allows the Destination Branch to accept the <a href="#clients_propose_transfer">proposed</a> Client Transfer.</p>
<p>The destination branch may also choose to link this client to a group (in which case, any existing active JLG loan of the client is rescheduled to match the meeting frequency of the group) and loan Officer at the time of accepting
the transfer</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/clients/{clientId}?command=acceptTransfer</code>
<code class="method-request">POST clients/1?command=acceptTransfer
Content-Type: application/json
Request Body:
{
"destinationGroupId":"13",
"staffId":"1",
"note":"Due Diligence done and all documents received"
}
</code>
<code class="method-response">
{
"clientId": 2,
"resourceId": 2
}
</code>
</div>
</div>
<a id="clients_retrieve" name="clients_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Client</h4>
<p>Example Requests:</p>
<div class=apiClick>clients/1</div>
<br>
<br>
<div class=apiClick>clients/1?template=true</div>
<br>
<br>
<div class=apiClick>clients/1?fields=id,displayName,officeName</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/{clientId}
</code>
<code class="method-response">
{
"id": 2,
"accountNo": "000000002",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"activationDate": [
2009,
3,
4
],
"fullname": "Client of group",
"displayName": "Client of group",
"officeId": 1,
"officeName": "Head Office",
"groups": [
{
"id": 1,
"name": "Example Group"
}
]
}
</code>
</div>
</div>
<a id="client_list" name="clients_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Clients</h4>
<p>The <i>list</i> capability of clients can support <b>pagination</b> and <b>sorting</b>.</p>
<h5>Optional Arguments</h5>
<dl class="argument-list">
<dt>offset</dt>
<dd>
Integer <span>optional</span>, defaults to 0
</dd>
<dd>Indicates from what result to start from.</dd>
<dt>limit</dt>
<dd>
Integer <span>optional</span>, defaults to 200
</dd>
<dd>Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1</dd>
<dt>orderBy</dt>
<dd>
String <span>optional</span>, one of <span>displayName, accountNo, officeId, officeName</span>
</dd>
<dd>Orders the results by the field indicated.</dd>
<dt>sortBy</dt>
<dd>
String <span>optional</span>, one of <span>ASC, DESC</span>
</dd>
<dd>Indicates what way to order results if <i>orderBy</i> is used.</dd>
<dt>officeId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dd>Provides ability to restrict list of clients returned based on the office there associated with.</dd>
<dt>underHierarchy</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use the office hierarchy string to return all clients under a given hierarchy.</dd>
<dt>displayName</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use displayName of clients to restrict results.</dd>
<dt>firstName</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use firstName of clients to restrict results.</dd>
<dt>lastName</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use lastName of clients to restrict results.</dd>
<dt>externalId</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use externalId of clients to restrict results.</dd>
<dt>sqlSearch</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use an sql fragment valid for the underlying client schema to filter results. e.g. display_name like %K%</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>clients</div>
<br>
<div class=apiClick>clients?fields=displayName,officeName,joinedDate</div>
<br>
<div class=apiClick>clients?offset=10&limit=50</div>
<br>
<div class=apiClick>clients?orderBy=displayName,sortOrder=DESC</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients
</code>
<code class="method-response">
{
"totalFilteredRecords": 2,
"pageItems": [
{
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2013,
3,
1
],
"fullname": "Small shop",
"displayName": "Small shop",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 2,
"accountNo": "000000002",
"status": {
"id": 100,
"code": "clientStatusType.pending",
"value": "Pending"
},
"active": false,
"fullname": "Home Farm Produce",
"displayName": "Home Farm Produce",
"officeId": 1,
"officeName": "Head Office"
}
]
}
</code>
</div>
</div>
<a id="clients_update" name="clients_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Client</h4>
<p><b>Note:</b>You can update any of the basic attributes of a client using this API but not its associations.</p>
<p>Chaning the relationship between a client and its office is not supported through this API. An API specific to handling <b>transfers</b> of clients between offices will be introduced for this.</p>
<p>The relationship between a client and a group must be removed through the <b>Groups</b> API.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/clients/{clientId}
</code>
<code class="method-request">
PUT clients/1
Content-Type: application/json
Request Body:
{
"externalId": "786444UUUYYH7"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 1,
"changes": {
"externalId": "786444UUUYYH7"
}
}
</code>
</div>
</div>
<a id="clients_delete" name="clients_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Client</h4>
<p>If a client is in <i>Pending</i> state you are allowed to <b>Delete</b> it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with it, you cannot delete the client but you may <b>Close</b> the client if they have died or exited the program.</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/clients/{clientId}
</code>
<code class="method-request">
DELETE clients/3
Content-Type: application/json
Request Body:
{
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 3,
"resourceId": 3
}
</code>
</div>
</div>
<a id="clients_loansummary" name="clients_loansummary" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve client accounts overview</h4>
<p>
An example of how a loan portfolio summary can be provided. This
is requested in a specific use case of the reference application.<br> It is quite reasonable to add resources like this to simplify User Interface development.
</p>
<p>Example Requests:</p>
<div class=apiClick>clients/1/accounts</div>
<br>
<br>
<div class=apiClick>clients/1/accounts?fields=loanAccounts,savingsAccounts</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/{clientId}/accounts
</code>
<code class="method-response">
{
"loanAccounts": [
{
"id": 1,
"accountNo": "000000001",
"externalId": "456",
"productId": 1,
"productName": "TestOne",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"loanType": {
"id": 1,
"code": "loanType.individual",
"value": "Individual"
},
"loanCycle": 1
}
],
"savingsAccounts": [
{
"id": 7,
"accountNo": "000000007",
"productId": 2,
"productName": "Other product",
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 6,
"accountNo": "000000006",
"productId": 1,
"productName": "Passbook Savings",
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 1828.03
},
{
"id": 5,
"accountNo": "000000005",
"productId": 1,
"productName": "Passbook Savings",
"status": {
"id": 400,
"code": "savingsAccountStatusType.withdrawn.by.applicant",
"value": "Withdrawn by applicant",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": true,
"active": false,
"closed": true
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
]
}
</code>
</div>
</div>
<!-- start of client Identifiers API docs-->
<a id="client_identifiers" name="client_identifiers" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Client Identifiers</h3>
<p>Client Identifiers refer to documents that are
used to uniquely identify a customer <br/>
Ex: Drivers License, Passport, Ration card etc
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>documentKey</td>
</tr>
<tr>
<td class=fielddesc>Number/String used to uniquely identify a particular
document (Driving License number for a driving license etc)</td>
</tr>
<tr class=alt>
<td>documentType</td>
</tr>
<tr>
<td class=fielddesc>Type of the identification document
(License, Passport Etc)</td>
</tr>
<tr class=alt>
<td>description</td>
</tr>
<tr>
<td class=fielddesc>Any user comments to be associated
with the Client Identifier</td>
</tr>
</table>
</div>
</div>
<a id="client_identifiers_list" name="client_identifiers_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List all Identifiers for a Client</h4>
<p>Example Requests:</p>
<div class=apiClick>clients/1/identifiers</div>
<br>
<br>
<div class=apiClick>clients/1/identifiers?fields=documentKey,documentType,description</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/{clientId}/identifiers
</code>
<code class="method-response">
[
{
"id": 2,
"clientId": 1,
"documentType": {
"id": 3,
"name": "Drivers License"
},
"documentKey": "12345",
"description": "Issued in the year 2--7"
}
]
</code>
</div>
</div>
<a id="client_identifiers_template" name="client_identifiers_template"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Client Identifier 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>clients/1/identifiers/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/{clientId}/identifiers/template
</code>
<code class="method-response">
{
"allowedDocumentTypes": [
{
"id": 1,
"name": "Passport",
"position": 0
},
{
"id": 2,
"name": "Id",
"position": 0
},
{
"id": 3,
"name": "Drivers License",
"position": 0
},
{
"id": 4,
"name": "Any Other Id Type",
"position": 0
}
]
}
</code>
</div>
</div>
<a id="client_identifiers_retrieve" name="client_identifiers_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Client Identifier</h4>
<p>Example Requests:</p>
<div class=apiClick>clients/1/identifier/2</div>
<br>
<br>
<div class=apiClick>clients/1/identifier/2?template=true</div>
<br>
<br>
<div class=apiClick>clients/1/identifiers/2?fields=documentKey,documentType,description</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId}
</code>
<code class="method-response">
{
"id": 2,
"clientId": 1,
"documentType": {
"id": 3,
"name": "Drivers License"
},
"documentKey": "12345",
"description": "Issued in 2007"
}
</code>
</div>
</div>
<a id="client_identifiers_create" name="client_identifiers_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create an Identifier for a Client</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>documentKey, documentTypeId
</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/clients/{clientId}/identifiers
</code>
<code class="method-request">
POST clients/1/identifiers
Content-Type: application/json
Request Body:
{
"documentTypeId":"1",
"documentKey":"KA-54677",
"description":"Document has been verified"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 3
}
</code>
</div>
</div>
<a id="client_identifiers_update" name="client_identifiers_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Client Identifier</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId}
</code>
<code class="method-request">
PUT clients/1/identifiers/3
Content-Type: application/json
Request Body:
{
"documentTypeId":"4",
"documentKey":"KA-94667",
"description":"Document has been updated"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 3,
"changes": {
"documentTypeId": 4,
"documentKey": "KA-94667",
"description": "Document has been updated"
}
}
</code>
</div>
</div>
<a id="client_identifiers_delete" name="client_identifiers_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Client Identifier</h4>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId}
</code>
<code class="method-request">
DELETE clients/1/identifiers/3
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 3
}
</code>
</div>
</div>
<!-- start of Client Images API docs-->
<a id="client_images" name="client_images" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Client Images</h3>
<p>The current API provides support for the addition of a single
image for a Client<br/>
Allowed formats: JPEG (.jpg or .jpeg), GIF (.gif) and PNG (.png)
</p>
<p> The API supports two different Approaches for manipulating Client Images
<ul>
<li><a href="http://en.wikipedia.org/wiki/Data_URI_scheme" target="_blank"> Data URI's: </a>
For easier manipulation by Javascript clients etc in supported Browsers.
</li>
<li><a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2">
Multi-part form data:</a>
Images can be uploaded using Multi part forms and downloaded as regular binary files
</li>
<br/>
</div>
</div>
<a id="client_images_retrieve" name="client_images_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Get Client Image (DATA URI)</h4>
<p>Example Requests:</p>
<div class=apiClick>clients/1/images</div>
<br>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/{clientId}/images
</code>
<code class="method-response">
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
bWFnZVJlYWR5ccllPAAAAJ1JREFUeNpi+P//PwMIA4E9EG8E4idQDGLbw+WhiiqA+D8OXAFVAzbp
DxBvB2JLIGaGYkuoGEjOhhFIHAbij0BdPgxYACMj42ogJQpifwBiXSDeC8JIbt4LxSC5DyxQjTeB
+BeaYb+Q5EBOAVutCzMJHUNNPADzzDokiYdAfAmJvwLkGeTgWQfyKZICS6hYBTwc0QL8ORSjBDhA
gAEAOg13B6R/SAgAAAAASUVORK5CYII=
</code>
</div>
</div>
<a id="client_images_retrieve_binary" name="client_images_retrieve_binary"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Get Client Image (Binary file)</h4>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/{clientId}/images
</code>
<code class="method-request">
POST clients/1/images
Accept: application/octet-stream
</code>
<code class="method-response">
<i>Not shown</i>: The corresponding binary (image) file
</code>
</div>
</div>
<a id="client_images_create" name="client_images_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Upload an Image for a Client (Data URI)</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/clients/{clientId}/images
</code>
<code class="method-request">
POST clients/1/images
Content-Type: text/plain
Request Body:
data:image/png;base64,iVBORw0KGgoAA
AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l
EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6
P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
</code>
</div>
</div>
<a id="client_images_create_form" name="client_images_create_form" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Upload an Image for a Client (Multi-part Form data)</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>file
</td>
</tr>
</table>
<p>
The form should contain a required named body part with the
name "file". <br/> <br/>
If you are using a HTML form, a snippet like
<small> &lt;input type="file" name="file"&gt;&lt;/input&gt; </small>
can be used for uploading the image file
</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/clients/{clientId}/images
</code>
<code class="method-request">
POST clients/1/images
Content-Type: multipart/form-data
Request Body: <i>Not shown</i>
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
</code>
</div>
</div>
<a id="client_images_update" name="client_images_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Client Image (Data URI)</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/clients/{clientId}/images
</code>
<code class="method-request">
PUT clients/1/images
Content-Type: text/plain
Request Body:
data:image/png;base64,iVBORw0KGgoAA
AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l
EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6
P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
</code>
</div>
</div>
<a id="client_images_update_form" name="client_images_update_form" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Client Image (Multi-part Form data)</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>file
</td>
</tr>
</table>
<p>
The form should contain a required named body part with the
name "file". <br/> <br/>
If you are using a HTML form, a snippet like
<small> &lt;input type="file" name="file"&gt;&lt;/input&gt; </small>
can be used for uploading the image file
</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/clients/{clientId}/images
</code>
<code class="method-request">
PUT clients/1/images
Content-Type: multipart/form-data
Request Body: <i>Not shown</i>
</code>
</div>
</div>
<a id="client_images_delete" name="client_images_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Client Image</h4>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/clients/{clientId}/images
</code>
<code class="method-request">
DELETE clients/1/images
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
</code>
</div>
</div>
<!-- Start of Administrative Units API-->
<a id="centers" name="centers" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Centers</h3>
<p><b>Centers</b> along with <b>Groups</b> are used to provided a distinctive banking distribution channel used in microfinance. Its common in areas such as India to use Centers and Group administrative units in <b>grameen style lending</b>. Typically groups will contain one to five people and centers themselves will be made of anywhere between 2-7 groups.
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>externalId</td>
</tr>
<tr>
<td class=fielddesc>A place to put an external reference for this center e.g. The ID another system uses. If provided, it must be unique.
</td>
</tr>
<tr class=alt>
<td>name</td>
</tr>
<tr>
<td class=fielddesc>Name given to the Center.</td>
</tr>
<tr class=alt>
<td>active</td>
</tr>
<tr>
<td class=fielddesc>Indicates whether this center is to be created as <b>active</b>. If active=true, then <b>activationDate</b> must be provided. If active=false, then the center is created as <b>pending</b>.
</td>
</tr>
<tr class=alt>
<td>activationDate</td>
</tr>
<tr>
<td class=fielddesc>The date on which the center became <b>active</b>.
</td>
</tr>
<tr class=alt>
<td>officeId</td>
</tr>
<tr>
<td class=fielddesc>The officeId of the office/branch this center is administrated through.</td>
</tr>
<tr class=alt>
<td>staffId</td>
</tr>
<tr>
<td class=fielddesc>The staffId of the staff member dealing with this center. The staff member is not specifically the loan officer.</td>
</tr>
<tr class=alt>
<td>groupMembers</td>
</tr>
<tr>
<td class=fielddesc>The array of groupIds to indicate what groups are part of this center.</td>
</tr>
</table>
</div>
</div>
<a id="centers_template" name="centers_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Center Template</h4>
<p>Example Requests:</p>
<div class=apiClick>centers/template</div>
<br/>
<div class=apiClick>centers/template?officeId=2</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/centers/template
</code>
<code class="method-response">
{
"active": false,
"activationDate": [
2013,
4,
18
],
"officeId": 1,
"officeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
},
{
"id": 2,
"name": "Branch Office 1",
"nameDecorated": "....Branch Office 1"
}
],
"staffOptions": [
{
"id": 1,
"displayName": "C, Mike"
}
],
"groupMembersOptions": [
{
"id": 1,
"name": "First Group",
"externalId": "000-1A",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".1."
},
{
"id": 2,
"name": "Pending Group",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".2."
}
]
}
</code>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/centers/template?officeId=2
</code>
<code class="method-response">
{
"active": false,
"activationDate": [
2013,
4,
18
],
"officeId": 2,
"officeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
},
{
"id": 2,
"name": "Branch Office 1",
"nameDecorated": "....Branch Office 1"
}
],
"staffOptions": [
{
"id": 2,
"displayName": "D, Mary"
},
{
"id": 3,
"displayName": "P, Paul"
}
]
}
</code>
</div>
</div>
<a id="centers_create" name="centers_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Center</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>name, officeId, active, activationDate (if active=true)</td>
</tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Optional Fields</div></td>
</tr>
<tr class=alt>
<td>externalId, staffId, groupMembers</td>
</tr>
</table>
</div>
<div class="method-example">
<p>Creater a center as pending with no association to groupMembers.</p>
<code class="method-declaration">
POST https://DomainName/mifosng-provider/api/v1/centers
</code>
<code class="method-request">
POST centers
Content-Type: application/json Request Body:
{
"name": "First Center (No groups)",
"officeId": 1,
"active": false
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 8,
"resourceId": 8
}
</code>
</div>
<div class="method-example">
<p>Creater a center as active with no association to groupMembers.</p>
<code class="method-declaration">
POST https://DomainName/mifosng-provider/api/v1/centers
</code>
<code class="method-request">
POST centers
Content-Type: application/json Request Body:
{
"name": "centerwithgroup",
"officeId": 1,
"groupMembers": ["7"],
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"active": true,
"activationDate": "01 March 2011"
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 9,
"resourceId": 9
}
</code>
</div>
</div>
<a id="centers_activate" name="centers_activate" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Activate a Center</h2>
<p>Centers can be created in a <i>Pending</i> state. This API exists to enable center activation.</p>
<p>If the center happens to be already active this API will result in an error.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/centers/{centerId}?command=activate</code>
<code class="method-request">POST centers/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activationDate": "01 March 2011"
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="centers_update" name="centers_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Center</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/mifosng-provider/api/v1/centers/{centerId}
</code>
<code class="method-request">
PUT centers/8
Content-Type: application/json
Request Body:
{
"name": "First Center (No groups)",
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 8,
"resourceId": 8,
"changes": {
"name": "First Center (No groups) - modified"
}
}
</code>
</div>
</div>
<a id="centers_delete" name="centers_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Center</h4>
<p>A center can be delete if it is in <i>pending</i> state and has nothing associated with it - groups, loans, savings etc</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/mifosng-provider/api/v1/centers/{centerId}
</code>
<code class="method-request">
DELETE centers/8
</code>
<code class="method-response">
{
"resourceId":1,
"changes":{}
}
</code>
</div>
</div>
<a id="centers_retrieve" name="centers_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Center</h4>
<p>Example Requests:</p>
<div class=apiClick>centers/1</div>
<br/>
<div class=apiClick>centers/1?associations=groupMembers</div>
</div>
<div class="method-example">
<p>Retrieve an existing center with no groups information.</p>
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/centers/8
</code>
<code class="method-response">
{
"id": 8,
"status": {
"id": 100,
"code": "groupingStatusType.pending",
"value": "Pending"
},
"active": false,
"name": "First Center (No groups)",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".8."
}
</code>
</div>
<div class="method-example">
<p>Retrieve an existing center with no groups information.</p>
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/centers/9?associations=groupMembers
</code>
<code class="method-response">
{
"id": 9,
"status": {
"id": 300,
"code": "groupingStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2011,
3,
1
],
"name": "centerwithgroup",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".9.",
"groupMembers": [
{
"id": 7,
"name": "Othergroup",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".7."
}
]
}
</code>
</div>
</div>
<a id="centers_list" name="centers_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Centers</h4>
<p>The <i>list</i> capability of centers can support <b>pagination</b> and <b>sorting</b>.</p>
<h5>Optional Arguments</h5>
<dl class="argument-list">
<dt>offset</dt>
<dd>
Integer <span>optional</span>, defaults to 0
</dd>
<dd>Indicates from what result to start from.</dd>
<dt>limit</dt>
<dd>
Integer <span>optional</span>, defaults to 200
</dd>
<dd>Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1</dd>
<dt>orderBy</dt>
<dd>
String <span>optional</span>, one of <span>displayName, accountNo, officeId, officeName</span>
</dd>
<dd>Orders the results by the field indicated.</dd>
<dt>sortBy</dt>
<dd>
String <span>optional</span>, one of <span>ASC, DESC</span>
</dd>
<dd>Indicates what way to order results if <i>orderBy</i> is used.</dd>
<dt>officeId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dd>Provides ability to restrict list of centers returned based on the office there associated with.</dd>
<dt>underHierarchy</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use the office hierarchy string to return all centers under a given hierarchy.</dd>
<dt>name</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use name of centers to restrict results.</dd>
<dt>externalId</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use externalId of center to restrict results.</dd>
<dt>sqlSearch</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use an sql fragment valid for the underlying center schema to filter results. e.g. display_name like %K%</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>centers</div>
<br>
<div class=apiClick>centers?fields=name,officeName,joinedDate</div>
<br>
<div class=apiClick>centers?offset=10&limit=50</div>
<br>
<div class=apiClick>centers?orderBy=name,sortOrder=DESC</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/centers
</code>
<code class="method-response">
{
"totalFilteredRecords": 2,
"pageItems": [
{
"id": 2,
"status": {
"id": 100,
"code": "groupingStatusType.pending",
"value": "Pending"
},
"active": false,
"name": "Center 1",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".2."
},
{
"id": 3,
"status": {
"id": 100,
"code": "groupingStatusType.pending",
"value": "Pending"
},
"active": false,
"name": "Center 2",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".3."
}
]
}
</code>
</div>
</div>
<!-- End of Centers API-->
<!-- start of Groups api docs -->
<a id="groups" name="groups" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Groups</h3>
<p><b>Groups</b> are used to provide a distinctive banking distribution channel used in microfinance throughout the world. The Group is an administrative unit. It can contain as few as 5 people or as many as 40 depending on how its used.</p>
<p>Different styles of group lending - Joint-Liability Group, Grameen Model (Center-Group), Self-Help Groups, Village/Communal Banks)</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 given to the Group.</td>
</tr>
<tr class=alt>
<td>externalId</td>
</tr>
<tr>
<td class=fielddesc>A place to put an external reference for this group e.g. The ID another system uses. If provided, it must be unique.
</td>
</tr>
<tr class=alt>
<td>officeId</td>
</tr>
<tr>
<td class=fielddesc>The officeId of the office/branch this group is administrated through.</td>
</tr>
<tr class=alt>
<td>active</td>
</tr>
<tr>
<td class=fielddesc>Indicates whether this group is to be created as <b>active</b>. If active=true, then <b>activationDate</b> must be provided. If active=false, then the group is created as <b>pending</b>.
</td>
</tr>
<tr class=alt>
<td>activationDate</td>
</tr>
<tr>
<td class=fielddesc>The date on which the group became <b>active</b>.
</td>
</tr>
<tr class=alt>
<td>staffId</td>
</tr>
<tr>
<td class=fielddesc>The staffId of the staff member dealing with this group. The staff member is not specifically the loan officer. The staff member must be assigned to the same office as this group.</td>
</tr>
<tr class=alt>
<td>clientMembers</td>
</tr>
<tr>
<td class=fielddesc>The individual client members that make up the group. The clients must be assigned to the same office as this group.</td>
</tr>
</table>
</div>
</div>
<a id="groups_template" name="groups_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Group 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>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>officeId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dt>centerId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dt>staffInSelectedOfficeOnly</dt>
<dd>
Boolean <span>optional</span>
</dd>
<dd>Defaults to false if not provided. If <strong>staffInSelectedOfficeOnly=true</strong> only staff
who are associated with the selected branch are returned.</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>groups/template</div>
<br/>
<div class=apiClick>groups/template?officeId=2</div>
<br/>
<div class=apiClick>groups/template?centerId=1</div>
<br/>
<div class=apiClick>groups/template?centerId=1&staffInSelectedOfficeOnly=true</div>
<br/>
</div>
<div class="method-example">
<p>Template to create a standard group</p>
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/groups/template
</code>
<code class="method-response">
{
"officeId": 1,
"officeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
},
{
"id": 2,
"name": "Branch Office 1",
"nameDecorated": "....Branch Office 1"
}
],
"staffOptions": [
{
"id": 1,
"displayName": "C, Mike"
}
],
"clientOptions": [
{
"id": 1,
"displayName": "Petra Yton",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 2,
"displayName": "Small shop business",
"officeId": 1,
"officeName": "Head Office"
}
]
}
</code>
</div>
<div class="method-example">
<p>Template to create a standard group with specific office known. This will return only staffOptions and clientMembersOptions relevant for the chosen office.</p>
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/groups/template?officeId=2
</code>
<code class="method-response">
{
"officeId": 2,
"officeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
},
{
"id": 2,
"name": "Branch Office 1",
"nameDecorated": "....Branch Office 1"
}
],
"staffOptions": [
{
"id": 2,
"displayName": "D, Mary"
},
{
"id": 3,
"displayName": "P, Paul"
}
]
}
</code>
</div>
<div class="method-example">
<p>Template to create a group for an existing center. As an existing center will be assigned to an office, this will return only staffOptions and clientMembersOptions relevant for the chosen center/office.</p>
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/groups/template?centerId=1
</code>
<code class="method-response">
</code>
</div>
</div>
<a id="groups_create" name="groups_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Group</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>name, officeId, active, activationDate (if active=true)</td>
</tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Optional Fields</div></td>
</tr>
<tr class=alt>
<td>externalId,staffId,clientMembers</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/mifosng-provider/api/v1/groups
</code>
<code class="method-request">
POST groups
Content-Type: application/json Request Body:
{
"officeId":"1",
"name":"Pending Group",
"active": false
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 2,
"resourceId": 2
}
</code>
<code class="method-request">
POST groups
Content-Type: application/json Request Body:
{
"officeId":"1",
"name":"First Group",
"externalId": "000-1A",
"clientMembers": ["1"],
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"active": true,
"activationDate": "04 March 2009"
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="groups_activate" name="groups_activate" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Activate a Group</h2>
<p>Groups can be created in a <i>Pending</i> state. This API exists to enable group activation.</p>
<p>If the group happens to be already active this API will result in an error.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/groups/{groupId}?command=activate</code>
<code class="method-request">POST groups/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activationDate": "01 March 2011"
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="groups_associate_clients" name="groups_associate_clients" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Associate Clients</h2>
<p>This API allows to associate existing clients to a group.</p>
<p>The clients are listed from the office to which the group is associated.</p>
<p>If client(s) is already associated with group then API will result in an error.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/groups/{groupId}?command=associateClients</code>
<code class="method-request">POST groups/1?command=associateClients
Content-Type: application/json
Request Body:
{
"clientMembers":[1,2]
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"clientMembers": [1,2]
}
</code>
</div>
</div>
<a id="groups_disassociate_clients" name="groups_disassociate_clients" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Disassociate Clients</h2>
<p>This API allows to disassociate clients from a group.</p>
<p>Disassociating a client with group loans results in an error.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/groups/{groupId}?command=disassociateClients</code>
<code class="method-request">POST groups/1?command=disassociateClients
Content-Type: application/json
Request Body:
{
"clientMembers":[1,2]
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"clientMembers": [1,2]
}
</code>
</div>
</div>
<a id="groups_associate_clients" name="groups_associate_clients" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Associate Clients</h2>
<p>This API allows to associate existing clients to a group.</p>
<p>The clients are listed from the office to which the group is associated.</p>
<p>If client(s) is already associated with group then API will result in an error.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/groups/{groupId}?command=associateClients</code>
<code class="method-request">POST groups/1?command=associateClients
Content-Type: application/json
Request Body:
{
"clientMembers":[1,2]
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"clientMembers": [1,2]
}
</code>
</div>
</div>
<a id="groups_transfer_clients" name="groups_transfer_clients" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Transfer Clients across groups</h2>
<p>This API allows to transfer clients from one group to another</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>destinationGroupId</td>
</tr>
<tr>
<td class=fielddesc>The identifier of the group to which the clients are to be transferred (
has to be in the same branch as the source Group).</td>
</tr>
<tr class=alt>
<td>clients</td>
</tr>
<tr>
<td class=fielddesc>Identifiers of all clients who need to be transferred
</td>
</tr>
<tr class=alt>
<td>inheritDestinationGroupLoanOfficer</td>
</tr>
<tr>
<td class=fielddesc>Flag specifies if the transferred clients (and all their active loans)
should be linked to the assigned loan officer for the group
</td>
</tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>destinationGroupId, clients</td>
</tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Optional Fields</div></td>
</tr>
<tr class=alt>
<td>inheritDestinationGroupLoanOfficer (defaults to true), transferActiveLoans (defaults to true)</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/groups/{groupId}?command=transferClients</code>
<code class="method-request">POST groups/1?command=transferClients
Content-Type: application/json
Request Body:
{
destinationGroupId:2,
clients:[{id:1}]
}
</code>
<code class="method-response">
{
"resourceId": 1
}
</code>
</div>
</div>
<a id="groups_retrieve" name="groups_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Group</h4>
<p>Example Requests:</p>
<div class=apiClick>groups/1</div>
<br/>
<div class=apiClick>groups/1?associations=clientMembers</div>
</div>
<div class="method-example">
<p>Group with no clientMembers information requested.</p>
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/groups/1
</code>
<code class="method-response">
{
"id": 1,
"name": "First Group",
"externalId": "000-1A",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".1."
}
</code>
</div>
<div class="method-example">
<p>Group with clientMembers.</p>
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/groups/1?associations=clientMembers
</code>
<code class="method-response">
{
"id": 1,
"name": "First Group",
"externalId": "000-1A",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".1.",
"clientMembers": [
{
"id": 1,
"accountNo": "000000001",
"externalId": "786YYH7",
"activationDate": [
2009,
3,
4
],
"firstname": "Petra",
"lastname": "Yton",
"displayName": "Petra Yton",
"officeId": 1,
"officeName": "Head Office"
}
]
}
</code>
</div>
</div>
<!--Start of Group account summary -->
<a id="groups_accounts" name="groups_accounts" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Group accounts overview</h4>
<p>
An example of how a loan portfolio summary can be provided. This
is requested in a specific use case of the reference application.<br> It is quite reasonable to add resources like this to simplify User Interface development.
</p>
<p>Example Requests:</p>
<div class=apiClick>groups/1/accounts</div>
<br>
<br>
<div class=apiClick>groups/1/accounts?fields=loanAccounts,savingsAccounts,memberLoanAccounts,<br> memberSavingsAccounts</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/groups/{groupId}/accounts
</code>
<code class="method-response">
{
"loanAccounts": [
{
"id": 3,
"accountNo": "000000003",
"productId": 3,
"productName": "daily product",
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"pendingApproval": true,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"loanType": {
"id": 2,
"code": "accountType.group",
"value": "Group"
}
}
],
"savingsAccounts": [
{
"id": 9,
"accountNo": "000000009",
"productId": 1,
"productName": "p_sav",
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountType": {
"id": 2,
"code": "accountType.group",
"value": "Group"
}
},
{
"id": 4,
"accountNo": "000000004",
"productId": 1,
"productName": "p_sav",
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountType": {
"id": 2,
"code": "accountType.group",
"value": "Group"
}
}
],
"memberLoanAccounts": [
{
"id": 4,
"accountNo": "000000004",
"productId": 1,
"productName": "testLoan",
"status": {
"id": 200,
"code": "loanStatusType.approved",
"value": "Approved",
"pendingApproval": false,
"waitingForDisbursal": true,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"loanType": {
"id": 3,
"code": "accountType.jlg",
"value": "JLG"
}
},
{
"id": 7,
"accountNo": "000000007",
"productId": 2,
"productName": "weekly product",
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"pendingApproval": true,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"loanType": {
"id": 3,
"code": "accountType.jlg",
"value": "JLG"
}
}
],
"memberSavingsAccounts": [
{
"id": 3,
"accountNo": "000000003",
"productId": 1,
"productName": "p_sav",
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountType": {
"id": 3,
"code": "accountType.jlg",
"value": "JLG"
}
},
{
"id": 10,
"accountNo": "000000010",
"productId": 1,
"productName": "p_sav",
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountType": {
"id": 3,
"code": "accountType.jlg",
"value": "JLG"
}
}
]
}
</code>
</div>
</div>
<!--End of Group account summary -->
<a id="groups_update" name="groups_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Group</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/mifosng-provider/api/v1/groups/{groupid}
</code>
<code class="method-request">
PUT groups/1
Content-Type: application/json
Request Body:
{
"name": "First Group (changed)"
}
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"changes": {
"name": "First Group (changed)"
}
}
</code>
</div>
</div>
<a id="groups_delete" name="groups_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Group</h4>
<p>A group can be deleted if it is in <i>pending</i> state and has nothing associated with it - groups, loans, savings etc</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/mifosng-provider/api/v1/groups/{groupid}
</code>
<code class="method-request">
DELETE groups/2
</code>
<code class="method-response">
{
"officeId": 1,
"groupId": 2,
"resourceId": 2
}
</code>
</div>
</div>
<a id="groups_list" name="groups_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Groups</h4>
<p>The <i>list</i> capability of groups can support <b>pagination</b> and <b>sorting</b>.</p>
<h5>Optional Arguments</h5>
<dl class="argument-list">
<dt>offset</dt>
<dd>
Integer <span>optional</span>, defaults to 0
</dd>
<dd>Indicates from what result to start from.</dd>
<dt>limit</dt>
<dd>
Integer <span>optional</span>, defaults to 200
</dd>
<dd>Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1</dd>
<dt>orderBy</dt>
<dd>
String <span>optional</span>, one of <span>displayName, accountNo, officeId, officeName</span>
</dd>
<dd>Orders the results by the field indicated.</dd>
<dt>sortBy</dt>
<dd>
String <span>optional</span>, one of <span>ASC, DESC</span>
</dd>
<dd>Indicates what way to order results if <i>orderBy</i> is used.</dd>
<dt>officeId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dd>Provides ability to restrict list of groups returned based on the office there associated with.</dd>
<dt>underHierarchy</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use the office hierarchy string to return all groups under a given hierarchy.</dd>
<dt>name</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use name of groups to restrict results.</dd>
<dt>externalId</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use externalId of groups to restrict results.</dd>
<dt>sqlSearch</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use an sql fragment valid for the underlying group schema to filter results. e.g. display_name like %K%</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>groups</div>
<br>
<div class=apiClick>groups?fields=name,officeName,joinedDate</div>
<br>
<div class=apiClick>groups?offset=10&limit=50</div>
<br>
<div class=apiClick>groups?orderBy=name,sortOrder=DESC</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/groups
</code>
<code class="method-response">
{
"totalFilteredRecords": 2,
"pageItems": [
{
"id": 4,
"name": "AnotherGroup",
"status": {
"id": 100,
"code": "clientStatusType.pending",
"value": "Pending"
},
"active": false,
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".4."
}
]
}
</code>
</div>
</div>
<!-- end of group api docs -->
<!-- start of loans api docs -->
<a id="loans" name="loans" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Loans</h3>
<p>The API concept of <b>loans</b> models the <b>loan application process</b> and the <b>loan contract/monitoring process</b>.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>accountNo</td>
</tr>
<tr>
<td class=fielddesc>The account no. associated with this loan. Is auto generated if not provided at loan application creation time.</td>
</tr>
<tr class=alt>
<td>externalId</td>
</tr>
<tr>
<td class=fielddesc>A place to put an external reference for
this loan e.g. The ID another system uses.<br> If provided,
it must be unique.
</td>
</tr>
<tr class=alt>
<td>fundId</td>
</tr>
<tr>
<td class=fielddesc>Optional: For associating a loan with a given fund.</td>
</tr>
<tr class=alt>
<td>loanOfficerId</td>
</tr>
<tr>
<td class=fielddesc>Optional: For associating a loan with a given staff member who is a loan officer.</td>
</tr>
<tr class=alt>
<td>loanPurposeId</td>
</tr>
<tr>
<td class=fielddesc>Optional: For marking a loan with a given loan purpose option. Loan purposes are configurable and can be setup by system admin through code/code values screens.</td>
</tr>
<tr class=alt>
<td>principal</td>
</tr>
<tr>
<td class=fielddesc>The loan amount to be disbursed to through loan.</td>
</tr>
<tr class=alt>
<td>loanTermFrequency</td>
</tr>
<tr>
<td class=fielddesc>The length of loan term<br> Used like:
<b>loanTermFrequency</b> loanTermFrequencyType<br> e.g. <b>12</b> Months
</td>
</tr>
<tr class=alt>
<td>loanTermFrequencyType</td>
</tr>
<tr>
<td class=fielddesc>The loan term period to use. Used like:
loanTermFrequency <b>loanTermFrequencyType</b><br> e.g. 12 <b>Months</b>
<span>Example Values:</span> 0=Days, 1=Weeks, 2=Months, 3=Years
</td>
</tr>
<tr class=alt>
<td>numberOfRepayments</td>
</tr>
<tr>
<td class=fielddesc>Number of installments to repay.<br>
Used like: <b>numberOfRepayments</b> Every <i>repaymentEvery</i>
<i>repaymentFrequencyType</i><br> e.g. <b>10</b> (repayments) Every 12 Weeks
</td>
</tr>
<tr class=alt>
<td>repaymentEvery</td>
</tr>
<tr>
<td class=fielddesc>Used like: numberOfRepayments Every
<b>repaymentEvery</b> repaymentFrequencyType<br> e.g. 10
(repayments) Every <b>12</b> Weeks
</td>
</tr>
<tr class=alt>
<td>repaymentFrequencyType</td>
</tr>
<tr>
<td class=fielddesc>Used like: <i>numberOfRepayments</i> Every
repaymentEvery <b>repaymentFrequencyType</b><br> e.g. 10
(repayments) Every 12 <b>Weeks</b> <br>
<span>Example Values:</span> 0=Days, 1=Weeks, 2=Months
</td>
</tr>
<tr class=alt>
<td>interestRatePerPeriod</td>
</tr>
<tr>
<td class=fielddesc>Interest Rate.<br> Used like:
<b>interestRatePerPeriod</b> % interestRateFrequencyType - interestType<br>
e.g. <b>12.0000</b>% Per year - Declining Balance
</td>
</tr>
<tr class=alt>
<td>interestRateFrequencyType</td>
</tr>
<tr>
<td class=fielddesc>Used like: interestRatePerPeriod%
interestRateFrequencyType - interestType<br> e.g. 12.0000%
<b>Per year</b> - Declining Balance <br>
<span>Example Values:</span> 2=Per month, 3=Per year
</td>
</tr>
<tr class=alt>
<td>graceOnPrincipalPayment</td>
</tr>
<tr>
<td class=fielddesc>Optional: Integer - represents the number of repayment periods that grace should apply to the principal component of a repayment period.
</td>
</tr>
<tr class=alt>
<td>graceOnInterestPayment</td>
</tr>
<tr>
<td class=fielddesc>Optional: Integer - represents the number of repayment periods that grace should apply to the interest component of a repayment period. Interest is still calculated but offset to later repayment periods.
</td>
</tr>
<tr class=alt>
<td>graceOnInterestCharged</td>
</tr>
<tr>
<td class=fielddesc>Optional: Integer - represents the number of repayment periods that should be interest-free.
</td>
</tr>
<tr class=alt>
<td>interestChargedFromDate</td>
</tr>
<tr>
<td class=fielddesc>Optional: Date - The date from with interest is to start being charged.</td>
</tr>
<tr class=alt>
<td>expectedDisbursementDate</td>
</tr>
<tr>
<td class=fielddesc>The proposed <b>disbursement date</b> of the loan so a proposed repayment schedule can be provided.</td>
</tr>
<tr class=alt>
<td>submittedOnDate</td>
</tr>
<tr>
<td class=fielddesc>The date the <b>loan application</b> was submitted by applicant.</td>
</tr>
<tr class=alt>
<td>amortizationType</td>
</tr>
<tr>
<td class=fielddesc><span>Example Values:</span> 0=Equal
principle payments, 1=Equal installments</td>
</tr>
<tr class=alt>
<td>interestType</td>
</tr>
<tr>
<td class=fielddesc>Used like: interestRatePerPeriod%
interestRateFrequencyType - interestType<br> e.g. 12.0000%
Per year - <b>Declining Balance</b> <br>
<span>Example Values:</span> 0=Declining Balance, 1=Flat
</td>
</tr>
<tr class=alt>
<td>interestCalculationPeriodType</td>
</tr>
<tr>
<td class=fielddesc><span>Example Values:</span> 0=Daily, 1=Same as repayment period</td>
</tr>
<tr class=alt>
<td>inArrearsTolerance</td>
</tr>
<tr>
<td class=fielddesc>The amount that can be 'waived' at end
of all loan payments because it is too small to worry about.<br>
This is also the tolerance amount assessed when determining if a
loan is in arrears.
</td>
</tr>
<tr class=alt>
<td>transactionProcessingStrategyId</td>
</tr>
<tr>
<td class=fielddesc>The type of transaction processing strategy to be used.<br>
At present some MFI specific ones exist. This is an important point of change for many MFIs.
<br>Responsible for things like payment order and how early or late repayments should be processed.<br>
Out of the box options available are:
<ol>
<li>id=1, code=mifos-standard-strategy, name=Mifos style</li>
<li>id=2, code=heavensfamily-strategy, name=Heavensfamily</li>
<li>id=3, code=creocore-strategy, name=Creocore</li>
<li>id=4, code=rbi-india-strategy, name=RBI (India)</li>
<li>id=5, code=principal-interest-penalties-fees-order-strategy, name=Principal Interest Penalties Fees Order</li>
<li>id=6, code=interest-principal-penalties-fees-order-strategy, name=Interest Principal Penalties Fees Order</li>
</ol>
</td>
</tr>
<tr class=alt>
<td>loanType</td>
</tr>
<tr>
<td class=fielddesc>To represent different type of loans.<br>
At present there are three type of loans are supported.
<br>Available loan types:
<ol>
<li><b>individual</b>: Loan given to individual member</li>
<li><b>group</b>: Loan given to group as a whole</li>
<li><b>jlg</b>: Joint liability group loan given to members in a group on individual basis. JLG loan can be given to one or more members in a group.</li>
</ol>
</td>
</tr>
</table>
</div>
</div>
<a id="loans_template" name="loans_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Loan 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>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>templateType</dt>
<dd>
String <span>mandatory</span>, allowed values are <span>individual, group, jlg, jlgbulk</span>
</dd>
<dd>
<br>templateType value decides the required template data for creating a new loan application.
</dd>
<dd>
<br><b>'individual':</b> Loan template data for creating individual loans.
</dd>
<dd>
<b>'group':</b> Loan template data for creating a group loan (loan given to group as a whole).
</dd>
<dd>
<b>'jlg':</b> Loan template data for creating a Joint liability group loan for a client.
</dd>
<dd>
<b>'jlgbulk':</b> Loan template data for creating a Joint liability group loan for multiple clients at a time in a group.
</dd>
<dt>clientId</dt>
<dd>
Integer <span>mandatory</span>
</dd>
<dt>productId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dd>If entered, productId, productName and selectedProduct
fields are returned.</dd>
<dt>staffInSelectedOfficeOnly</dt>
<dd>
Boolean <span>optional</span>
</dd>
<dd>Defaults to false if not provided. If <strong>staffInSelectedOfficeOnly=true</strong> only loan officers
who are associated with the selected branch are returned.</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>loans/template?templateType=individual&clientId=1</div>
<br>
<br>
<div class=apiClick>loans/template?templateType=individual&clientId=1&productId=1</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/template?templateType=individual&clientId=1
</code>
<code class="method-response">
{
"clientId": 1,
"clientName": "Kampala first Client",
"clientOfficeId": 2,
"timeline": {
"expectedDisbursementDate": [
2013,
3,
8
]
},
"productOptions": [
{
"id": 1,
"name": "Kampala Product (with cash accounting)"
}
]
}
</code>
<code class="method-declaration">
GET https://DomainName/api/v1/loans/template?templateType=individual&clientId=1&productId=1
</code>
<code class="method-response">
{
"clientId": 1,
"clientName": "Kampala first Client",
"clientOfficeId": 2,
"loanProductId": 1,
"loanProductName": "Kampala Product (with cash accounting)",
"loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.",
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"principal": 1000000,
"termFrequency": 12,
"termPeriodFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRatePerPeriod": 24,
"interestRateFrequencyType": {
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
},
"annualInterestRate": 24,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"timeline": {
"expectedDisbursementDate": [
2013,
3,
8
]
},
"charges": [],
"productOptions": [
{
"id": 1,
"name": "Kampala Product (with cash accounting)"
}
],
"loanOfficerOptions": [
{
"id": 2,
"firstname": "Kampala",
"lastname": "LoanOfficer",
"displayName": "LoanOfficer, Kampala",
"officeId": 2,
"officeName": "Uganda (Kampala)",
"isLoanOfficer": true
}
],
"loanPurposeOptions": [
{
"id": 20,
"name": "option.Agriculture",
"position": 1
},
{
"id": 21,
"name": "option.Manufacturing",
"position": 20
},
{
"id": 22,
"name": "option.HousingImprovement",
"position": 21
}
],
"termFrequencyTypeOptions": [
{
"id": 0,
"code": "loanTermFrequency.periodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "loanTermFrequency.periodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "loanTermFrequency.periodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "loanTermFrequency.periodFrequencyType.years",
"value": "Years"
}
],
"repaymentFrequencyTypeOptions": [
{
"id": 0,
"code": "repaymentFrequency.periodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "repaymentFrequency.periodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
}
],
"interestRateFrequencyTypeOptions": [
{
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
{
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
}
],
"amortizationTypeOptions": [
{
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
{
"id": 0,
"code": "amortizationType.equal.principal",
"value": "Equal principle payments"
}
],
"interestTypeOptions": [
{
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
{
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
}
],
"interestCalculationPeriodTypeOptions": [
{
"id": 0,
"code": "interestCalculationPeriodType.daily",
"value": "Daily"
},
{
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
}
],
"transactionProcessingStrategyOptions": [
{
"id": 2,
"code": "heavensfamily-strategy",
"name": "Heavensfamily"
}
],
"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"
}
}
],
"loanCollateralOptions": [
{
"id": 17,
"name": "option.House",
"position": 1
},
{
"id": 18,
"name": "option.Television",
"position": 17
},
{
"id": 19,
"name": "option.Gold",
"position": 18
}
]
}
</code>
</div>
</div>
<a id="loans_retrieve" name="loans_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Loan</h4>
<p>
<b>Note:</b> template=true parameter doesn't apply to this resource.
</p>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>associations</dt>
<dd>
optional, <span>Either 'all' or a comma separated list of
loan 'associations' (itemised 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 all association data.
</dd>
<dd>
<b>'repaymentSchedule':</b> Loan schedule data.
</dd>
<dd>
<b>'transactions':</b> Loan transactions data.
</dd>
<dd>
<b>'charges':</b> Loan charges data.
</dd>
<dd>
<b>'guarantors':</b> Loan guarantors data.
</dd>
<dd>
<b>'collateral':</b> Loan collateral data.
</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>loans/1</div>
<br>
<br>
<div class=apiClick>loans/1?fields=id,principal,annualInterestRate</div>
<br>
<br>
<div class=apiClick>loans/1?associations=all</div>
<br>
<br>
<div class=apiClick>loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/{loanId}
</code>
<code class="method-response">
{
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"clientId": 1,
"clientName": "Kampala first Client",
"clientOfficeId": 2,
"loanProductId": 1,
"loanProductName": "Kampala Product (with cash accounting)",
"loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.",
"loanPurposeId": 22,
"loanPurposeName": "option.HousingImprovement",
"loanOfficerId": 2,
"loanOfficerName": "LoanOfficer, Kampala",
"loanType": {
"id": 1,
"code": "loanType.individual",
"value": "Individual"
},
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"principal": 1000000,
"termFrequency": 12,
"termPeriodFrequencyType": {
"id": 2,
"code": "termFrequency.periodFrequencyType.months",
"value": "Months"
},
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRatePerPeriod": 24,
"interestRateFrequencyType": {
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
},
"annualInterestRate": 24,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"timeline": {
"submittedOnDate": [
2012,
4,
3
],
"submittedByUsername": "admin",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedOnDate": [
2012,
4,
3
],
"approvedByUsername": "admin",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"expectedDisbursementDate": [
2012,
4,
10
],
"actualDisbursementDate": [
2012,
4,
10
],
"disbursedByUsername": "admin",
"disbursedByFirstname": "App",
"disbursedByLastname": "Administrator",
"expectedMaturityDate": [
2013,
4,
10
]
},
"summary": {
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"principalDisbursed": 1000000,
"principalPaid": 0,
"principalWrittenOff": 0,
"principalOutstanding": 1000000,
"principalOverdue": 833333.3,
"interestCharged": 240000,
"interestPaid": 0,
"interestWaived": 0,
"interestWrittenOff": 0,
"interestOutstanding": 240000,
"interestOverdue": 200000,
"feeChargesCharged": 18000,
"feeChargesDueAtDisbursementCharged": 0,
"feeChargesPaid": 0,
"feeChargesWaived": 0,
"feeChargesWrittenOff": 0,
"feeChargesOutstanding": 18000,
"feeChargesOverdue": 15000,
"penaltyChargesCharged": 0,
"penaltyChargesPaid": 0,
"penaltyChargesWaived": 0,
"penaltyChargesWrittenOff": 0,
"penaltyChargesOutstanding": 0,
"penaltyChargesOverdue": 0,
"totalExpectedRepayment": 1258000,
"totalRepayment": 0,
"totalExpectedCostOfLoan": 258000,
"totalCostOfLoan": 0,
"totalWaived": 0,
"totalWrittenOff": 0,
"totalOutstanding": 1258000,
"totalOverdue": 1048333.3,
"overdueSinceDate": [
2012,
5,
10
]
}
}
</code>
</div>
</div>
<a id="loans_list" name="loans_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Loans</h4>
<p>The <i>list</i> capability of loans can support <b>pagination</b> and <b>sorting</b>.</p>
<h5>Optional Arguments</h5>
<dl class="argument-list">
<dt>offset</dt>
<dd>
Integer <span>optional</span>, defaults to 0
</dd>
<dd>Indicates from what result to start from.</dd>
<dt>limit</dt>
<dd>
Integer <span>optional</span>, defaults to 200
</dd>
<dd>Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1</dd>
<dt>orderBy</dt>
<dd>
String <span>optional</span>, one of <span>displayName, accountNo, officeId, officeName</span>
</dd>
<dd>Orders the results by the field indicated.</dd>
<dt>sortBy</dt>
<dd>
String <span>optional</span>, one of <span>ASC, DESC</span>
</dd>
<dd>Indicates what way to order results if <i>orderBy</i> is used.</dd>
<dt>officeId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dd>Provides ability to restrict list of loans returned based on the office there associated with.</dd>
<dt>underHierarchy</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use the office hierarchy string to return all loans under a given hierarchy.</dd>
<dt>accountNo</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use account no. of loans to restrict results.</dd>
<dt>externalId</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use externalId of loan to restrict results.</dd>
<dt>sqlSearch</dt>
<dd>
String <span>optional</span>
</dd>
<dd>Use an sql fragment valid for the underlying loan schema to filter results. e.g. display_name like %K%</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>loans</div>
<br>
<div class=apiClick>loans?fields=accountNo</div>
<br>
<div class=apiClick>loans?offset=10&limit=50</div>
<br>
<div class=apiClick>loans?orderBy=accountNo,sortOrder=DESC</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/loans
</code>
<code class="method-response">
{
"totalFilteredRecords": 1,
"pageItems": [
{
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"clientId": 1,
"clientName": "Change To IndividualName",
"clientOfficeId": 1,
"loanProductId": 1,
"loanProductName": "AgriCredit",
"loanProductDescription": "test",
"loanType": {
"id": 1,
"code": "loanType.individual",
"value": "Individual"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principal": 10000,
"termFrequency": 12,
"termPeriodFrequencyType": {
"id": 2,
"code": "termFrequency.periodFrequencyType.months",
"value": "Months"
},
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRatePerPeriod": 2,
"interestRateFrequencyType": {
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
"annualInterestRate": 24,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"timeline": {
"submittedOnDate": [
2012,
6,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedOnDate": [
2012,
6,
1
],
"approvedByUsername": "mifos",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"expectedDisbursementDate": [
2012,
6,
1
],
"actualDisbursementDate": [
2012,
6,
1
],
"disbursedByUsername": "mifos",
"disbursedByFirstname": "App",
"disbursedByLastname": "Administrator",
"expectedMaturityDate": [
2013,
6,
1
]
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principalDisbursed": 10000,
"principalPaid": 3073.07,
"principalWrittenOff": 0,
"principalOutstanding": 6926.93,
"principalOverdue": 5999.92,
"interestCharged": 1347.15,
"interestPaid": 709.33,
"interestWaived": 0,
"interestWrittenOff": 0,
"interestOutstanding": 637.82,
"interestOverdue": 619.28,
"feeChargesCharged": 0,
"feeChargesDueAtDisbursementCharged": 0,
"feeChargesPaid": 0,
"feeChargesWaived": 0,
"feeChargesWrittenOff": 0,
"feeChargesOutstanding": 0,
"feeChargesOverdue": 0,
"penaltyChargesCharged": 0,
"penaltyChargesPaid": 0,
"penaltyChargesWaived": 0,
"penaltyChargesWrittenOff": 0,
"penaltyChargesOutstanding": 0,
"penaltyChargesOverdue": 0,
"totalExpectedRepayment": 11347.15,
"totalRepayment": 3782.4,
"totalExpectedCostOfLoan": 1347.15,
"totalCostOfLoan": 709.33,
"totalWaived": 0,
"totalWrittenOff": 0,
"totalOutstanding": 7564.75,
"totalOverdue": 6619.2,
"overdueSinceDate": [
2012,
11,
1
]
},
"feeChargesAtDisbursementCharged": 0
}
]
}
</code>
</div>
</div>
<a id="loans_calculate" name="loans_calculate" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Calculate loan repayment schedule</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>productId, principal, loanTermFrequency,
loanTermFrequencyType, numberOfRepayments, repaymentEvery,
repaymentFrequencyType, interestRatePerPeriod,
amortizationType, interestType,
interestCalculationPeriodType, expectedDisbursementDate,
transactionProcessingStrategyId</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans?command=calculateLoanSchedule
</code>
<code class="method-request">
POST loans?command=calculateLoanSchedule
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en_GB",
"productId": 1,
"principal": "100,000.00",
"loanTermFrequency": 12,
"loanTermFrequencyType": 2,
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": 2,
"interestRatePerPeriod": 2,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"expectedDisbursementDate": "20 September 2011",
"transactionProcessingStrategyId": 2
}
</code>
<code class="method-response">
{
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"loanTermInDays": 366,
"totalPrincipalDisbursed": 100000,
"totalPrincipalExpected": 100000,
"totalPrincipalPaid": 0,
"totalInterestCharged": 13471.52,
"totalFeeChargesCharged": 0,
"totalPenaltyChargesCharged": 0,
"totalWaived": 0,
"totalWrittenOff": 0,
"totalRepaymentExpected": 113471.52,
"totalRepayment": 0,
"totalOutstanding": 0,
"periods": [
{
"period": 0,
"dueDate": [
2011,
9,
20
],
"principalDisbursed": 100000,
"principalLoanBalanceOutstanding": 100000,
"feeChargesDue": 0,
"feeChargesOutstanding": 0,
"totalOriginalDueForPeriod": 0,
"totalDueForPeriod": 0,
"totalOutstandingForPeriod": 0,
"totalOverdue": 0,
"totalActualCostOfLoanForPeriod": 0
},
{
"period": 1,
"fromDate": [
2011,
9,
20
],
"dueDate": [
2011,
10,
20
],
"daysInPeriod": 30,
"principalOriginalDue": 7455.96,
"principalDue": 7455.96,
"principalOutstanding": 7455.96,
"principalLoanBalanceOutstanding": 92544.04,
"interestOriginalDue": 2000,
"interestDue": 2000,
"interestOutstanding": 2000,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 9455.96,
"totalDueForPeriod": 9455.96,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 9455.96,
"totalOverdue": 9455.96,
"totalActualCostOfLoanForPeriod": 2000
},
...
...
{
"period": 12,
"fromDate": [
2012,
8,
20
],
"dueDate": [
2012,
9,
20
],
"daysInPeriod": 31,
"principalOriginalDue": 9270.56,
"principalDue": 9270.56,
"principalOutstanding": 9270.56,
"principalLoanBalanceOutstanding": 0,
"interestOriginalDue": 185.4,
"interestDue": 185.4,
"interestOutstanding": 185.4,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 9455.96,
"totalDueForPeriod": 9455.96,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 9455.96,
"totalOverdue": 9455.96,
"totalActualCostOfLoanForPeriod": 185.4
}
]
}
</code>
</div>
</div>
<a id="loans_create" name="loans_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Submit a new Loan Application</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>clientId, productId, principal, loanTermFrequency,
loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery,
repaymentFrequencyType, interestRatePerPeriod,
amortizationType, interestType,
interestCalculationPeriodType, transactionProcessingStrategyId,
expectedDisbursementDate, submittedOnDate, loanType</td>
</tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Optional Fields</div></td>
</tr>
<tr class=alt>
<td>graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans
</code>
<code class="method-request">
POST loans
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en_GB",
"clientId": 1,
"productId": 1,
"principal": "10,000.00",
"loanTermFrequency": 12,
"loanTermFrequencyType": 2,
"loanType": "individual",
"numberOfRepayments": 10,
"repaymentEvery": 1,
"repaymentFrequencyType": 2,
"interestRatePerPeriod": 10,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"transactionProcessingStrategyId": 1,
"expectedDisbursementDate": "10 Jun 2013",
"submittedOnDate": "10 Jun 2013"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="loans_approve" name="loans_approve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Approve Loan Application</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>approvedOnDate</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}?command=approve
</code>
<code class="method-request">
POST loans/1?command=approve
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "20 September 2011",
"note": "Loan approval note"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 200,
"code": "loanStatusType.approved",
"value": "Approved",
"pendingApproval": false,
"waitingForDisbursal": true,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "20 September 2011",
"note": "Loan approval note"
}
}
</code>
</div>
</div>
<a id="loans_approve_undo" name="loans_approve_undo" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Undo Loan Application Approval</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}?command=undoApproval
</code>
<code class="method-request">
POST loans/1?command=undoApproval
Content-Type: application/json
Request Body:
{
"note": "Loan undo approval note"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"pendingApproval": true,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"approvedOnDate": ""
}
}
</code>
</div>
</div>
<a id="loans_reject" name="loans_reject" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Reject Loan Application</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>rejectedOnDate</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}?command=reject
</code>
<code class="method-request">
POST loans/1?command=reject
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "20 September 2011",
"note": "Loan rejection reason."
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 500,
"code": "loanStatusType.rejected",
"value": "Rejected",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "20 September 2011",
"closedOnDate": "20 September 2011"
}
}
</code>
</div>
</div>
<a id="loans_withdraw" name="loans_withdraw" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Applicant Withdraws from Loan Application</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>withdrawnOnDate</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}?command=withdrawnByApplicant
</code>
<code class="method-request">
POST loans/1?command=withdrawnByApplicant
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "20 September 2011",
"note": "Reason loan applicant withdrew from application."
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 2,
"resourceId": 2,
"changes": {
"status": {
"id": 400,
"code": "loanStatusType.withdrawn.by.client",
"value": "Withdrawn by applicant",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "20 September 2011",
"closedOnDate": "20 September 2011"
}
}
</code>
</div>
</div>
<a id="loans_disburse" name="loans_disburse" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Disburse Loan</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>actualDisbursementDate</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}?command=disburse
</code>
<code class="method-request">
POST loans/1?command=disburse
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"actualDisbursementDate": "14 May 2013",
"paymentTypeId": "12",
"note": "",
"accountNumber": "accno123",
"checkNumber": "chec123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"accountNumber": "accno123",
"checkNumber": "chec123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"actualDisbursementDate": "14 May 2013"
}
}
</code>
</div>
</div>
<a id="loans_disburse_undo" name="loans_disburse_undo" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Undo Loan Disbursal</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}?command=undoDisbursal
</code>
<code class="method-request">
POST loans/1?command=undoDisbursal
Content-Type: application/json
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 200,
"code": "loanStatusType.approved",
"value": "Approved",
"pendingApproval": false,
"waitingForDisbursal": true,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"actualDisbursementDate": ""
}
}
</code>
</div>
</div>
<a id="loans_delete" name="loans_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Loan Application</h4>
<p>
<b>Note:</b> Only loans in "Submitted and awaiting approval"
status can be deleted.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/loans/{loanId}
</code>
<code class="method-request">
DELETE loans/1
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<!-- Loan Transactions API-->
<a id="loans_transactions" name="loans_transactions" class="old-syle-anchor">&nbsp;</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"
name="loans_repaymenttemplate_etc" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Loan Transaction 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>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>command</dt>
<dd>
String<span> mandatory, case-insensitive</span>
</dd>
<dd>
<b>'repayment'</b><br> "date" is set to the date of the
first outstanding installment.<br> "total" "amount" is set
to the amount outstanding.
</dd>
<dd>
<b>'waiver'</b><br> "date" is set to the current date.<br>
"total" "amount" is set to the remaining loan principal
outstanding. The amount that can be waived is limited to the
loan's inArrearsTolerance
</dd>
</dl>
<p>Example Request:</p>
<div class=apiClick>loans/1/transactions/template?command=repayment</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/{loanId}/transactions/template"
</code>
<code class="method-response">
{
"transactionType": {
"id": 2,
"code": "loanTransactionType.repayment",
"value": "Repayment"
},
"date": [
2009,
8,
1
],
"total": {
"currencyCode": "XOF",
"digitsAfterDecimal": 0,
"inMultiplesOf": 0,
"amount": 471,
"defaultName": "CFA Franc BCEAO",
"nameCode": "currency.XOF",
"displaySymbol": "CFA",
"zero": false,
"greaterThanZero": true,
"displaySymbolValue": "471 CFA"
}
}
</code>
</div>
</div>
<a id="loans_transaction_repayment" name="loans_transaction_repayment" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Make a Repayment </h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=repayment
</code>
<code class="method-request">
POST loans/5/transactions?command=repayment
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transactionDate": "14 May 2013",
"transactionAmount": "500.00",
"paymentTypeId": "12",
"note": "check payment",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 5,
"resourceId": 564,
"changes": {
"transactionDate": "14 May 2013",
"transactionAmount": "500.00",
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"note": "check payment",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
</code>
</div>
</div>
<a id="loans_transaction_waiveinterest" name="loans_transaction_waiveinterest" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<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_write-off_loan" name="loans_transaction_write-off_loan" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Write-off Loan</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=writeoff
</code>
<code class="method-request">
POST loans/70/transactions?command=writeoff
Content-Type: application/json
Request Body:
{
"locale": "en_GB",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "14 May 2012",
"note": "Write-off note"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 7,
"loanId": 70,
"resourceId": 442,
"changes": {
"transactionDate": "1 March 2012",
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"status": {
"id": 601,
"code": "loanStatusType.closed.written.off",
"value": "Closed (written off)",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": true,
"closedRescheduled": false,
"closed": true,
"overpaid": false
},
"closedOnDate": "1 March 2012",
"writtenOffOnDate": "1 March 2012",
"note": "Write-off note"
}
}
</code>
</div>
</div>
<a id="loans_transaction_retrieve" name="loans_transaction_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Transaction Details</h4>
<p>Example Request:</p>
<div class=apiClick>loans/5/transactions/3</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId}
</code>
<code class="method-response">
{
"id": 3,
"type": {
"id": 2,
"code": "loanTransactionType.repayment",
"value": "Repayment",
"disbursement": false,
"repaymentAtDisbursement": false,
"repayment": true,
"contra": false,
"waiveInterest": false,
"waiveCharges": false,
"writeOff": false,
"recoveryRepayment": false
},
"date": [
2012,
5,
14
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 559.88,
"interestPortion": 559.88
}
</code>
</div>
</div>
<a id="loans_transaction_adjust" name="loans_transaction_adjust" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Adjust a Transaction</h4>
<p><b>Note:</b> there is no need to specify command={transactionType} parameter.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>transactionDate, transactionAmount</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId}
</code>
<code class="method-request">
POST loans/1/transactions/2
Content-Type: application/json
Request Body:
{
"locale": "en_GB",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "25 May 2012",
"transactionAmount": "50,000.00",
"note": "An optional note about why your adjusting or changing the transaction."
}
</code>
<code class="method-response">
{
"resourceId": 16
}
</code>
</div>
</div>
<!--Start of guarantors functionality-->
<a id="guarantors" name="guarantors" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Guarantors</h3>
<p>A person who guarantees to pay for someone else's debt
if he or she should default on a loan obligation. A guarantor acts as a co-signor of sorts.
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>guarantorType</td>
</tr>
<tr>
<td class=fielddesc>Identifies if the guarantor is
an existing Client, Staff member or an external
individual <br/>
Refer <a href="#guarantors_template">Retrieve
Guarantor Details Template</a> for complete
details
</td>
</tr>
<tr class=alt>
<td>entityId</td>
</tr>
<tr>
<td class=fielddesc>The identifier for guarantors
who are an existing Client of Staff member.
</td>
</tr>
<tr class=alt>
<td>firstname</td>
</tr>
<tr>
<td class=fielddesc>Guarantors first name
</td>
</tr>
<tr class=alt>
<td>lastname</td>
</tr>
<tr>
<td class=fielddesc>Guarantors last name
</td>
</tr>
<tr class=alt>
<td>officeName</td>
</tr>
<tr>
<td class=fielddesc>Name of the office with which the internal guarantors are associated
</td>
</tr>
<tr class=alt>
<td>addressLine1, addressLine2, city, state, zip,
country, mobileNumber, housePhoneNumber, comment,
dob</td>
</tr>
<tr>
<td class=fielddesc>Address, contact and date of
birth details of an external guarantor
</td>
</tr>
</table>
</div>
</div>
<a id="guarantors_list" name="guarantors_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Guarantors</h4>
<p>Example Requests:</p>
<div class=apiClick>loans/1/guarantors</div>
<br>
<br>
<div class=apiClick>loans/1/guarantors?fields=firstname,lastname</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/{loanId}/guarantors
</code>
<code class="method-response">
[
{
"id": 1,
"loanId": 1,
"guarantorType": {
"id": 1,
"code": "guarantor.existing.customer",
"value": "CUSTOMER"
},
"firstname": "Declan",
"lastname": "Browne",
"officeName": "Head Office",
"joinedDate": [
2009,
1,
4
]
}
]
</code>
</div>
</div>
<a id="guarantors_template" name="guarantors_template"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Guarantors 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>loans/1/guarantors/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/{loanId}/guarantors/template
</code>
<code class="method-response">
{
"guarantorType": {
"id": 1,
"code": "guarantor.existing.customer",
"value": "CUSTOMER"
},
"guarantorTypeOptions": [
{
"id": 1,
"code": "guarantor.existing.customer",
"value": "CUSTOMER"
},
{
"id": 2,
"code": "guarantor.staff",
"value": "STAFF"
},
{
"id": 3,
"code": "guarantor.external",
"value": "EXTERNAL"
}
]
}
</code>
</div>
</div>
<a id="guarantors_retrieve" name="guarantors_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Guarantor</h4>
<p>Example Requests:</p>
<div class=apiClick>/loans/1/guarantors/1</div>
<br>
<br>
<div class=apiClick>/loans/1/guarantors/1</div>
<br>
<br>
<div class=apiClick>/loans/1/guarantors/1?fields=firstname</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}
</code>
<code class="method-response">
{
"id": 1,
"loanId": 1,
"guarantorType": {
"id": 1,
"code": "guarantor.existing.customer",
"value": "CUSTOMER"
},
"firstname": "Declan",
"officeName": "Head Office",
"joinedDate": [
2009,
1,
4
]
}
</code>
</div>
</div>
<a id="guarantors_create" name="guarantors_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Guarantor</h4>
<p>
<b>Note:</b> You may associate any number of Guarantors
to a Loan. The mandatory fields would vary based
on the "guarantorType"<br>
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields
for "internal" guarantors</div></td>
</tr>
<tr class=alt>
<td>guarantorTypeId, entityId</td>
</tr>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields for "external" guarantors</div></td>
</tr>
<tr class=alt>
<td>guarantorTypeId, firstname, lastname</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1//loans/{loanId}}/guarantors
</code>
<code class="method-request">
POST /loans/1/guarantors
Content-Type: application/json
Request Body:
{
guarantorTypeId:3,
firstname:Lyndon,
lastname:Johnson
}
</code>
<code class="method-response">
{
"officeId": 2,
"loanId": 1,
"resourceId": 9
}
</code>
<code class="method-request">
POST /loans/1/guarantors
Content-Type: application/json
Request Body:
{
guarantorTypeId:1,
entityId:2
}
</code>
<code class="method-response">
{
"officeId": 2,
"loanId": 1,
"resourceId": 10
}
</code>
</div>
</div>
<a id="guarantors_update" name="guarantors_update"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Guarantor</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}
</code>
<code class="method-request">
PUT loans/1/guarantors/1
Content-Type: application/json
Request Body:
{
entityId:1
}
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 1,
"changes": {
"entityId": 1
}
}
</code>
</div>
</div>
<a id="guarantors_delete" name="guarantors_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Remove a Guarantor</h4>
<p>
<b>Note:</b> A guarantor can be removed only from loans that are not yet approved.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}
</code>
<code class="method-request">
DELETE loans/1/guarantors/1
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"officeId": 2,
"loanId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<!-- start of collaterals content -->
<a id="collaterals" name="collaterals" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3> Loan Collateral</h3>
<p>In lending agreements, collateral is a borrower's pledge of specific property to a lender,
to secure repayment of a loan. The collateral serves as protection for a lender against a
borrower's default - that is, any borrower failing to pay the principal and interest under
the terms of a loan obligation. If a borrower does default on a loan (due to insolvency
or other event), that borrower forfeits (gives up) the property pledged as collateral
- and the lender then becomes the owner of the collateral
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>type</td>
</tr>
<tr>
<td class=fielddesc>Identifies the type of a collateral <br/>
Ex: Gold, property etc (permitted types can be configured using
<a href="#configs_codes_codevalues">Code Values</a> for
the <a href="#configs_codes">Code</a> <i>LoanCollateral</i>) <br/>
Refer <a href="#collaterals_template">Retrieve
Collateral Details Template</a> for complete
details
</td>
</tr>
<tr class=alt>
<td>value</td>
</tr>
<tr>
<td class=fielddesc>The market value of a Collateral.
</td>
</tr>
<tr class=alt>
<td>description</td>
</tr>
<tr>
<td class=fielddesc>Description for the collateral
</td>
</tr>
<tr class=alt>
<td>currency</td>
</tr>
<tr>
<td class=fielddesc>Details of the currency used
to estimate the value of a Collateral.
The currency defaults to the currency of the
Loan for which this Collateral serves as a
guarantee
</td>
</tr>
</table>
</div>
</div>
<a id="collaterals_list" name="collaterals_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Loan Collaterals</h4>
<p>Example Requests:</p>
<div class=apiClick>loans/1/collaterals</div>
<br>
<br>
<div class=apiClick>loans/1/collaterals?fields=value,description</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/{loanId}/collaterals
</code>
<code class="method-response">
[
{
"id": 12,
"type": {
"id": 8,
"name": "Gold"
},
"value": 50000,
"description": "24 Carat Gold chain weighing 12 grams",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
]
</code>
</div>
</div>
<a id="collaterals_template" name="collaterals_template"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Collateral 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>loans/1/collaterals/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/{loanId}/collaterals/template
</code>
<code class="method-response">
{
"allowedCollateralTypes": [
{
"id": 9,
"name": "Silver",
"position": 0
},
{
"id": 8,
"name": "Gold",
"position": 0
},
{
"id": 10,
"name": "Property",
"position": 0
}
]
}
</code>
</div>
</div>
<a id="collaterals_retrieve" name="collaterals_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Collateral</h4>
<p>Example Requests:</p>
<div class=apiClick>/loans/1/collaterals/1</div>
<br>
<br>
<div class=apiClick>/loans/1/collaterals/1?fields=value,description</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/{loanId}/collaterals/{guarantorId}
</code>
<code class="method-response">
{
"id": 12,
"type": {
"id": 8,
"name": "Gold"
},
"value": 50000,
"description": "24 Carat Gold chain weighing 12 grams",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
} </code>
</div>
</div>
<a id="collaterals_create" name="collaterals_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Collateral</h4>
<p>
<b>Note:</b> Currently, Collaterals may be added only before a Loan
is approved<br>
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields
for "internal" collaterals</div></td>
</tr>
<tr class=alt>
<td>collateralTypeId</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1//loans/{loanId}/collaterals
</code>
<code class="method-request">
POST /loans/1/collaterals
Content-Type: application/json
Request Body:
{
collateralTypeId:9,
}
</code>
<code class="method-response">
{
"loanId": 1,
"resourceId": 12
}
</code>
<code class="method-request">
POST /loans/1/collaterals
Content-Type: application/json
Request Body:
{
"collateralTypeId":"8",
"value": "50000",
"dateFormat":"dd MMMM yyyy",
"locale": "en",
"description": "24 Carat Gold chain weighing 12 grams"
}
</code>
<code class="method-response">
{
"loanId": 1,
"resourceId": 13
}
</code>
</div>
</div>
<a id="collaterals_update" name="collaterals_update"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Collateral</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId}
</code>
<code class="method-request">
PUT loans/1/collaterals/12
Content-Type: application/json
Request Body:
{
"description": "22 Carat Gold chain weighing 12 grams"
}
</code>
<code class="method-response">
{
"loanId": 1,
"resourceId": 12,
"changes": {
"description": "22 Carat Gold chain weighing 12 grams"
}
}
</code>
</div>
</div>
<a id="collaterals_delete" name="collaterals_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Remove a Collateral</h4>
<p>
<b>Note:</b> A collateral can 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}/collaterals/{collateralId}
</code>
<code class="method-request">
DELETE loans/1/collaterals/13
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"loanId": 1,
"resourceId": 13
}
</code>
</div>
</div>
<!-- start of Loan charges content-->
<a id="loans_charges" name="loans_charges" class="old-syle-anchor">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Offices</h3>
<p>Offices are used to model an MFIs structure. A hierarchial
representation of offices is supported. There will always be at
least one office (which represents the MFI or an MFIs head
office). All subsequent offices added must have a parent office.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>externalId</td>
</tr>
<tr>
<td class=fielddesc>A place to put an external reference for
this office e.g. The ID another system uses for it.<br> If
provided, it must be unique.
</td>
</tr>
<tr class=alt>
<td>hierarchy</td>
</tr>
<tr>
<td class=fielddesc>This field is a system generated
convenience field. It can't be set.<br> It uses "dot
notation" to define where an office stands in the office
hierarchy.<br> For example, the system default office (id =
1) has a hierarchy value of '.'<br> An office (id = 12)
placed directly underneath this default office has a hierarchy
value of '.12.'<br> And if a further office (id = 78) is
placed directly under office (id = 12) its hierarchy value is
'.12.78.'<br>
<br> The hierarchy value is useful when you need to display
offices in 'hierarchy' order (perhaps indented in a drop down
list box).
</td>
</tr>
</table>
</div>
</div>
<a id="offices_list" name="offices_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Offices</h4>
<p>Example Requests:</p>
<div class=apiClick>offices</div>
<br>
<br>
<div class=apiClick>offices?fields=id,name,openingDate</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/offices
</code>
<code class="method-response">
[
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
}
]
</code>
</div>
</div>
<a id="offices_template" name="offices_template"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Office 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>offices/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/offices/template
</code>
<code class="method-response">
{
"openingDate": [
2013,
2,
4
],
"allowedParents": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
]
}
</code>
</div>
</div>
<a id="offices_retrieve" name="offices_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve an Office</h4>
<p>Example Requests:</p>
<div class=apiClick>offices/1</div>
<br>
<br>
<div class=apiClick>offices/1?template=true</div>
<br>
<br>
<div class=apiClick>offices/1?fields=id,name,parentName</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/offices/1
</code>
<code class="method-response">
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
}
</code>
</div>
</div>
<a id="offices_create" name="offices_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create an Office</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>name, openingDate, parentId</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/offices
</code>
<code class="method-request">
POST offices
Content-Type: application/json
Request Body:
{
"name": "Example New Branch",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"openingDate": "01 July 2007",
"parentId": 2,
"externalId": "SYS54-88"
}
</code>
<code class="method-response">
{
"officeId": 3,
"resourceId": 3
}
</code>
</div>
</div>
<a id="offices_update" name="offices_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update Office</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/offices/{officeId}
</code>
<code class="method-request">
PUT offices/1
Content-Type: application/json
Request Body:
{
"name": "Name is updated"
}
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 1,
"changes": {
"name": "Name is updated"
}
}
</code>
</div>
</div>
<!-- end of office api docs -->
<!-- start of loan products api docs -->
<a id="loanproducts" name="loanproducts" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Loan Products</h3>
<p>A Loan product is a template that is used when creating a
loan. Much of the template definition can be overridden during
loan creation.</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 loan product on system.</td>
</tr>
<tr class=alt>
<td>description</td>
</tr>
<tr>
<td class=fielddesc>For providing helpful description of product offering.</td>
</tr>
<tr class=alt>
<td>fundId</td>
</tr>
<tr>
<td class=fielddesc>For associating a loan product with a given fund by default.</td>
</tr>
<tr class=alt>
<td>includeInBorrowerCycle</td>
</tr>
<tr>
<td class=fielddesc>It is a flag, Used to denote whether the loans should include in loan cycle counter or not.</td>
</tr>
<tr class=alt>
<td>currencyCode</td>
</tr>
<tr>
<td class=fielddesc>A three letter ISO code of currency.</td>
</tr>
<tr class=alt>
<td>digitsAfterDecimal</td>
</tr>
<tr>
<td class=fielddesc>Override the currency default value for digitsAfterDecimal.</td>
</tr>
<tr class=alt>
<td>inMultiplesOf</td>
</tr>
<tr>
<td class=fielddesc>Override the default value for rounding currency to multiples of value provided.</td>
</tr>
<tr class=alt>
<td>principal</td>
</tr>
<tr>
<td class=fielddesc>The loan amount to be disbursed to through loan.</td>
</tr>
<tr class=alt>
<td>numberOfRepayments</td>
</tr>
<tr>
<td class=fielddesc>Number of installments to repay.<br>
Used like: <b>numberOfRepayments</b> Every <i>repaymentEvery</i>
<i>repaymentFrequencyType</i><br> e.g. <b>10</b> (repayments) Every 12 Weeks
</td>
</tr>
<tr class=alt>
<td>repaymentEvery</td>
</tr>
<tr>
<td class=fielddesc>Used like: numberOfRepayments Every
<b>repaymentEvery</b> repaymentFrequencyType<br> e.g. 10
(repayments) Every <b>12</b> Weeks
</td>
</tr>
<tr class=alt>
<td>repaymentFrequencyType</td>
</tr>
<tr>
<td class=fielddesc>Used like: <i>numberOfRepayments</i> Every
repaymentEvery <b>repaymentFrequencyType</b><br> e.g. 10
(repayments) Every 12 <b>Weeks</b> <br>
<span>Example Values:</span> 0=Days, 1=Weeks, 2=Months
</td>
</tr>
<tr class=alt>
<td>interestRatePerPeriod</td>
</tr>
<tr>
<td class=fielddesc>Interest Rate.<br> Used like:
<b>interestRatePerPeriod</b> % interestRateFrequencyType - interestType<br>
e.g. <b>12.0000</b>% Per year - Declining Balance
</td>
</tr>
<tr class=alt>
<td>interestRateFrequencyType</td>
</tr>
<tr>
<td class=fielddesc>Used like: interestRatePerPeriod%
interestRateFrequencyType - interestType<br> e.g. 12.0000%
<b>Per year</b> - Declining Balance <br>
<span>Example Values:</span> 2=Per month, 3=Per year
</td>
</tr>
<tr class=alt>
<td>amortizationType</td>
</tr>
<tr>
<td class=fielddesc><span>Example Values:</span> 0=Equal
principle payments, 1=Equal installments</td>
</tr>
<tr class=alt>
<td>interestType</td>
</tr>
<tr>
<td class=fielddesc>Used like: interestRatePerPeriod%
interestRateFrequencyType - interestType<br> e.g. 12.0000%
Per year - <b>Declining Balance</b> <br>
<span>Example Values:</span> 0=Declining Balance, 1=Flat
</td>
</tr>
<tr class=alt>
<td>interestCalculationPeriodType</td>
</tr>
<tr>
<td class=fielddesc><span>Example Values:</span> 0=Daily, 1=Same as repayment period</td>
</tr>
<tr class=alt>
<td>inArrearsTolerance</td>
</tr>
<tr>
<td class=fielddesc>The amount that can be 'waived' at end
of all loan payments because it is too small to worry about.<br>
This is also the tolerance amount assessed when determining if a
loan is in arrears.
</td>
</tr>
<tr class=alt>
<td>transactionProcessingStrategyId</td>
</tr>
<tr>
<td class=fielddesc>The type of transaction processing strategy to be used.<br>
At present some MFI specific ones exist. This is an important point of change for many MFIs.
<br>Responsible for things like payment order and how early or late repayments should be processed.<br>
Out of the box options available are:
<ol>
<li>id=1, code=mifos-standard-strategy, name=Mifos style</li>
<li>id=2, code=heavensfamily-strategy, name=Heavensfamily</li>
<li>id=3, code=creocore-strategy, name=Creocore</li>
<li>id=4, code=rbi-india-strategy, name=RBI (India)</li>
<li>id=5, code=principal-interest-penalties-fees-order-strategy, name=Principal Interest Penalties Fees Order</li>
<li>id=6, code=interest-principal-penalties-fees-order-strategy, name=Interest Principal Penalties Fees Order</li>
</ol>
</td>
</tr>
<tr class=alt>
<td>graceOnPrincipalPayment</td>
</tr>
<tr>
<td class=fielddesc>Optional: Integer - represents the number of repayment periods that grace should apply to the principal component of a repayment period.
</td>
</tr>
<tr class=alt>
<td>graceOnInterestPayment</td>
</tr>
<tr>
<td class=fielddesc>Optional: Integer - represents the number of repayment periods that grace should apply to the interest component of a repayment period. Interest is still calculated but offset to later repayment periods.
</td>
</tr>
<tr class=alt>
<td>graceOnInterestCharged</td>
</tr>
<tr>
<td class=fielddesc>Optional: Integer - represents the number of repayment periods that should be interest-free.
</td>
</tr>
<tr class=alt>
<td>accountingRule</td>
</tr>
<tr>
<td class=fielddesc>Specifies if accounting is enabled for the particular
product and the type of the accounting rule to be used
<span>Example Values:</span>1=NONE,2=CASH_BASED, 3=ACCRUAL_BASED</td>
</tr>
</td>
</tr>
</tr>
</table>
</div>
</div>
<a id="loanproducts_list" name="loanproducts_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Loan Products</h4>
<p>Example Requests:</p>
<div class=apiClick>loanproducts</div>
<br>
<br>
<div class=apiClick>loanproducts?fields=name,description,interestRateFrequencyType,amortizationType</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loanproducts
</code>
<code class="method-response">
[
{
"id": 1,
"name": "LP with Charges but no accounting)",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principal": 100000,
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRatePerPeriod": 1.75,
"interestRateFrequencyType": {
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
"annualInterestRate": 21,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyName": "Mifos style",
"accountingRule": {
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
}
}
]
</code>
</div>
</div>
<a id="loanproducts_template" name="loanproducts_template"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Loan Product 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>loanproducts/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loanproducts/template
</code>
<code class="method-response">
{
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRateFrequencyType": {
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"transactionProcessingStrategyName": "Heavensfamily",
"accountingRule": {
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
},
"accountingMappings": {},
"currencyOptions": [
{
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
}
],
"repaymentFrequencyTypeOptions": [
{
"id": 0,
"code": "repaymentFrequency.periodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "repaymentFrequency.periodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
}
],
"interestRateFrequencyTypeOptions": [
{
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
{
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
}
],
"amortizationTypeOptions": [
{
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
{
"id": 0,
"code": "amortizationType.equal.principal",
"value": "Equal principle payments"
}
],
"interestTypeOptions": [
{
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
{
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
}
],
"interestCalculationPeriodTypeOptions": [
{
"id": 0,
"code": "interestCalculationPeriodType.daily",
"value": "Daily"
},
{
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
}
],
"transactionProcessingStrategyOptions": [
{
"id": 2,
"code": "heavensfamily-strategy",
"name": "Heavensfamily"
}
],
"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"
}
}
],
"accountingRuleOptions": [
{
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
},
{
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
},
{
"id": 3,
"code": "accountingRuleType.accrual",
"value": "ACCRUAL BASED"
}
],
"accountingMappingOptions": {
"assetAccountOptions": [
{
"id": 2,
"name": "Cash in Valut 1",
"glCode": "11101",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
}
},
{
"id": 4,
"name": "Centenary Opening Account",
"glCode": "11201",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
}
}
],
"expenseAccountOptions": [
{
"id": 41,
"name": "Water Charges",
"glCode": "42102",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
}
},
{
"id": 42,
"name": "Electricity Charges",
"glCode": "42103",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
}
},
{
"id": 97,
"name": "Miscellaneous",
"glCode": "42905",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
}
}
],
"incomeAccountOptions": [
{
"id": 34,
"name": "Interest on Loans",
"glCode": "31101",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
}
},
{
"id": 35,
"name": "Late Payment Interest",
"glCode": "31102",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
}
},
{
"id": 37,
"name": "Collected Bank Fees Receivable",
"glCode": "6201",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
}
}
]
}
}
</code>
</div>
</div>
<a id="loanproducts_retrieve" name="loanproducts_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Loan Product</h4>
<p>Example Requests:</p>
<div class=apiClick>loanproducts/1</div>
<br>
<br>
<div class=apiClick>loanproducts/1?template=true</div>
<br>
<br>
<div class=apiClick>loanproducts/1?fields=name,description,numberOfRepayments</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loanproducts/{productId}
</code>
<code class="method-response">
{
"id": 1,
"name": "LP with Charges but no accounting)",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principal": 100000,
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRatePerPeriod": 1.75,
"interestRateFrequencyType": {
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
"annualInterestRate": 21,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyName": "Mifos style",
"charges": [
{
"id": 1,
"name": "Loan service fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 230.56,
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
}
],
"accountingRule": {
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
}
}
</code>
</div>
</div>
<a id="loanproducts_create" name="loanproducts_create"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Loan Product</h4>
<p>Depending of the Accounting Rule (accountingRule) selected,
additional fields with details of the appropriate Ledger Account
identifiers would need to be passed in.
</p>
</p>Refer <a href="https://mifosforge.jira.com/wiki/display/MIFOSX/A+Possible+accounting+Spec">
MifosX Accounting Specs Draft</a> for more details regarding the
significance of the selected accounting rule
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>name, currencyCode, digitsAfterDecimal, inMultiplesOf, principal,
numberOfRepayments, repaymentEvery, repaymentFrequencyType,
interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType,
interestCalculationPeriodType, transactionProcessingStrategyId,
accountingRule</td>
</tr>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Optional Fields</div></td>
</tr>
<tr class=alt>
<td>inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle</td>
</tr>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Additional Mandatory Fields for Cash(2) based accounting</div></td>
</tr>
<tr class=alt>
<td>fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId,
incomeFromFeeAccountId, incomeFromPenaltyAccountId,
writeOffAccountId</td>
</tr>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Additional Mandatory Fields for Accrual(3) based accounting</div></td>
</tr>
<tr class=alt>
<td>fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId,
incomeFromFeeAccountId, incomeFromPenaltyAccountId,
writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId,
receivablePenaltyAccountId</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loanproducts
</code>
<code class="method-request">
POST loanproducts
Content-Type: application/json
Request Body:
{
"name": "LP with Charges but no accounting)",
"currencyCode": "USD",
"locale": "en_GB",
"digitsAfterDecimal": "2",
"inMultiplesOf": 0,
"principal": "100,000.00",
"numberOfRepayments": "12",
"repaymentEvery": "1",
"repaymentFrequencyType": 2,
"interestRatePerPeriod": "1.75",
"interestRateFrequencyType": 2,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"inArrearsTolerance": "0",
"transactionProcessingStrategyId": 1,
"charges":[{"id":"1"}],
"accountingRule": 1
}
</code>
<code class="method-response">
{
"resourceId": 1
}
</code>
<code class="method-request">
POST loanproducts
Content-Type: application/json
Request Body:
{
"name": "LP Cash Accounting",
"currencyCode": "USD",
"locale": "en_GB",
"digitsAfterDecimal": "2",
"inMultiplesOf": 0,
"principal": "100,000.00",
"numberOfRepayments": "12",
"repaymentEvery": "1",
"repaymentFrequencyType": 2,
"transactionProcessingStrategyId": 1,
"interestRatePerPeriod": "1.75",
"interestRateFrequencyType": 2,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"accountingRule":"2",
"fundSourceAccountId":"4",
"loanPortfolioAccountId":"8",
"interestOnLoanAccountId":"34",
"incomeFromFeeAccountId":"37",
"incomeFromPenaltyAccountId":"35",
"writeOffAccountId":"41",
"paymentChannelToFundSourceMappings": [
{
"paymentTypeId": "11",
"fundSourceAccountId": "11"
}
],
"feeToIncomeAccountMappings": [
{
"chargeId": "1",
"incomeAccountId": "5"
},
{
"chargeId": "2",
"incomeAccountId": "8"
}
],
"penaltyToIncomeAccountMappings": [
{
"chargeId": "6",
"incomeAccountId": "9"
}
]
}
</code>
<code class="method-response">
{
"resourceId": 2
}
</code>
<code class="method-request">
POST loanproducts
Content-Type: application/json
Request Body:
{
"name": "LP Accrual Accounting",
"currencyCode": "USD",
"locale": "en_GB",
"digitsAfterDecimal": "2",
"inMultiplesOf": 0,
"principal": "100,000.00",
"numberOfRepayments": "12",
"repaymentEvery": "1",
"repaymentFrequencyType": 2,
"transactionProcessingStrategyId": 1,
"interestRatePerPeriod": "1.75",
"interestRateFrequencyType": 2,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"accountingRule":"3",
"fundSourceAccountId":"4",
"loanPortfolioAccountId":"8",
"receivableInterestAccountId":"9",
"receivableFeeAccountId":"11",
"receivablePenaltyAccountId":"10",
"interestOnLoanAccountId":"34",
"incomeFromFeeAccountId":"37",
"incomeFromPenaltyAccountId":"35",
"writeOffAccountId":"41"
}
</code>
<code class="method-response">
{
"resourceId": 3
}
</code>
</div>
</div>
<a id="loanproducts_update" name="loanproducts_update"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Loan Product</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/loanproducts/{loanId}
</code>
<code class="method-request">
PUT loanproducts/1
Content-Type: application/json
Request Body:
{
"locale": "en_GB",
"principal": "70,000.00"
}
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {
"principal": 70000,
"locale": "en_GB"
}
}
</code>
</div>
</div>
<!-- end of loan products api docs -->
<!-- start of loan products mix api docs -->
<a id="loanproductmix" name="loanproductmix" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Loan Products Mix</h3>
<p>If you have the appropriate permissions, you can decide which types of products a given client or group can mix. In this way, you can restrict clients from having active loans accounts of different products at the same time.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>restrictedProducts</td>
</tr>
<tr>
<td class=fielddesc>List of productIds to create a product mix</td>
</tr>
</table>
</div>
</div>
<a id="loanproductmix_list" name="loanproductmix_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Loan Product Mix</h4>
<p>Example Requests:</p>
<div class=apiClick>loanproducts?associations=productMixes</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loanproducts?associations=productMixes
</code>
<code class="method-response">
[
{
"productId": 1,
"productName": "Personal Loan",
"restrictedProducts": [
{
"id": 2,
"name": "Joint Loan",
"includeInBorrowerCycle": false
},
{
"id": 5,
"name": "Primary Loan",
"includeInBorrowerCycle": false
},
{
"id": 3,
"name": "Daily Loan",
"includeInBorrowerCycle": false
}
],
"allowedProducts": [
{
"id": 1,
"name": "Personal Loan",
"includeInBorrowerCycle": false
},
{
"id": 6,
"name": "Personal Loan -2",
"includeInBorrowerCycle": false
},
{
"id": 4,
"name": "Weekly Loan",
"includeInBorrowerCycle": false
}
]
},
{
"productId": 2,
"productName": "Joint Loan",
"restrictedProducts": [
{
"id": 1,
"name": "Personal Loan",
"includeInBorrowerCycle": false
},
{
"id": 6,
"name": "Personal Loan -2",
"includeInBorrowerCycle": false
}
],
"allowedProducts": [
{
"id": 3,
"name": "Daily Loan",
"includeInBorrowerCycle": false
},
{
"id": 2,
"name": "Joint Loan",
"includeInBorrowerCycle": false
},
{
"id": 5,
"name": "Primary Loan",
"includeInBorrowerCycle": false
},
{
"id": 4,
"name": "Weekly Loan",
"includeInBorrowerCycle": false
}
]
}
]
</code>
</div>
</div>
<a id="loanproductmix_template" name="loanproductmix_template"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Product Mix 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>
<p>This request gets all the products details for which productmix is not defined.</p>
<br/>
<div class=apiClick>loanproducts/template?isProductMixTemplate=true</div>
<br/><br/>
<p>This request gets the productmix details for the specific loanproduct.</p>
<br/>
<div class=apiClick>loanproducts/5/productmix</div>
<br/>
<div class=apiClick>loanproducts/5/productmix?template=true</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loanproducts/template?isProductMixTemplate=true
</code>
<code class="method-response">
{
"productOptions": [
{
"id": 5,
"name": "Primary Loan"
},
{
"id": 4,
"name": "Weekly Loan"
}
]
}
</code>
<code class="method-declaration">
GET https://DomainName/api/v1/loanproducts/5/productmix
</code>
<code class="method-response">
{
"restrictedProducts": [
{
"id": 1,
"name": "Personal Loan",
"includeInBorrowerCycle": false
}
],
"allowedProducts": [
{
"id": 3,
"name": "Daily Loan",
"includeInBorrowerCycle": false
},
{
"id": 2,
"name": "Joint Loan",
"includeInBorrowerCycle": false
},
{
"id": 6,
"name": "Personal Loan -2",
"includeInBorrowerCycle": false
},
{
"id": 5,
"name": "Primary Loan",
"includeInBorrowerCycle": false
},
{
"id": 4,
"name": "Weekly Loan",
"includeInBorrowerCycle": false
}
]
}
</code>
</div>
</div>
<a id="loanproductmix_retrieve" name="loanproductmix_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Loan Product Mix</h4>
<p>Example Requests:</p>
<div class=apiClick>loanproducts/5/productmix</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loanproducts/5/productmix
</code>
<code class="method-response">
{
"restrictedProducts": [
{
"id": 1,
"name": "Personal Loan",
"includeInBorrowerCycle": false
}
],
"allowedProducts": [
{
"id": 3,
"name": "Daily Loan",
"includeInBorrowerCycle": false
},
{
"id": 2,
"name": "Joint Loan",
"includeInBorrowerCycle": false
},
{
"id": 6,
"name": "Personal Loan -2",
"includeInBorrowerCycle": false
},
{
"id": 5,
"name": "Primary Loan",
"includeInBorrowerCycle": false
},
{
"id": 4,
"name": "Weekly Loan",
"includeInBorrowerCycle": false
}
]
}
</code>
</div>
</div>
<a id="loanproductmix_create" name="loanproductmix_create"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Loan Product Mix</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>restrictedProducts</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loanproducts/5/productmix
</code>
<code class="method-request">
POST loanproducts/{productId}/productmix
Content-Type: application/json
Request Body:
{"restrictedProducts":["1"]}
</code>
<code class="method-response">
{
"changes":{
"restrictedProductsForMix":[1],
"removedProductsForMix":[]
},
"productId":5
}
</code>
</div>
</div>
<a id="loanproductmix_update" name="loanproductmix_update"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Loan Product Mix</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/loanproducts/{productId}/productmix
</code>
<code class="method-request">
PUT loanproducts/5/productmix
Content-Type: application/json
Request Body:
{
"restrictedProducts":["3"]
}
</code>
<code class="method-response">
{
"changes": {
"restrictedProductsForMix": [3],
"removedProductsForMix": [1]
},
"productId": 5
}
</code>
</div>
</div>
<a id="loanproductmix_delete" name="loanproductmix_delete"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Loan Product Mix</h4>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/loanproducts/{productId}/productmix
</code>
<code class="method-request">
DELETE loanproducts/5/productmix
</code>
<code class="method-response">
{
"changes": {
"removedProductsForMix": [3]
},
"productId": 5
}
</code>
</div>
</div>
<!-- end of loan products mix api docs -->
<!-- start of configurations api docs -->
<a id="configs" name="configs" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Currency</h3>
<p>Application related configuration around viewing/updating
the currencies permitted for use within the MFI.</p>
</div>
</div>
<a id="configs_currencyretrieve" name="configs_currencyretrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Currency Configuration</h4>
<p>Returns the list of currencies permitted for use AND the
list of currencies not selected (but available for selection).</p>
<p>Example Requests:</p>
<div class=apiClick>currencies</div>
<br>
<br>
<div class=apiClick>currencies?fields=selectedCurrencyOptions</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/currencies
</code>
<code class="method-response">
{
"selectedCurrencyOptions": [
{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
],
"currencyOptions": [
{
"code": "AFN",
"name": "Afghanistan Afghani",
"decimalPlaces": 2,
"nameCode": "currency.AFN",
"displayLabel": "Afghanistan Afghani [AFN]"
},
{
"code": "ALL",
"name": "Albanian Lek",
"decimalPlaces": 2,
"nameCode": "currency.ALL",
"displayLabel": "Albanian Lek [ALL]"
},
{
"code": "ZWD",
"name": "Zimbabwe Dollar",
"decimalPlaces": 2,
"nameCode": "currency.ZWD",
"displayLabel": "Zimbabwe Dollar [ZWD]"
}
]
}
</code>
</div>
</div>
<a id="configs_currencyupdate" name="configs_currencyupdate"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update Currency Configuration</h4>
<p>Updates the list of currencies permitted for use.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/currencies
</code>
<code class="method-request">
PUT currencies
Content-Type: application/json
Request Body:
{
"currencies": [
"KES",
"BND",
"LBP",
"GHC",
"USD",
"XOF",
"AED",
"AMD"
]
}
</code>
<code class="method-response">
{
"currencies": [
"KES",
"BND",
"LBP",
"GHC",
"USD",
"XOF",
"AED",
"AMD"
]
}
</code>
</div>
</div>
<a id="configs_global" name="configs_global" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Global Configuration</h3>
<p>Global configuration related to set of supported enable/disable configurations:</p>
<ol>
<li><b>maker-checker</b> - defaults to false - if true turns on maker-checker functionality</li>
</ol>
</div>
</div>
<a id="configs_globalconfig_retrieve" name="configs_globalconfig_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Global Configuration</h4>
<p>Returns the list global enable/disable configurations.</p>
<p>Example Requests:</p>
<div class=apiClick>configurations</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/configurations
</code>
<code class="method-response">
{
"globalConfiguration": [
{
"name": "maker-checker",
"enabled": false
}
]
}
</code>
</div>
</div>
<a id="configs_globalconfig_update" name="configs_globalconfig_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update Global Configuration</h4>
<p>Updates an enable/disable global configuration item.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/configurations?maker-checker=false
</code>
<code class="method-request">
PUT configurations
Content-Type: application/json
Request Body: { }
</code>
<code class="method-response">
{
"changes": {
"globalConfiguration": {
"maker-checker": false
}
}
}
</code>
</div>
</div>
<a id="configs_codes" name="configs_codes" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Codes</h3>
<p>Code and code values: Codes represent a specific category of
data, their code values are a specific instance of that category.</p>
<p>
Codes are mostly <b>system defined</b> which means the code itself
comes out of the box and cannot be modified however its code values
can be. e.g. 'Customer Identifier', it defaults to a code value of
'Passport' but could be 'Drivers License, National Id' etc
<p />
</div>
</div>
<a id="configs_codes_create" name="configs_codes_create"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Code</h4>
<p>Creates a code. Codes created through api are always 'user
defined' and so system defined is marked as false.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/codes
</code>
<code class="method-request">
POST codes
Content-Type: application/json
Request Body:
{
"name": "MyNewCode"
}
</code>
<code class="method-response">
{
"resourceId": 4
}
</code>
</div>
</div>
<a id="configs_codes_retrieve" name="configs_codes_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Codes</h4>
<p>Returns the list of codes.</p>
<p>Example Requests:</p>
<div class=apiClick>codes</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/codes
</code>
<code class="method-response">
[
{
"id": 1,
"name": "Customer Identifier",
"systemDefined": true
},
{
"id": 2,
"name": "Gender",
"systemDefined": true
},
{
"id": 3,
"name": "Education",
"systemDefined": true
}
]
</code>
</div>
</div>
<a id="configs_code_retrieve" name="configs_code_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Code</h4>
<p>Returns the details of a Code.</p>
<p>Example Requests:</p>
<div class=apiClick>codes/1</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/codes/{codeId}
</code>
<code class="method-response">
{
"id": 1,
"name": "Customer Identifier",
"systemDefined": true
}
</code>
</div>
</div>
<a id="configs_code_update" name="configs_codes_update"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Code</h4>
<p>Updates the details of a code if it is not system defined.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/codes/{codeId}
</code>
<code class="method-request">
PUT codes/4
Content-Type: application/json
Request Body:
{
"name": "MyNewCode(changed)"
}
</code>
<code class="method-response">
{
"resourceId": 4,
"changes": {
"name": "MyNewCode(changed)"
}
}
</code>
</div>
</div>
<a id="configs_code_delete" name="configs_code_delete"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Code</h4>
<p>Deletes a code if it is not system defined.</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/codes/{codeId}
</code>
<code class="method-request">
DELETE codes/4
Content-Type: application/json
</code>
<code class="method-response">
{
"resourceId": 4
}
</code>
</div>
</div>
<!-- Code Value starts here -->
<a id="configs_codes_codevalues" name="configs_codes_codevalues" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Code Values</h3>
<p>Code and code values: Codes represent a specific category of
data, their code values are a specific instance of that category.</p>
<p>
Codes are mostly <b>system defined</b> which means the code itself
comes out of the box and cannot be modified however its code values
can be. e.g. 'Customer Identifier', it defaults to a code value of
'Passport' but could be 'Drivers License, National Id' etc
<p />
</div>
</div>
<a id="configs_codes_codevalues_create" name="configs_codes_codevalues_create"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Code Value</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/codes/1/codevalues
</code>
<code class="method-request">
POST codes/1/codevalues
Content-Type: application/json
Request Body:
{
"name":"Ration Card",
"position":"1"
}
</code>
<code class="method-response">
{
"resourceId": 4
}
</code>
</div>
</div>
<a id="configs_codes_codevalues_list" name="configs_codes_codevalues_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Code Values</h4>
<p>Returns the list of Code Values for a given Code</p>
<p>Example Requests:</p>
<div class=apiClick>codes/1/codevalues</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/codes/{codeId}/codevalues
</code>
<code class="method-response">
[
{
"id": 1,
"name": "Passport",
"position": 0
},
{
"id": 2,
"name": "Id",
"position": 0
},
{
"id": 3,
"name": "Drivers License",
"position": 0
},
{
"id": 4,
"name": "Any Other Id Type",
"position": 0
},
{
"id": 5,
"name": "Ration Card",
"position": 1
}
]
</code>
</div>
</div>
<a id="configs_codes_codevalues_retrieve" name="configs_codes_codevalues_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Code Value</h4>
<p>Returns the details of a Code Value</p>
<p>Example Requests:</p>
<div class=apiClick>codes/1/codevalues/1</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId}
</code>
<code class="method-response">
{
"id": 1,
"name": "Passport",
"position": 0
}
</code>
</div>
</div>
<a id="configs_codes_codevalues_update" name="configs_codes_codevalues_update"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Code Value</h4>
<p>Updates the details of a code value.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId}
</code>
<code class="method-request">
PUT codes/1/codevalues/1
Content-Type: application/json
Request Body:
{
"name": "Indian Passport",
"position":2
}
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {
"name": "Indian Passport",
"position": 2
}
}
</code>
</div>
</div>
<a id="configs_codes_codevalues_delete" name="configs_codes_codevalues_delete"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Code Value</h4>
<p>Deletes a code value</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId}
</code>
<code class="method-request">
DELETE codes/1/codevalues/5
Content-Type: application/json
</code>
<code class="method-response">
{
"resourceId": 5
}
</code>
</div>
</div>
<!-- Audit starts here -->
<a id="audits" name="audits" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Audits</h3>
<p>Every non-read Mifos API request is audited. A fully processed request can
not be changed or deleted. See maker checker api for situations where an audit is not
fully processed.<br><br>
Permissions: To search and look at audit entries a user needs to be attached to a role
that has one of the ALL_FUNCTIONS, ALL_FUNCTIONS_READ or READ_AUDIT permissions.<br><br>
Data Scope: A user can only see audits that are within their data scope. However,
'head office' users can see all audits including those that aren't office/branch related
e.g. Loan Product changes.
<p/>
</div>
</div>
<a id="audits_list" name="audits_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Audits</h4>
<p>Get a list of audits that match the criteria supplied,
and are within the requestors' data scope.</p>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>actionName</dt>
<dd>optional</dd>
<dd>Examples: CREATE, UPDATE, DISBURSE</dd>
<dt>entityName</dt>
<dd>optional</dd>
<dd>Examples: CLIENT, LOAN, FUND</dd>
<dt>resourceId</dt>
<dd>optional, <span>
The id value of the entityName</span>
</dd>
<dt>makerId</dt>
<dd>optional, <span>
The id value of the application user creating the entry</span>
</dd>
<dt>makerDateTimeFrom</dt>
<dd>optional, <span>
Get entries created on or after this</span>
</dd>
<dd>Example: 2013-04-10 08:00:00</dd>
<dt>makerDateTimeTo</dt>
<dd>optional, <span>
Get entries created on or before this</span>
</dd>
<dd>Example: 2013-05-10 08:00:00</dd>
<dt>checkerId</dt>
<dd>optional, <span>
The id value of the application user that checked (approved) the entry</span>
</dd>
<dt>checkerDateTimeFrom</dt>
<dd>optional, <span>
Get entries checked on or after this</span>
</dd>
<dd>Example: 2013-04-10 08:00:00</dd>
<dt>checkerDateTimeTo</dt>
<dd>optional, <span>
Get entries checked on or before this</span>
</dd>
<dd>Example: 2013-05-10 18:00:00</dd>
<dt>processingResult</dt>
<dd>optional, <span>
The enum value of the processing status</span>
</dd>
<dd>values:<br>
0: Invalid<br>
1: processed<br>
2: awaiting.approval<br>
3: rejected
</dd>
<dt>officeId</dt>
<dd>optional, <span>
The id value of the office/branch associated with the entry (if there is one)</span>
</dd>
<dt>groupId</dt>
<dd>optional, <span>
The id value of the group associated with the entry (if there is one).
A group is a general idea and may be a Center, a Group, a Communal Bank or other.</span>
</dd>
<dt>clientId</dt>
<dd>optional, <span>
The id value of the client associated with the entry (if there is one)</span>
</dd>
<dt>loanId</dt>
<dd>optional, <span>
The id value of the loan associated with the entry (if there is one)</span>
</dd>
<dt>savingsAccountId</dt>
<dd>optional, <span>
The id value of the savings account associated with the entry (if there is one)</span>
</dd>
<dt>includeJson</dt>
<dd>optional, <span>
Values are true, false. Default is false.</span>
</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>audits</div><br>
<div class=apiClick>audits?fields=madeOnDate,maker,processingResult</div><br>
<div class=apiClick>audits?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00</div><br>
<div class=apiClick>audits?officeId=1</div><br>
<div class=apiClick>audits?officeId=1&includeJson=true</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/audits
</code>
<code class="method-response">
[
{
"id": 671,
"actionName": "PERMISSIONS",
"entityName": "ROLE",
"resourceId": 6,
"maker": "keithwoodlock",
"madeOnDate": 1365014262000,
"processingResult": "processed"
},
{
"id": 670,
"actionName": "CREATE",
"entityName": "CLIENTNOTE",
"resourceId": 287,
"maker": "keithwoodlock",
"madeOnDate": 1365014204000,
"processingResult": "awaiting.approval",
"officeName": "my office",
"clientName": "gg ggg"
},
{
"id": 668,
"actionName": "UPDATE",
"entityName": "PERMISSION",
"maker": "keithwoodlock",
"madeOnDate": 1365014186000,
"processingResult": "processed"
},
{
"id": 667,
"actionName": "CREATE",
"entityName": "CLIENTNOTE",
"resourceId": 286,
"maker": "keithwoodlock",
"madeOnDate": 1365014169000,
"processingResult": "processed",
"officeName": "my office name",
"clientName": "gg ggg"
},
{
"id": 666,
"actionName": "CREATE",
"entityName": "CLIENT",
"resourceId": 363,
"maker": "keithwoodlock",
"madeOnDate": 1365012843000,
"processingResult": "awaiting.approval",
"officeName": "my office name"
},
{
"id": 657,
"actionName": "CREATE",
"entityName": "CLIENT",
"resourceId": 362,
"maker": "ii",
"madeOnDate": 1364953928000,
"checker": "ii",
"checkedOnDate": 1365010060000,
"processingResult": "processed",
"officeName": "my office name",
"clientName": "gg ggg"
},
{
"id": 645,
"actionName": "CREATE",
"entityName": "LOAN",
"resourceId": 373,
"maker": "keithwoodlock",
"madeOnDate": 1364860260000,
"checker": "keithwoodlock",
"checkedOnDate": 1364861222000,
"processingResult": "processed",
"officeName": "another office",
"clientName": "another client",
"loanAccountNo": "000000373"
},...
]
</code>
</div>
</div>
<a id="audits_searchtemplate" name="audits_searchtemplate"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Audit Search Template</h4>
<p>This is a convenience resource. It can be useful when
building an Audit Search UI. "appUsers" are data scoped to
the office/branch the requestor is associated with.
</p>
<p>Example Requests:</p>
<div class=apiClick>audits/searchtemplate</div>
<div class=apiClick>audits/searchtemplate?fields=actionNames</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/audits/searchtemplate
</code>
<code class="method-response">
{
"appUsers": [
{
"id": 30,
"username": "user 1"
},
{
"id": 28,
"username": "user 2"
},
{
"id": 35,
"username": "user 3"
},...
],
"actionNames": [
"CREATE",
"DELETE",
"UPDATE",
"ACTIVATE",
"ADJUST",
"APPROVALUNDO",
"APPROVE",
"APPROVEINPAST",
"BULKREASSIGN",
"CALCULATEINTEREST",
"CLOSE",
"CLOSEASRESCHEDULED",
"CREATEHISTORIC",
"DEPOSIT",
"DEREGISTER",
"DISBURSALUNDO",
"DISBURSE",
"DISBURSEINPAST",
"INTEREST",
"PERMISSIONS",
"REGISTER",
"REJECT",...
],
"entityNames": [
"CALENDAR",
"CENTER",
"CHARGE",
"CLIENT",
"CLIENTIDENTIFIER",
"CLIENTIMAGE",
"CLIENTNOTE",
"CODE",
"CODEVALUE",
"COLLATERAL",
"CONFIGURATION",
"CURRENCY",
"DATATABLE",
"DEPOSITACCOUNT",
"DEPOSITNOTE",
"DEPOSITPRODUCT",
"DOCUMENT",
"FUND",
"GLACCOUNT",
"GLCLOSURE",
"GROUP",
"GROUPNOTE",...
],
"processingResults": [
{
"id": 0,
"processingResult": "invalid"
},
{
"id": 1,
"processingResult": "processed"
},
{
"id": 2,
"processingResult": "awaiting.approval"
},
{
"id": 3,
"processingResult": "rejected"
}
]
}
</code>
</div>
</div>
<a id="audits_retrieve" name="audits_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve an Audit Entry</h4>
<p></p>
<p>Example Requests:</p>
<div class=apiClick>audits/20</div>
<div class=apiClick>audits/20?fields=madeOnDate,maker,processingResult</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/audits
</code>
<code class="method-response">
{
"id": 20,
"actionName": "REPAYMENT",
"entityName": "LOAN",
"resourceId": 868,
"maker": "dataentry1",
"madeOnDate": 1358449025000,
"processingResult": "processed",
"commandAsJson": "{\"transactionDate\":\"28 September 2012\",\"transactionAmount\":\"1,967.00\",\"locale\":\"en\",\"dateFormat\":\"dd MMMM yyyy\"}",
"officeName": "another office",
"clientName": "another client",
"loanAccountNo": "23"
}
</code>
</div>
</div>
<!-- Maker Checker starts here -->
<a id="makercheckers" name="makercheckers" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Maker Checker (or 4-eye) functionality</h3>
<p>Mifos X Maker Checker functionality allows an MFI to define transactions
as having a maker and a checker phase. One user enters, deletes or changes data.
Then, another user that has "Checker" rights for that transaction, can inspect
and approve the data.
</p>
<p>By default, Maker Checker functionality is disabled.
See <a href="#configs_globalconfig_update">Update Global Configuration</a> to enable/disable
Maker Checker functionality at a global level.
</p>
<p>
Additionally, Maker Checker functionality for each transaction (permission) is disabled by default.
see <a href="#permissions_update">Enable/Disable Permissions for Maker Checker</a> to enable/disable
Maker Checker functionality at a transaction (permission) level.
</p>
<p>
Finally, to give checking rights to a user (via a role associated with the user) see
<a href="#rolespermissions_update">Update a Role's Permissions</a>
</p>
<p>For example, <br>
<code>
{
"permissions":{
"CREATE_GUARANTOR_CHECKER":true,
"CREATE_CLIENT_CHECKER":true
}
}
</code>
<br>
will give checking rights for CREATE_GUARANTOR and CREATE_CLIENT</p>
<p>Alternatively, the special permissions ALL_FUNCTIONS or CHECKER_SUPER_USER will give blanket
checking rights.
</p>
<p>
When a user "makes" an entry that is enabled for Maker Checker, it is audited and the audit status
is set to a value of 2 (awaiting.approval).
</p>
Checkers can only Check and approve entries that they have been permitted to check.<br><br>
Checkers can only Check and approve entries that are within their data scope. However,
'head office' Checkers can Check and approve all entries
including those that aren't office/branch related (as long as they have the Checker permissions)
e.g. Loan Product changes.
<p/>
</div>
</div>
<a id="makercheckers_list" name="makercheckers_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Maker Checker Entries</h4>
<p>Get a list of entries that can be checked by the requestor that match the criteria supplied.</p>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>actionName</dt>
<dd>optional</dd>
<dd>Examples: CREATE, UPDATE, DISBURSE</dd>
<dt>entityName</dt>
<dd>optional</dd>
<dd>Examples: CLIENT, LOAN, FUND</dd>
<dt>resourceId</dt>
<dd>optional, <span>
The id value of the entityName</span>
</dd>
<dt>makerId</dt>
<dd>optional, <span>
The id value of the application user creating the entry</span>
</dd>
<dt>makerDateTimeFrom</dt>
<dd>optional, <span>
Get entries created on or after this</span>
</dd>
<dd>Example: 2013-04-10 08:00:00</dd>
<dt>makerDateTimeTo</dt>
<dd>optional, <span>
Get entries created on or before this</span>
</dd>
<dd>Example: 2013-05-10 08:00:00</dd>
<dt>officeId</dt>
<dd>optional, <span>
The id value of the office/branch associated with the entry (if there is one)</span>
</dd>
<dt>groupId</dt>
<dd>optional, <span>
The id value of the group associated with the entry (if there is one).
A group is a general idea and may be a Center, a Group, a Communal Bank or other.</span>
</dd>
<dt>clientId</dt>
<dd>optional, <span>
The id value of the client associated with the entry (if there is one)</span>
</dd>
<dt>loanId</dt>
<dd>optional, <span>
The id value of the loan associated with the entry (if there is one)</span>
</dd>
<dt>savingsAccountId</dt>
<dd>optional, <span>
The id value of the savings account associated with the entry (if there is one)</span>
</dd>
<dt>includeJson</dt>
<dd>optional, <span>
Values are true, false. Default is false.</span>
</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>makercheckers</div><br>
<div class=apiClick>makercheckers?fields=madeOnDate,maker,processingResult</div><br>
<div class=apiClick>makercheckers?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00</div><br>
<div class=apiClick>makercheckers?officeId=1</div><br>
<div class=apiClick>makercheckers?officeId=1&includeJson=true</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/makercheckers
</code>
<code class="method-response">
[
{
"id": 654,
"actionName": "CREATE",
"entityName": "LOANPRODUCT",
"resourceId": 15,
"maker": "keithwoodlock",
"madeOnDate": 1364924512000,
"processingResult": "awaiting.approval"
},
{
"id": 666,
"actionName": "CREATE",
"entityName": "CLIENT",
"resourceId": 363,
"maker": "keithwoodlock",
"madeOnDate": 1365012843000,
"processingResult": "awaiting.approval",
"officeName": "my office name"
},
{
"id": 670,
"actionName": "CREATE",
"entityName": "CLIENTNOTE",
"resourceId": 287,
"maker": "keithwoodlock",
"madeOnDate": 1365014204000,
"processingResult": "awaiting.approval",
"officeName": "my office name",
"clientName": "gg ggg"
}
]
</code>
</div>
</div>
<a id="makercheckers_searchtemplate" name="makercheckers_searchtemplate"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Maker Checker Search Template</h4>
<p>This is a convenience resource. It can be useful when
building a Checker Inbox UI. "appUsers" are data scoped to
the office/branch the requestor is associated with.
"actionNames" and "entityNames" returned are those that the
requestor has Checker approval permissions for.
</p>
<p>Example Requests:</p>
<div class=apiClick>makercheckers/searchtemplate</div>
<div class=apiClick>makercheckers/searchtemplate?fields=entityNames</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/audits/searchtemplate
</code>
<code class="method-response">
{
"appUsers": [
{
"id": 30,
"username": "user 1"
},
{
"id": 28,
"username": "user 2"
},
{
"id": 35,
"username": "user 3"
},...
],
"actionNames": [
"CREATE",
"DELETE",
"UPDATE",
"ACTIVATE",
"ADJUST",
"APPROVALUNDO",
"APPROVE",...
],
"entityNames": [
"CALENDAR",
"CENTER",
"CHARGE",
"CLIENT",
"CLIENTIDENTIFIER",...
]
}
</code>
</div>
</div>
<a id="makercheckers_approve" name="makercheckers_approve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Approve Maker Checker Entry</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/makercheckers/{auditId}?command=approve
</code>
<code class="method-request">
POST makercheckers/1?command=approve
Content-Type: application/json
</code>
<code class="method-response">{ "auditId": 1 } </code>
</div>
</div>
<a id="makercheckers_delete" name="makercheckers_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete Maker Checker Entry</h4>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/makercheckers/{auditId}
</code>
<code class="method-request">
DELETE makercheckers/1
Content-Type: application/json
</code>
<code class="method-response">{ "auditId": 1 } </code>
</div>
</div>
<!-- Maker Checker starts here -->
<a id="scheduler_jobs" name="scheduler_jobs" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>MIFOSX-BATCH JOBS</h3>
<p>Batch jobs (also known as cron jobs on Unix-based systems) are a series of back-end jobs executed on a computer at a particular time defined in job's cron expression.
</p>
<p>At any point, you can view the list of batch jobs scheduled to run along with other details specific to each job. Manually you can execute the jobs at any point of time.
</p>
<p>The scheduler status can be either "Active" or "Standby". If the scheduler status is Active, it indicates that all batch jobs are running/ will run as per the specified schedule.If the scheduler status is Standby, it will ensure all scheduled batch runs are suspended.
</p>
</div>
</div>
<a id="scheduler_jobs_list" name="scheduler_jobs_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Scheduler Jobs</h4>
<p>Returns the list of jobs.</p>
<p>Example Requests:</p>
<div class=apiClick>jobs</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/jobs
</code>
<code class="method-response">
[
{
"jobId": 1,
"displayName": "Update loan Summary",
"cronExpression": "0 0 22 1/1 * ? *",
"active": false,
"currentlyRunning": false,
"lastRunHistory": {
"version": 17,
"jobRunStartTime": "Jul 26, 2013 1:38:26 PM",
"jobRunEndTime": "Jul 26, 2013 1:38:26 PM",
"status": "success",
"triggerType": "application"
}
},
{
"jobId": 2,
"displayName": "Update Loan Arrears Ageing",
"nextRunTime": "Jul 27, 2013 12:01:00 AM",
"cronExpression": "0 1 0 1/1 * ? *",
"active": true,
"currentlyRunning": false,
"lastRunHistory": {
"version": 18,
"jobRunStartTime": "Jul 26, 2013 4:05:32 PM",
"jobRunEndTime": "Jul 26, 2013 4:05:32 PM",
"status": "success",
"triggerType": "application"
}
},
{
"jobId": 3,
"displayName": "Update Loan Paid In Advance",
"nextRunTime": "Jul 27, 2013 12:05:00 AM",
"cronExpression": "0 5 0 1/1 * ? *",
"active": true,
"currentlyRunning": false,
"lastRunHistory": {
"version": 16,
"jobRunStartTime": "Jul 26, 2013 4:15:47 PM",
"jobRunEndTime": "Jul 26, 2013 4:15:47 PM",
"status": "success",
"triggerType": "application"
}
},
{
"jobId": 4,
"displayName": "Apply Annual Fee For Savings",
"nextRunTime": "Jul 26, 2013 10:20:00 PM",
"cronExpression": "0 20 22 1/1 * ? *",
"active": true,
"currentlyRunning": false,
"lastRunHistory": {
"version": 11,
"jobRunStartTime": "Jul 26, 2013 12:00:37 PM",
"jobRunEndTime": "Jul 26, 2013 12:00:38 PM",
"status": "success
"triggerType": "application"
}
},
{
"jobId": 5,
"displayName": "Apply Holidays To Loans",
"nextRunTime": "Jul 27, 2013 12:00:00 PM",
"cronExpression": "0 0 12 * * ?",
"active": true,
"currentlyRunning": false,
"lastRunHistory": {
"version": 16,
"jobRunStartTime": "Jul 26, 2013 4:31:54 PM",
"jobRunEndTime": "Jul 26, 2013 4:31:55 PM",
"status": "success",
"triggerType": "application"
}
}
]
</code>
</div>
</div>
<a id="retrieve_scheduler_job" name="retrieve_scheduler_job"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Job</h4>
<p>Returns the details of a Job.</p>
<p>Example Requests:</p>
<div class=apiClick>jobs/5</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/jobs/{jobId}
</code>
<code class="method-response">
https://localhost:8443/mifosng-provider/api/v1/jobs/5
{
"jobId": 5,
"displayName": "Apply Holidays To Loans",
"nextRunTime": "Jul 27, 2013 12:00:00 PM",
"cronExpression": "0 0 12 * * ?",
"active": true,
"currentlyRunning": false,
"lastRunHistory": {
"version": 16,
"jobRunStartTime": "Jul 26, 2013 4:31:54 PM",
"jobRunEndTime": "Jul 26, 2013 4:31:55 PM",
"status": "success",
"triggerType": "application"
}
}
</code>
</div>
</div>
<a id="update_scheduler_job" name="update_scheduler_job"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Job</h4>
<p>Updates the details of a job.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/jobs/{jobId}
</code>
<code class="method-request">
PUT jobs/1
Content-Type: application/json
{
"displayName":"Update loan Summary",
"cronExpression":"0 0 22 1/1 * ? *",
"active":"true"
} </code>
</div>
</div>
<a id="run_job" name="run_job"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Run a Job</h4>
<p>Manually Execute Specific Job.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/jobs/{jobId}?command=executeJob
</code>
<code class="method-request">
POST jobs/1?command=executeJob
</code>
</div>
</div>
<a id="retrieve_job_runhistory" name="retrieve_job_runhistory"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Job Run History</h4>
<p>Example Requests:</p>
<div class=apiClick>jobs/5/runhistory?offset=0&limit=200</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/jobs/{jobid}/runhistory?offset=0&limit=200
</code>
<code class="method-response">
{
"totalFilteredRecords": 8,
"pageItems": [
{
"version": 1,
"jobRunStartTime": "Jul 16, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 16, 2013 12:00:00 PM",
"status": "success",
"triggerType": "cron"
},
{
"version": 2,
"jobRunStartTime": "Jul 17, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 17, 2013 12:00:00 PM",
"status": "success",
"triggerType": "cron"
},
{
"version": 3,
"jobRunStartTime": "Jul 18, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 18, 2013 12:00:01 PM",
"status": "success",
"triggerType": "cron"
},
{
"version": 4,
"jobRunStartTime": "Jul 19, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 19, 2013 12:00:00 PM",
"status": "success",
"triggerType": "cron"
},
{
"version": 5,
"jobRunStartTime": "Jul 20, 2013 11:16:07 AM",
"jobRunEndTime": "Jul 20, 2013 11:16:07 AM",
"status": "success",
"triggerType": "application"
},
{
"version": 6,
"jobRunStartTime": "Jul 20, 2013 11:35:05 AM",
"jobRunEndTime": "Jul 20, 2013 11:35:05 AM",
"status": "success",
"triggerType": "application"
},
{
"version": 7,
"jobRunStartTime": "Jul 20, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 20, 2013 12:00:00 PM",
"status": "success",
"triggerType": "cron"
},
{
"version": 8,
"jobRunStartTime": "Jul 22, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 22, 2013 12:00:00 PM",
"status": "success",
"triggerType": "cron"
}
]
}
</code>
</div>
</div>
<a id="retrieve_scheduler_status" name="retrieve_scheduler_status"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Scheduler Status</h4>
<p>Returns the scheduler status.</p>
<p>Example Requests:</p>
<div class=apiClick>scheduler</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/scheduler
</code>
<code class="method-response">
https://localhost:8443/mifosng-provider/api/v1/scheduler
{
"active": true
}
</code>
</div>
</div>
<a id="activate_scheduler" name="activate_scheduler"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Activate Scheduler Jobs</h4>
<p>Activates the scheduler job service.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/scheduler?command=start
</code>
<code class="method-request">
POST scheduler?command=start
</code>
</div>
</div>
<a id="suspend_scheduler" name="suspend_scheduler" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Suspend Scheduler Jobs</h4>
<p>Suspends the scheduler job service.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/scheduler?command=stop
</code>
<code class="method-request">
POST scheduler?command=stop
</code>
</div>
</div>
<!-- Fund starts here -->
<a id="funds" name="funds" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Funds</h3>
</div>
</div>
<a id="funds_create" name="funds_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Fund</h4>
<p>Creates a fund.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/funds
</code>
<code class="method-request">
POST funds
Content-Type: application/json
Request Body:
{
"name": "EU Agri Fund"
}
</code>
<code class="method-response">
{
"resourceId": 1
}
</code>
</div>
</div>
<a id="funds_retrieve" name="funds_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Funds</h4>
<p>Returns the list of funds.</p>
<p>Example Requests:</p>
<div class=apiClick>funds</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/funds
</code>
<code class="method-response">
[
{
"id": 1,
"name": "EU Agri Fund"
}
]
</code>
</div>
</div>
<a id="fund_retrieve" name="fund_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Fund</h4>
<p>Returns the details of a Fund.</p>
<p>Example Requests:</p>
<div class=apiClick>funds/1</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/funds/{fundId}
</code>
<code class="method-response">
{
"id": 1,
"name": "EU Agri Fund"
}
</code>
</div>
</div>
<a id="fund_update" name="fund_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Fund</h4>
<p>Updates the details of a fund.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/funds/{fundId}
</code>
<code class="method-request">
PUT funds/1
Content-Type: application/json
Request Body:
{
"name": "EU Agri Fund (2010-2020)"
}
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {
"name": "EU Agri Fund (2010-2020)"
}
}
</code>
</div>
</div>
<a id="staff" name="staff" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Staff</h3>
<p>Allows you to model staff members. At present the key role
of significance is whether this staff member is a loan officer or
not.</p>
</div>
</div>
<a id="staff_create" name="staff_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a staff member</h4>
<p>Creates a staff member.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/staff
</code>
<code class="method-request">
POST staff
Content-Type: application/json
Request Body:
{
"officeId": 1,
"firstname": "John",
"lastname": "Doe",
"isLoanOfficer": "true",
"externalId": "17H"
}
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="staff_list" name="staff_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Staff</h4>
<p>Returns the list of staff members.</p>
<p>Example Requests:</p>
<div class=apiClick>staff</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/staff
</code>
<code class="method-response">
[
{
"id": 1,
"firstname": "John",
"lastname": "Doe",
"displayName": "Doe, John",
"officeId": 1,
"officeName": "Head Office",
"isLoanOfficer": true,
"externalId": "17H"
}
]
</code>
</div>
</div>
<a id="staff_retrieve" name="staff_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Staff Member</h4>
<p>Returns the details of a Staff Member.</p>
<p>Example Requests:</p>
<div class=apiClick>staff/1</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://DomainName/api/v1/staff/{staffId}</code>
<code class="method-response">
{
"id": 1,
"firstname": "John",
"lastname": "Doe",
"displayName": "Doe, John",
"officeId": 1,
"officeName": "Head Office",
"isLoanOfficer": true,
"externalId": "17H"
}
</code>
</div>
</div>
<a id="staff_update" name="staff_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Staff Member</h4>
<p>Updates the details of a staff member.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/staff/{staffId}
</code>
<code class="method-request">
PUT staff/1
Content-Type: application/json
Request Body:
{
"isLoanOfficer": "false",
"externalId": "17Hbb"
}
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 1,
"changes": {
"isLoanOfficer": false,
"externalId": "17Hbb"
}
}
</code>
</div>
</div>
<!--Charges section starts here-->
<a id="charges" name="charges" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Charges</h3>
<p>
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 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_template" name="charges_template"
class="old-syle-anchor">&nbsp;</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">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create/Define a Charge</h4>
<p>Define a new charge that can later be associated with loan
products or loans.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/charges
</code>
<code class="method-request">
POST charges
Content-Type: application/json
Request Body:
{
"name": "Loan service fee",
"chargeAppliesTo": 1,
"currencyCode": "USD",
"locale": "en",
"amount": "230.56",
"chargeTimeType": "1",
"chargeCalculationType": "1",
"active": true
}
</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>
<a id="charges_list" name="charges_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Charges</h4>
<p>Returns the list of defined charges.</p>
<p>Example Requests:</p>
<div class=apiClick>charges</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/charges
</code>
<code class="method-response">
[
{
"id": 1,
"name": "Loan service fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 230.56,
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
}
]
</code>
</div>
</div>
<a id="charges_retrieve" name="charges_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Charge</h4>
<p>Returns the details of a defined Charge.</p>
<p>Example Requests:</p>
<div class=apiClick>charges/1</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/charges/{chargeId}
</code>
<code class="method-response">
{
"id": 1,
"name": "Loan service fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 230.56,
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
}
</code>
</div>
</div>
<a id="charges_update" name="charges_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Charge</h4>
<p>Updates the details of a Charge.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/charges/{chargeId}
</code>
<code class="method-request">
PUT charges/1
Content-Type: application/json
Request Body:
{
"name": "Loan service fee(changed)"
}
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {
"name": "Loan service fee(changed)"
}
}
</code>
</div>
</div>
<a id="charges_delete" name="charges_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Charge</h4>
<p>Deletes a Charge.</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/charges/{chargeId}
</code>
<code class="method-request">
DELETE charges/1
Content-Type: application/json
</code>
<code class="method-response">{ "resourceId": 1 } </code>
</div>
</div>
<!--Accounting Rules section starts here-->
<a id="accountingrules" name="accountingrules" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Accounting Rules</h3>
<p>
It is typical scenario in MFI's that non accountants pass journal entries on a regular basis.
For Ex: A branch office might deposit their entire cash at hand to their Bank account at the end of a
working day. The branch office users might not understand enough of accounting to figure out which
account needs to get credited and which account needs to be debited to represent this transaction.
</p>
<p>Enter accounting rules, an abstraction on top of manual Journal entires for enabling
simpler data entry.
An accounting rule can define any of the following abstractions
<ul>
<li>A Simple journal entry where both the credit and debit account have been preselected</li>
<li>A Simple journal entry where either credit or debit accounts have been limited to a
pre-selected list of accounts (Ex: Debit account should be one of "Bank of America" of "JP Morgan"
and credit account should be "Cash")
</li>
<li>A Compound journal entry where multiple debits and / or multiple credits may be made
amongst a set of preselected list of accounts (Ex: Credit account should be either "Bank Of America"
or "Cash" and debit account can be "Employee Salary" and/or "Miscellenous Expenses")
</li>
</ul>
</p>
<p>An accounting rule can also be optionally associated with a branch, so that only a particular Branch's
users have access to the rule</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 of the accounting rule</td>
</tr>
<tr class=alt>
<td>description</td>
</tr>
<tr>
<td class=fielddesc>A description of the accounting rule.</td>
</tr>
<tr class=alt>
<td>officeId</td>
</tr>
<tr>
<td class=fielddesc>An Optional Office for this accounting rule is applicable.</td>
</tr>
<tr class=alt>
<td>accountToDebit</td>
</tr>
<tr>
<td class=fielddesc>ID of the target account to be Debited</td>
</tr>
<tr class=alt>
<td>accountToCredit</td>
</tr>
<tr>
<td class=fielddesc>ID of the target account to be Credited</td>
</tr>
<tr class=alt>
<td>debitTags</td>
</tr>
<tr>
<td class=fielddesc>A list of accounting Tags. Any Ledger account with this tag can serve as the
account to be debited.<br> This parameter is optional, if <b>accountToDebit</b> present in the request params</td>
</tr>
<tr class=alt>
<td>creditTags</td>
</tr>
<tr>
<td class=fielddesc>A list of accounting Tags. Any Ledger account with this tag can serve as the
account to be credited.<br> This parameter is optional, if <b>accountToCredit</b> present in the request params</td></td>
</tr>
<tr class=alt>
<td>allowMultipleDebitEntries</td>
</tr>
<tr>
<td class=fielddesc>Allows passing multiple debit entries for the accounting rule</td>
</tr>
<tr class=alt>
<td>allowMultipleCreditEntries</td>
</tr>
<tr>
<td class=fielddesc>Allows passing multiple credit entries for the accounting rule</td>
</tr>
</table>
</div>
</div>
<a id="accountingrules_template" name="accountingrules_template"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Accounting Rule 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>accountingrules/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/accountingrules/template
</code>
<code class="method-response">
{
"systemDefined": false,
"allowedOffices": [{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}],
"allowedAccounts": [{
"id": 21,
"name": "Cash 2",
"parentId": 18,
"glCode": "20011",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Cash",
"nameDecorated": "............Cash 2",
"tagId": {
"id": 10,
"name": "asset tag"
}
},
{
"id": 9,
"name": "Employee Salary",
"parentId": 8,
"glCode": "456674",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Employee Salary",
"tagId": {
"id": 14,
"name": "Expenses Tag"
}
}]
}
</code>
</div>
</div>
<a id="accountingrules_create" name="accountingrules_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create/Define a Accounting rule</h4>
<p>Define a new Accounting rule.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>name, officeId,<br> accountToDebit OR debitTags,<br> accountToCredit OR creditTags.<br>
</td>
</tr>
</table>
<br />
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Optional Fields</div></td>
</tr>
<tr class=alt>
<td>description</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/accountingrules
</code>
<code class="method-request">
POST accountingrules
Content-Type: application/json
Request Body:
{
"name": "test",
"officeId": "1",
"accountToDebit": "21",
"accountToCredit": "9",
"description": "Employee salary"
}
</code>
<code class="method-response">
{
"officeId":1,
"resourceId":1
}
</code>
<code class="method-request">
POST accountingrules
Content-Type: application/json
Request Body:
{
"name": "fordocs",
"officeId": "1",
"debitTags": ["10","11"],
"allowMultipleDebitEntries": "true",
"creditTags": ["12","13"],
"allowMultipleCreditEntries": "true",
"description": "for api docs"
}
</code>
<code class="method-response">
{
"officeId":1,
"resourceId":2
}
</code>
<code class="method-request">
POST accountingrules
Content-Type: application/json
Request Body:
{
"name": "test123",
"officeId": "1",
"accountToDebit": "21",
"creditTags": ["12", "13"],
"allowMultipleCreditEntries": "false",
"description": "Employee salary"
}
</code>
<code class="method-response">
{
"officeId":1,
"resourceId":3
}
</code>
<code class="method-request">
POST accountingrules
Content-Type: application/json
Request Body:
{
"name": "fordocstest",
"officeId": "1",
"debitTags": ["10","11"],
"allowMultipleDebitEntries": "false",
"accountToCredit": "9",
"description": "for api docs"
}
</code>
<code class="method-response">
{
"officeId":1,
"resourceId":4
}
</code>
</div>
</div>
<a id="accountingrules_list" name="accountingrules_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Accounting Rules</h4>
<p>Returns the list of defined accounting rules.</p>
<p>Example Requests:</p>
<div class=apiClick>accountingrules</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/accountingrules
</code>
<code class="method-response">
[{
"id": 1,
"officeId": 1,
"officeName": "Head Office",
"name": "test",
"description": "Employee salary",
"systemDefined": false,
"debitAccountHead": {
"id": 21,
"name": "Cash 2",
"glCode": "20011",
"disabled": false,
"manualEntriesAllowed": false
},
"creditAccountHead": {
"id": 9,
"name": "Employee Salary",
"glCode": "456674",
"disabled": false,
"manualEntriesAllowed": false
}
},
{
"id": 2,
"officeId": 1,
"officeName": "Head Office",
"name": "A L1",
"description": "aafff",
"systemDefined": false,
"debitAccountHead": {
"id": 3,
"name": "A L",
"glCode": "10003",
"disabled": false,
"manualEntriesAllowed": false
},
"creditAccountHead": {
"id": 4,
"name": "car loan",
"glCode": "10004",
"disabled": false,
"manualEntriesAllowed": false
}
}]
</code>
</div>
</div>
<a id="accountingrules_retrieve" name="accountingrules_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Accounting rule</h4>
<p>Returns the details of a defined Accounting rule.</p>
<p>Example Requests:</p>
<div class=apiClick>accountingrules/1</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/accountingrules/{accountingruleId}
</code>
<code class="method-response">
{
"id": 1,
"officeId": 1,
"officeName": "Head Office",
"name": "test",
"description": "Employee salary",
"systemDefined": false,
"debitAccountHead": {
"id": 21,
"name": "Cash 2",
"glCode": "20011",
"disabled": false,
"manualEntriesAllowed": false
},
"creditAccountHead": {
"id": 9,
"name": "Employee Salary",
"glCode": "456674",
"disabled": false,
"manualEntriesAllowed": false
}
}
</code>
</div>
</div>
<a id="accountingrules_update" name="accountingrules_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Accounting Rule</h4>
<p>Updates the details of a Accounting rule.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/accountingrules/{accountingruleId}
</code>
<code class="method-request">
PUT accountingrules/1
Content-Type: application/json
Request Body:
{
"name": "Employee Salary posting rule"
}
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {
"name": "Employee Salary posting rule"
}
}
</code>
</div>
</div>
<a id="accountingrules_delete" name="accountingrules_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Accounting Rule</h4>
<p>Deletes a Accounting rule.</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/accountingrules/{accountingruleId}
</code>
<code class="method-request">
DELETE accountingrules/1
Content-Type: application/json
</code>
<code class="method-response">{ "resourceId": 1 } </code>
</div>
</div>
<!-- start of saving products api docs -->
<a id="savingsproducts" name="savingsproducts" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Savings Product:</h3>
<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 the savings account application process.</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>The name of the product offering.</td></tr>
<tr class=alt><td>description</td></tr>
<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 representing currency.</td></tr>
<tr class=alt><td>digitsAfterDecimal</td></tr>
<tr><td class=fielddesc>Override the currency default value for digitsAfterDecimal.</td></tr>
<tr class=alt><td>inMultiplesOf</td></tr>
<tr><td class=fielddesc>Override the default value for rounding currency to multiples of provided value.</td></tr>
<tr class=alt><td>nominalAnnualInterestRate</td></tr>
<tr><td class=fielddesc>The default interest rate set when creating savings accounts of this type of product. e.g. <b>5</b>% Per year - It number here is always expressed as the Nominal APR.</td></tr>
<tr class=alt><td>interestCompoundingPeriodType</td></tr>
<tr><td class=fielddesc>The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month)</td></tr>
<tr class=alt><td>interestPostingPeriodType</td></tr>
<tr><td class=fielddesc>The period at which interest rate is posted or credited to savings account. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec)</td></tr>
<tr class=alt><td>interestCalculationType</td></tr>
<tr><td class=fielddesc>The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance</td></tr>
<tr class=alt><td>interestCalculationDaysInYearType</td></tr>
<tr><td class=fielddesc>The setting for number of days in year to use: 360=360 Days, 365=365 Days</td></tr>
<tr class=alt><td>minRequiredOpeningBalance</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, sets the minimum deposit amount required to open a savings account e.g. <b>2,000</b></td></tr>
<tr class=alt><td>lockinPeriodFrequency</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>lockinPeriodFrequencyType</i> to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. e.g. <b>6</b> Months</td></tr>
<tr class=alt><td>lockinPeriodFrequencyType</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>lockinPeriodFrequency</i> to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years
e.g. 6 <b>Months</b></td></tr>
<tr class=alt><td>withdrawalFeeAmount</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>withdrawalFeeType</i> to indicate the amount to be charged on the account for withdrawing. e.g. <b>5</b> Flat or <b>5</b> % of Amount</td></tr>
<tr class=alt><td>withdrawalFeeType</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>withdrawalFeeAmount</i> to indicate the amount to be charged on the account for withdrawing. 1=Flat, 2=% of Amount, e.g. 5 <b>Flat</b> or 5 <b>% of Amount</b></td></tr>
<tr class=alt><td>withdrawalFeeForTransfers</td></tr>
<tr><td class=fielddesc><b>Optional</b>: Used along with <i>withdrawalFeeAmount</i> to indicate whether the withdrawal fee should be applied on the account for account transfers .</td></tr>
<tr class=alt><td>annualFeeAmount</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>annualFeeOnMonthDay</i> to indicate the amount to be charged on the account annually on a given day of month. e.g. <b>10</b> on 10 May. <i>monthDayFormat</i> indicates day and month formatting used e.g. "dd MMM" for 10 May
</td>
</tr>
<tr class=alt><td>annualFeeOnMonthDay</td></tr>
<tr>
<td class=fielddesc><b>Optional</b>: If provided, used along with <i>annualFeeAmount</i> and <i>monthDayFormat</i> to indicate the amount to be charged on the account annually on a given day of month. e.g. 10 on <b>10 May</b>. <i>monthDayFormat</i> indicates day and month formatting used e.g. "dd MMM" for 10 May
</td>
</tr>
<tr class=alt><td>accountingRule</td></tr>
<tr>
<td class=fielddesc>Specifies if accounting is enabled for the particular
product and the type of the accounting rule to be used
<span>Example Values:</span>1=NONE,2=CASH_BASED</td>
</tr>
</table>
</div>
</div>
<a id="savingsproducts_template" name="savingsproducts_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Savings Product 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>savingsproducts/template</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingsproducts/template</code>
<code class="method-response">
{
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"accountingRule": {
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
},
"currencyOptions": [
{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
],
"interestCompoundingPeriodTypeOptions": [
{
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
{
"id": 2,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.weekly",
"value": "Weekly"
},
{
"id": 3,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.biweekly",
"value": "Bi-Weekly"
},
{
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
},
{
"id": 5,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.quarterly",
"value": "Quarterly"
},
{
"id": 6,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.biannual",
"value": "Semi-Annual"
},
{
"id": 7,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.annual",
"value": "Annually"
},
{
"id": 8,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.nocompounding",
"value": "No Compounding - Simple Interest"
}
],
"interestPostingPeriodTypeOptions": [
{
"id": 4,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.monthly",
"value": "Monthly"
},
{
"id": 5,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.quarterly",
"value": "Quarterly"
},
{
"id": 6,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.biannual",
"value": "Semi-Annual"
},
{
"id": 7,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.annual",
"value": "Annually"
}
],
"interestCalculationTypeOptions": [
{
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
{
"id": 2,
"code": "savingsInterestCalculationType.averagedailybalance",
"value": "Average Daily Balance"
}
],
"interestCalculationDaysInYearTypeOptions": [
{
"id": 360,
"code": "savingsInterestCalculationDaysInYearType.days360",
"value": "360 Days"
},
{
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
}
],
"lockinPeriodFrequencyTypeOptions": [
{
"id": 0,
"code": "savings.lockin.savingsPeriodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "savings.lockin.savingsPeriodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "savings.lockin.savingsPeriodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "savings.lockin.savingsPeriodFrequencyType.years",
"value": "Years"
}
],
"withdrawalFeeTypeOptions": [
{
"id": 1,
"code": "savingsWithdrawalFeesType.flat",
"value": "Flat"
},
{
"id": 2,
"code": "savingsWithdrawalFeesType.percent.of.amount",
"value": "% of Amount"
}
],
"paymentTypeOptions": [
{
"id": 14,
"name": "Wire Transfer",
"position": 0
},
{
"id": 13,
"name": "Cash",
"position": 1
}
],
"accountingRuleOptions": [
{
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
},
{
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
},
{
"id": 3,
"code": "accountingRuleType.accrual",
"value": "ACCRUAL BASED"
}
],
"accountingMappingOptions": {
"liabilityAccountOptions": [
{
"id": 15,
"name": "Savings Control",
"glCode": "50001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Savings Control",
"tagId": {
"id": 0
}
}
],
"assetAccountOptions": [
{
"id": 2,
"name": "Cash",
"glCode": "100001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 16,
"name": "Savings Reference",
"glCode": "100007",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Savings Reference",
"tagId": {
"id": 0
}
},
{
"id": 12,
"name": "HDFC Rajajinagar",
"glCode": "100015",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 1,
"name": "Loan Portfolio",
"glCode": "10003",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 7,
"name": "Interest Receivable",
"glCode": "10005",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 8,
"name": "Penalties Receivable",
"glCode": "10008",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 9,
"name": "Fee Receivable",
"glCode": "10009",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
}
],
"expenseAccountOptions": [
{
"id": 6,
"name": "Write Off Expenses",
"glCode": "60001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 13,
"name": "Employee Salary",
"glCode": "60002",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 18,
"name": "Interest On Savings",
"glCode": "60003",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Interest On Savings",
"tagId": {
"id": 0
}
}
],
"incomeAccountOptions": [
{
"id": 3,
"name": "Income from Interest",
"glCode": "40001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 4,
"name": "Income from Fees",
"glCode": "40002",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 5,
"name": "Income from Penalties",
"glCode": "40004",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
}
]
}
}
</code>
</div>
</div>
<a id="savingsproducts_create" name="savingsproducts_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Savings Product</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
<tr class=alt>
<td>name, description, currencyCode, digitsAfterDecimal,inMultiplesOf, nominalAnnualInterestRate,
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType,accountingRule</td>
</tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields for Cash based accounting (accountingRule = 2)</div></td></tr>
<tr class=alt>
<td>savingsReferenceAccountId,savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId</td>
</tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Optional Fields</div></td></tr>
<tr class=alt><td>minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeAmount, withdrawalFeeType,withdrawalFeeForTransfers, annualFeeAmount, annualFeeOnMonthDay, monthDayFormat, paymentChannelToFundSourceMappings</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsproducts</code>
<code class="method-request">POST savingsproducts
Content-Type: application/json
Request Body:
{
"name": "Passbook Savings",
"description": "Daily compounding using Daily Balance, 5% per year, 365 days in year",
"currencyCode": "USD",
"digitsAfterDecimal": 2,
"inMultiplesOf": 0,
"locale": "en",
"nominalAnnualInterestRate": "5.0",
"interestCompoundingPeriodType": 1,
"interestPostingPeriodType":4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": "365",
"accountingRule":"1"
}
</code>
<code class="method-response">
{
"resourceId": 1
}
</code>
<code class="method-request">POST savingsproducts
Content-Type: application/json
Request Body:
{
"locale": "en",
"name": "New Passbook Savings ",
"description": "A savings product",
"currencyCode": "USD",
"digitsAfterDecimal": "2",
"inMultiplesOf": 0,
"nominalAnnualInterestRate": "15",
"interestCompoundingPeriodType": "1",
"interestPostingPeriodType": "4",
"interestCalculationType": "1",
"interestCalculationDaysInYearType": "365",
"minRequiredOpeningBalance": "50",
"lockinPeriodFrequency": "4",
"lockinPeriodFrequencyType": "1",
"withdrawalFeeAmount": "12",
"withdrawalFeeType": "1",
"withdrawalFeeForTransfers":false,
"monthDayFormat": "dd MMM",
"annualFeeAmount": "12",
"annualFeeOnMonthDay": "01 May",
"accountingRule": "2",
"savingsReferenceAccountId": "16",
"savingsControlAccountId": "15",
"interestOnSavingsAccountId": "18",
"incomeFromFeeAccountId": "4",
"paymentChannelToFundSourceMappings": [
{
"paymentTypeId": "14",
"fundSourceAccountId": "2"
}
]
}
</code>
<code class="method-response">
{
"resourceId": 1
}
</code>
</div>
</div>
<a id="savingsproducts_retrieve" name="savingsproducts_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Savings Product</h4>
<p>Example Requests: </p>
<div class=apiClick>savingsproducts/1</div>
<br><br>
<div class=apiClick>savingsproducts/1?template=true</div>
<br><br>
<div class=apiClick>savingsproducts/1?fields=name,description</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingsproducts/1</code>
<code class="method-response">
{
"id": 1,
"name": "First Product",
"description": "A cool saving product",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 50.000000,
"interestCompoundingPeriodType": {
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"minRequiredOpeningBalance": 20.000000,
"lockinPeriodFrequency": 1,
"lockinPeriodFrequencyType": {
"id": 1,
"code": "savings.lockin.savingsPeriodFrequencyType.weeks",
"value": "Weeks"
},
"withdrawalFeeAmount": 12.000000,
"withdrawalFeeType": {
"id": 1,
"code": "savingsWithdrawalFeesType.flat",
"value": "Flat"
},
"withdrawalFeeForTransfers":true,
"annualFeeAmount": 100.000000,
"annualFeeOnMonthDay": [
5,
1
],
"accountingRule": {
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
},
"accountingMappings": {
"savingsReferenceAccountId": 16,
"incomeFromFeeAccountId": 4,
"interestOnSavingsAccountId": 18,
"savingsControlAccountId": 15
},
"paymentChannelToFundSourceMappings": [
{
"paymentTypeId": 14,
"fundSourceAccountId": 2
}
]
}
</code>
</div>
</div>
<a id="savingsproducts_update" name="savingsproducts_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Savings Product</h4>
</div>
<div class="method-example">
<code class="method-declaration">PUT https://Domain Name/api/v1/savingsproducts/{productId}</code>
<code class="method-request">POST savingsproducts/1
Content-Type: application/json
Request Body:
{
"description": "Passbook Savings Lite.",
"locale": "en",
"interestRate": "5.73"
}
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {
"description": "Passbook Savings Lite.",
"interestRate": 5.73,
"locale": "en"
}
}
</code>
</div>
</div>
<a id="savingsproducts_delete" name="savingsproducts_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Savings Product</h4>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://Domain Name/api/v1/savingsproducts/{productId}
</code>
<code class="method-request">
DELETE savingsproducts/1
Content-Type: application/json
</code>
<code class="method-response">
{
"resourceId": 1
}
</code>
</div>
</div>
<a id="savingsproducts_list" name="savingsproducts_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Savings Products</h4>
<p>Example Requests:</p>
<div class=apiClick>savingsproducts</div>
<br><br>
<div class=apiClick>savingsproducts?fields=name</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingsproducts</code>
<code class="method-response">
[
{
"id": 1,
"name": "Passbook Savings",
"description": "Daily compounding using Daily Balance, 5% per year, 365 days in year",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
}
}
]
</code>
</div>
</div>
<!-- end of saving products api docs -->
<!-- start of savings accounts api -->
<a id="savingsaccounts" name="savingsaccounts" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Savings Account:</h2>
<p>Savings accounts are instances of a praticular savings product created for an individual or group. An application process around the creation of accounts is also supported.</p>
<table class=matrixHeading>
<thead>
<tr class="matrixHeadingBG">
<td class="mifosXHeading2">Starting State</td>
<td class="mifosXHeading2">Action</td>
<td class="mifosXHeading2">Resultant State</td>
</tr>
</thead>
<tbody>
<tr>
<td>-</td>
<td>Submit</td>
<td>Submitted and pending approval</td>
</tr>
<tr>
<td>Submitted and pending approval</td>
<td>Reject</td>
<td>Closed - Rejected</td>
</tr>
<tr>
<td>Submitted and pending approval</td>
<td>Withdrawn by Applicant</td>
<td>Closed - Withdrawn by Applicant</td>
</tr>
<tr>
<td>Submitted and pending approval</td>
<td>Approve</td>
<td>Approved</td>
</tr>
<tr>
<td>Approved</td>
<td>Undo Approval</td>
<td>Submitted and pending approval</td>
</tr>
<tr>
<td>Approved</td>
<td>Activate</td>
<td>Active</td>
</tr>
</tbody>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Field Descriptions</div></td></tr>
<tr class=alt><td>clientId</td></tr>
<tr><td class=fielddesc>The client you are creating the savings account for. Either <i>clientId</i> or <i>groupId</i> must be provided.</td></tr>
<tr class=alt><td>groupId</td></tr>
<tr><td class=fielddesc>The group you are creating the savings account for. Either <i>clientId</i> or <i>groupId</i> must be provided.</td></tr>
<tr class=alt><td>productId</td></tr>
<tr><td class=fielddesc>The id of the product used for this savings account. The savings account <b>inherits the selected currency</b> of the product and <b>possibly other details if not overridden</b> in the savings account creation request.</td></tr>
<tr class=alt><td>accountNo</td></tr>
<tr><td class=fielddesc>The account no. associated with this loan. Is auto generated if not provided at creation time.</td></tr>
<tr class=alt><td>externalId</td></tr>
<tr><td class=fielddesc>A place to put an external reference for this savings account useful in migrations e.g. The ID another system uses. If provided, it must be unique.</td></tr>
<tr class=alt><td>submittedOnDate</td></tr>
<tr><td class=fielddesc><i>submittedOnDate</i> must be provided when initially creating savings account application. <i>locale</i> and <i>dateFormat</i> parameters must be provided with this.</td></tr>
<tr class=alt><td>nominalAnnualInterestRate</td></tr>
<tr><td class=fielddesc>The interest rate set for savings account e.g. <b>5</b>% Per year - It is always expressed as the Nominal APR.</td></tr>
<tr class=alt><td>interestCompoundingPeriodType</td></tr>
<tr><td class=fielddesc>The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month)</td></tr>
<tr class=alt><td>interestPostingPeriodType</td></tr>
<tr><td class=fielddesc>The period at which interest rate is posted or credited to savings account. The actual crediting or posting transaction is date as occurring on the day after the end of the period. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec), 7=Annually (at end of calendar year 31st Dec)</td></tr>
<tr class=alt><td>interestCalculationType</td></tr>
<tr><td class=fielddesc>The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance</td></tr>
<tr class=alt><td>interestCalculationDaysInYearType</td></tr>
<tr><td class=fielddesc>The setting for number of days in year to use: 360=360 Days, 365=365 Days</td></tr>
<tr class=alt><td>minRequiredOpeningBalance</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, sets the minimum deposit amount required to open a savings account e.g. <b>2,000</b></td></tr>
<tr class=alt><td>lockinPeriodFrequency</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>lockinPeriodFrequencyType</i> to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. e.g. <b>6</b> Months</td></tr>
<tr class=alt><td>lockinPeriodFrequencyType</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>lockinPeriodFrequency</i> to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years
e.g. 6 <b>Months</b></td></tr>
<tr class=alt><td>withdrawalFeeAmount</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>withdrawalFeeType</i> to indicate the amount to be charged on the account for withdrawing. e.g. <b>5</b> Flat or <b>5</b> % of Amount</td></tr>
<tr class=alt><td>withdrawalFeeType</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>withdrawalFeeAmount</i> to indicate the amount to be charged on the account for withdrawing. 1=Flat, 2=% of Amount, e.g. 5 <b>Flat</b> or 5 <b>% of Amount</b></td></tr>
<tr class=alt><td>withdrawalFeeForTransfers</td></tr>
<tr><td class=fielddesc><b>Optional</b>: Used along with <i>withdrawalFeeAmount</i> to indicate whether the withdrawal fee should be applied on the account for account transfers .</td></tr>
<tr class=alt><td>annualFeeAmount</td></tr>
<tr><td class=fielddesc><b>Optional</b>: If provided, used along with <i>annualFeeOnMonthDay</i> to indicate the amount to be charged on the account annually on a given day of month. e.g. <b>10</b> on 10 May. <i>monthDayFormat</i> indicates day and month formatting used e.g. "dd MMM" for 10 May
</td>
</tr>
<tr class=alt><td>annualFeeOnMonthDay</td></tr>
<tr>
<td class=fielddesc><b>Optional</b>: If provided, used along with <i>annualFeeAmount</i> and <i>monthDayFormat</i> to indicate the amount to be charged on the account annually on a given day of month. e.g. 10 on <b>10 May</b>. <i>monthDayFormat</i> indicates day and month formatting used e.g. "dd MMM" for 10 May
</td>
</tr>
</table>
</div>
</div>
<a id="savingsaccounts_template" name="savingsaccounts_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve Savings Account Template:</h2>
<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>
<h4>Arguments</h4>
<dl class="argument-list">
<dt>clientId</dt>
<dd>Integer <span>mandatory</span></dd>
<dt>productId</dt>
<dd>Integer <span>optional</span></dd>
<dd>If entered, productId, productName and selectedProduct fields are returned.</dd>
</dl>
<p>Example Requests: </p>
<div class=apiClick>savingsaccounts/template?clientId=1</div>
<br><br>
<div class=apiClick>savingsaccounts/template?clientId=1&productId=1</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingsaccounts/template?clientId={clientId}</code>
<code class="method-response">
{
"clientId": 1,
"clientName": "small business",
"productOptions": [
{
"id": 1,
"name": "Passbook Savings"
}
]
}
</code>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingsaccounts/template?clientId={clientId}&productId={productId}</code>
<code class="method-response">
{
"clientId": 1,
"clientName": "small business",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"timeline": {},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"productOptions": [
{
"id": 1,
"name": "Passbook Savings"
}
],
"fieldOfficerOptions": [
{
"id": 3,
"firstname": "Mrs.",
"lastname": "loanofficerB1",
"displayName": "loanofficerB1, Mrs.",
"officeId": 2,
"officeName": "branch 1",
"isLoanOfficer": true
},
{
"id": 1,
"firstname": "Mr.",
"lastname": "loanofficerHO",
"displayName": "loanofficerHO, Mr.",
"officeId": 1,
"officeName": "branch 1",
"isLoanOfficer": true
}
],
"interestCompoundingPeriodTypeOptions": [
{
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
{
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
}
],
"interestPostingPeriodTypeOptions": [
{
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
{
"id": 5,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly",
"value": "Quarterly"
},
{
"id": 7,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual",
"value": "Annually"
}
],
"interestCalculationTypeOptions": [
{
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
{
"id": 2,
"code": "savingsInterestCalculationType.averagedailybalance",
"value": "Average Daily Balance"
}
],
"interestCalculationDaysInYearTypeOptions": [
{
"id": 360,
"code": "savingsInterestCalculationDaysInYearType.days360",
"value": "360 Days"
},
{
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
}
],
"lockinPeriodFrequencyTypeOptions": [
{
"id": 0,
"code": "savings.lockin.savingsPeriodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "savings.lockin.savingsPeriodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "savings.lockin.savingsPeriodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "savings.lockin.savingsPeriodFrequencyType.years",
"value": "Years"
}
],
"withdrawalFeeTypeOptions": [
{
"id": 1,
"code": "savingsWithdrawalFeesType.flat",
"value": "Flat"
},
{
"id": 2,
"code": "savingsWithdrawalFeesType.percent.of.amount",
"value": "% of Amount"
}
]
}
</code>
</div>
</div>
<a id="savingsaccounts_create" name="savingsaccounts_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Submit new savings application</h2>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
<tr class=alt><td>clientId or groupId, productId, submittedOnDate</td></tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Optional Fields</div></td></tr>
<tr class=alt><td>accountNo, externalId, fieldOfficerId</td></tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Inherited from Product (if not provided)</div></td></tr>
<tr class=alt><td>nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeAmount, withdrawalFeeType,withdrawalFeeForTransfers, annualFeeAmount, annualFeeOnMonthDay</td>
</tr>
</table>
</div>
<div class="method-example">
<p>Minimal request: accountNo auto generated, remaining details inherited from savings product.</p>
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts</code>
<code class="method-request">POST savingsaccount
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2011"
}
</code>
<p>Minimal request: accountNo provided (must be unique), remaining details inherited from savings product.</p>
<code class="method-request">POST savingsaccount
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2011",
"accountNo": "SA000023",
"externalId": "SYS-23"
}
</code>
<p>Full request: accountNo provided (must be unique), remaining details override details from savings product (except currency).</p>
<code class="method-request">POST savingsaccount
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"fieldOfficerId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2013",
"accountNo": "SA000023",
"externalId": "SYS-23",
"nominalAnnualInterestRate": "5.65",
"interestCompoundingPeriodType": 1,
"interestPostingPeriodType": 4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": 365,
"minRequiredOpeningBalance": "1,000",
"lockinPeriodFrequency": 6,
"lockinPeriodFrequencyType": 2
}
</code>
<code class="method-response">
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="savingsaccounts_approve" name="savingsaccounts_approve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Approve savings application</h2>
<p>Approves savings application so long as its in 'Submitted and pending approval' state.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=approve</code>
<code class="method-request">POST savingsaccount/1?command=approve
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "01 March 2013"
}
</code>
<code class="method-response">
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 200,
"code": "savingsAccountStatusType.approved",
"value": "Approved",
"submittedAndPendingApproval": false,
"approved": true,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "02 March 2013"
}
}
</code>
</div>
</div>
<a id="savingsaccounts_undoapproval" name="savingsaccounts_undoapproval" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Undo approval savings application</h2>
<p>Will move 'approved' savings application back to 'Submitted and pending approval' state.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=undoApproval</code>
<code class="method-request">POST savingsaccount/1?command=undoApproval
Content-Type: application/json
Request Body:
{
}
</code>
<code class="method-response">
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"approvedOnDate": ""
}
}
</code>
</div>
</div>
<a id="savingsaccounts_reject" name="savingsaccounts_reject" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Reject savings application</h2>
<p>Rejects savings application so long as its in 'Submitted and pending approval' state.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=reject</code>
<code class="method-request">POST savingsaccount/1?command=reject
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "03 March 2013"
}
</code>
<code class="method-response">
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 500,
"code": "savingsAccountStatusType.rejected",
"value": "Rejected",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": true,
"withdrawnByApplicant": false,
"active": false,
"closed": true
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "03 March 2013",
"closedOnDate": "03 March 2013"
}
}
</code>
</div>
</div>
<a id="savingsaccounts_withdrawbyapplicant" name="savingsaccounts_withdrawbyapplicant" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Withdraw savings application</h2>
<p>Used when an applicant withdraws from the savings application. It must be in 'Submitted and pending approval' state.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=withdrawnByApplicant</code>
<code class="method-request">POST savingsaccount/1?command=withdrawnByApplicant
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "03 March 2013"
}
</code>
<code class="method-response">
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 400,
"code": "savingsAccountStatusType.withdrawn.by.applicant",
"value": "Withdrawn by applicant",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": true,
"active": false,
"closed": true
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "03 March 2013",
"closedOnDate": "03 March 2013"
}
}
</code>
</div>
</div>
<a id="savingsaccounts_activate" name="savingsaccounts_activate" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Activate a savings account</h2>
<p>Results in an approved savings application being converted into an 'active' savings account.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=activate</code>
<code class="method-request">POST savingsaccount/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activatedOnDate": "01 March 2013"
}
</code>
<code class="method-response">
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activatedOnDate": "01 March 2013"
}
}
</code>
</div>
</div>
<a id="savingsaccounts_close" name="savingsaccounts_close" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Close a savings account</h2>
<p>Results in an Activated savings application being converted into an 'closed' savings account.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=close</code>
<code class="method-request">POST savingsaccount/5?command=close
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closedOnDate":"26 August 2013",
"note":"close note"
}
</code>
<code class="method-response">
{
"officeId":1,
"clientId":1,
"savingsId":5,
"resourceId":5,
"changes":{
"status":{
"id":600,
"code":"savingsAccountStatusType.closed",
"value":"Closed",
"submittedAndPendingApproval":false,
"approved":false,
"rejected":false,
"withdrawnByApplicant":false,
"active":false,
"closed":true
},
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"closedOnDate":"26 August 2013",
"note":"close note"
}
}
</code>
</div>
</div>
<a id="savingsaccounts_calculate_interest" name="savingsaccounts_calculate_interest" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Calculate Interest on Savings Account</h2>
<p>
Calculates interest earned on a savings account based on todays date. It does not attempt to <b>post or credit</b> the interest on the account. That is responsibility of the <a href="#savingsaccounts_post_interest" >Post Interest API</a> that will likely be called by overnight process.
</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=calculateInterest</code>
<code class="method-request">POST savingsaccount/1?command=calculateInterest
Content-Type: application/json
Request Body:
{
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="savingsaccounts_post_interest" name="savingsaccounts_post_interest" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Post Interest on Savings Account</h2>
<p>
Calculates and Posts interest earned on a savings account based on todays date and whether an interest posting or crediting event is due.
</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=postInterest</code>
<code class="method-request">POST savingsaccount/1?command=postInterest
Content-Type: application/json
Request Body:
{
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="savingsaccounts_list" name="savingsaccounts_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>List savings applications/accounts</h2>
<p>Example Requests:</p>
<div class=apiClick>savingsaccounts</div>
<br><br>
<div class=apiClick>savingsaccounts?fields=name</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingsaccounts</code>
<code class="method-response">
{
"totalFilteredRecords": 1,
"pageItems": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "small business",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"fieldOfficerId": 0,
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"timeline": {
"submittedOnDate": [
2013,
3,
1
]
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 0
}
}
]
}
</code>
</div>
</div>
<a id="savingsaccounts_retrieve" name="savingsaccounts_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve a savings application/account:</h2>
<h4>Arguments</h4>
<dl class="argument-list">
<dt>associations</dt>
<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>
</dl>
<p>Example Requests : </p>
<div class=apiClick>savingsaccounts/1</div>
<br><br>
<div class=apiClick>savingsaccounts/1?associations=all</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://DomainName/api/v1/savingsaccounts/{accountId}</code>
<code class="method-response">
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "small business",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"fieldOfficerId": 0,
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"timeline": {
"submittedOnDate": [
2013,
3,
1
]
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 0
}
}
</code>
</div>
</div>
<a id="savingsaccounts_update" name="savingsaccounts_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Modify a savings application</h2>
<p>Savings application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc</p>
</div>
<div class="method-example">
<code class="method-declaration">PUT https://Domain Name/api/v1/savingsaccounts/{accountsId}</code>
<code class="method-request">PUT savingsaccounts/1
Content-Type: application/json
No Request Body:
{
"locale": "en",
"nominalAnnualInterestRate": "5.9999999999",
}
</code>
<code class="method-response">
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"nominalAnnualInterestRate": 5.9999999999,
"locale": "en"
}
}
</code>
</div>
</div>
<a id="savingsaccounts_delete" name="savingsaccounts_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Delete a savings application</h2>
<p>At present we support <b>hard</b> delete of savings application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the savings account.</p>
</div>
<div class="method-example">
<code class="method-declaration">DELETE https://Domain Name/api/v1/savingsaccounts/{accountsId}</code>
<code class="method-request">DELETE savingsaccounts/1
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="savingsaccounts_transactions" name="savingsaccounts_transactions" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Savings Account Transactions:</h2>
<p>Transactions possible on a savings account.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Field Descriptions</div></td></tr>
<tr class=alt><td>transactionDate</td></tr>
<tr><td class=fielddesc>The date of the transaction.</td></tr>
<tr class=alt><td>transactionAmount</td></tr>
<tr><td class=fielddesc>The amount of the transaction.</td></tr>
</table>
</div>
</div>
<a id="savingsaccounts_transactions_template" name="savingsaccounts_transactions_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve Savings Account Transaction Template:</h2>
<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 Requests: </p>
<div class=apiClick>savingsaccounts/1/transactions/template</div>
<br/>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingsaccounts/{accountId}/transactions/template
</code>
<code class="method-response">
{
"accountId": 1,
"accountNo": "000000001",
"date": [
2013,
5,
27
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"paymentTypeOptions": [
{
"id": 14,
"name": "Wire Transfer",
"position": 0
},
{
"id": 13,
"name": "Cash",
"position": 1
}
]
}
</code>
</div>
</div>
<a id="savingsaccounts_transaction" name="savingsaccounts_transaction" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve Savings Account Transaction:</h2>
<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 Requests: </p>
<div class=apiClick>savingsaccounts/1/transactions/1</div>
<br/>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingsaccounts/{accountId}/transactions/{transactionId}
</code>
<code class="method-response">
{
"id": 1,
"transactionType": {
"id": 2,
"code": "savingsAccountTransactionType.withdrawal",
"value": "Withdrawal",
"deposit": false,
"withdrawal": true,
"interestPosting": false,
"feeDeduction": false
},
"accountId": 1,
"accountNo": "000000001",
"date": [
2013,
8,
7
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"paymentDetailData": {
"id": 62,
"paymentType": {
"id": 11,
"name": "cash"
},
"accountNumber": "",
"checkNumber": "",
"routingCode": "",
"receiptNumber": "",
"bankNumber": ""
},
"amount": 5000,
"runningBalance": 0,
"reversed": true
}
</code>
</div>
</div>
<a id="savingsaccounts_deposit" name="savingsaccounts_deposit" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Deposit Transaction</h2>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions?command=deposit</code>
<code class="method-request">POST savingsaccounts/1/transactions?command=deposit
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "27 May 2013",
"transactionAmount": "500",
"paymentTypeId": "14",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 47,
"changes": {
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
</code>
</div>
</div>
<a id="savingsaccounts_withdrawal" name="savingsaccounts_withdrawal" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Withdrawal Transaction</h2>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions?command=withdrawal</code>
<code class="method-request">POST savingsaccounts/1/transactions?command=withdrawal
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "27 May 2013",
"transactionAmount": "500",
"paymentTypeId": "14",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 48,
"changes": {
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
</code>
</div>
</div>
<a id="savingsaccounts_adjusttransaction" name="savingsaccounts_adjusttransaction" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Adjust Transaction</h2>
<p>This command modifies the given transaction.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions/{transactionId}?command=modify</code>
<code class="method-request">POST savingsaccounts/1/transactions/1?command=modify
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "27 May 2013",
"transactionAmount": "500",
"paymentTypeId": "14",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 48,
"changes": {
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
</code>
</div>
</div>
<a id="savingsaccounts_undotransaction" name="savingsaccounts_undotransaction" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Undo transaction</h2>
<p>This command reverses the given transaction.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions/{transactionId}?command=undo</code>
<code class="method-request">POST savingsaccounts/1/transactions/1?command=undo
Content-Type: application/json
No Request Body:
{
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<!-- end of savings accounts api -->
<!-- account transfers -->
<a id="accounttransfers" name="accounttransfers" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Account Transfers:</h2>
<p>Ability to be able to transfer monetary funds from one account to another.</p>
<p>Note: At present only savings account to savings account transfers are supported.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Parameters</div></td></tr>
<tr class=alt><td>fromOfficeId</td></tr>
<tr><td class=fielddesc>The id of the office/branch from which the transfer is made.</td></tr>
<tr class=alt><td>fromClientId</td></tr>
<tr><td class=fielddesc>The id of the client from which the transfer is made.</td></tr>
<tr class=alt><td>fromAccountType</td></tr>
<tr><td class=fielddesc>The type of account from which the transfer is made. 1=Loan Account, 2=Savings Account</td></tr>
<tr class=alt><td>fromAccountId</td></tr>
<tr><td class=fielddesc>The id of the account from which the transfer is made.</td></tr>
<tr class=alt><td>toOfficeId</td></tr>
<tr><td class=fielddesc>The id of the office/branch to which the transfer is made.</td></tr>
<tr class=alt><td>toClientId</td></tr>
<tr><td class=fielddesc>The id of the client to which the transfer is made.</td></tr>
<tr class=alt><td>toAccountType</td></tr>
<tr><td class=fielddesc>The type of account to which the transfer is made. 1=Loan Account, 2=Savings Account</td></tr>
<tr class=alt><td>toAccountId</td></tr>
<tr><td class=fielddesc>The id of the account to which the transfer is made. The accouont must be <i>active</i> and must have the same currency as that of the selected <b>fromAccountId</b>.</td></tr>
<tr class=alt><td>transferDate</td></tr>
<tr><td class=fielddesc>The date of the transfer. Requires <i>dateFormat</i> and <i>locale</i> parameters.</td></tr>
<tr class=alt><td>transferAmount</td></tr>
<tr><td class=fielddesc>The amount of the transfer. Requires <i>locale</i> parameter.</td></tr>
<tr class=alt><td>transferDescription</td></tr>
<tr><td class=fielddesc>Description of the transfer itself.</td></tr>
</table>
</div>
</div>
<a id="accounttransfers_template" name="accounttransfers_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve Account Transfer Template:</h2>
<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 Requests:</p>
<div class=apiClick>accounttransfers/template?fromAccountType=2&fromOfficeId=1</div>
<br/>
<div class=apiClick>accounttransfers/template?fromAccountType=2&fromOfficeId=1&fromClientId=1</div>
<br/>
<div class=apiClick>accounttransfers/template?fromClientId=1&fromAccountType=2&fromAccountId=1</div>
<br/>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/accounttransfers/template?fromAccountType=2&fromOfficeId=1
</code>
<code class="method-response">
{
"transferAmount": 0,
"transferDate": [
2013,
8,
15
],
"fromOffice": {
"id": 1,
"name": "HO",
"nameDecorated": "HO",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"fromClientOptions": [
{
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
{
"id": 3,
"displayName": "Third client",
"officeId": 1,
"officeName": "HO"
}
],
"fromAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
],
"toOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"toAccountTypeOptions": [
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
]
}
</code>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/accounttransfers/template?fromAccountType=2&fromOfficeId=1&fromClientId=1
</code>
<code class="method-response">
{
"transferAmount": 0,
"transferDate": [
2013,
8,
15
],
"fromOffice": {
"id": 1,
"name": "HO",
"nameDecorated": "HO",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"fromClient": {
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2013,
3,
1
],
"fullname": "Small shop",
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO",
"groups": []
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"fromClientOptions": [
{
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
{
"id": 3,
"displayName": "Third client",
"officeId": 1,
"officeName": "HO"
}
],
"fromAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
],
"fromAccountOptions": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Small shop",
"productId": 1,
"productName": "Passbook",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 3,
"accountNo": "000000003",
"clientId": 1,
"clientName": "Small shop",
"productId": 2,
"productName": "Shilling product",
"fieldOfficerId": 0,
"currency": {
"code": "KES",
"name": "Kenyan Shilling",
"decimalPlaces": 0,
"inMultiplesOf": 0,
"displaySymbol": "KSh",
"nameCode": "currency.KES",
"displayLabel": "Kenyan Shilling (KSh)"
}
}
],
"toOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"toAccountTypeOptions": [
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
]
}
</code>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/accounttransfers/template?fromClientId=1&fromAccountType=2&fromAccountId=1
</code>
<code class="method-response">
{
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 0,
"transferDate": [
2013,
8,
15
],
"fromOffice": {
"id": 1,
"name": "HO",
"nameDecorated": "HO",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"fromClient": {
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2013,
3,
1
],
"fullname": "Small shop",
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO",
"groups": []
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Small shop",
"productId": 1,
"productName": "Passbook",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
"fromOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"fromClientOptions": [
{
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
{
"id": 3,
"displayName": "Third client",
"officeId": 1,
"officeName": "HO"
}
],
"fromAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
],
"fromAccountOptions": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Small shop",
"productId": 1,
"productName": "Passbook",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 3,
"accountNo": "000000003",
"clientId": 1,
"clientName": "Small shop",
"productId": 2,
"productName": "Shilling product",
"fieldOfficerId": 0,
"currency": {
"code": "KES",
"name": "Kenyan Shilling",
"decimalPlaces": 0,
"inMultiplesOf": 0,
"displaySymbol": "KSh",
"nameCode": "currency.KES",
"displayLabel": "Kenyan Shilling (KSh)"
}
}
],
"toOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"toAccountTypeOptions": [
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
]
}
</code>
</div>
</div>
<a id="accounttransfers_create" name="accounttransfers_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Create new Transfer</h2>
<p>Ability to create new transfer of monetary funds from one account to another.</p>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/accounttransfers</code>
<code class="method-request">POST accounttransfers/
Content-Type: application/json
No Request Body:
{
"fromOfficeId": 1,
"fromClientId": 1,
"fromAccountType": 2,
"fromAccountId": 1,
"toOfficeId": 1,
"toClientId": 1,
"toAccountType": 2,
"toAccountId": 2,
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transferDate": "01 August 2011",
"transferAmount": "112.45",
"transferDescription": "A description of the transfer"
}
</code>
<code class="method-response">
{
"savingsId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="accounttransfers_list" name="accounttransfers_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>List account transfers</h2>
<p>Example Requests:</p>
<div class=apiClick>accounttransfers</div>
<br>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/accounttransfers</code>
<code class="method-response">
{
"totalFilteredRecords": 4,
"pageItems": [
{
"id": 1,
"reversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 200,
"transferDate": [
2013,
4,
1
],
"transferDescription": "pay off loan from savings.",
"fromOffice": {
"id": 1,
"name": "HO"
},
"fromClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001"
},
"toOffice": {
"id": 1,
"name": "HO"
},
"toClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"toAccountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"toAccount": {
"id": 1,
"accountNo": "000000001"
}
},
{
"id": 2,
"reversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 112.45,
"transferDate": [
2013,
6,
1
],
"transferDescription": "A description of the transfer",
"fromOffice": {
"id": 1,
"name": "HO"
},
"fromClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001"
},
"toOffice": {
"id": 1,
"name": "HO"
},
"toClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 3,
"accountNo": "000000003"
}
},
{
"id": 3,
"reversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 112.45,
"transferDate": [
2013,
6,
1
],
"transferDescription": "A description of the transfer",
"fromOffice": {
"id": 1,
"name": "HO"
},
"fromClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001"
},
"toOffice": {
"id": 1,
"name": "HO"
},
"toClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 3,
"accountNo": "000000003"
}
},
{
"id": 4,
"reversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 112.45,
"transferDate": [
2013,
6,
1
],
"transferDescription": "A description of the transfer",
"fromOffice": {
"id": 1,
"name": "HO"
},
"fromClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001"
},
"toOffice": {
"id": 1,
"name": "HO"
},
"toClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 3,
"accountNo": "000000003"
}
}
]
}
</code>
</div>
</div>
<a id="accounttransfers_retrieve" name="accounttransfers_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve account transfer:</h2>
<p>Example Requests : </p>
<div class=apiClick>accounttransfers/1</div>
<br>
</div>
<div class="method-example">
<code class="method-declaration">GET https://DomainName/api/v1/accounttransfers/{transferId}</code>
<code class="method-response">
{
"id": 1,
"reversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 200,
"transferDate": [
2013,
4,
1
],
"transferDescription": "pay off loan from savings.",
"fromOffice": {
"id": 1,
"name": "HO"
},
"fromClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001"
},
"toOffice": {
"id": 1,
"name": "HO"
},
"toClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"toAccountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"toAccount": {
"id": 1,
"accountNo": "000000001"
}
}
</code>
</div>
</div>
<!-- end of acount transfers api -->
<!-- start of datatables api docs -->
<a id="datatables" name="datatables" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Data Tables</h3>
<p>The datatables API allows you to plug-in your own tables
(MySql) that have a relationship to a Mifos X core table. For
example, you might want to add some extra client fields and record
information about each of the clients' family members. Via the API
you can create, read, update and delete entries for each
'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 plug-in called
stretchydatatables (which in turn uses this datatables resource)
to provide a pretty flexible CRUD (Create, Read, Update, Delete)
User Interface.</p>
<p>
<a
href="https://mifosforge.jira.com/wiki/display/MIFOSX/Mifos+X+-+Plugging+In+Non-Core+and+User+Defined+Data">More
Documentation</a>
</p>
</div>
</div>
<a id="datatables_createTable" name="datatables_createTable"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create Data Table</h4>
<p>Create a new data table and registers it with the Mifos X Core application
table.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td><strong>Mandatory - </strong> datatableName</td>
</tr>
<tr>
<td class=fielddesc>The name of the Data Table.</td>
</tr>
<tr class=alt>
<td><strong>Mandatory - </strong> apptableName</td>
</tr>
<tr>
<td class=fielddesc>
Application table name. Must be one of the following:
<ul class="field">
<li>m_client</li>
<li>m_group</li>
<li>m_loan</li>
<li>m_office</li>
<li>m_saving_account</li>
<li>m_product_loan</li>
<li>m_savings_product</li>
</ul>
</td>
</tr>
<tr class=alt>
<td><strong>Mandatory - </strong>columns</td>
</tr>
<tr>
<td class=fielddesc>An array of columns in the new Data Table.</td>
</tr>
</table>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions - columns</div></td>
</tr>
<tr class=alt>
<td><strong>Mandatory - </strong>name</td>
</tr>
<tr>
<td class=fielddesc>Name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.</td>
</tr>
<tr class=alt>
<td><strong>Mandatory - </strong>type</td>
</tr>
<tr>
<td class=fielddesc>
Column type. Must be one of the following:
<ul class="field">
<li>Date</li>
<li>Decimal</li>
<li>Dropdown</li>
<li>Number</li>
<li>String</li>
<li>Text</li>
</ul>
</td>
</tr>
<tr class=alt>
<td><strong>Mandatory [type = Dropdown] - </strong>code</td>
</tr>
<tr>
<td class=fielddesc>Used in Code Value fields. Column name becomes: <tt>code_cd_name</tt>. Mandatory if using type Dropdown, otherwise an error is returned.</td>
</tr>
<tr class=alt>
<td><em>Optional - </em>mandatory</td>
</tr>
<tr>
<td class=fielddesc>Determines whether this column must have a value in every entry. Optional, defaults to <tt>false</tt>.</td>
</tr>
<tr class=alt>
<td><strong>Mandatory [type = String] - </strong>length</td>
</tr>
<tr>
<td class=fielddesc>Length of the text field. Mandatory if type String is used, otherwise an error is returned.</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/datatables
</code>
<code class="method-request">
POST https://DomainName/api/v1/datatables
Content-Type: application/json
Request Body:
{
"datatableName": "extra_client_details",
"apptableName": "m_client",
"columns": [
{
"name": "Gender",
"type": "Dropdown",
"code": "Gender"
},
{
"name": "Some Decimal",
"type": "Decimal",
"mandatory": true
},
{
"name": "Birth Date",
"type": "Date"
},
{
"name": "Question 2",
"type": "String",
"length": 100,
"mandatory": false
}
]
}
</code>
<code class="method-response">
{
"resourceIdentifier": "extra_client_details"
}
</code>
</div>
</div>
<a id="datatables_list" name="datatables_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Data Tables</h4>
<p>Lists registered data tables and the Mifos X Core
application table they are registered to.</p>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>apptable</dt>
<dd>
<span>optional</span>
</dd>
<dd>The Mifos X core application table.</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>datatables?apptable=m_client</div>
<br>
<br>
<div class=apiClick>datatables</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/datatables
</code>
<code class="method-response">
[
{
"applicationTableName": "m_client",
"registeredTableName": "extra_client_details",
"columnHeaderData": [
{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Gender_cd_Question",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Some Decimal",
"columnType": "decimal",
"columnLength": 0,
"columnDisplayType": "DECIMAL",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Birth Date",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}
]
}
]
</code>
</div>
</div>
<a id="datatables_getTable" name="datatables_getTable"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Data Table Details</h4>
<p>Lists a registered data table details and the Mifos X Core
application table they are registered to.</p>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/datatables/{datatable}
</code>
<code class="method-response">
{
"applicationTableName": "m_client",
"registeredTableName": "extra_client_details",
"columnHeaderData": [
{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Gender_cd_Question",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Some Decimal",
"columnType": "decimal",
"columnLength": 0,
"columnDisplayType": "DECIMAL",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Birth Date",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}
]
}
</code>
</div>
</div>
<a id="datatables_updateTable" name="datatables_updateTable"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update Data Table</h4>
<p>Modifies fields of a data table. If the apptableName parameter is passed,
data table is deregistered and registered with the new application table.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td><em>Optional - </em> apptableName</td>
</tr>
<tr>
<td class=fielddesc>
Application table name. Only necessary if changing the application table this Data Table is registered to. Must be one of the following:
<ul class="field">
<li>m_client</li>
<li>m_group</li>
<li>m_loan</li>
<li>m_office</li>
<li>m_saving_account</li>
</ul>
</td>
</tr>
<tr class=alt>
<td><em>Optional - </em>dropColumns</td>
</tr>
<tr>
<td class=fielddesc>An array of columns to be deleted from the Data Table.</td>
</tr>
<tr class=alt>
<td><em>Optional - </em>addColumns</td>
</tr>
<tr>
<td class=fielddesc>An array of columns to be added to the Data Table.</td>
</tr>
<tr class=alt>
<td><em>Optional - </em>changeColumns</td>
</tr>
<tr>
<td class=fielddesc>An array of columns to be changed in the Data Table.</td>
</tr>
</table>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions - dropColumns</div></td>
</tr>
<tr class=alt>
<td><strong>Mandatory - </strong>name</td>
</tr>
<tr>
<td class=fielddesc>Requires a full name of the deleted column to be provided.</td>
</tr>
</table>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions - addColumns</div></td>
</tr>
<tr class=alt>
<td><strong>Mandatory - </strong>name</td>
</tr>
<tr>
<td class=fielddesc>Name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.</td>
</tr>
<tr class=alt>
<td><strong>Mandatory - </strong>type</td>
</tr>
<tr>
<td class=fielddesc>
Column type. Must be one of the following:
<ul class="field">
<li>Date</li>
<li>Decimal</li>
<li>Dropdown</li>
<li>Number</li>
<li>String</li>
<li>Text</li>
</ul>
</td>
</tr>
<tr class=alt>
<td><strong>Mandatory [type = Dropdown] - </strong>code</td>
</tr>
<tr>
<td class=fielddesc>Used in Code Value fields. Column name becomes: <tt>code_cd_name</tt>. Mandatory if using type Dropdown, otherwise an error is returned.</td>
</tr>
<tr class=alt>
<td><em>Optional - </em>mandatory</td>
</tr>
<tr>
<td class=fielddesc>Determines whether this column must have a value in every entry. Optional, defaults to <tt>false</tt>.</td>
</tr>
<tr class=alt>
<td><strong>Mandatory [type = String] - </strong>length</td>
</tr>
<tr>
<td class=fielddesc>Length of the text field. Mandatory if type String is used, otherwise an error is returned.</td>
</tr>
<tr class=alt>
<td><em>Optional - </em>after</td>
</tr>
<tr>
<td class=fielddesc>Only used when re-ordering Data Table columns. Requires a full column name to be provided.</td>
</tr>
</table>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions - changeColumns</div></td>
</tr>
<tr class=alt>
<td><strong>Mandatory - </strong>name</td>
</tr>
<tr>
<td class=fielddesc>Name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.</td>
</tr>
<tr class=alt>
<td><em>Optional - </em>newName</td>
</tr>
<tr>
<td class=fielddesc>New name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.</td>
</tr>
<tr class=alt>
<td><strong>Mandatory [type = Dropdown] - </strong>code</td>
</tr>
<tr>
<td class=fielddesc>Used in Code Value fields. Column name becomes: <tt>code_cd_name</tt>. Mandatory if using type Dropdown, otherwise an error is returned.</td>
</tr>
<tr class=alt>
<td><em>Optional [type = Dropdown] - </em>newCode</td>
</tr>
<tr>
<td class=fielddesc>Used in Code Value fields. Column name becomes: <tt>code_cd_name</tt>. Optional if using type Dropdown, otherwise an error is returned.</td>
</tr>
<tr class=alt>
<td><em>Optional - </em>mandatory</td>
</tr>
<tr>
<td class=fielddesc>Determines whether this column must have a value in every entry. Optional, defaults to <tt>false</tt>.</td>
</tr>
<tr class=alt>
<td><strong>Mandatory [type = String] - </strong>length</td>
</tr>
<tr>
<td class=fielddesc>Length of the text field. Mandatory if type String is used, otherwise an error is returned.</td>
</tr>
<tr class=alt>
<td><em>Optional - </em>after</td>
</tr>
<tr>
<td class=fielddesc>Only used when re-ordering Data Table columns. Requires a full column name to be provided.</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/datatables/{datatables}
</code>
<code class="method-request">
PUT https://DomainName/api/v1/datatables/extra_client_details
Content-Type: application/json
Request Body:
{
"apptableName": "m_client",
"dropColumns": [
{
"name": "Gender_cd_Question"
}
],
"addColumns": [
{
"name": "Question",
"type": "Dropdown",
"code": "Gender",
"mandatory": true
},
{
"name": "Some Number",
"type": "Number",
"after": "Some Field"
}
],
"changeColumns": [
{
"name": "Question",
"newName": "Question 2",
"mandatory": true,
"code": "Gender",
"newCode": "Gender2"
}
]
}
</code>
<code class="method-response">
{
"resourceIdentifier": "extra_client_details"
}
</code>
</div>
</div>
<a id="datatables_deleteTable" name="datatables_deleteTable"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete Data Table</h4>
<p>Deletes a data table and deregisters it from the Mifos X Core
application table.</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/datatables/{datatables}
</code>
<code class="method-request">
DELETE https://DomainName/api/v1/datatables/extra_client_details
Content-Type: application/json
No Request Body
</code>
<code class="method-response">
{
"resourceIdentifier": "extra_client_details"
}
</code>
</div>
</div>
<a id="datatables_register" name="datatables_register"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Register Data Table</h4>
<p>Registers a data table with the Mifos X Core application
table. This allows the data table to be maintained through the
API.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/datatables/register/{datatable}/{apptable}
</code>
<code class="method-request">
POST datatables/register/extra_client_details/m_client
Content-Type: application/json
Request Body:
{}
</code>
<code class="method-response">
{
"resourceIdentifier": "extra_client_details"
}
</code>
</div>
</div>
<a id="datatables_deregister" name="datatables_deregister"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Deregister Data Table</h4>
<p>Deregisters a data table. It will no longer be available
through the API.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/datatables/deregister/{datatable}
</code>
<code class="method-request">
POST datatables/deregister/extra_client_details
Content-Type: application/json
Request Body:
{}
</code>
<code class="method-response">
{
"resourceIdentifier": "extra_client_details"
}
</code>
</div>
</div>
<a id="datatables_create" name="datatables_create"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create Entry in Data Table</h4>
<p>Adds a row to the data table.</p>
<p>Note that the default datatable UI functionality converts
any field name containing spaces to underscores when using the
API. This means the field name "Business Description" is
considered the same as "Business_Description". So you shouldn't
have both "versions" in any data table.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/datatables/{datatable}/{apptableId}
</code>
<code class="method-request">
POST datatables/extra_client_details/1
Content-Type: application/json
Request Body:
{
"Business Description": "Livestock sales",
"Comment": "First comment made",
"Education_cv": "Primary",
"Gender_cd": "6",
"Highest Rate Paid": "8.5",
"Next Visit": "01 October 2012",
"Years in Business": "5",
"dateFormat": "dd MMMM yyyy",
"locale": "en"
}
</code>
<code class="method-response">
{
"resourceId": 1
}
</code>
</div>
</div>
<a id="datatables_retrieve" name="datatables_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Entry(s) from Data Table</h4>
<p>
Gets the entry (if it exists) for data tables that are one to one
with the application table. <br> Gets the entries (if they
exist) for data tables that are one to many with the application
table.
</p>
<p>Note: The 'fields' parameter is not available for
datatables.</p>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>order</dt>
<dd>
<span>optional</span>
</dd>
<dd>Specifies the order in which data is returned.</dd>
<dt>genericResultSet</dt>
<dd>
<span>optional, defaults to false</span>
</dd>
<dd>If 'true' an optimised JSON format is returned suitable for tabular display of data.
This format is used by the default data tables UI functionality.</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>datatables/extra_client_details/1</div>
<br>
<br>
<div class=apiClick>datatables/extra_family_details/1?order=`Date of Birth` desc</div>
<br>
<br>
<div class=apiClick>datatables/extra_client_details/1?genericResultSet=true</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/datatables/{datatable}/{apptableId}?genericResultSet=true
</code>
<code class="method-response">
{
"columnHeaders": [
{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Business Description",
"columnType": "varchar",
"columnLength": 100,
"columnDisplayType": "STRING",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Years in Business",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Gender_cd",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": [
{
"id": 5,
"value": "option.Male"
},
{
"id": 6,
"value": "option.Female"
}
]
},
{
"columnName": "Education_cv",
"columnType": "varchar",
"columnLength": 60,
"columnDisplayType": "CODEVALUE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": [
{
"id": 9,
"value": "Primary"
},
{
"id": 10,
"value": "Secondary"
},
{
"id": 11,
"value": "University"
}
]
},
{
"columnName": "Next Visit",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Highest Rate Paid",
"columnType": "decimal",
"columnLength": 0,
"columnDisplayType": "DECIMAL",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Comment",
"columnType": "text",
"columnLength": 65535,
"columnDisplayType": "TEXT",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}
],
"data": [
{
"row": [
"1",
"Livestock sales",
"5",
"6",
"Primary",
"2012-10-01",
"8.500000",
"First\tcomment made"
]
}
]
}
</code>
</div>
</div>
<a id="datatables_update" name="datatables_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update Entry in Data Table (One to One)</h4>
<p>Updates the row (if it exists) of the data table.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId}
</code>
<code class="method-request">
PUT datatables/extra_client_details/1
Content-Type: application/json
Request Body:
{
"Business Description": "Livestock sales updated",
}
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {
"Business Description": "Livestock sales updated"
}
}
</code>
</div>
</div>
<a id="datatables_update_1M" name="datatables_update_1M"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update Entry in Data Table (One to Many)</h4>
<p>Updates the row (if it exists) of the data table.</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId}
</code>
<code class="method-request">
PUT datatables/Extra Family Details Data/1/2
Content-Type: application/json
Request Body:
{
"Date of Birth": "01 June 1982",
Education_cdHighest: "5",
Name: "June",
"Other Notes": "More\nnotes",
"Points Score": "20",
dateFormat: "dd MMMM yyyy",
locale: "en"
}
</code>
<code class="method-response">{ "resourceId": 1 } </code>
</div>
</div>
<a id="datatables_delete" name="datatables_delete"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete Entry(s) in Data Table</h4>
<p>
Deletes the entry (if it exists) for data tables that are one-to-one with the application table. <br> Deletes the entries (if they exist) for data tables that are one-to-many with the application table.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/datatables/{datatable}/{apptableId}
</code>
<code class="method-request">
DELETE datatables/extra_client_details/1
Content-Type: application/json
Request Body:
{}
</code>
<code class="method-response">
{
"resourceId": 1
}
</code>
</div>
</div>
<a id="datatables_delete_1M" name="datatables_delete_1M"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete Entry in Datatable (One to Many)</h4>
<p>Deletes the entry (if it exists) for data tables that are
one to many with the application table.</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId}
</code>
<code class="method-request">
DELETE datatables/extra_family_details/1/2
Content-Type: application/json
Request Body:
{}
</code>
<code class="method-response">
{
"resourceId": 1
}
</code>
</div>
</div>
<!-- end of datatables api docs -->
<!-- start of Notes api docs -->
<a id="notes" name="notes" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Notes</h3>
<p>Notes API allows to enter notes for supported resources.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>note</td>
</tr>
<tr>
<td class=fielddesc>A simple text note created for supported resources.</td>
</tr>
</table>
<br>
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Supported Resources</div></td>
</tr>
<tr class=alt>
<td>
<a href="#clients">Client</a>
<br>
<a href="#loans">Loan</a>
<br>
<a href="#groups">Group</a>
<br>
<a href="#savingsaccounts">Savings Account</a>
</td>
</tr>
</table>
</div>
</div>
<a id="resources_addnote" name="resources_addnote"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Add a Resource Note</h4>
<p>Adds a new note to a supported resource.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>note</td>
</tr>
</table>
<p>Example Requests:</p>
<div class=apiClick>clients/1/notes</div>
<br>
<br>
<div class=apiClick>groups/1/notes</div>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/{resource}/{resourceId}/notes
</code>
<code class="method-request">
POST clients/1/notes
Content-Type: application/json
Request Body:
{
"note": "a note about the client"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 76
}
</code>
</div>
</div>
<a id="resource_notelist" name="resource_notelist"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Resource's Notes</h4>
<p>
<b>Note:</b> Notes are returned in descending createOn order.
</p>
<p>Example Requests:</p>
<div class=apiClick>clients/2/notes</div>
<br>
<br>
<div class=apiClick>groups/2/notes?fields=note,createdOn,createdByUsername</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/{resource}/{resourceId}/notes
</code>
<code class="method-response">
[
{
"id": 2,
"clientId": 1,
"noteType": {
"id": 100,
"code": "noteType.client",
"value": "Client note"
},
"note": "First note edited",
"createdById": 1,
"createdByUsername": "mifos",
"createdOn": 1342498505000,
"updatedById": 1,
"updatedByUsername": "mifos",
"updatedOn": 1342498517000
}
]
</code>
</div>
</div>
<a id="resources_retrievenote" name="resources_retrievenote"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Resource Note</h4>
<p>Example Requests:</p>
<div class=apiClick>clients/1/notes/76</div>
<br>
<br>
<div class=apiClick>groups/1/notes/20</div>
<br>
<br>
<div class=apiClick>clients/1/notes/76?fields=note,createdOn,createdByUsername</div>
<br>
<br>
<div class=apiClick>groups/1/notes/20?fields=note,createdOn,createdByUsername</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId}
</code>
<code class="method-response">
{
"id": 76,
"clientId": 1,
"noteType": {
"id": 100,
"code": "noteType.client",
"value": "Client note"
},
"note": "a note about the client",
"createdById": 1,
"createdByUsername": "mifos",
"createdOn": 1359463135000,
"updatedById": 1,
"updatedByUsername": "mifos",
"updatedOn": 1359463135000
}
</code>
</div>
</div>
<a id="resources_updatenote" name="resources_updatenote"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Resource Note</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId}
</code>
<code class="method-request">
PUT clients/1/notes/76
Content-Type: application/json
Request Body:
{
"note": "and here the note is updated nicely."
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 76,
"changes": {
"note": "and here the note is updated nicely."
}
}
</code>
</div>
</div>
<a id="resources_deletenote" name="resources_deletenote"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Resource Note</h4>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId}
</code>
<code class="method-request">
DELETE clients/1/notes/76
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"resourceId": 76
}
</code>
</div>
</div>
<!-- end of Notes api docs -->
<!-- start of documents api docs -->
<a id="documents" name="documents" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Documents</h3>
<p>Multiple Documents (a combination of a name, description
and a file) may be attached to different Entities
like Clients, Groups, Staff, Loans, Savings and Client
Identifiers in the system
</p>
<p>Note: The currently allowed Entities are
<ul>
<li>Clients: URL Pattern as <i>clients</i></li>
<li>Staff: URL Pattern as <i>staff</i></li>
<li>Loans: URL Pattern as <i>loans</i></li>
<li>Savings: URL Pattern as <i>savings</i></li>
<li>Client Identifiers: URL Pattern as <i>client_identifiers</i></li>
<li>Groups: URL Pattern as <i>groups</i></li>
</ul>
</p>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>parentEntityType</td>
</tr>
<tr>
<td class=fielddesc>The type of the Entity
with which this document is associated
</td>
</tr>
<tr class=alt>
<td>parentEntityId</td>
</tr>
<tr>
<td class=fielddesc>The ID of the entity (client,
loan etc) with which this document is
associated</td>
</tr>
<tr class=alt>
<td>name</td>
</tr>
<tr>
<td class=fielddesc>User Defined name for the
document, need not be the same as the name
of the file associated with the document
</td>
</tr>
<tr class=alt>
<td>fileName</td>
</tr>
<tr>
<td class=fielddesc>The name of the file associated
with this document</td>
</tr>
<tr class=alt>
<td>size</td>
</tr>
<tr>
<td class=fielddesc>The size (in bytes) of the file
associated with this document</td>
</tr>
<tr class=alt>
<td>type</td>
</tr>
<tr>
<td class=fielddesc>Mime Type of the file
associated with this document
</td>
</tr>
<tr class=alt>
<td>description</td>
</tr>
<tr>
<td class=fielddesc>A description of this document
</td>
</tr>
</table>
</div>
</div>
<a id="documents_list" name="documents_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List documents</h4>
<p>Example Requests:</p>
<div class=apiClick>clients/1/documents</div>
<br>
<div class=apiClick>client_identifiers/1/documents</div>
<br>
<div class=apiClick>loans/1/documents?fields=name,description</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/{entityType}/{entityId}/documents
</code>
<code class="method-response">
[
{
"id": 1,
"parentEntityType": "clients",
"parentEntityId": 1,
"name": "Client Details Form ",
"fileName": "CGAP.pdf",
"size": 5246719,
"type": "application/pdf",
"description": "A signed form signed by new member"
}
]
</code>
</div>
</div>
<a id="documents_retrieve" name="documents_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Document</h4>
<p>Example Requests:</p>
<div class=apiClick>clients/1/documents/1</div>
<br>
<br>
<div class=apiClick>loans/1/documents/1</div>
<br>
<br>
<div class=apiClick>client_identifiers/1/documents/1?fields=name,description</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/documents/{clientId}
</code>
<code class="method-response">
{
"id": 1,
"parentEntityType": "clients",
"parentEntityId": 1,
"name": "Client Details Form ",
"fileName": "CGAP.pdf",
"size": 5246719,
"type": "application/pdf",
"description": "A signed form signed by new member"
}
</code>
</div>
</div>
<a id="documents_create" name="documents_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Document</h4>
<p>
<b>Note:</b> A document is created using a Multi-part form upload
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Body Parts</div></td>
</tr>
<tr class=alt>
<td>name</td>
</tr>
<tr>
<td class=fielddesc>Name or summary of the document
</td>
</tr>
<tr class=alt>
<td>description</td>
</tr>
<tr>
<td class=fielddesc>Description of the document
</tr>
<tr class=alt>
<td>file</td>
</tr>
<tr>
<td class=fielddesc>The file to be uploaded
</td>
</tr>
</table>
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>file and description</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/{entityType}/{entityId}/documents
</code>
<code class="method-request">
POST clients/1/documents
Content-Type: multipart/form-data
Request Body:
<i>Not Shown (multi-part form data)</i>
</code>
<code class="method-response">
{
"resourceId":3,
"resourceIdentifier":"3"
}
</code>
</div>
</div>
<a id="documents_update" name="documents_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Document</h4>
<p>
<b>Note:</b> A document is updated using a Multi-part form upload
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Body Parts</div></td>
</tr>
<tr class=alt>
<td>name</td>
</tr>
<tr>
<td class=fielddesc>Name or summary of the document
</td>
</tr>
<tr class=alt>
<td>description</td>
</tr>
<tr>
<td class=fielddesc>Description of the document
</tr>
<tr class=alt>
<td>file</td>
</tr>
<tr>
<td class=fielddesc>The file to be uploaded
</td>
</tr>
</table>
</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}
</code>
<code class="method-request">
PUT clients/1/documents/1
Content-Type: multipart/form-data
Request Body:
<i>Not Shown (multi-part form data)</i>
</code>
<code class="method-response">
{
"resourceId":3,
"changes":{},
"resourceIdentifier":"3"
}
</code>
</div>
</div>
<a id="documents_retrieve_file" name="documents_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Binary File associated with Document</h4>
<p>Request used to download the file associated with the document</p>
<p>Example Requests:</p>
<div class=apiClick>clients/1/documents/1/attachment</div>
<br>
<br>
<div class=apiClick>loans/1/documents/1/attachment</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}/attachment
</code>
<code class="method-response">
<i>Not Shown: The corresponding Binary file</i>
</code>
</div>
</div>
<a id="documents_delete" name="documents_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Remove a Document</h4>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}
</code>
<code class="method-request">
DELETE clients/1/documents/1
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"resourceId":1,
"changes":{},
"resourceIdentifier":"1"
}
</code>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}
</code>
<code class="method-request">
DELETE loans/1/documents/1
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"resourceId":1,
"changes":{},
"resourceIdentifier":"1"
}
</code>
</div>
</div>
<!-- start of reports api docs -->
<a id="reports" name="reports" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Reports</h3>
<p>
Non-core reports can be added, updated and deleted.
</p>
<p>
Core reports (supplied at installation/upgrade time) can only have their "useReport" updated.
"useReport" is used, for example, in the reference UI report page to 'show'/'not show' reports.
Reports that have useReport set to false can still be run.
Reports only used for workflow purposes are examples of reports that would have their useReport set to false.
</p>
<p>
Placeholders can be put in the reportSql to act as parameters. They have the format ${paramName}.
The runreports api will translate the value of any query parameter beginning R_ with the equivalent placeholder.<br>
e.g. query parameter R_myName=john will replace ${myName} with john
</p>
<p>
There is a special 'automatic' placeholder ${currentUserHierarchy} - if this is included in reportSql
it gets replaced by the requesting users' office hierarchy value. This enables data scoping.<br>
Usage example "where o.hierarchy like CONCAT('${currentUserHierarchy}', '%')"
</p>
<p>
Note: <br>
The reports api allows parameters (not just placeholders in reportSql) to be associated with reports.
These associated parameters are only required to allow the reference UI reporting functionality implement
user-friendly parameter input.
</p>
</div>
</div>
<a id="reports_template" name="reports_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Report 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>reports/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/reports/template
</code>
<code class="method-response">
{
"allowedReportTypes": [
"Table",
"Pentaho",
"Chart"
],
"allowedReportSubTypes": [
"Bar",
"Pie"
],
"allowedParameters": [
{
"id": 1,
"parameterName": "startDateSelect"
},
{
"id": 2,
"parameterName": "endDateSelect"
},
{
"id": 3,
"parameterName": "obligDateTypeSelect"
},
{
"id": 5,
"parameterName": "OfficeIdSelectOne"
},
{
"id": 6,
"parameterName": "loanOfficerIdSelectAll"
},
{
"id": 10,
"parameterName": "currencyIdSelectAll"
},
{
"id": 20,
"parameterName": "fundIdSelectAll"
},
{
"id": 25,
"parameterName": "loanProductIdSelectAll"
},
{
"id": 26,
"parameterName": "loanPurposeIdSelectAll"
},
{
"id": 100,
"parameterName": "parTypeSelect"
}
]
}
</code>
</div>
</div>
<a id="reports_create" name="reports_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Report</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/reports
</code>
<code class="method-request">
POST reports
Content-Type: application/json
Request Body:
{
"reportName":"Completely New Report",
"reportType":"Table",
"reportSubType":"",
"reportCategory":"Loan",
"useReport":"false",
"description":"Just\nAn\nExample",
"reportSql":"select 'very good sql' as AComment",
"reportParameters":[{"id":"","parameterId":"5","reportParameterName":""},{"id":"","parameterId":"6","reportParameterName":""}]
}
</code>
<code class="method-response">
{
"resourceId": 132
}
</code>
</div>
</div>
<a id="reports_list" name="reports_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Reports</h4>
<p>Lists all reports and their parameters. </p>
<p>Example Request:</p>
<div class=apiClick>reports</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/reports
</code>
<code class="method-response">
[
{
"id": 1,
"reportName": "Client Listing",
"reportType": "Table",
"reportCategory": "Client",
"description": "Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \u0027one to one\u0027 additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t \n\nhave that client browser/memory impact).",
"coreReport": true,
"useReport": true,
"reportParameters": [
{
"id": 1,
"parameterId": 5,
"parameterName": "OfficeIdSelectOne"
}
]
},
{
"id": 2,
"reportName": "Client Loans Listing",
"reportType": "Table",
"reportCategory": "Client",
"description": "Individual Client Report\n\nPretty \n\nwide report that lists the basic details of client loans. \n\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t have that client browser/memory impact).",
"coreReport": false,
"useReport": true,
"reportParameters": [
{
"id": 2,
"parameterId": 5,
"parameterName": "OfficeIdSelectOne"
},
{
"id": 3,
"parameterId": 6,
"parameterName": "loanOfficerIdSelectAll"
},
{
"id": 4,
"parameterId": 10,
"parameterName": "currencyIdSelectAll"
},
{
"id": 5,
"parameterId": 20,
"parameterName": "fundIdSelectAll"
},
{
"id": 6,
"parameterId": 25,
"parameterName": "loanProductIdSelectAll"
},
{
"id": 7,
"parameterId": 26,
"parameterName": "loanPurposeIdSelectAll"
}
]
},...
]
</code>
</div>
</div>
<a id="reports_retrieve" name="reports_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Report</h4>
<p>Example Requests:</p>
<div class=apiClick>reports/1</div><br><br>
<div class=apiClick>reports/1?template=true</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/reports/{id}
</code>
<code class="method-response">
{
"id": 1,
"reportName": "Client Listing",
"reportType": "Table",
"reportCategory": "Client",
"description": "Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \u0027one to one\u0027 additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t \n\nhave that client browser/memory impact).",
"reportSql": "select \nconcat(repeat(\"..\", \n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \u0027.\u0027, \u0027\u0027)) - 1))), ounder.`name`) as \"Office/Branch\",\n c.account_no as \"Client Account No.\", \nc.display_name as \"Name\", \nr.enum_message_property as \"Status\",\nc.activation_date as \"Activation\", c.external_id as \"External Id\"\nfrom m_office o \njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \u0027%\u0027)\nand ounder.hierarchy like concat(\u0027${currentUserHierarchy}\u0027, \u0027%\u0027)\njoin m_client c on c.office_id \u003d ounder.id\nleft join r_enum_value r on r.enum_name \u003d \u0027status_enum\u0027 and r.enum_id \u003d c.status_enum\nwhere o.id \u003d ${officeId}\norder by ounder.hierarchy, c.account_no",
"coreReport": true,
"useReport": true,
"reportParameters": [
{
"id": 1,
"parameterId": 5,
"parameterName": "OfficeIdSelectOne"
}
]
}
</code>
</div>
</div>
<a id="reports_update" name="reports_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Report</h4>
<p>
Only the useReport value can be updated for core reports.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/reports/{id}
</code>
<code class="method-request">
PUT reports/129
Content-Type: application/json
Request Body:
{
"reportName": "New rpt name",
"reportParameters": [
{
"id": 194,
"parameterId": 5,
"reportParameterName": "m"
}
]
}
</code>
<code class="method-response">
{
"resourceId": 129,
"changes": {
"reportName": "New rpt name",
"reportParameters": "[{\"id\":194,\"parameterId\":5,\"reportParameterName\":\"m\"}]"
}
}
</code>
</div>
</div>
<a id="reports_delete" name="reports_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Report</h4>
<p>
Only non-core reports can be deleted.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/reports/{id}
</code>
<code class="method-request">
DELETE reports/100
Content-Type: application/json
Request Body:
{}
</code>
<code class="method-response">
{
"resourceId": 100
}
</code>
</div>
</div>
<!-- start of runreports api docs -->
<a id="runreports" name="runreports" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Run Reports</h3>
</div>
</div>
<a id="report_run" name="report_run" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Running a Report</h4>
<p>This resource allows you to run and receive output from pre-defined Mifos X reports. </p>
<p>Reports can also be used to provide data for searching and workflow functionality.</p>
<p>
The default output is a JSON formatted "Generic Resultset". The Generic Resultset contains
Column Heading as well as Data information. However, you can
export to CSV format by simply adding "&exportCSV=true" to the end
of your URL.</p>
<p>If Pentaho reports have been pre-defined, they can also be
run through this resource. Pentaho reports can return HTML, PDF or
CSV formats.</p>
<p>The Mifos X reference application uses a
JQuery plugin called stretchyreporting which, itself, uses this
reports resource to provide a pretty flexible reporting User
Interface (UI).</p>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>R_'parameter names' ...</dt>
<dd>
optional, <span>No defaults</span>
</dd>
<dd>The number and names of the parameters depend on the
specific report and how it has been configured. R_officeId is an
example parameter name.</dd>
<dd>Note: the prefix R_ stands for Reporting</dd>
<dt>genericResultSet</dt>
<dd>
<span>optional, defaults to true</span>
</dd>
<dd>If 'true' an optimised JSON format is returned suitable for tabular display of data.
<dd>If 'false' a simple JSON format is returned.
<dt>parameterType</dt>
<dd>
optional, <span>The only valid value is 'true'. If any
other value is provided the argument will be ignored</span>
</dd>
<dd>Determines whether the request looks in the list of
reports or the list of parameters for its data. Doesn't apply to
Pentaho reports.</dd>
<dt>exportCSV</dt>
<dd>
optional, <span>The only valid value is 'true'. If any
other value is provided the argument will be ignored</span>
</dd>
<dd>Output will be delivered as a CSV file instead of JSON.
Doesn't apply to Pentaho reports.</dd>
<dt>output-type</dt>
<dd>
optional, <span>Defaults to HTML.</span>
</dd>
<dd>Valid Values are HTML, XLS, CSV and PDF for html, Excel,
CSV and PDF formats respectively.</dd>
<dd>Only applies to Pentaho reports.</dd>
<dt>locale</dt>
<dd>
optional
</dd>
<dd>Any valid locale Ex: en_US, en_IN, fr_FR etc</dd>
<dd>Only applies to Pentaho reports.</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>runreports/Client%20Listing?R_officeId=1</div>
<br>
<br>
<div class=apiClick>runreports/Client%20Listing?R_officeId=1&exportCSV=true</div>
<br>
<br>
<div class=apiClick>runreports/OfficeIdSelectOne?R_officeId=1&ampparameterType=true</div>
<br>
<br>
<div class=apiClick>runreports/OfficeIdSelectOne?R_officeId=1&ampparameterType=true&exportCSV=true</div>
<br>
<br>
<div class=apiClick>runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=HTML&R_officeId=1</div>
<br>
<br>
<div class=apiClick>runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=XLS&R_officeId=1</div>
<br>
<br>
<div class=apiClick>runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=CSV&R_officeId=1</div>
<br>
<br>
<div class=apiClick>runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=PDF&R_officeId=1</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/runreports/{reportName}
</code>
<code class="method-response">
{
"columnHeaders": [
{
"columnName": "Office/Branch",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Client Account No.",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Name",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Joined",
"columnType": "DATE",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "External Id",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
}
],
"data": [
{
"row": [
"Head Office",
"000000001",
"Petra Yton",
"2009-03-04",
"786YYH7"
]
},
{
"row": [
"Head Office",
"000000002",
"Keith(changed) Yton",
"2009-03-04",
null
]
},
{
"row": [
"Head Office",
"000000003",
"Jorge lastname",
"2013-02-05",
null
]
}
]
}
</code>
</div>
</div>
<!-- start of authentication api docs -->
<a id="authentication" name="authentication" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Authentication</h3>
<p>An API capability that allows client applications to verify
authentication details.</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>base64EncodedAuthenticationKey</td>
</tr>
<tr>
<td class=fielddesc>HTTP Basic Auth key. See <a
href="#authentication_overview">Authentication Overview</a> for
an example of its use.
</td>
</tr>
</tr>
</table>
</div>
</div>
<a id="authenticate_request" name="authenticate_request" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Verify authentication</h4>
<p>Authenticates the credentials provided and returns the set roles and permissions allowed.</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/authentication?username={username}&password={password}
</code>
<code class="method-request">
POST authentication?username=mifos&password=password
Content-Type: application/json
No Request Body
</code>
<p>Example response of autentication for user that is not linked with any staff.</p>
<code class="method-response">
{
"username": "mifos",
"userId": 1,
"base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=",
"authenticated": true,
"officeId": 1,
"officeName": "Head Office",
"roles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
],
"permissions": [
"ALL_FUNCTIONS"
]
}
</code>
<p>Example response of autentication for user that is linked with a staff member and role.</p>
<code class="method-response">
{
"username": "mifos",
"userId": 1,
"base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=",
"authenticated": true,
"officeId": 1,
"officeName": "Head Office",
"staffId": 1,
"staffDisplayName": "Director, Program",
"organisationalRole": {
"id": 100,
"code": "staffOrganisationalRoleType.programDirector",
"value": "Program Director"
},
"roles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
],
"permissions": [
"ALL_FUNCTIONS"
]
}
</code>
<code class="method-request">
POST authentication?username=mifos&password=fail
Content-Type: application/json
No Request Body
</code>
<code class="method-response">
{
"developerMessage": "Invalid authentication details were passed in api request.",
"developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes",
"httpStatusCode": "401",
"defaultUserMessage": "Unauthenticated. Please login.",
"userMessageGlobalisationCode": "error.msg.not.authenticated",
"errors": []
}
</code>
</div>
</div>
<!-- start of users api docs -->
<a id="users" name="users" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Users</h3>
<p>An API capability to support administration of application users.</p>
</div>
</div>
<a id="users_list" name="users_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve list of users</h4>
<p>Example Requests:</p>
<div class=apiClick>users</div>
<br>
<br>
<div class=apiClick>users?fields=id,username,email,officeName</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/users
</code>
<code class="method-response">
[
{
"id": 1,
"username": "mifos",
"officeId": 1,
"officeName": "Head Office",
"firstname": "App",
"lastname": "Administrator",
"email": "demomfi@mifos.org"
}
]
</code>
</div>
</div>
<a id="users_template" name="users_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve User 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>users/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/users/template
</code>
<code class="method-response">
{
"allowedOffices": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"availableRoles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
]
}
</code>
</div>
</div>
<a id="users_retrieve" name="users_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a User</h4>
<p>Example Requests:</p>
<div class=apiClick>users/1</div>
<br>
<br>
<div class=apiClick>users/1?template=true</div>
<br>
<br>
<div class=apiClick>users/1?fields=username,officeName</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/users/{userId}
</code>
<code class="method-response">
{
"id": 1,
"username": "mifos",
"officeId": 1,
"officeName": "Head Office",
"firstname": "App",
"lastname": "Administrator",
"email": "demomfi@mifos.org",
"availableRoles": [],
"selectedRoles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
]
}
</code>
</div>
</div>
<a id="users_create" name="users_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a User</h4>
<p>Adds new application user.</p>
<p>
<b>Note:</b> Password information is not required (or processed).
Password details at present are auto-generated and then sent to
the email account given (which is why it can take a few seconds to
complete).
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>username, firstname, lastname, email, officeId, roles</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/users
</code>
<code class="method-request">
POST users
Content-Type: application/json
Request body:
{
"username": "newuser",
"firstname": "Test",
"lastname": "User",
"email": "whatever@mifos.org",
"officeId": 1,
"roles": [2,3]
}
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 11
}
</code>
</div>
</div>
<a id="users_update" name="users_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a User</h4>
<p>
<b>Note:</b> When updating a password you must provide the
repeatPassword parameter also.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/users/{userId)
</code>
<code class="method-request">
PUT users/3
Content-Type: application/json
Request body:
{
"firstname": "Test",
"password": "window75",
"repeatPassword": "window75"
}
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 3,
"changes": {
"firstname": "Test",
"passwordEncoded": "abc3326b1bb376351c7baeb4175f5e0504e33aadf6a158474a6d71de1befae51"
}
}
</code>
</div>
</div>
<a id="users_delete" name="users_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a User</h4>
<p>Removes the user and the associated roles and permissions.</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/users/{userId}
</code>
<code class="method-request">
DELETE users/20
Content-Type: application/json
No Request Body
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 20,
"changes": {}
}
</code>
</div>
</div>
<!-- end of users api docs -->
<!-- start of roles api docs -->
<a id="roles" name="users" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Roles</h3>
<p>An API capability to support management of application roles for user administration.</p>
</div>
</div>
<a id="roles_list" name="roles_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Roles</h4>
<p>Example Requests:</p>
<div class=apiClick>roles</div>
<br>
<br>
<div class=apiClick>roles?fields=name</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/roles
</code>
<code class="method-response">
[
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
]
</code>
</div>
</div>
<a id="roles_retrieve" name="roles_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Role</h4>
<p>Example Requests:</p>
<div class=apiClick>roles/1</div>
<br>
<br>
<div class=apiClick>roles/1?fields=name</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/roles/{roleId}
</code>
<code class="method-response">
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
</code>
</div>
</div>
<a id="roles_create" name="roles_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a New Role</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>name, description</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/roles
</code>
<code class="method-request">
POST roles
Content-Type: application/json
Request body:
{
"name": "Another Role Name",
"description": "A description outlining the purpose of this role in relation to the application."
}
</code>
<code class="method-response">{ "resourceId": 2} </code>
</div>
</div>
<a id="roles_update" name="roles_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Role</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/roles/{roleId}
</code>
<code class="method-request">
PUT roles/1
Content-Type: application/json
Request body:
{
"description": "some description(changed)"
}
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {
"description": "some description(changed)"
}
}
</code>
</div>
</div>
<a id="rolespermissions_retrieve" name="rolespermissions_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Role's Permissions</h4>
<p>Example Requests:</p>
<div class=apiClick>roles/1/permissions</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/roles/{roleId}/permissions
</code>
<code class="method-response">
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions.",
"permissionUsageData": [
{
"grouping": "authorisation",
"code": "READ_PERMISSION",
"entityName": "PERMISSION",
"actionName": "READ",
"selected": false
},
...
{
"grouping": "transaction_loan",
"code": "WRITEOFF_LOAN_CHECKER",
"entityName": "LOAN",
"actionName": "WRITEOFF",
"selected": false
}
]
}
</code>
</div>
</div>
<a id="rolespermissions_update" name="rolespermissions_update"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Role's Permissions</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/roles/{roleId}/permissions
</code>
<code class="method-request">
PUT roles/8
Content-Type: application/json
Request body:
{
"permissions": {
"ALL_FUNCTIONS_READ": "true"
}
}
</code>
<code class="method-response">
{
"resourceId": 8,
"changes": {
"permissions": {
"ALL_FUNCTIONS_READ": true
}
}
}
</code>
</div>
</div>
<!-- start of permissions api docs -->
<a id="permissions" name="permissions" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Permissions</h3>
<p>An API capability to support management of application permissions for user administration.</p>
<p>There is no Mifos X functionality for creating or deleting permissions. Permissions come pre-installed.</p>
<p>Permissions are not updated, except in the case of enabling or disabling non-read transactions for
Maker Checker functionality</p>
</div>
</div>
<a id="permissions_list" name="permissions_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Application Permissions</h4>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>makerCheckerable</dt>
<dd>optional, <span>
Values are true, false. Default is false.</span>
<p>If makerCheckerable=false or not supplied then a list of application permissions is returned. The "selected"
attribute is always true in this case.
</p>
<p>If makerCheckerable=true then the "selected" attribute shows whether the permission is
enabled for Maker Check functionality.
</p>
<p>
Note: Each Mifos X transaction is associated with a permission.
</p>
</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>permissions</div><br><br>
<div class=apiClick>permissions?makerCheckerable=true</div><br><br>
<div class=apiClick>permissions?fields=grouping,code</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/permissions
</code>
<code class="method-response">
[
{
"grouping": "authorisation",
"code": "READ_PERMISSION",
"entityName": "PERMISSION",
"actionName": "READ",
"selected": true
},
....
{
"grouping": "transaction_loan",
"code": "WRITEOFF_LOAN",
"entityName": "LOAN",
"actionName": "WRITEOFF",
"selected": true
}
]
</code>
</div>
</div>
<a id="permissions_update" name="permissions_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Enable/Disable Permissions for Maker Checker</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/permissions
</code>
<code class="method-request">
PUT permissions
Content-Type: application/json
Request Body:
{
"permissions":{
"CREATE_GUARANTOR":true,
"CREATE_CLIENT":true
}
}
</code>
</div>
</div>
<!-- start of accounting api docs -->
<a id="glaccounts" name="glaccounts" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>General Ledger Account</h3>
<p>Ledger accounts represent an Individual account within an Organizations Chart
Of Accounts(COA) and are assigned a name and unique number by which they can
be identified. <br/>
All transactions relating to a company's assets, liabilities, owners' equity,
revenue and expenses are recorded against these accounts
</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>The name of the account</td>
</tr>
<tr class=alt>
<td>glCode</td>
</tr>
<tr>
<td class=fielddesc>The ledger code associated with the
Account<br>These codes are mandatory and should be unique within
an organization</td>
</tr>
<tr class=alt>
<td>disabled</td>
</tr>
<tr>
<td class=fielddesc>A boolean flag that indicates whether an account
is currently in use</td>
</tr>
<tr class=alt>
<td>type</td>
</tr>
<tr>
<td class=fielddesc>Classifies the account into one of the following Types
<br/><b>Asset:</b> represent the different types of economic resources
owned or controlled by business, common examples of Asset accounts are cash,
cash in bank, building, inventory, prepaid rent, goodwill, accounts receivable<br/>
<b>Liability:</b> represent the different types of economic obligations
by a business, such as accounts payable, bank loan, bonds payable<br/>
<b>Income:</b> represent the company's gross earnings and common examples
include Interest Income, Sales and Service revenue<br/>
<b>Expense:</b> represent the company's expenditures to enable itself to
operate. Common examples are electricity and water, rentals, depreciation,
doubtful accounts, insurance.<br/>
<b>Equity:</b> represent the residual equity of a business (after
deducting from Assets all the liabilities) including Retained Earnings
and Appropriations <br/><br/>
The options are fully listed in <a href="#glaccounts_template">Retrieve
General Ledger Accounts Template</a>.
</td>
</tr>
<tr class=alt>
<td>usage</td>
</tr>
<tr>
<td class=fielddesc>Determines how the account shall be used<br>
"Header" accounts specify the title of a group of accounts. They are used
only for grouping together detail accounts that have a similar purpose; that is, detail accounts
are assigned to specific header accounts
<br/>
"Detail" accounts may have transactions logged against them<br/><br/>
The options are fully listed in <a href="#glaccounts_template">Retrieve
General Ledger Accounts Template</a>.
</td>
</tr>
<tr class=alt>
<td>manualEntriesAllowed</td>
</tr>
<tr>
<td class=fielddesc>Specifies if manual entries can be made
against this account using the <a href="#journalentries_create">
Create Journal Entries API</a> </td>
</tr>
<tr class=alt>
<td>description</td>
</tr>
<tr>
<td class=fielddesc>Human understandable description for the Ledger Account
</td>
</tr>
<tr class=alt>
<td>parentId</td>
</tr>
<tr>
<td class=fielddesc>To assign a parent for this GLAccount
</td>
</tr><tr class=alt>
<td>tagId</td>
</tr>
<tr>
<td class=fielddesc>Used for tagging the Account Heads, based on GLAccount types.
</td>
</tr>
</table>
</div>
</div>
<a id="glaccounts_list" name="glaccounts_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List General Ledger Accounts</h4>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>type</dt>
<dd>
Integer <span>optional</span>
</dd>
<dt>manualEntriesAllowed</dt>
<dd>
boolean <span>optional</span>
</dd>
<dt>usage</dt>
<dd>
Integer <span>optional</span>
</dd>
<dt>disabled</dt>
<dd>
boolean <span>optional</span>
</dd>
<dt>parentId</dt>
<dd>
Long <span>optional</span>
</dd>
<dt>tagId</dt>
<dd>
Long <span>optional</span>
</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>glaccounts</div>
<br>
<br>
<div class=apiClick>glaccounts?type=1&manualEntriesAllowed=true&usage=1&disabled=false</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/glaccounts
</code>
<code class="method-response">
[
{
"id": 16,
"name": "Cash",
"parentId": 1,
"glCode": "100001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc",
"nameDecorated": "....Cash",
"tagId": {
"id": 10,
"name": "asset tag"
}
},
{
"id": 15,
"name": "Fund Source For Loan",
"glCode": "100002",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc"
}
]
</code>
</div>
</div>
<a id="glaccounts_template" name="glaccounts_template"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve GL Accounts 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>glaccounts/template</div>
<div class=apiClick>glaccounts/template?type=1</div>
<br>
type is optional and integer value from 1 to 5.<br>
<P><br>1.Assets
<br>2.Liabilities
<br>3.Equity
<br>4.Income
<br>5.Expenses</p>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/glaccounts/template<br>
GET https://DomainName/api/v1/glaccounts/template?type=1
</code>
<code class="method-response">
{
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"accountTypeOptions": [
{
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
{
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
{
"id": 3,
"code": "accountType.equity",
"value": "EQUITY"
},
{
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
{
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
}
],
"usageOptions": [
{
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
{
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
}
],
"assetHeaderAccountOptions": [
{
"id": 1,
"name": "Two wheeler loan",
"glCode": "10001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
},
"nameDecorated": "Two wheeler loan",
"tagId": {
"id": 10,
"name": "asset tag"
}
},
{
"id": 2,
"name": "VEHICLE LOAN",
"parentId": 1,
"glCode": "10002",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
},
"nameDecorated": "....VEHICLE LOAN",
"tagId": {
"id": 10,
"name": "asset tag"
}
}
],
"liabilityHeaderAccountOptions": [
{
"id": 15,
"name": "liabilitieschild",
"glCode": "ltchild",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"usage": {
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
},
"nameDecorated": "liabilitieschild",
"tagId": {
"id": 11,
"name": "liability tag"
}
}
],
"equityHeaderAccountOptions": [
{
"id": 13,
"name": "testajax",
"glCode": "12345678",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 3,
"code": "accountType.equity",
"value": "EQUITY"
},
"usage": {
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
},
"nameDecorated": "testajax",
"tagId": {
"id": 12,
"name": "Equity tag"
}
}
],
"expenseHeaderAccountOptions": [
{
"id": 8,
"name": "Salary",
"glCode": "450098",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
},
"nameDecorated": "Salary",
"tagId": {
"id": 14,
"name": "Expenses Tag"
}
}
],
"allowedAssetsTagOptions": [
{
"id": 10,
"name": "asset tag",
"position": 0
}
],
"allowedLiabilitiesTagOptions": [
{
"id": 11,
"name": "liability tag",
"position": 0
}
],
"allowedEquityTagOptions": [
{
"id": 12,
"name": "Equity tag",
"position": 0
}
],
"allowedIncomeTagOptions": [
{
"id": 13,
"name": "Income Tag",
"position": 0
}
],
"allowedExpensesTagOptions": [
{
"id": 14,
"name": "Expenses Tag",
"position": 0
}
]
}
</code>
</div>
</div>
<a id="glaccounts_retrieve" name="glaccounts_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a General Ledger Account</h4>
<p>Example Requests:</p>
<div class=apiClick>glaccounts/1</div>
<br>
<br>
<div class=apiClick>glaccounts/1?template=true</div>
<br>
<br>
<div class=apiClick>glaccounts/1?fields=name,glCode</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/glaccounts/{glaccountsId}
</code>
<code class="method-response">
{
"id": 1,
"name": "Cash",
"glCode": "100001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset1",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc"
}
</code>
</div>
</div>
<a id="glaccounts_create" name="glaccounts_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a General Ledger Account</h4>
<p>
<b>Note:</b> You may optionally
create Hierarchical Chart of Accounts by using the "parentId"
property of an Account<br>
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>name, glCode, type, usage and manualEntriesAllowed
</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/glaccounts
</code>
<code class="method-request">
POST glaccounts
Content-Type: application/json
Request Body:
{
"name": "Cash at Bangalore",
"glCode": "100017",
"manualEntriesAllowed": true,
"type": 1,
"tagId": "10",
"parentId": "18",
"usage": 1,
"description": "Cash at Bangalore Branch"
}
</code>
<code class="method-response">
{
"resourceId": 22
}
</code>
</div>
</div>
<a id="glaccounts_update" name="glaccounts_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a General Ledger Account</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/glaccounts/{glaccountId}
</code>
<code class="method-request">
PUT glaccounts/22
Content-Type: application/json
Request Body:
{
"name": "Cash at Bangalore rural"
}
</code>
<code class="method-response">
{
"resourceId": 22,
"changes": {
"name": "Cash at Bangalore rural"
}
}
</code>
</div>
<div class="method-example">
<code class="method-request">
PUT glaccounts/1
Content-Type: application/json
Request Body:
{
"disabled": true
}
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {
"disabled": true
}
}
</code>
</div>
</div>
<a id="glaccounts_delete" name="glaccounts_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a General Ledger Account</h4>
<p>
<b>Note:</b> Only Ledger Accounts against which no transactions have been logged
(either manually or by the loan or Savings portfolio) can be deleted.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/glaccounts/{glaccountId}
</code>
<code class="method-request">
DELETE glaccounts/1
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"resourceId": 1,
"changes": {}
}
</code>
</div>
</div>
<a id="glclosures" name="glclosures" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Accounting Closure</h3>
<p>An accounting closure indicates that no more journal
entries may be logged (or reversed) in the system,
either manually or via the portfolio with an entry date
prior to the defined closure date
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>closingDate</td>
</tr>
<tr>
<td class=fielddesc>The date for which the
accounting closure is defined</td>
</tr>
<tr class=alt>
<td>officeId</td>
</tr>
<tr>
<td class=fielddesc>The identifer of the branch for
which accounting has been closed</td>
</tr>
<tr class=alt>
<td>comments</td>
</tr>
<tr>
<td class=fielddesc>Description associated with an
Accounting closure</td>
</tr>
</table>
</div>
</div>
<a id="glclosures_list" name="glclosures_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Accounting closures</h4>
<p>Example Requests:</p>
<div class=apiClick>glclosures</div>
<br>
<br>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/glclosures
</code>
<code class="method-response">
[
{
"id": 7,
"officeId": 1,
"officeName": "Head Office",
"closingDate": [
2013,
1,
2
],
"deleted": false,
"createdDate": [
2013,
1,
3
],
"lastUpdatedDate": [
2013,
1,
3
],
"createdByUserId": 1,
"createdByUsername": "mifos",
"lastUpdatedByUserId": 1,
"lastUpdatedByUsername": "mifos",
"comments": "closed",
},
{
"id": 6,
"officeId": 1,
"officeName": "Head Office",
"closingDate": [
2012,
12,
13
],
"deleted": false,
"createdDate": [
2012,
12,
14
],
"lastUpdatedDate": [
2012,
12,
14
],
"createdByUserId": 1,
"createdByUsername": "mifos",
"lastUpdatedByUserId": 1,
"lastUpdatedByUsername": "mifos",
"comments": "hello",
}
]
</code>
</div>
</div>
<a id="glclosures_retrieve" name="glclosures_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve an Accounting Closure</h4>
<p>Example Requests:</p>
<div class=apiClick>glclosures/1</div>
<br>
<br>
<div class=apiClick>/glclosures/1?fields=officeName,closingDate</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/glclosures/{glclosureId}
</code>
<code class="method-response">
{
"id": 7,
"officeId": 1,
"officeName": "Head Office",
"closingDate": [
2013,
1,
2
],
"deleted": false,
"createdDate": [
2013,
1,
3
],
"lastUpdatedDate": [
2013,
1,
3
],
"createdByUserId": 1,
"createdByUsername": "mifos",
"lastUpdatedByUserId": 1,
"lastUpdatedByUsername": "mifos",
"comments": "closed",
}
</code>
</div>
</div>
<a id="glclosures_create" name="glclosures_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create an Accounting Closure</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>officeId,closingDate
</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/glclosures
</code>
<code class="method-request">
POST glclosures
Content-Type: application/json
Request Body:
{
"officeId": 1,
"closingDate": "06 December 2012",
"comments": "The accountants are heading for a carribean vacation",
"locale": "en" ,
"dateFormat": "dd MMMM yyyy"
}
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 9
}
</code>
</div>
</div>
<a id="glclosures_update" name="glclosures_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update an Accounting closure</h4>
<p>Once an accounting closure is created, only the comments associated with it may be edited
</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/glclosures/{glclosureId}
</code>
<code class="method-request">
PUT glclosures/1
Content-Type: application/json
Request Body:
{
"comments": "All transactions verified by Johnny Cash"
}
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 1,
"changes": {
"comments": "All transactions verified by Johnny Cash"
}
}
</code>
</div>
</div>
<a id="glclosures_delete" name="glclosures_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete an accounting closure</h4>
<p>
<b>Note:</b> Only the latest accounting closure
associated with a branch may be deleted.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/glclosures/{glclosureId}
</code>
<code class="method-request">
DELETE glclosures/1
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="journalentries" name="journalentries" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Journal Entries</h3>
<p>A journal entry refers to the logging of
transactions against general ledger accounts. A journal
entry may consist of several line items, each of which is either a "debit" or a "credit". The total amount of the
debits must equal the total amount of the credits or the
journal entry is said to be "unbalanced" <br/><br/>
A journal entry directly changes the account balances on
the general ledger
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>officeId</td>
</tr>
<tr>
<td class=fielddesc>The identifier of the office (
cost center) at which the financial activity
occured</td>
</tr>
<tr class=alt>
<td>glAccountId</td>
</tr>
<tr>
<td class=fielddesc>The identifier of the account (
Ledger Account) against which this journal entry
was made
</td>
</tr>
<tr class=alt>
<td>transactionDate</td>
</tr>
<tr>
<td class=fielddesc>The target date for which this
entry was recorded</td>
</tr>
<tr class=alt>
<td>amount</td>
</tr>
<tr>
<td class=fielddesc>The Monetary amount associated
with this entry
</td>
</tr>
<tr class=alt>
<td>comments</td>
</tr>
<tr>
<td class=fielddesc>A description associated with
this entry</td>
</tr>
<tr class=alt>
<td>entryType</td>
</tr>
<tr>
<td class=fielddesc>Either a Credit(1) or a Debit(2)</td>
</tr>
<tr class=alt>
<td>transactionId</td>
</tr>
<tr>
<td class=fielddesc>A unique Identifier for a set
of related Credit and Debit entries that make up
a "balanced" jounral Entry. For a manual entry,
this feild is a unique string.<br/>
For a system generated entry, the combination
of transactionId and entityId is unique
</td>
</tr>
<tr class=alt>
<td>manualEntry</td>
</tr>
<tr>
<td class=fielddesc>Flag determines if an entry is
generated by the portfolio (posted automatically by
the system during the lifecycle of loan or saving
products) or manually created by using the <a href="
journalentries_create">Create (Balanced) Journal
Entries</a> API
</td>
</tr>
<tr class=alt>
<td>reversed</td>
</tr>
<tr>
<td class=fielddesc>Flag determines if this manual
journal entry has been reversed using the <a href="
journalentries_reverse">Reverse a Journal Entry</a>
API. <br/>
Note: A journal entry is reversed by logging debits
for all credits that make up the Journal entry and
vice-versa
</td>
</tr>
<tr class=alt>
<td>referenceNumber</td>
</tr>
<tr>
<td class=fielddesc>An additional field that is used to store additional information about the entry (Ex: chequeNo)
</td>
</tr>
<tr class=alt>
<td>accountingRule</td>
</tr>
<tr>
<td class=fielddesc>Denotes the accounting rule id for posting journal entries.
</td>
</tr>
</table>
</div>
</div>
<a id="journalentries_list" name="journalentries_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Journal Entries</h4>
<p>The <i>list</i> capability of journal entries can support <b>pagination</b> and <b>sorting</b>.</p>
<h5>Optional Arguments</h5>
<dl class="argument-list">
<dt>offset</dt>
<dd>
Integer <span>optional</span>, defaults to 0
</dd>
<dd>Indicates from what result to start from.</dd>
<dt>limit</dt>
<dd>
Integer <span>optional</span>, defaults to 200
</dd>
<dd>Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1</dd>
<dt>orderBy</dt>
<dd>
String <span>optional</span>, one of <span>displayName, accountNo, officeId, officeName</span>
</dd>
<dd>Orders the results by the field indicated.</dd>
<dt>sortBy</dt>
<dd>
String <span>optional</span>, one of <span>ASC, DESC</span>
</dd>
<dd>Indicates what way to order results if <i>orderBy</i> is used.</dd>
<dt>officeId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dd>Provides ability to restrict list of centers returned based on the office there associated with.</dd>
<dt>glAccountId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dt>manualEntriesOnly</dt>
<dd>
Boolean <span>optional</span>
</dd>
<dd>Flag determines if only manually created journal entries
are to be returned( journal entries created by
the system during lifecycle of loan or saving
products etc shall be excluded)
<br/>
Set to "false" by default if not passed in explicity
</dd>
<dt>fromDate</dt>
<dd>
Date<span>optional</span>
</dd>
<dd>Filters for Journal entries whose entry Date
is greater than or equal to the passed in Date
</dd>
<dt>toDate</dt>
<dd>
Date <span>optional</span>
</dd>
<dd>Filters for Journal entries whose entry Date
is lesser than or equal to the passed in Date
</dd>
<dt>transactionId</dt>
<dd>
String <span>optional</span>
</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>journalentries</div>
<br>
<div class=apiClick>journalentries?transactionId=PB37X8Y21EQUY4S</div>
<br>
<div class=apiClick>journalentries?officeId=1&manualEntriesOnly=true&fromDate=1 July 2013&toDate=15 July 2013&dateFormat=dd MMMM yyyy&locale=en</div>
<br>
<div class=apiClick>journalentries?fields=officeName,glAccountName,transactionDate</div>
<br>
<div class=apiClick>journalentries?offset=10&limit=50</div>
<br>
<div class=apiClick>journalentries?orderBy=transactionId,sortOrder=DESC</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
</code>
<code class="method-response">
{
"totalFilteredRecords": 24,
"pageItems": [
{
"id": 1,
"officeId": 1,
"officeName": "Head Office",
"glAccountName": "ACCOUNT_NAME_WTYRB",
"glAccountId": 98,
"glAccountCode": "ASSET_C01367768735188",
"glAccountType": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"transactionDate": [
2011,
3,
4
],
"entryType": {
"id": 2,
"code": "journalEntrytType.debit",
"value": "DEBIT"
},
"amount": 10000,
"transactionId": "33",
"manualEntry": false,
"entityType": {
"id": 1,
"code": "productType.loan",
"value": "LOAN"
},
"entityId": 7,
"createdByUserId": 1,
"createdDate": [
2013,
5,
5
],
"createdByUserName": "mifos",
"reversed": false
},
{
"id": 2,
"officeId": 1,
"officeName": "Head Office",
"glAccountName": "ACCOUNT_NAME_WTYRB",
"glAccountId": 98,
"glAccountCode": "ASSET_C01367768735188",
"glAccountType": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"transactionDate": [
2011,
3,
4
],
"entryType": {
"id": 1,
"code": "journalEntryType.credit",
"value": "CREDIT"
},
"amount": 10000,
"transactionId": "33",
"manualEntry": false,
"entityType": {
"id": 1,
"code": "productType.loan",
"value": "LOAN"
},
"entityId": 7,
"createdByUserId": 1,
"createdDate": [
2013,
5,
5
],
"createdByUserName": "mifos",
"reversed": false
}
]
}
</code>
</div>
</div>
<a id="journalentries_create" name="journalentries_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create "Balanced" Journal Entries</h4>
<p>
<b>Note:</b> A Balanced (simple) Journal entry would
have atleast one "Debit" and one "Credit" entry whose
amounts are equal <br/>
Compound Journal entries may have "n" debits and "m"
credits where both "m" and "n" are greater than 0
and the net sum or all debits and credits are equal
<br>
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>officeId, transactionDate
</td>
</tr>
<tr>
<td class=fielddesc></td>
</tr>
<tr class=alt>
<td>credits</td>
</tr>
<tr>
<td class=fielddesc>Details of the credits contained
in the journal entry. Each credit entry contains
the following items <br/>
glAccountId: Identifier of the general ledger
account against which the credit entry shall be
made <br/>
amount: Amount of money credited
<br/>
comments: Optional description associated with
a credit entry
</a>.
</td>
</tr>
<tr class=alt>
<td>debits</td>
</tr>
<tr>
<td class=fielddesc>Details of the debits contained
in the journal entry. Each debit entry contains the
following items <br/>
glAccountId: Identifier of the general ledger account
against which the debit entry shall be
made <br/>
amount: Amount of money debited
<br/>
comments: Optional description associated with
a debit entry
</a>.
</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/journalentries
</code>
<code class="method-request">
POST journalentries
Content-Type: application/json
Request Body:
{
"officeId": 1,
"transactionDate": "06 December 2012",
"comments": "Gifts for staff",
"locale": "en" ,
"dateFormat": "dd MMMM yyyy",
"credits":[{"glAccountId":1,
"amount":5000},
{"glAccountId":2,
"amount":5000}
],
"debits":[{"glAccountId":3,
"amount":5000},
{"glAccountId":4,
"amount":5000}
]
}
</code>
<code class="method-response">
{
"officeId": 1,
"transactionId": "DNEEMS2LPD0NJ9O"
}
</code>
<code class="method-declaration">
POST https://DomainName/api/v1/journalentries
</code>
<code class="method-request">
POST journalentries
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"officeId": "1",
"transactionDate": "23 May 2013",
"referenceNumber": "547",
"comments": "asdf",
"accountingRule": "2",
"amount": "547"
}
</code>
<code class="method-response">
{
"officeId":1,
"transactionId":"RS9MCISID4WK1ZM"
}
</code>
<code class="method-declaration">
POST https://DomainName/api/v1/journalentries
</code>
<code class="method-request">
POST journalentries
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"officeId": "1",
"transactionDate": "23 May 2013",
"referenceNumber": "547",
"comments": "asdf",
"accountingRule": "2",
"credits":[{"glAccountId":1,
"amount":5000},
{"glAccountId":2,
"amount":5000}
],
"debits":[{"glAccountId":3,
"amount":5000},
{"glAccountId":4,
"amount":5000}
]
}
</code>
<code class="method-response">
{
"officeId":1,
"transactionId":"RS9MCISID4WK1ZM"
}
</code>
<code class="method-declaration">
POST https://DomainName/api/v1/journalentries
</code>
<code class="method-request">
POST journalentries
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"officeId": "1",
"transactionDate": "23 May 2013",
"referenceNumber": "547",
"comments": "asdf",
"accountingRule": "3",
"credits":[{"glAccountId":1,
"amount":5000},
{"glAccountId":2,
"amount":5000}
],
"amount": "10000"
}
</code>
<code class="method-response">
{
"officeId":1,
"transactionId":"RS9MCISID4WK1ZM"
}
</code>
</div>
</div>
<a id="journalentries_retrieve" name="journalentries_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a single Entry</h4>
<p>Example Requests:</p>
<div class=apiClick>journalentries/1</div>
<br>
<br>
<br>
<div class=apiClick>journalentries/1?fields=officeName,glAccountId,entryType,amount</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/journalentries/{entryId}
</code>
<code class="method-response">
{
"id": 1,
"officeId": 2,
"officeName": "sub branch 1",
"glAccountName": "Income from interest",
"glAccountId": 14,
"glAccountCode": "400001",
"glAccountType": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"transactionDate": [
2012,
11,
2
],
"entryType": {
"id": 1,
"code": "journalEntryType.credit",
"value": "CREDIT"
},
"amount": 900,
"transactionId": "13",
"manualEntry": true,
"createdByUserId": 1,
"createdDate": [
2012,
11,
2
],
"createdByUserName": "mifos",
"reversed": false
}
</code>
</div>
</div>
<a id="journalentries_reverse" name="journalentries_reverse"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Reverse a Journal Entry</h4>
<p>
<b>Note:</b> A journal entry is reversed by logging debits
for all credits that constitute the Journal entry and
vice-versa. The transactionId of the "reversal Entry" is returned
as the methods response
</p>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>command</dt>
<dd>
String<span> Mandatory, case-insensitive</span>
</dd>
<dd>'reverse' : Reverse the Journal Entry</dd>
</dl>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/journalentries/{transactionId}
</code>
<code class="method-request">
POST journalentries/C1MAE935K0IAEYA?command=reverse
Content-Type: application/json
</code>
<code class="method-response">
{
"transactionId": "YFDYMPBVVI9TRJP"
}
</code>
</div>
</div>
<!-- start of Search API doc -->
<a id="search" name="search" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Search</h3>
<p>Search API allows to search scoped resources clients, loans and groups on specified fields.</p>
<table class=matrixHeading id=scoped_resources>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Scoped Resources</div></td>
<td><div class="mifosXHeading2">Scoped fields</div></td>
</tr>
<tr class=alt>
<td rowspan="3"><a href="#clients">Client</a></td>
<td>Display Name</td>
</td>
<tr class=alt>
<td>Account Number</td>
</tr>
<tr class=alt>
<td>External Id</td>
</tr>
<tr>
<td><a href="#loans">Loan</a></td>
<td>Account Number</td>
</td>
<tr class=alt>
<td><a href="#client_identifiers">Client Identifiers</a></td>
<td>Document Key</td>
</td>
<tr>
<td rowspan=2><a href="#groups">Group</a></td>
<td>Name</td>
</td>
<tr>
<td>External Id</td>
</td>
</table>
</div>
</div>
<a id="search_resource" name="search_resource"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Search Resources</h4>
<p>Example Requests:</p>
<div class=apiClick>search?query=000000001</div>
<br>
<div class=apiClick>search?query=Petra&resource=clients,groups</div>
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Parameters</div></td>
<td><div class="mifosXHeading2">Description</div></td>
</tr>
<tr class=alt>
<td>
query
<br><i>(mandatory)</i>
</td>
<td class=fielddesc>
String which is searched on scoped resources
</td>
</tr>
<tr>
<td>
resource
<br><i>(non-mandatory)</i>
</td>
<td class=fielddesc>
Scoped resources on which search can be performed. If there is no resource parameter passed then search will be performed on all <a href="#search">scoped</a> resources.
</td>
</tr>
</table>
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Order of Search results</div></td>
</tr>
<tr class=alt>
<td class=fielddesc>
<b>List exact match results in following order</b>
<ol start=1>
<li>1. Clients</li>
<li>2. Loans</li>
<li>3. Client Identifiers</li>
<li>4. Groups</li>
</ol>
</td>
</tr>
<tr>
<td class=fielddesc>
<b>List partial match results in following order</b>
<ol start=1>
<li>1. Clients</li>
<li>2. Loans</li>
<li>3. Client Identifiers</li>
<li>4. Groups</li>
</ol>
</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/search?query=000000111
</code>
<code class="method-response">
[
{
"entityId": 111,
"entityAccountNo": "000000111",
"entityName": "12-A Flat Loan",
"entityType": "LOAN",
"parentId": 65,
"parentName": "aaaa aaaaa"
}
]
</code>
</div>
</div>
<!-- ends Search API docs-->
</div>
<!-- main-content-wrapper -->
<a id="fullapi_matrix" name="fullapi_matrix" class="old-syle-anchor">&nbsp;</a>
<br>
<br>
<br>
<div class=fullMatrixOuter>
<table width="80%">
<tr>
<td><h3>
Full API Matrix
</h3></td>
</tr>
</table>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table></td>
</tr>
<tr class="alt">
<td><a href="#clients">Clients</a></td>
<td>clients</td>
<td><a href="#clients_create">Create a Client</a></td>
<td><a href="#clients_list">List Clients</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/template</td>
<td></td>
<td><a href="#clients_template">Retrieve Client Template</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}</td>
<td></td>
<td><a href="#clients_retrieve">Retrieve a Client</a></td>
<td><a href="#clients_update">Update a Client</a></td>
<td><a href="#clients_delete">Delete a Client</a></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}?command=activate</td>
<td><a href="#clients_activate">Activate a Client</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}?command=close</td>
<td><a href="#clients_close">Close a Client</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}?command=assignStaff</td>
<td><a href="#clients_assignStaff">Assign Staff</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}?command=unassignStaff</td>
<td><a href="#clients_unassignStaff">Unassign Staff</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}/accounts</td>
<td></td>
<td><a href="#clients_loansummary">Retrieve client accounts overview</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}?command=transfer</td>
<td><a href="#clients_transfer">Transfer Client</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#client_identifiers">Client Identifiers</a></td>
<td>clients/{clientId}/identifiers</td>
<td><a href="#client_identifiers_create">Create an Identifier for a Client</a></td>
<td><a href="#client_identifiers_list">List all Identifiers for a Client</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}/identifiers/{identifierId}</td>
<td></td>
<td><a href="#client_identifiers_retrieve">Retrieve a Client Identifier</a></td>
<td><a href="#client_identifiers_update">Update a Client Identifier</a></td>
<td><a href="#client_identifiers_delete">Delete a Client Identifier</a></td>
</tr>
<tr>
<td><a href="#client_images">Client Images</a></td>
<td>clients/{clientId}/images</td>
<td><a href="#client_images_create">Upload an Image for a Client (as DATA URI)</a></td>
<td><a href="#client_images_retrieve">Get Client Image (DATA URI)</a></td>
<td><a href="#client_images_update">Update Client Image (DATA URI)</a></td>
<td><a href="#client_images_delete">Delete Client Image</a></td>
</tr>
<tr class="alt">
<td></td>
<td></td>
<td><a href="#client_images_create_form">
Upload an Image for a Client (Multi-part form data)</a>
</td>
<td><a href="#client_images_retrieve_binary">Get Client Image (Binary file)</a></td>
<td><a href="#client_images_update_form">
Update Client Image (Multi-part form data)</a>
</td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#groups">Group</a></td>
<td>groups</td>
<td><a href="#groups_create">Create a Group</a></td>
<td><a href="#groups_list">List Groups</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>groups/template</td>
<td></td>
<td><a href="#groups_template">Retrieve Group Template</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>groups/{groupId}</td>
<td></td>
<td><a href="#groups_retrieve">Retrieve a Group</a></td>
<td><a href="#groups_update">Update a Group</a></td>
<td><a href="#groups_delete">Delete a Group</a></td>
</tr>
<tr>
<td></td>
<td>groups/{groupId}?command=activate</td>
<td><a href="#groups_activate">Activate a Group</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>groups/{groupId}?command=associateClients</td>
<td><a href="#groups_associate_clients">Associate Clients</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>groups/{groupId}?command=disassociateClients</td>
<td><a href="#groups_disassociate_clients">Disassociate Clients</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>groups/{groupId}/accounts</td>
<td></td>
<td><a href="#groups_accounts">Retrive Group accounts summary</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#loanproducts">Loan Product</a></td>
<td>loanproducts</td>
<td><a href="#loanproducts_create">Create a Loan Product</a></td>
<td><a href="#loanproducts_list">List Loan Products</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loanproducts/template</td>
<td></td>
<td><a href="#loanproducts_template">Retrieve Loan Product Template</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loanproducts/{productId}</td>
<td></td>
<td><a href="#loanproducts_retrieve">Retrieve a Loan Product</a></td>
<td><a href="#loanproducts_update">Update a Loan Product</a></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#loanproductmix">Loan Product Mix</a></td>
<td>loanproducts/template?isProductMixTemplate=true</td>
<td></td>
<td><a href="#loanproductmix_template">Retrieve Loan Product Mix Template</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loanproducts?associations=productMixes</td>
<td></td>
<td><a href="#loanproductmix_list">List Loan Products Mix</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loanproducts/{productId}/productmix</td>
<td><a href="#loanproductmix_create">Create a Loan Product Mix</a></td>
<td><a href="#loanproductmix_retrieve">Retrieve Loan Products Mix</a></td>
<td><a href="#loanproductmix_update">Update Loan Product Mix</a></td>
<td><a href="#loanproductmix_delete">Delete Loan Products Mix</a></td>
</tr>
<tr>
<td><a href="#loans">Loans</a></td>
<td>loans?calculateLoanSchedule</td>
<td><a href="#loans_calculate">Calculate Loan Repayment Schedule</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans</td>
<td><a href="#loans_create">Submit a new Loan Application</a></td>
<td><a href="#loans_list">List Loans/Loan Applications</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/template?clientId={clientId}</td>
<td></td>
<td><a href="#loans_template">Retrieve Loan Template</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}</td>
<td></td>
<td><a href="#loans_retrieve">Retrieve a Loan</a></td>
<td></td>
<td><a href="#loans_delete">Delete a Loan Application</a></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}?command=approve</td>
<td><a href="#loans_approve">Approve Loan Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}?command=undoApproval</td>
<td><a href="#loans_approve_undo">Undo Loan Application Approval</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}?command=reject</td>
<td><a href="#loans_reject">Reject Loan Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}?command=withdraw</td>
<td><a href="#loans_withdraw">Withdraw Loan Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}?command=disburse</td>
<td><a href="#loans_disburse">Disburse Loan</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}?command=undoDisbursal</td>
<td><a href="#loans_disburse_undo">Undo Loan Application Disbursal</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}/transactions/template</td>
<td></td>
<td><a href="#loans_repaymenttemplate_etc">Retrieve Loan Transaction Template</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<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>
<td></td>
<td>loans/{loanId}/transactions?command=waiveInterest</td>
<td><a href="#loans_transaction_waiveinterest">Waive Interest</a></td>
<td></td>
<td></td>
<td></td>
</tr><tr>
<td></td>
<td>loans/{loanId}/transactions?command=writeoff</td>
<td><a href="#loans_transaction_write-off_loan">Write-off Loan</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}/transactions/{transactionId}</td>
<td></td>
<td><a href="#loans_transaction_retrieve">Retrieve a transactions details</a></td>
<td></td>
<td></td>
</tr>
<tr>
<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 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></td>
<td></td>
<td></td>
</tr>
<tr>
<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 class="alt">
<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>
<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">
<td><a href="#collaterals">Loan Collateral</a></td>
<td>loans/{loanId}/collaterals</td>
<td><a href="#collaterals_create">Create a Collateral
</a></td>
<td><a href="#collaterals_list">List collaterals
</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}/collaterals/{collateralId}</td>
<td></td>
<td><a href="#collaterals_retrieve">Retrieve a Collateral</a></td>
<td><a href="#collaterals_update">Update a Collateral</a></td>
<td><a href="#collaterals_delete">Delete a Collateral</a></td>
</tr>
<tr class="alt">
<td><a href="#glaccounts">General Ledger Account</a></td>
<td>glaccounts</td>
<td><a href="#glaccounts_create">Create a New Ledger Account</a></td>
<td><a href="#glaccounts_list">List Ledger Accounts</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>glaccounts/{glaccountId}</td>
<td></td>
<td><a href="#glaccounts_retrieve">Retrieve a Ledger Account</a></td>
<td><a href="#glaccounts_update">Update a Ledger Account</a></td>
<td><a href="#glaccounts_delete">Delete a Ledger Account</a></td>
</tr>
<tr class="alt">
<td><a href="#glclosures">Accounting Closure</a></td>
<td>glclosures</td>
<td><a href="#glclosures_create">Create an Accounting Closure</a></td>
<td><a href="#glclosures_list">List Accounting Closures</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>glclosures/{glclosureId}</td>
<td></td>
<td><a href="#glclosures_retrieve">Retrieve an Accounting Closure</a></td>
<td><a href="#glclosures_update">Update an Accounting Closure</a></td>
<td><a href="#glclosures_delete">Delete an Accounting Closure</a></td>
</tr>
<tr class="alt">
<td><a href="#journalentries">Journal Entries</a></td>
<td>journalentries</td>
<td><a href="#journalentries_create">Create Journal Entries</a></td>
<td><a href="#journalentries_list">List Journal Entries</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>journalentries/{entryId}</td>
<td></td>
<td><a href="#journalentries_retrieve">Retrieve a single Entry</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>journalentries/{transactionId}/reversal</td>
<td><a href="#journalentries_reverse">Reverse Journal Entries</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#accountingrules">Accounting Rules</a></td>
<td>accountingrules</td>
<td><a href="#accountingrules_create">Create a Accounting Rule</a></td>
<td><a href="#accountingrules_list">List Accounting Rules</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>accountingrules/{accountingrulesId}</td>
<td></td>
<td><a href="#accountingrules_retrieve">Retrieve a Accounting Rule</a></td>
<td><a href="#accountingrules_update">Update a Accounting Rule</a></td>
<td><a href="#accountingrules_delete">Delete a Accounting Rule</a></td>
</tr>
<tr class="alt">
<td><a href="#reports">Report</a></td>
<td>reports</td>
<td><a href="#reports_create">Create a Report</a></td>
<td><a href="#reports_list">List Reports</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>reports/template</td>
<td></td>
<td><a href="#reports_template">Retrieve Report Template</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>reports/{id}</td>
<td></td>
<td><a href="#reports_retrieve">Retrieve a Report</a></td>
<td><a href="#reports_update">Update a Report</a></td>
<td><a href="#reports_delete">Delete a Report</a></td>
</tr>
<tr class="alt">
<td><a href="#runreports">Run Report</a></td>
<td>runreports/{reportName}</td>
<td></td>
<td><a href="#report_run">Run a Report</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#search">Search</a></td>
<td>search</td>
<td></td>
<td><a href="#search_resource">Search Resources</td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#offices">Office</a></td>
<td>offices</td>
<td><a href="#offices_create">Create an Office</a></td>
<td><a href="#offices_list">List Offices</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>offices/template</td>
<td></td>
<td><a href="#offices_template">Retrieve Office Template</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>offices/{officeId}</td>
<td></td>
<td><a href="#offices_retrieve">Retrieve an Office</a></td>
<td><a href="#offices_update">Update an Office</a></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#configs">Currency</a></td>
<td>currencies</td>
<td></td>
<td><a href="#configs_currencyretrieve">Retrieve Currency
Configuration</a></td>
<td><a href="#configs_currencyupdate">Update Currency
Configuration</a></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#funds">Funds</a></td>
<td>funds</td>
<td><a href="#funds_create">Create a Fund</a></td>
<td><a href="#funds_retrieve">List Funds</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>funds/{fundId}</td>
<td></td>
<td><a href="#fund_retrieve">Retrieve a Fund</a></td>
<td><a href="#fund_update">Update a Fund</a></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#staff">Staff</a></td>
<td>staff</td>
<td><a href="#staff_create">Create a Staff</a></td>
<td><a href="#staff_list">List Staff</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>staff/{staffId}</td>
<td></td>
<td><a href="#staff_retrieve">Retrieve a Staff Member</a></td>
<td><a href="#staff_update">Update a Staff Member</a></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#charges">Charges</a></td>
<td>charges</td>
<td><a href="#charges_create">Create a Charge</a></td>
<td><a href="#charges_list">List Charges</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>charges/{chargeId}</td>
<td></td>
<td><a href="#charges_retrieve">Retrieve a Charge</a></td>
<td><a href="#charges_update">Update a Charge</a></td>
<td><a href="#charges_delete">Delete a Charge</a></td>
</tr>
<tr class="alt">
<td><a href="#datatables">Data Table</a></td>
<td>datatables</td>
<td><a href="#datatables_createTable">Create Data Table</a></td>
<td><a href="#datatables_list">List Data Tables</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>datatables/{datatable}</td>
<td></td>
<td><a href="#datatables_getTable">Retrieve Data Table Details</a></td>
<td><a href="#datatables_updateTable">Update Data Table</a></td>
<td><a href="#datatables_deleteTable">Delete Data Table</a></td>
</tr>
<tr>
<td></td>
<td>datatables/register/{datatable}/{apptable}</td>
<td><a href="#datatables_register">Register Data Table</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>datatables/deregister/{datatable}</td>
<td><a href="#datatables_deregister">Deregister Data Table</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>datatables/{datatable}/{apptableId}</td>
<td><a href="#datatables_create">Create Entry in Data
Table</a></td>
<td><a href="#datatables_retrieve">Retrieve Entry(s) from
Data Table</a></td>
<td><a href="#datatables_update">Update Entry in Data
Table (One to One)</a></td>
<td><a href="#datatables_delete">Delete Entry(s) in Data
Table</a></td>
</tr>
<tr class="alt">
<td></td>
<td>datatables/{datatable}/{apptableId}/{datatableId}</td>
<td></td>
<td><a href="#datatables_update_1M">Update Entry in Data
Table (One to Many)</a></td>
<td></td>
<td><a href="#datatables_delete_1M">Delete Entry in Data
Table (One to Many)</a></td>
</tr>
<tr>
<td><a href="#documents">Documents</a></td>
<td>{entityType}/{entityId}/documents</td>
<td><a href="#documents_create">Create a Document</td>
<td><a href="#documents_list">List All Document Details</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>{entityType}/{entityId}/documents/{documentId}</td>
<td></td>
<td><a href="#documents_retrieve">Retrieve a Documents Details</a></td>
<td><a href="#documents_update">Update a Document</a></td>
<td><a href="#documents_delete">Delete a Document</a></td>
</tr>
<tr>
<td></td>
<td>{entityType}/{entityId}/documents/{documentId}/attachment</td>
<td></td>
<td><a href="#documents_retrieve_file">Retrieve
binary file associated with a
Document</a>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#notes">Notes</a></td>
<td>{resource}/{resourceId}/notes</td>
<td><a href="#resources_addnote">Add a Resource Note</td>
<td><a href="#resource_notelist">Retrieve a Resource's Notes</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>{resource}/{resourceId}/notes/{noteId}</td>
<td></td>
<td><a href="#resources_retrievenote">List All
Notes for a Resource</a></td>
<td><a href="#resources_updatenote">Update a Resource Note</a></td>
<td><a href="#resources_deletenote">Delete a Resource Note</a></td>
</tr>
<tr>
<td><a href="#authentication">Authentication</a></td>
<td>authentication</td>
<td><a href="#authenticate_request">Verify Authentication</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#users">User</a></td>
<td>users</td>
<td><a href="#users_create">Create a User</a></td>
<td><a href="#users_list">List Users</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>users/template</td>
<td></td>
<td><a href="#users_template">Retrieve User Template</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>users/{userId}</td>
<td></td>
<td><a href="#users_retrieve">Retrieve a User</a></td>
<td><a href="#users_update">Update a User</a></td>
<td><a href="#users_delete">Delete a User</a></td>
</tr>
<tr>
<td><a href="#roles">Role</a></td>
<td>roles</td>
<td><a href="#roles_create">Create a New Role</a></td>
<td><a href="#roles_list">List Roles</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>roles/{roleId}</td>
<td></td>
<td><a href="#roles_retrieve">Retrieve a Role</a></td>
<td><a href="#roles_update">Update a Role</a></td>
<td></td>
</tr>
<tr>
<td></td>
<td>roles/{roleId}/permissions</td>
<td></td>
<td><a href="#rolespermissions_retrieve">Retrieve a Role's
Permissions</a></td>
<td><a href="#rolespermissions_update">Update a Role's
Permissions</a></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#permissions">Permission</a></td>
<td>permissions</td>
<td></td>
<td><a href="#permissions_list">List Application Permissions</a></td>
<td><a href="#permissions_update">Enable/Disable Permissions for Maker Checker</a></td>
<td></td>
</tr>
<tr>
<td><a href="#configs_global">Global Configuration</a></td>
<td>configurations</td>
<td></td>
<td><a href="#configs_globalconfig_retrieve">Retrieve Global Configuration</a></td>
<td><a href="#configs_globalconfig_update">Update Global Configuration</a></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#configs_codes">Codes</a></td>
<td>codes</td>
<td><a href="#configs_codes_create">Create a Code</a></td>
<td><a href="#configs_codes_retrieve">List Codes</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>codes/{codeId}</td>
<td></td>
<td><a href="#configs_code_retrieve">Retrieve a Code</a></td>
<td><a href="#configs_code_update">Update a Code</a></td>
<td><a href="#configs_code_delete">Delete a Code</a></td>
</tr>
<tr class="alt">
<td><a href="#configs_codes_codevalues">Code Values</a></td>
<td>codes/{codeId}/codevalues</td>
<td><a href="#configs_codes_codevalues_create">Create a Code Value</a></td>
<td><a href="#configs_codes_codevalues_list">List Code Values</a></td>
<td></td>
<td></td>
</tr>
<tr >
<td></td>
<td>codes/{codeId}/codevalues/{codevalueId}</td>
<td></td>
<td><a href="#configs_codes_codevalues_retrieve">Retrieve a Code Value</a></td>
<td><a href="#configs_codes_codevalues_update">Update a Code Value</a></td>
<td><a href="#configs_codes_codevalues_delete">Delete a Code Value</a></td>
</tr>
<tr>
<td><a href="#audits">Audits</a></td>
<td>audits</td>
<td></td>
<td><a href="#audits_list">List Audits</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>audits/searchtemplate</td>
<td></td>
<td><a href="#audits_searchtemplate">Retrieve Audit Search Template</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>audits/{auditId}</td>
<td></td>
<td><a href="#audits_retrieve">Retrieve an Audit Entry</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#makercheckers">Makercheckers</a></td>
<td>makercheckers</td>
<td></td>
<td><a href="#makercheckers_list">List Maker Checker Entries</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>makercheckers/searchtemplate</td>
<td></td>
<td><a href="#makercheckers_searchtemplate">Retrieve Maker Checker Search Template</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>makercheckers/{auditId}</td>
<td></td>
<td></td>
<td></td>
<td><a href="#makercheckers_delete">Delete Maker Checker Entry</a></td>
</tr>
<tr>
<td></td>
<td>makercheckers/{auditId}?command=approve</td>
<td><a href="#makercheckers_approve">Approve Maker Checker Entry</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#scheduler_jobs">Scheduler jobs</a></td>
<td>jobs</td>
<td></td>
<td><a href="#scheduler_jobs_list">List Scheduler jobs</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>jobs/{jobId}</td>
<td></td>
<td><a href="#retrieve_scheduler_job">Retrieve a job</a></td>
<td><a href="#update_scheduler_job">Update a job</a></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>jobs/{jobId}?command=executeJob</td>
<td><a href="#run_job">Run a job</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>jobs/{jobid}/runhistory?offset=0&limit=200</td>
<td></td>
<td><a href="#retrieve_job_runhistory">Retrieve job history</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>scheduler</td>
<td></td>
<td><a href="#retrieve_scheduler_status">Retrieve scheduler status</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>scheduler?command=start</td>
<td><a href="#activate_scheduler">Activate a scheduler service</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>scheduler?command=stop</td>
<td><a href="#suspend_scheduler">Suspend a scheduler service</td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
<a id="betaapi_matrix" name="betaapi_matrix" class="old-syle-anchor">&nbsp;</a>
<div class=fullMatrixOuter>
<table width="80%">
<tr>
<td><h3>Beta API Matrix</h3></td>
</tr>
</table>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td colspan=2 valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>RESOURCES</td>
</tr>
</table>
</div></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">POST</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>create/complex update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">GET</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>read</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">PUT</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>update</div></td>
</tr>
</table></td>
<td><table>
<tr>
<td><div class="matrixHeadingVerbs">DELETE</div></td>
</tr>
<tr>
<td><div class=matrixHeadingCommands>delete</div></td>
</tr>
</table>
</td>
</tr>
<tr class="alt">
<td><a href="#centers">Center</a></td>
<td>centers</td>
<td><a href="#centers_create">Create a Center</a></td>
<td><a href="#centers_list">List Centers</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>centers/template</td>
<td></td>
<td><a href="#centers_template">Retrieve Center Template</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>centers/{centerId}</td>
<td></td>
<td><a href="#centers_retrieve">Retrieve a Center</a></td>
<td><a href="#centers_update">Update a Center</a></td>
<td><a href="#centers_delete">Delete a Center</a></td>
</tr>
<tr>
<td></td>
<td>centers/{centerId}?command=activate</td>
<td><a href="#centers_activate">Activate a Center</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#savingsproducts">Savings Product</a></td>
<td>savingsproducts</td>
<td><a href="#savingsproducts_create">Create a Savings product</a></td>
<td><a href="#savingsproducts_list">List Savings products</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>savingproducts/template</td>
<td></td>
<td><a href="#savingsproducts_template">Retrieve Savings Product Template</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsproducts/{productId}</td>
<td></td>
<td><a href="#savingsproducts_retrieve">Retrieve a savings product</a></td>
<td><a href="#savingsproducts_update">Update a savings product</a></td>
<td><a href="#savingsproducts_delete">Delete a savings product</a></td>
</tr>
<tr>
<td><a href="#savingsaccounts">Savings Accounts</a></td>
<td>savingsaccounts</td>
<td><a href="#savingsaccounts_create">Submit new savings application</a></td>
<td><a href="#savingsaccounts_list">List savings application/accounts</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsaccounts/template?clientId={clientId}</td>
<td></td>
<td><a href="#savingsaccounts_template">Retrieve savings template</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>savingsaccounts/{accountId}</td>
<td></td>
<td><a href="#savingsaccounts_retrieve">Retrieve a savings application/account</a></td>
<td><a href="#savingsaccounts_update">Modify a savings application</a></td>
<td><a href="#savingsaccounts_delete">Delete a savings application</a></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsaccounts/{accountId}?command=approve</td>
<td><a href="#savingsaccounts_approve">Approve a savings application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>savingsaccounts/{accountId}?command=undoApproval</td>
<td><a href="#savingsaccounts_undoapproval">Undo savings application approval</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsaccounts/{accountId}?command=reject</td>
<td><a href="#savingsaccounts_reject">Reject a savings application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>savingsaccounts/{accountId}?command=withdraw</td>
<td><a href="#savingsaccounts_withdrawbyapplicant">Withdraw savings application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsaccounts/{accountId}?command=activate</td>
<td><a href="#savingsaccounts_activate">Activate a savings account</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsaccounts/{accountId}?command=close</td>
<td><a href="#savingsaccounts_close">Close a savings account</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>savingsaccounts/{accountId}?command=calculateInterest</td>
<td><a href="#savingsaccounts_calculate_interest">Calculate interest on a savings account</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsaccounts/{accountId}?command=postInterest</td>
<td><a href="#savingsaccounts_post_interest">Post interest on a savings account</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#savingsaccounts_transactions">Savings Transactions</a></td>
<td>savingsaccounts/{accountId}/transactions?command=deposit</td>
<td><a href="#savingsaccounts_deposit">Make a deposit</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>savingsaccounts/{accountId}/transactions?command=withdrawal</td>
<td><a href="#savingsaccounts_withdrawal">Make a withdrawal</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsaccounts/{accountId}/transactions/{transactionId}?command=undo</td>
<td><a href="#savingsaccounts_undotransaction">Undo transaction</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsaccounts/{accountId}/transactions/{transactionId}?command=modify</td>
<td><a href="#savingsaccounts_adjusttransaction">Adjust transaction</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>savingsaccounts/{accountId}/transactions/template</td>
<td></td>
<td><a href="#savingsaccounts_transactions_template">Retrieve savings account transaction template</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>savingsaccounts/{accountId}/transactions/{transactionId}</td>
<td></td>
<td><a href="#savingsaccounts_transaction">Retrieve savings account transaction</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#accounttransfers">Account Transfers</a></td>
<td>accounttransfers/</td>
<td><a href="#accounttransfers_create">Create new Transfer</a></td>
<td><a href="#accounttransfers_list">List Transfers</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>accounttransfers/template</td>
<td></td>
<td><a href="#accounttransfers_template">Retrieve Template</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>accounttransfers/{transferId}</td>
<td></td>
<td><a href="#accounttransfers_retrieve">Retrieve Transfer</a></td>
<td></td>
<td></td>
</tr>
</table>
</div>
</div>
<script>
$(document).ready(function() {
$('.apiClick').bind('click', function() {
clickAPILink($(this).text());
});
$('.apiClickNotPretty').bind('click', function() {
clickAPILinkNotPretty($(this).text());
});
baseURL = getBaseURL(window.location.href);
});
</script>
</body>
</html>