Files
cbsnexora-backend/api-docs/apiLive.htm
T

10506 lines
310 KiB
HTML

<!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>API MENU</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>
</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></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}/loans</td>
<td></td>
<td><a href="#clients_loansummary">Retrieve a Client's
Loan Account Summary</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}/notes</td>
<td><a href="#clients_addnote">Add a Client Note</a></td>
<td><a href="#clients_notes">Retrieve a Client's Notes</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}/notes/{noteId}</td>
<td></td>
<td><a href="#clients_retrievenote">Retrieve a Client
Note</a></td>
<td><a href="#clients_updatenote">Update a Client Note</a></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Group</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="#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><a href="#groups_delete">Delete a Group</a></td>
</tr>
<tr>
<td></td>
<td>groups/{group}</td>
<td></td>
<td><a href="#groups_retrieve">Retrieve a Group</a></td>
<td><a href="#groups_update">Update a Group</a></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>groups/{group}/loans</td>
<td></td>
<td><a href="#groups_loansummary">Retrieve a Group's
Loan Account Summary</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>groups/{group}/command/assign_loanofficer</td>
<td><a href="#groups_assignlo">Assign a Loan Officer</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>groups/{group}/command/unassign_loanofficer</td>
<td><a href="#groups_unassign_lo">Unassign a Loan Officer</a></td>
<td></a></td>
<td></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">LOAN</a></td>
<td>loans</td>
<td><a href="#loans_create">Create a New Loan / Submit
a Loan Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}</td>
<td><a href="#loans_approve_etc">Approve, Undo
Approval, Disburse, Undo Disbursal, Reject a Loan or Withdraw
a Loan Application</a></td>
<td><a href="#loans_retrieve">Retrieve a Loan</a></td>
<td></td>
<td><a href="#loans_delete">Delete a Loan</a></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}/transactions</td>
<td><a href="#loans_repayment_etc">Make a Repayment /
Loan Waiver</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}/transactions/{transactionId}</td>
<td><a href="#loans_repaymentadjust_etc">Adjust a
Repayment or Waiver</a></td>
<td><a href="#loans_repaymentretrieve_etc">Retrieve a
Repayment or Waiver Details</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#guarantors">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>
</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</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="#depositproducts">DEPOSIT PRODUCT</a></td>
<td>depositproducts</td>
<td><a href="#depositproducts_create">Create a Deposit product</a></td>
<td><a href="#depositproducts_list">List Deposit products</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>depositproducts/{prodcutId}</td>
<td></td>
<td><a href="#depositproducts_retrieve">Retrieve a Deposit product</a></td>
<td><a href="#depositproducts_update">Update a Deposit product</a></td>
<td><a href="#depositproducts_delete">Delete a Deposit product</a></td>
</tr>
<tr>
<td><a href="#savingproducts">SAVING PRODUCT</a></td>
<td>savingproducts</td>
<td><a href="#savingproducts_create">Create a Saving product</a></td>
<td><a href="#savingproducts_list">List Saving products</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>savingproducts/{prodcutId}</td>
<td></td>
<td><a href="#savingproducts_retrieve">Retrieve a Saving procduct</a></td>
<td><a href="#savingproducts_update">Update a Saving product</a></td>
<td><a href="#savingproducts_delete">Delete a Saving product</a></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>
</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></td>
<td><a href="#datatables_list">List Data Tables</a></td>
<td></td>
<td></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>
</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></td>
<td><a href="#reports_list">List Reports</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>reports/{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">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></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 Details
Template</a></td>
</tr>
<tr>
<td>loans/template</td>
<td><a href="#loans_template">Retrieve Loan Details
Template</a></td>
</tr>
<tr class="alt">
<td>loans/{loanId}/transactions/template</td>
<td><a href="#loans_repaymenttemplate_etc">Retrieve
Loan Repayment/Loan Waiver Template</a></td>
</tr>
<tr>
<td>offices/template</td>
<td><a href="#offices_template">Retrieve Office Details
Template</a></td>
</tr>
<tr class="alt">
<td>loanproducts/template</td>
<td><a href="#loanproducts_template">Retrieve Loan
Product Details Template</a></td>
</tr>
<tr>
<td>users/template</td>
<td><a href="#users_template">Retrieve User Details
Template</a></td>
</tr>
<tr class="alt">
<td>audit/searchtemplate</td>
<td><a href="#audit_searchtemplate">Retrieve Audit
Search Data</a></td>
</tr>
<tr class="alt">
<td>depositproducts/template</td>
<td><a href="#depositproducts_template">Retrieve Deposit
Product Details Template</a></td>
</tr>
<tr class="alt">
<td>loanproducts/template</td>
<td><a href="#savingproducts_template">Retrieve Saving
Product Details Template</a></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Savings</h2>
<div id="toc-menu-savings" 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>Work in Progress</a></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#fixeddeposits">FIXED DEPOSITS</a></td>
<td>depositaccounts</td>
<td><a href="#fixeddeposits_create">Create a New Deposit
Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>depositaccounts/{accountId}</td>
<td><a href="#fixeddeposits_approve_etc">Approve, Undo Approve,
Interest withdraw, Reject a Deposit Application or Withdraw a
Deposit Application</a></td>
<td><a href="#fixeddeposits_retrieve">Retrieve a Deposit
Application</a></td>
<td></td>
<td><a href="#fixeddeposits_delete">Delete a Deposit
Application</a></td>
</tr>
<tr class="alt">
<td><a href="#savingaccounts">SAVING ACCOUNTS</a></td>
<td>savingaccounts</td>
<td><a href="#savingaccounts_create">Create a New Saving
Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>savingaccounts/{accountId}</td>
<td><a href="#savingaccounts_approve_etc">Approve, Undo Approve,
Interest withdraw, Reject a Saving Application or Withdraw a
Saving Application</a></td>
<td><a href="#savingaccounts_retrieve">Retrieve a Saving
Application</a></td>
<td></td>
<td><a href="#savingaccounts_delete">Delete a Saving
Application</a></td>
</tr>
</table>
</div>
</div>
</div>
<div class="flybar-nav">
<h2 class="flybar-button">Accounting</h2>
<div id="toc-menu-group" 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>
</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/keithwoodlock/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>
<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>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>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>
</table>
</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>Example Requests:</p>
<div class=apiClick>clients</div>
<br>
<br>
<div class=apiClick>clients?fields=displayName,officeName,joinedDate</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients
</code>
<code class="method-response">
[
{
"id": 2,
"accountNo": "000000002",
"externalId": "one/78",
"fullname": "New Business to Create",
"displayName": "New Business to Create",
"officeId": 1,
"officeName": "Head Office",
"joinedDate": [2006,6,13]
},
{
"id": 1,
"accountNo": "000000001",
"externalId": "786YYH7",
"firstname": "Petra",
"lastname": "Yton",
"displayName": "Petra Yton",
"officeId": 1,
"officeName": "Head Office",
"joinedDate": [2009,3,4]
}
]
</code>
</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>
<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">
{
"officeId": 1,
"joinedDate": [
2013,
2,
5
],
"allowedOffices": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
]
}
</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": 1,
"accountNo": "000000001",
"externalId": "786YYH7",
"firstname": "Petra",
"lastname": "Yton",
"displayName": "Petra Yton",
"officeId": 1,
"officeName": "Head Office",
"joinedDate": [
2009,
3,
4
]
}
</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>, joinedDate,
officeId
</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",
"joinedDate": "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": "New Business to Create",
"externalId": "one/78",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"joinedDate": "13 June 2006"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 2,
"resourceId": 2
}
</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>
</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",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"joinedDate": "09 June 2006"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"resourceId": 1,
"changes": {
"externalId": "786444UUUYYH7",
"joinedDate": "09 June 2006",
"dateFormat": "dd MMMM yyyy",
"locale": "en"
}
}
</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 a Client's Loan Account Summary</h4>
<p>
An example of how a loan portfolio summary can be provided. This
one contains quite a bit of redundant data (like the counts) and
is requested in a specific use case of the Individual Lending User
Interface.<br> However, it is quite reasonable to add
resources like this to simplify User Interface development.
</p>
<p>Example Requests:</p>
<div class=apiClick>clients/1/loans</div>
<br>
<br>
<div class=apiClick>clients/1/loans?fields=openLoans,closedLoans,activeLoanCount</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/{clientId}/loans
</code>
<code class="method-response">
{
"anyLoanCount": 9,
"pendingApprovalLoanCount": 4,
"pendingApprovalLoans": [
{
"id": 48,
"accountNo": "48",
"productId": 1,
"productName": "PORetailLoan",
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval"
}
},
{
"id": 50,
"accountNo": "50",
"productId": 1,
"productName": "PORetailLoan",
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval"
}
},
{
"id": 51,
"accountNo": "51",
"productId": 1,
"productName": "PORetailLoan",
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval"
}
},
{
"id": 62,
"accountNo": "62",
"productId": 3,
"productName": "Further Loan Product",
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval"
}
}
],
"activeLoanCount": 2,
"openLoans": [
{
"id": 46,
"accountNo": "46",
"productId": 1,
"productName": "PORetailLoan",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active"
}
},
{
"id": 60,
"accountNo": "60",
"productId": 1,
"productName": "PORetailLoan",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active"
}
}
],
"closedLoanCount": 3,
"closedLoans": [
{
"id": 22,
"accountNo": "22",
"productId": 1,
"productName": "PORetailLoan",
"status": {
"id": 700,
"code": "loanStatusType.overpaid",
"value": "Overpaid"
}
},
{
"id": 33,
"accountNo": "33",
"productId": 1,
"productName": "PORetailLoan",
"status": {
"id": 601,
"code": "loanStatusType.closed.written.off",
"value": "Closed (written off)"
}
},
{
"id": 44,
"accountNo": "44",
"productId": 1,
"productName": "PORetailLoan",
"status": {
"id": 600,
"code": "loanStatusType.closed.obligations.met",
"value": "Closed (obligations met)"
}
}
]
}
</code>
</div>
</div>
<a id="clients_notes" name="clients_notes" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Client'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>clients/2/notes?fields=note,createdOn,createdByUsername</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/{clientId}/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="clients_addnote" name="clients_addnote"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Add a Client Note</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/clients/{clientId}/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="clients_retrievenote" name="clients_retrievenote"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Client Note</h4>
<p>Example Requests:</p>
<div class=apiClick>clients/1/notes/76</div>
<br>
<br>
<div class=apiClick>clients/1/notes/76?fields=note,createdOn,createdByUsername</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/clients/{clientId}/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="clients_updatenote" name="clients_updatenote"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Client Note</h4>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/clients/{clientId}/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>
<!-- 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>Groups are collection of clients for specific purpose (JLG,SHG, Program etc) </p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>office_id</td>
</tr>
<tr>
<td class=fielddesc>It stores the officeid of office, to this officer Group belongs.</td>
</tr>
<tr class=alt>
<td>loan_officer_id</td>
</tr>
<tr>
<td class=fielddesc>Id of the officer who manages this group.</td>
</tr>
<tr class=alt>
<td>name</td>
</tr>
<tr>
<td class=fielddesc>Human friendly identity of the Group (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.<br> If
provided, it must be unique.
</td>
</tr>
<tr class=alt>
<td>is_deleted</td>
</tr>
<tr>
<td class=fielddesc>Indicator for active or archived groups.
</td>
</tr>
</table>
</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<br>
officeId<br>
clients
</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":"TA Group",
"externalId":"",
"clientMembers":["82","83","84"]
}
</code>
<code class="method-response">
{"resourceId":24,"changes":{}}
</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>Example Requests:</p>
<div class=apiClick>groups</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/groups
</code>
<code class="method-response">
[{
"id": 1,
"name": "GWT_2",
"externalId": "GWT_EX_ID_2",
"officeId": 7,
"officeName": "Z2"
}, {
"id": 2,
"name": "group22",
"externalId": "11234",
"officeId": 1,
"officeName": "Head Office"
}, {
"id": 3,
"name": "PlusOne",
"officeId": 22,
"officeName": "North Point Office"
}]
</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/10</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/groups/10
</code>
<code class="method-response">
{
"id": 10,
"name": "test123",
"externalId": "tejjjst",
"officeId": 1,
"officeName": "Head Office",
"clientMembers": [{
"id": 1,
"displayName": "Willie O\u0027Meara"
}]
}
</code>
</div>
</div>
<a id="groups_loansummary" name="groups_loansummary"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Groups's Loan Account Summary</h4>
<p>
An example of how a loan portfolio summary can be provided. This
one contains quite a bit of redundant data (like the counts)
</p>
<p>Example Requests:</p>
<div class=apiClick>groups/7/loans</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/mifosng-provider/api/v1/groups/7/loans
</code>
<code class="method-response">
{
"anyLoanCount": 1,
"pendingApprovalLoanCount": 0,
"pendingApprovalLoans": [],
"awaitingDisbursalLoanCount": 0,
"awaitingDisbursalLoans": [],
"activeLoanCount": 1,
"openLoans": [{
"id": 79,
"productId": 1,
"productName": "1-PORetailLoan",
"accountStatusId": 300
}],
"closedLoanCount": 0,
"closedLoans": [],
"anyIndividualLoanCount": 3,
"pendingApprovalIndividualLoanCount": 0,
"pendingApprovalIndividualLoans": [],
"awaitingDisbursalIndividualLoanCount": 0,
"awaitingDisbursalIndividualLoans": [],
"activeIndividualLoanCount": 3,
"openIndividualLoans": [{
"id": 80,
"productId": 17,
"productName": "17-Intrasoft Business Loan",
"accountStatusId": 300
}, {
"id": 81,
"productId": 1,
"productName": "1-PORetailLoan",
"accountStatusId": 300
}, {
"id": 82,
"productId": 13,
"productName": "13-A Flat Loan",
"accountStatusId": 300
}],
"closedIndividualLoanCount": 0,
"closedIndividualLoans": []
}
</code>
</div>
</div>
<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/7
Content-Type: application/json
Request Body:
{
"officeId": "26",
"name": "Laxmi SSG U",
"externalId": "Unq 2--124",
"clientMembers": ["91", "93", "94"]
}
</code>
<code class="method-response">
{
"resourceId":7,
"changes":{}
}
</code>
</div>
</div>
<a id="groups_assignlo" name="groups_assignlo" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Assign a Loan Officer to Group</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/mifosng-provider/api/v1/groups/{groupid}/command/assign_loanofficer
</code>
<code class="method-request">
POST groups/20/command/assign_loanofficer
Content-Type: application/json
Request Body:
{
{"loanOfficerId":"1"}
}
</code>
<code class="method-response">
{
"resourceId":20,
"changes":{}
}
</code>
</div>
</div>
<a id="groups_unassign_lo" name="groups_unassign_lo" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Unassign a loan officer to a Group</h4>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/mifosng-provider/api/v1/groups/{groupid}/command/assign_loanofficer
</code>
<code class="method-request">
POST groups/20/command/unassign_loanofficer
Content-Type: application/json
Request Body:
{
{"loanOfficerId":"1"}
}
</code>
<code class="method-response">
{
"resourceId":20,
"changes":{}
}
</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>
</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/7
</code>
<code class="method-response">
{
"resourceId":7,
"changes":{}
}
</code>
</div>
</div>
<!-- group end anchor grpxxxx -->
<!-- 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>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>principal</td>
</tr>
<tr>
<td class=fielddesc>The amount to be provided in the loan.</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>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>numberOfRepayments</td>
</tr>
<tr>
<td class=fielddesc>Number of installments to repay.<br>
Used like: numberOfRepayments Every repaymentEvery
repaymentFrequencyType<br> e.g. <b>10</b> (repayments)
Every 12 Weeks
</td>
</tr>
<tr class=alt>
<td>interestRatePerPeriod</td>
</tr>
<tr>
<td class=fielddesc>Interest Rate.<br> Used like:
interestRatePerPeriod% interestRateFrequencyType - interestType<br>
e.g. <b>12.0000</b>% Per year - Declining Balance
</td>
</tr>
<tr class=alt>
<td>repaymentEvery</td>
</tr>
<tr>
<td class=fielddesc>Used like: numberOfRepayments Every
repaymentEvery repaymentFrequencyType<br> e.g. 10
(repayments) Every <b>12</b> Weeks
</td>
</tr>
<tr>
<td class=fieldtype>Each of the items below has an id, code
and (english) value.<br> Only the id (integer) is used when
updating. All 3 are returned on GET (read) requests.<br>
The options are fully listed in <a href="#loanproducts_template">Retrieve
Loan Product Details Template</a>.
</td>
</tr>
<tr class=alt>
<td>repaymentFrequencyType</td>
</tr>
<tr>
<td class=fielddesc>Used like: numberOfRepayments Every
repaymentEvery repaymentFrequencyType<br> e.g. 10
(repayments) Every 12 <b>Weeks</b> <br>
<span>Example Values:</span> Days, Weeks, Months
</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> Per month, Per year
</td>
</tr>
<tr class=alt>
<td>amortizationType</td>
</tr>
<tr>
<td class=fielddesc><span>Example Values:</span> Equal
principle payments, Equal installments</td>
</tr>
</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> Declining Balance, Flat
</td>
</tr>
</td>
</tr>
<tr class=alt>
<td>interestCalculationPeriodType</td>
</tr>
<tr>
<td class=fielddesc><span>Example Values:</span> Same as
repayment period, Daily</td>
</tr>
</td>
</tr>
</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>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>loans/template?clientId=1&productId=1</div>
<br>
<br>
<div class=apiClick>loans/template?clientId=1</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/loans/template?clientId=1
</code>
<code class="method-response">
{
"clientId": 1,
"clientName": "Petra Yton",
"expectedDisbursementDate": [
2013,
2,
5
],
"loanOfficerOptions": [
{
"id": 1,
"firstname": "John",
"lastname": "Doe",
"displayName": "Doe, John",
"officeId": 1,
"officeName": "Head Office",
"isLoanOfficer": true
}
],
"productOptions": [
{
"id": 1,
"name": "A new loan product for me"
}
],
"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"
}
],
"repaymentStrategyOptions": [
{
"id": 1,
"code": "mifos-standard-strategy",
"name": "Mifos style"
},
{
"id": 2,
"code": "heavensfamily-strategy",
"name": "Heavensfamily"
},
{
"id": 3,
"code": "creocore-strategy",
"name": "Creocore"
},
{
"id": 4,
"code": "rbi-india-strategy",
"name": "RBI (India)"
}
],
"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"
}
],
"fundOptions": [
{
"id": 1,
"name": "EU Agri Fund"
}
],
"chargeOptions": [
{
"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"
}
}
],
"chargeTemplate": {
"active": false,
"penalty": false,
"chargeCalculationTypeOptions": [
{
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
{
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
}
],
"chargeTimeTypeOptions": [
{
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
{
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
}
]
}
}
</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>'summary':</b> Loan summary data.
</dd>
<dd>
<b>'repaymentSchedule':</b> Loan Schedule data.
</dd>
<dd>
<b>'loanRepayments':</b> Loan Repayment data.
</dd>
<dd>
<b>'permissions':</b> Data that describes what things can happen
to the loan in its current state. Very specific to the needs of
the current Individual Lending client application.
</dd>
<dd>
<b>'convenienceData':</b> Some derived data that is specific to
the needs of the current Individual Lending client application.
</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",
"clientId": 1,
"clientName": "Petra Yton",
"loanProductId": 1,
"loanProductName": "A new loan product for me",
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principal": 100000,
"termFrequency": 12,
"termPeriodFrequencyType": {
"id": 2,
"code": "termFrequency.periodFrequencyType.months",
"value": "Months"
},
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"transactionProcessingStrategyId": 1,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestRatePerPeriod": 2,
"interestRateFrequencyType": {
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
"annualInterestRate": 24,
"interestType": {
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"submittedOnDate": [2011,9,20],
"expectedDisbursementDate": [2011,9,20],
"expectedMaturityDate": [2011,9,20],
"lifeCycleStatusDate": [2011,9,20]
}
</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>Create a New Loan / Submit a Loan Application</h4>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>command</dt>
<dd>
String<span> Optional, case-insensitive</span>
</dd>
<dd>
The default action is to Submit a New Loan Application
("Submitted and awaiting approval" status).<br>
</dd>
<dd>If "?command=calculateLoanSchedule" is added to the URL
then no update is made but the loan schedule (as would have been
if the loan had been submitted) is returned. This gives the
ability to try out various loan options and 'preview' the
schedule before committing to it.</dd>
</dl>
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>clientId, productId, principal, loanTermFrequency,
loanTermFrequencyType, numberOfRepayments, repaymentEvery,
repaymentFrequencyType, interestRatePerPeriod,
interestRateFrequencyType, amortizationType, interestType,
interestCalculationPeriodType, expectedDisbursementDate,
submittedOnDate, transactionProcessingStrategyId</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": "100,000.00",
"loanTermFrequency": 12,
"loanTermFrequencyType": 2,
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": 2,
"interestRatePerPeriod": 2,
"interestRateFrequencyType": 2,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"expectedDisbursementDate": "20 September 2011",
"submittedOnDate": "20 September 2011",
"transactionProcessingStrategyId": 1
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1
}
</code>
</div>
</div>
<a id="loans_approve_etc" name="loans_approve_etc"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Approve, Undo Approval, Disburse, Undo Disbursal, Reject
or Withdraw a Loan Application</h4>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>command</dt>
<dd>
String<span> Mandatory, case-insensitive</span>
</dd>
<dd>'approve' : Approve Loan</dd>
<dd>'disburse' : Disburse Loan</dd>
<dd>'reject' : Reject Loan</dd>
<dd>'withdrewbyclient' : Client Withdrew Loan Application</dd>
<dd>'undoapproval' : Undo Loan Approval</dd>
<dd>'undodisbursal' : Undo Loan Disbursal</dd>
<dd>'assignloanofficer' : Assign Loan Officer</dd>
<dd>'unassignloanofficer' : Unassign Loan Officer as of today or in past but not beyond assigned date. Does not support unassigning in future date</dd>
</dl>
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields</div></td>
</tr>
<tr class=alt>
<td>eventDate</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}
</code>
<code class="method-request">
POST loans/1?command=approve
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"eventDate": "20 September 2011",
"note": "and event note is added"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"loanId": 2,
"resourceId": 2,
"changes": {
"status": {
"id": 200,
"code": "loanStatusType.approved",
"value": "Approved"
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "20 September 2011",
"note": "and event note is added"
}
}
</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</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>
<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 Repayment/Loan Waiver 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,
"amount": 471,
"defaultName": "CFA Franc BCEAO",
"nameCode": "currency.XOF",
"displaySymbol": "CFA",
"zero": false,
"greaterThanZero": true,
"displaySymbolValue": "471 CFA"
}
}
</code>
</div>
</div>
<a id="loans_repayment_etc" name="loans_repayment_etc"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Make a Repayment / Loan Waiver</h4>
<dl class="argument-list">
<dt>command</dt>
<dd>
String<span> Optional, case-insensitive</span>
</dd>
<dd>'repayment' : Make Loan Repayment.</dd>
<dd>'waiver' : Loan Waiver.</dd>
</dl>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/loans/{loanId}/transactions
</code>
<code class="method-request">
POST loans/1/transactions?command=repayment
Content-Type: application/json
Request Body:
{
"locale": "en_GB",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "14 May 2012",
"transactionAmount": "559.88",
"note": "Repayment at branch"
}
</code>
<code class="method-response">{ "resourceId": 37 } </code>
</div>
</div>
<a id="loans_repaymentretrieve_etc"
name="loans_repaymentretrieve_etc" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Repayment or Waiver Details</h4>
<p>Example Request:</p>
<div class=apiClick>loans/1/transactions/2</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": 10,
"date": [
2009,
1,
29
],
"total": {
"currencyCode": "XOF",
"digitsAfterDecimal": 0,
"amount": 300000,
"defaultName": "CFA Franc BCEAO",
"nameCode": "currency.XOF",
"displaySymbol": "CFA",
"zero": false,
"greaterThanZero": true,
"displaySymbolValue": "300000 CFA"
},
"transactionOffsetFromToday": -1218
}
</code>
</div>
</div>
<a id="loans_repaymentadjust_etc" name="loans_repaymentadjust_etc"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Adjust a Repayment or Waiver</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": "adj note"
}
</code>
<code class="method-response">
{ "resourceId": 16 }
</code>
</div>
</div>
<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 fixed deposits -->
<a id="fixeddeposits" name="fixeddeposits" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Fixed Deposit Account:</h2>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Field Descriptions</div></td></tr>
<tr class=alt><td>deposit :</td></tr>
<tr><td class=fielddesc>The amount to be deposited in the deposit account.</td></tr>
<tr class=alt><td>externalId :</td></tr>
<tr><td class=fielddesc>A place to put an external reference for this deposit account. e.g. The ID another system uses.<br>
If provided, it must be unique.</td></tr>
<tr class=alt><td>tenureInMonths:</td></tr>
<tr><td class=fielddesc>The time period for fixed deposit to mature(in months). <br>
Eg:The period of deposit shall be 24 months<br>
tenureInMonths=24.
</td></tr>
<tr class=alt><td>renewalAllowed:</td></tr>
<tr><td class=fielddesc>Used to renew the deposit account after maturity.
<br> if 'true' the account is eligible for renew.
</td></tr>
<tr class=alt><td>isInterestWithdrawable:</td></tr>
<tr><td class=fielddesc>Denotes whether one can withdraw the interest from deposit account.</td></tr>
<tr class=alt><td>interestCompoundingAllowed:</td></tr>
<tr><td class=fielddesc>Denotes whether the interest is calculated on compounding basis or not.<br>
if true:interest calculated on compounding basis, else interest calculated on simple calculation basis.
</td></tr>
<tr class=alt><td>maturityInterestRate:</td></tr>
<tr><td class=fielddesc>Denotes the interest rate % on deposit amount. </td></tr>
<tr class=alt><td>preClosureInterestRate:</td></tr>
<tr><td class=fielddesc>Denotes the interest rate % of deposit amount for preclosing accounts.<br>
This rate is applicable if the account is preclosed.
</td></tr>
<tr class=alt><td>interestCompoundedEvery:</td></tr>
<tr><td class=fielddesc>Interest is calculated on deposit amount for every interestCompoundedEvery period</td></tr>
<tr class=alt><td>lockinPeriod:</td></tr>
<tr><td class=fielddesc>Defines a lockin period for deposit account. <br>
With in the lockin period one cannot preclose the deposit account.
</td></tr>
</tr>
</table>
</div>
</div>
<a id="fixeddeposits_template" name="fixeddeposits_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve Deposit Account Details 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>depositaccounts/template?clientId=17&productId=1</div>
<br><br>
<div class=apiClick>depositaccounts/template?clientId=17</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/depositaccounts/template?clientId={clientId}&productId={productId}</code>
<code class="method-response">
{
"clientId": 1,
"clientName": "First Client",
"productId": 1,
"productName": "MyFirstDepositProduct",
"currency": {
"code": "USD",
"name": "",
"decimalPlaces": 2,
"displaySymbol": "",
"nameCode": "",
"displayLabel": " [USD]"
},
"deposit": 100,
"maturityInterestRate": 6,
"tenureInMonths": 12,
"projectedCommencementDate": [
2013,
2,
6
],
"interestCompoundedEvery": 1,
"interestCompoundedEveryPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"renewalAllowed": true,
"preClosureAllowed": true,
"preClosureInterestRate": 3,
"isInterestWithdrawable": false,
"interestCompoundingAllowed": true,
"interestCompoundedEveryPeriodTypeOptions": [
{
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
}
],
"productOptions": [
{
"id": 1,
"name": "MyFirstDepositProduct"
}
],
"availableInterestForWithdrawal": 0,
"availableWithdrawalAmount": 0,
"todaysDate": [
2013,
2,
6
],
"isLockinPeriodAllowed": true,
"lockinPeriod": 0,
"lockinPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"availableInterest": 0,
"interestPostedAmount": 0
}
</code>
<code class="method-declaration">GET https://Domain Name/api/v1/depositaccounts/template?clientId={clientId}</code>
<code class="method-response">{
"clientId": 1,
"clientName": "First Client",
"renewalAllowed": false,
"preClosureAllowed": false,
"isInterestWithdrawable": false,
"interestCompoundingAllowed": true,
"interestCompoundedEveryPeriodTypeOptions": [
{
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
}
],
"productOptions": [
{
"id": 1,
"name": "MyFirstDepositProduct"
}
],
"availableInterestForWithdrawal": 0,
"availableWithdrawalAmount": 0,
"todaysDate": [
2013,
2,
6
],
"isLockinPeriodAllowed": true,
"availableInterest": 0,
"interestPostedAmount": 0
}
</code>
</div>
</div>
<a id="fixeddeposits_retrieve" name="fixeddeposits_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve a fixeddeposit:</h2>
<h4>Arguments</h4>
<dl class="argument-list">
<dt>associations</dt>
<dd>optional, <span>'all' deposit associations are 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>'permissions':</b> Data that describes what things can happen to the deposit in its current state.
Very specific to the needs of the current Individual Lending client application.</dd>
</dl>
<p>Example Requests: </p>
<div class=apiClick>depositaccounts/1</div>
<br><br>
<div class=apiClick>depositaccounts/1?associations=all</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://DomainName/api/v1/depositaccounts/{depositaccountId}</code>
<code class="method-response">{
{
"id": 5,
"status": {
"id": 100,
"code": "depositStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval"
},
"clientId": 17,
"clientName": "Agri",
"productId": 1,
"productName": "Micro Savings",
"currency": {
"code": "INR",
"name": "Indian Rupee",
"decimalPlaces": 2,
"nameCode": "currency.INR",
"displayLabel": "Indian Rupee [INR]"
},
"deposit": 200.000000,
"maturityInterestRate": 12.000000,
"tenureInMonths": 12,
"projectedCommencementDate": [2012, 12, 16],
"maturedOn": [2013, 12, 15],
"projectedInterestAccrued": 24.000000,
"projectedMaturityAmount": 224.000000,
"interestCompoundedEvery": 6,
"interestCompoundedEveryPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"renewalAllowed": true,
"preClosureAllowed": true,
"preClosureInterestRate": 5.000000,
"isInterestWithdrawable": true,
"interestPaid": 0.000000,
"interestCompoundingAllowed": false,
"permissions": {
"rejectAllowed": true,
"withdrawnByApplicantAllowed": true,
"undoApprovalAllowed": false,
"pendingApproval": true,
"isInterestWithdrawalAllowed": true,
"renewelAllowed": false,
"isMaturedDepositAccount": false,
"anyActionOnAccountAllowed": true
},
"availableInterestForWithdrawal": 0,
"availableWithdrawalAmount": 200.000000,
"todaysDate": [2013, 1, 30],
"isLockinPeriodAllowed": true,
"lockinPeriod": 0,
"lockinPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"availableInterest": 0.000000,
"interestPostedAmount": 0.000000,
"imageKey": "/root/.mifosx/DefaultDemoTenant/images/clients/33/places.png"
}
}
</code>
</div>
</div>
<a id="fixeddeposits_create" name="fixeddeposits_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Create a New DepositAccount / Submit a DepositAccount Application</h2>
<h4>Arguments</h4>
<dl class="argument-list">
<dt>command</dt>
<dd>String<span> Optional, case-insensitive</span></dd>
<dd>The default action is to Submit a New DepositAccount Application ("Submitted and awaiting approval" status).<br></dd>
</dl>
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
<tr class=alt><td>clientId, productId, deposit, maturityInterestRate, commencementDate</td></tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/depositaccounts</code>
<code class="method-request">POST depositaccount
Content-Type: application/json
Request Body:
{
"clientId": "17",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"productId": "1",
"commencementDate": "25 January 2013",
"externalId": "123",
"deposit": "20000",
"tenureInMonths": "3",
"renewalAllowed": "true",
"preClosureAllowed": "true",
"interestCompoundingAllowed": "false",
"isInterestWithdrawable": "true",
"isLockinPeriodAllowed": "true",
"maturityInterestRate": "12",
"preClosureInterestRate": "5",
"interestCompoundedEvery": "6",
"interestCompoundedEveryPeriodType": "2",
"lockinPeriod": "1",
"lockinPeriodType": "2"
}
</code>
<code class="method-response">{
"resourceId": 42
}
</code>
</div>
</div>
<a id="fixeddeposits_approve_etc" name="fixeddeposits_approve_etc" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2> Approval, Reject or Withdraw a DepositAccount Application</h2>
<h4>Arguments</h4>
<dl class="argument-list">
<dt>command</dt>
<dd>String<span> Mandatory, case-insensitive</span></dd>
<dd>'approve' : Approve DepositAccount</dd>
<dd>'reject' : Reject DepositAccount</dd>
<dd>'withdrewbyclient' : Client Withdrew DepositAccount Application</dd>
<dt>Deposit amount</dt>
<dd>Integer<span>Mandatory</span></dd>
<dt>Deposit interest rate</dt>
<dd>Integer<span>Mandatory</span></dd>
<dt>Tenure month</dt>
<dd>Integer<span>Mandatory</span></dd>
<dt>Interest posted every</dt>
<dd>Integer<span>Mandatory</span></dd>
</dl>
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
<tr class=alt><td>eventDate</td></tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">POST https://DomainName/api/v1/depositaccounts/{depositaccountId}</code>
<code class="method-request">POST depositaccounts/1?command=reject
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"eventDate": "07 May 2012",
"note": "and event note is added"
} </code>
<code class="method-response">
{
"resourceId": 37
}
</code>
</div>
</div>
<a id="fixeddeposits_delete" name="fixeddeposits_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Delete a DepositAccount</h2>
<p>
<b>Note:</b> depositaccount is deleted.
</p>
</div>
<div class="method-example">
<code class="method-declaration">DELETE https://Domain Name/api/v1/depositaccounts/{depositaccountsId}</code>
<code class="method-request">DELETE depositaccounts/1
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">{
"resourceId": 1
}
</code>
</div>
</div>
<!-- End of Fixed deposits-->
<!--Start of saving -->
<a id="savingaccounts" name="savingaccounts" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Saving Account :</h2>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Field Descriptions</div></td></tr>
<tr class=alt><td>savingsDepositAmountPerPeriod :</td></tr>
<tr><td class=fielddesc>The amount to be depositd in the savingaccount for every period.<br>
If the account is regular account enter what ever the amount you want to deposit </td></tr><br>
<tr class=alt><td>externalId :</td></tr>
<tr><td class=fielddesc>A place to put an external reference for this savingaccount. e.g. The ID another system uses.<br>
If provided, it must be unique.</td></tr>
<tr class=alt><td>tenure :</td></tr>
<tr><td class=fielddesc>denotes the tenure period of savings account </td></tr>
<tr class=alt><td>depositEvery :</td></tr>
<tr><td class=fielddesc>For every 'depositEvery' period the client has to deposit 'savingsDepositAmountPerPeriod' amount </td></tr>
<tr class=alt><td>interestCalculationMethod:</td></tr>
<tr><td class=fielddesc>denotes on what basis the interest is calculated<br>
e.g. AverageBal,Monthly Collection etc</td></tr>
<tr class=alt><td>recurringInterestRate :</td></tr>
<tr><td class=fielddesc>The interest rate applicable on recurring deposit savingaccounts</td></tr>
<tr class=alt><td>savingInterestRate :</td></tr>
<tr><td class=fielddesc>The interest rate applicable on regular savingaccounts </td></tr>
<tr class=alt><td>interestPostEvery:</td></tr>
<tr><td class=fielddesc>Denotes for how many months the interest is posted for recurring/regular saving accounts</td></tr>
<tr class=alt><td>lockinPeriod :</td></tr>
<tr><td class=fielddesc>With in a lockin period you cannot withdraw whole money(cannot Preclose) </td></tr>
</tr>
</table>
</div>
</div>
<a id="savingaccounts_template" name="savingaccounts_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve SavingAccount Details 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>savingaccounts/template?clientId=25&productId=5</div>
<br><br>
<div class=apiClick>savingaccounts/template?clientId=25</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingaccounts/template</code>
<code class="method-response">{
"clientId": 25,
"clientName": "Clark Kent",
"productId": 5,
"productName": "Shares",
"productType": {
"id": 2,
"code": "savings.product.savingProductType.regular",
"value": "Regular"
},
"currencyData": {
"code": "ZAR",
"name": "South African Rand",
"decimalPlaces": 2,
"displaySymbol": "R",
"nameCode": "currency.ZAR",
"displayLabel": "South African Rand (R)"
},
"savingsDepositAmountPerPeriod": 500.000000,
"savingsFrequencyType": {
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
},
"recurringInterestRate": 12.000000,
"savingInterestRate": 12.000000,
"interestType": {
"id": 2,
"code": "savings.interest.type.savingsInterestType.compounding",
"value": "Compounding"
},
"interestCalculationMethod": {
"id": 1,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.averagebal",
"value": "AverageBalance"
},
"tenure": 12,
"tenureType": {
"id": 1,
"code": "savings.tenure.tenureTypeEnum.fixedPeriod",
"value": "FixedPeriod"
},
"projectedCommencementDate": [2013,
2,
1],
"preClosureAllowed": true,
"isLockinPeriodAllowed": false,
"lockinPeriod": 0,
"lockinPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"depositEvery": 1,
"productOptions": [{
"id": 4,
"name": "sb01"
},
{
"id": 5,
"name": "Shares"
}],
"currencyOptions": [{
"code": "ZAR",
"name": "South African Rand",
"decimalPlaces": 2,
"displaySymbol": "R",
"nameCode": "currency.ZAR",
"displayLabel": "South African Rand (R)"
},
{
"code": "VND",
"name": "Vietnamese Dong",
"decimalPlaces": 2,
"nameCode": "currency.VND",
"displayLabel": "Vietnamese Dong [VND]"
}],
"savingsProductTypeOptions": [{
"id": 1,
"code": "savings.product.savingProductType.reccuring",
"value": "Recurring"
},
{
"id": 2,
"code": "savings.product.savingProductType.regular",
"value": "Regular"
}],
"tenureTypeOptions": [{
"id": 1,
"code": "savings.tenure.tenureTypeEnum.fixedPeriod",
"value": "FixedPeriod"
},
{
"id": 2,
"code": "savings.tenure.tenureTypeEnum.perpetual",
"value": "Perpetual"
}],
"savingFrequencyOptions": [{
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
}],
"savingsInterestTypeOptions": [{
"id": 1,
"code": "savings.interest.type.savingsInterestType.simple",
"value": "Simple"
},
{
"id": 2,
"code": "savings.interest.type.savingsInterestType.compounding",
"value": "Compounding"
}],
"lockinPeriodTypeOptions": [{
"id": 2,
"code": "savings.product.lockin.period.type.months",
"value": "Months"
}],
"interestCalculationOptions": [{
"id": 1,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.averagebal",
"value": "AverageBalance"
},
{
"id": 3,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.monthlycllection",
"value": "MonthlyCollection"
}],
"outstandingAmount": 0,
"dueAmount": 0,
"interestPostEvery": 3,
"interestPostFrequency": {
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
}
}
</code>
</div>
</div>
<a id="savingaccounts_retrieve" name="savingaccounts_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve a SavingAccount :</h2>
<p>
<b>Note:</b> template=true parameter doesn't apply to this resource.
</p>
<h4>Arguments</h4>
<dl class="argument-list">
<dt>associations</dt>
<dd>optional, <span>Either 'all' or a comma separated list of savings 'associations' (itemised below).</span></dd>
<dd><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>'permissions':</b> Data that describes what things can happen to the saving account in its current state.
Very specific to the needs of the current Individual Lending client application.</dd>
<dd><b>'savingScheduleData':</b> Some derived data that </dd>
<dd><b>'transactions' :</b> Some data </dd>
</dl>
<p>Example Requests : </p>
<div class=apiClick>savingaccounts/15</div>
<br><br>
<div class=apiClick>savingaccounts/15?associations=all</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://DomainName/api/v1/savingaccounts/{savingaccountId}</code>
<code class="method-response">{
"id": 15,
"status": {
"id": 100,
"code": "depositStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval"
},
"externalId": "23",
"clientId": 50,
"clientName": "Brendan Fahy",
"productId": 4,
"productName": "sb01",
"productType": {
"id": 2,
"code": "savings.product.savingProductType.regular",
"value": "Regular"
},
"currencyData": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"savingsDepositAmountPerPeriod": 200.000000,
"savingsFrequencyType": {
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
},
"totalDepositAmount": 0.000000,
"recurringInterestRate": 4.000000,
"savingInterestRate": 4.000000,
"interestType": {
"id": 1,
"code": "savings.interest.type.savingsInterestType.simple",
"value": "Simple"
},
"interestCalculationMethod": {
"id": 1,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.averagebal",
"value": "AverageBalance"
},
"tenure": 12,
"tenureType": {
"id": 1,
"code": "savings.tenure.tenureTypeEnum.fixedPeriod",
"value": "FixedPeriod"
},
"projectedCommencementDate": [2013,
2,
1],
"projectedInterestAccuredOnMaturity": 0.000000,
"actualInterestAccured": 0.000000,
"projectedMaturityAmount": 200.000000,
"actualMaturityAmount": 0.000000,
"preClosureAllowed": false,
"preClosureInterestRate": 0.000000,
"isLockinPeriodAllowed": false,
"lockinPeriod": 0,
"lockinPeriodType": {
"id": 2,
"code": "savings.product.lockin.period.type.months",
"value": "Months"
},
"depositEvery": 1,
"permissions": {
"rejectAllowed": true,
"withdrawnByApplicantAllowed": true,
"undoApprovalAllowed": false,
"pendingApproval": true,
"renewelAllowed": false,
"isMaturedDepositAccount": false,
"anyActionOnAccountAllowed": true
},
"outstandingAmount": 0.000000,
"savingScheduleData": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"cumulativeDepositDue": 200.0000,
"cumulativeDepositPaid": 0.0000,
"cummulativeInterestAccured": 0.0000,
"periods": [{
"period": 1,
"dueDate": [2013,
3,
1],
"depositDue": 200.0000,
"depositPaid": 0.0000,
"interestAccured": 0.0000
}]
},
"transactions": [],
"interestPostEvery": 3,
"interestPostFrequency": {
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
}
}
</code>
</div>
</div>
<a id="savingaccounts_create" name="savingaccounts_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Create a New SavingAccount / Submit a SavingAccount Application</h2>
<h4>Arguments</h4>
<dl class="argument-list">
<dt>command</dt>
<dd>String<span> Optional, case-insensitive</span></dd>
<dd>The default action is to Submit a New SavingAccount Application ("Submitted and awaiting approval" status).<br></dd>
</dl>
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
<tr class=alt><td>clientId, productId, savingsDepositAmountPerPeriod, tenureMonths, depositEvery, interestCalculationMethod, recurringInterestRate, commencementDate, interestPostEvery </td></tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingaccounts</code>
<code class="method-request">POST savingaccount
Content-Type: application/json
Request Body:
{
"clientId": "17",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"currencyCode": "ZAR",
"digitsAfterDecimal": "2",
"productId": "5",
"commencementDate": "05 February 2013",
"externalId": "",
"savingsDepositAmountPerPeriod": "500",
"minimumBalanceForWithdrawal": "100",
"tenure": "12",
"tenureType": "1",
"depositEvery": "1",
"frequency": "2",
"isLockinPeriodAllowed": "false",
"isPartialDepositAllowed": "false",
"interestCalculationMethod": "1",
"recurringInterestRate": "12",
"interestType": "2",
"savingInterestRate": "12",
"interestPostEvery": "3",
"interestPostFrequency": "2",
"lockinPeriod": "0",
"lockinPeriodType": "2"
} </code>
<code class="method-response">{
"resourceId": 42
}
</code>
</div>
</div>
<a id="savingaccounts_approve_etc" name="savingaccounts_approve_etc" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2> Approval, Reject or Withdraw a SavingAccount Application</h2>
<h4>Arguments</h4>
<dl class="argument-list">
<dt>command</dt>
<dd>String<span> Mandatory, case-insensitive</span></dd>
<dd>'approve' : Approve SavingAccount</dd>
<dd>'reject' : Reject SavingAccount</dd>
<dd>'withdrewbyclient' : Client Withdrew SavingAccount Application</dd>
</dl>
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
<tr class=alt><td>eventDate</td></tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingaccounts/{savingaccountId}</code>
<code class="method-request">POST savingaccounts/1?command=reject
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"eventDate": "07 May 2012",
"note": "and event note is added"
} </code>
<code class="method-response">
{
"resourceId": 37
}
</code>
</div>
</div>
<a id="savingaccounts_delete" name="savingaccounts_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Delete a SavingAccount</h2>
<p>
<b>Note:</b> savingaccount is deleted.
</p>
</div>
<div class="method-example">
<code class="method-declaration">DELETE https://Domain Name/api/v1/savingaccounts/{savingaccountsId}</code>
<code class="method-request">DELETE savingaccounts/1
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">{
"resourceId": 1
}
</code>
</div>
</div>
<!-- End of saving -->
<!-- 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>digitsAfterDecimal</td>
</tr>
<tr>
<td class=fielddesc>Override the currency default value for
digitsAfterDecimal.</td>
</tr>
<tr class=alt>
<td>principal</td>
</tr>
<tr>
<td class=fielddesc>Loan amount.</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>numberOfRepayments</td>
</tr>
<tr>
<td class=fielddesc>Number of installments to repay.<br>
Used like: numberOfRepayments Every repaymentEvery
repaymentFrequencyType<br> e.g. <b>10</b> (repayments)
Every 12 Weeks
</td>
</tr>
<tr class=alt>
<td>interestRatePerPeriod</td>
</tr>
<tr>
<td class=fielddesc>Interest Rate.<br> Used like:
interestRatePerPeriod% interestRateFrequencyType - interestType<br>
e.g. <b>12.0000</b>% Per year - Declining Balance
</td>
</tr>
<tr class=alt>
<td>repaymentEvery</td>
</tr>
<tr>
<td class=fielddesc>Used like: numberOfRepayments Every
repaymentEvery repaymentFrequencyType<br> e.g. 10
(repayments) Every <b>12</b> Weeks
</td>
</tr>
<tr>
<td class=fieldtype>Each of the items below has an id, code
and (english) value.<br> Only the id (integer) is used when
updating. All 3 are returned on GET (read) requests.<br>
The options are fully listed in <a href="#loanproducts_template">Retrieve
Loan Product Details Template</a>.
</td>
</tr>
<tr class=alt>
<td>repaymentFrequencyType</td>
</tr>
<tr>
<td class=fielddesc>Used like: numberOfRepayments Every
repaymentEvery repaymentFrequencyType<br> e.g. 10
(repayments) Every 12 <b>Weeks</b> <br>
<span>Example Values:</span> Days, Weeks, Months
</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> Per month, Per year
</td>
</tr>
<tr class=alt>
<td>amortizationType</td>
</tr>
<tr>
<td class=fielddesc><span>Example Values:</span> Equal
principle payments, Equal installments</td>
</tr>
</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> Declining Balance, Flat
</td>
</tr>
</td>
</tr>
<tr class=alt>
<td>interestCalculationPeriodType</td>
</tr>
<tr>
<td class=fielddesc><span>Example Values:</span> Same as
repayment period, Daily</td>
</tr>
</td>
</tr>
</tr>
<tr class=alt>
<td>accountingRule</td>
</tr>
<tr>
<td class=fielddesc><span>Example Values:</span>NONE(1),
CASH_BASED(2), ACCRUAL_BASED(3)</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": "A new loan product for me",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principal": 100000,
"numberOfRepayments": 12,
"loanTermFrequency": 12,
"repaymentEvery": 1,
"loanTermFrequencyType": {
"id": 2,
"code": "loanTermFrequency.periodFrequencyType.months",
"value": "Months"
},
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyName": "Mifos style",
"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"
},
"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": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"loanTermFrequencyType": {
"id": 2,
"code": "loanTermFrequency.periodFrequencyType.months",
"value": "Months"
},
"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"
},
"accountingRule": 1,
"currencyOptions": [
{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
],
"fundOptions": [
{
"id": 1,
"name": "EU Agri Fund"
}
],
"transactionProcessingStrategyOptions": [
{
"id": 1,
"code": "mifos-standard-strategy",
"name": "Mifos style"
},
{
"id": 2,
"code": "heavensfamily-strategy",
"name": "Heavensfamily"
},
{
"id": 3,
"code": "creocore-strategy",
"name": "Creocore"
},
{
"id": 4,
"code": "rbi-india-strategy",
"name": "RBI (India)"
}
],
"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"
}
],
"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"
}
],
"loanTermFrequencyTypeOptions": [
{
"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"
}
],
"chargeOptions": [
{
"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"
}
}
],
"accountingOptions": {
"assetAccountOptions": [
{
"id": 1,
"name": "Fund Source For Loans",
"glCode": "100001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc"
},
{
"id": 2,
"name": "Interest Receivable",
"glCode": "100002",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc"
},
{
"id": 3,
"name": "Fees Receivable",
"glCode": "100003",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc"
},
{
"id": 4,
"name": "Penalties Receivable",
"glCode": "100004",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "better duddette"
}
],
"expenseAccountOptions": [
{
"id": 5,
"name": "Written Off Losses",
"glCode": "500005",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc"
}
],
"incomeAccountOptions": [
{
"id": 6,
"name": "Income from Interest",
"glCode": "400001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc"
},
{
"id": 7,
"name": "Income from Fees",
"glCode": "400002",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc"
},
{
"id": 8,
"name": "Income from Penalties",
"glCode": "400003",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc"
}
]
},
"accountingMappings": {}
}
</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": "A new loan product for me",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principal": 100000,
"numberOfRepayments": 12,
"loanTermFrequency": 12,
"repaymentEvery": 1,
"loanTermFrequencyType": {
"id": 2,
"code": "loanTermFrequency.periodFrequencyType.months",
"value": "Months"
},
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyName": "Mifos style",
"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"
},
"accountingRule": 1,
"charges": []
}
</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 with 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, principal,
inArrearsTolerance, repaymentFrequencyType, repaymentEvery,
numberOfRepayments, interestRatePerPeriod,
interestRateFrequencyType, amortizationType, interestType,
interestCalculationPeriodType, accountingRule</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": "A new loan product for me",
"currencyCode": "USD",
"locale": "en_GB",
"digitsAfterDecimal": "2",
"principal": "100,000.00",
"numberOfRepayments": "12",
"repaymentEvery": "1",
"repaymentFrequencyType": 2,
"transactionProcessingStrategyId": 1,
"interestRatePerPeriod": "1.75",
"interestRateFrequencyType": 2,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"accountingRule": 1
}
</code>
<code class="method-response">
{
"resourceId": 1
}
</code>
<code class="method-request">
POST loanproducts
Content-Type: application/json
Request Body:
{
"name": "A new loan product for me",
"currencyCode": "USD",
"locale": "en_GB",
"digitsAfterDecimal": "2",
"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":"15",
"loanPortfolioAccountId":"16",
"interestOnLoanAccountId":"14",
"incomeFromFeeAccountId":"13",
"incomeFromPenaltyAccountId":"12",
"writeOffAccountId":"11"
}
</code>
<code class="method-response">
{
"resourceId": 2
}
</code>
<code class="method-request">
POST loanproducts
Content-Type: application/json
Request Body:
{
"name": "A new loan product for me",
"currencyCode": "USD",
"locale": "en_GB",
"digitsAfterDecimal": "2",
"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":"15",
"loanPortfolioAccountId":"16",
"receivableInterestAccountId":"10",
"receivableFeeAccountId":"9",
"receivablePenaltyAccountId":"8",
"interestOnLoanAccountId":"14",
"incomeFromFeeAccountId":"13",
"incomeFromPenaltyAccountId":"12",
"writeOffAccountId":"11"
}
</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 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 e.g. maker-checker.</p>
</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": {} } </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 modifed 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>
<a id="funds" name="funds" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Funds</h3>
<p>Simple implementation of funds. At present funds can
optionally be associated with a Loan.</p>
<p>This information can then be used to produce reports on
loans/loan amounts drawn from a fund.</p>
</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 signifigance 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"
}
</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
}
]
</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
}
</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"
}
</code>
<code class="method-response">
{
"officeId": 1,
"resourceId": 1,
"changes": {
"isLoanOfficer": false
}
}
</code>
</div>
</div>
<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 to their financial
products. There are typically <b>Fees</b> or <b>Penalites</b>.
</p>
<p>Charges is what we use to model both fees and penalities.
For now charges can only be associated with loan products / loans.</p>
</div>
</div>
<a id="charges_create" name="staff_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"
}
</code>
<code class="method-response">{ "resourceId": 1 }</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>
<!-- start of deposit products api docs -->
<a id="depositproducts" name="depositproducts" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Deposit Products :</h3>
<p>A Deposit product is a template that is used when creating a Fixed Deposit Account.
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Field Descriptions</div></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>minimumBalance :</td></tr>
<tr><td class=fielddesc>Minimum deposit amount that is required to create a deposit account.</td></tr>
<tr class=alt><td>maximumBalance :</td></tr>
<tr><td class=fielddesc>The max deposit amount that can be limited to create a deposit account.</td></tr>
<tr class=alt><td></td></tr>
<tr class=alt><td>interestCompoundedEvery</td></tr>
<tr><td class=fielddesc>Interest amount which is accrued or earned during the tenure of the deposit account will be posted to customer as interest as per the selected period in "interestCompoundedEvery" and combination of "interestCompoundedEveryPeriodType" <br>
e.g.Every <b>1</b>-Month</td></tr>
<tr class=alt><td>tenureInMonths</td></tr>
<tr><td class=fielddesc>The duration for fixed deposit (in months). <br>
e.g. 12
</td></tr>
<tr class=alt><td>maturityDefaultInterestRate</td></tr>
<tr><td class=fielddesc>Default interest rate for Fixed Deposit product <br>
e.g. 12</td></tr>
<tr class=alt><td>maturityMinInterestRate</td></tr>
<tr><td class=fielddesc>Minimum supported interest rate for Fixed Deposit product<br>
e.g. 8</td></tr>
<tr class=alt><td>maturityMaxInterestRate</td></tr>
<tr><td class=fielddesc>Maximum supported interest rate for Fixed Deposit product<br>
e.g. 14 </td></tr>
<tr class=alt><td>renewalAllowed</td></tr>
<tr><td class=fielddesc> Allows to renew the deposit account on maturity<br>
Used like: renewalAllowed:true </td></tr>
<tr class=alt><td>preClosureAllowed</td></tr>
<tr><td class=fielddesc>Support for pre-closing a Fixed deposit account before maturity<br>
If 'true' : preClosureAllowed else preClosure is not allowed.</tr></td>
<tr class=alt><td>preClosureInterestRate</td></tr>
<tr><td class=fielddesc>Denotes the interest rate for deposit accounts for pre-closure accounts.<br>
This rate is applicable if the account is pre-closed / Before maturity. </td></tr>
<tr class=alt><td>interestCompoundingAllowed</td></tr>
<tr><td class=fielddesc>Denotes whether the interest is calculated on compounding basis or not.<br>
if true:interest calculated on compounding basis, else interest calculated on simple calculation basis.</tr></td>
<tr class=alt><td>isLockinPeriodAllowed</td></tr>
<tr><td class=fielddesc>This will allow to set the lock-in period for a fixed deposit product<br>
If 'true' :isLockinPeriodAllowed otherwise isLockinPeriod not allowed</tr></td>
<tr class=alt><td>lockinPeriod</td></tr>
<tr><td class=fielddesc>Defines a lock-in period for deposit account.</tr></td>
</tr>
</table>
</div>
</div>
<a id="depositproducts_list" name="depositproducts_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List DepositProducts</h4>
<p>Example Requests:</p>
<div class=apiClick>depositproducts</div>
<br><br>
<div class=apiClick>depositproducts?fields=name, ...... </div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/depositproducts</code>
<code class="method-response">
[{
"id": 1,
"name": "Test",
"description": "asdf",
"currencyCode": "USD",
"digitsAfterDecimal": 2,
"minimumBalance": 100.000000,
"maximumBalance": 1000.000000,
"tenureInMonths": 12,
"maturityDefaultInterestRate": 12.000000,
"maturityMinInterestRate": 8.000000,
"maturityMaxInterestRate": 12.000000,
"interestCompoundedEvery": 1,
"interestCompoundedEveryPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"renewalAllowed": false,
"preClosureAllowed": false,
"preClosureInterestRate": 6.000000,
"interestCompoundingAllowed": true,
"isLockinPeriodAllowed": false,
"lockinPeriod": 2,
"lockinPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"createdOn": 1360576753000,
"lastModifedOn": 1360579312000
}...]
</code>
</div>
</div>
<a id="depositproducts_template" name="depositproducts_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve DepositProduct 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>depositproducts/template</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/depositproducts/template</code>
<code class="method-response">
{
"interestCompoundedEveryPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"renewalAllowed": false,
"preClosureAllowed": false,
"isLockinPeriodAllowed": false,
"lockinPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"currencyOptions": [{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}],
"interestCompoundedEveryPeriodTypeOptions": [{
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
}]
}
</code>
</div>
</div>
<a id="depositproducts_retrieve" name="depositproducts_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Deposit Product</h4>
<p>Example Requests: </p>
<div class=apiClick>depositproducts/1</div>
<br><br>
<div class=apiClick>depositproducts/1?template=true</div>
<br><br>
<div class=apiClick>depositproducts/1?fields=name,description</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/depositproducts/1</code>
<code class="method-response">
{
"id": 1,
"name": "Test",
"description": "asdf",
"currencyCode": "USD",
"digitsAfterDecimal": 2,
"minimumBalance": 100,
"maximumBalance": 1000,
"tenureInMonths": 12,
"maturityDefaultInterestRate": 12,
"maturityMinInterestRate": 8,
"maturityMaxInterestRate": 12,
"interestCompoundedEvery": 1,
"interestCompoundedEveryPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"renewalAllowed": false,
"preClosureAllowed": false,
"preClosureInterestRate": 6,
"interestCompoundingAllowed": true,
"isLockinPeriodAllowed": false,
"lockinPeriod": 2,
"lockinPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"createdOn": 1360576753000,
"lastModifedOn": 1360579312000
}
</code>
<code class="method-declaration">GET https://Domain Name/api/v1/depositproducts/1?template=true</code>
<code class="method-response">
{
"id": 1,
"name": "Test",
"description": "asdf",
"currencyCode": "USD",
"digitsAfterDecimal": 2,
"minimumBalance": 100.000000,
"maximumBalance": 1000.000000,
"tenureInMonths": 12,
"maturityDefaultInterestRate": 12.000000,
"maturityMinInterestRate": 8.000000,
"maturityMaxInterestRate": 12.000000,
"interestCompoundedEvery": 1,
"interestCompoundedEveryPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"renewalAllowed": false,
"preClosureAllowed": false,
"preClosureInterestRate": 6.000000,
"interestCompoundingAllowed": true,
"isLockinPeriodAllowed": false,
"lockinPeriod": 2,
"lockinPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"createdOn": 1360576753000,
"lastModifedOn": 1360579312000,
"currencyOptions": [{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}],
"interestCompoundedEveryPeriodTypeOptions": [{
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
}]
}
</code>
</div>
</div>
<a id="depositproducts_create" name="depositproducts_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Deposit Product</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
<tr class=alt><td>name, currencyCode, digitsAfterDecimal,interestPostedEvery, minimumBalance,
</td></tr>
<tr><td>
tenureInMonths, maturityDefaultInterestRate,maturityMinInterestRate,
</td></tr>
<tr class=alt><td>
maturityMaxInterestRate,interestCompoundedEvery,preClosureInterestRate.
</td></tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/depositproducts</code>
<code class="method-request">POST depositproducts
Content-Type: application/json
Request Body:
{
"locale": "en",
"name": "Test",
"description": "asdf",
"currencyCode": "USD",
"digitsAfterDecimal": "2",
"minimumBalance": "100",
"maximumBalance": "1,000",
"tenureInMonths": "12",
"renewalAllowed": "true",
"preClosureAllowed": "false",
"interestCompoundingAllowed": "true",
"isLockinPeriodAllowed": "false",
"maturityDefaultInterestRate": "12",
"maturityMinInterestRate": "8",
"maturityMaxInterestRate": "12",
"preClosureInterestRate": "6",
"interestCompoundedEvery": "1",
"interestCompoundedEveryPeriodType": "2",
"lockinPeriod": "2",
"lockinPeriodType": "2"
}
</code>
<code class="method-response">{
"resourceId": 1
}
</code>
</div>
</div>
<a id="depositproducts_update" name="depositproducts_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Deposit Product</h4>
</div>
<div class="method-example">
<code class="method-declaration">PUT https://Domain Name/api/v1/depositproducts/{depositId}</code>
<code class="method-request">POST depositproducts/1
Content-Type: application/json
Request Body:
{
"locale": "en",
"description": "Update desc"
}
</code>
<code class="method-response">{
"resourceId": 1
}
</code>
</div>
</div>
<a id="depositproducts_delete" name="depositproducts_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Deposit Product</h4>
<p>Deletes a Deposit Product.</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://Domain Name/api/v1/savingproducts/{productId}
</code>
<code class="method-request">
DELETE savingproducts/1
Content-Type: application/json
</code>
<code class="method-response">{ "resourceId": 1 } </code>
</div>
</div>
<!-- end of deposit products api docs -->
<!-- start of saving products api docs -->
<a id="savingproducts" name="savingproducts" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Saving Products :</h3>
<p>A Saving product is a template that is used when creating a Saving Account.
</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Field Descriptions</div></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>savingsDepositAmount :</td></tr>
<tr><td class=fielddesc>The deposit amount need to be deposited every depositEvery period.</td></tr>
<tr class=alt><td>minimumBalanceForWithdrawal :</td></tr>
<tr><td class=fielddesc>The minimumbal that is need to be maintained in saving account</td></tr>
<tr class=alt><td></td></tr>
<tr class=alt><td>depositEvery:</td></tr>
<tr><td class=fielddesc>The time period to deposit the amount to saving account every "depositEvery" "frequency" <br>
e.g. Every <b>1</b> Month </td></tr>
<tr class=alt><td>tenureType</td></tr>
<tr><td class=fielddesc>This denotes the tenureType for savings account </td></tr>
<tr class=alt><td>tenure</td></tr>
<tr><td class=fielddesc>The duration for fixed deposit (in months). <br>
e.g. 12
</td></tr>
<tr class=alt><td>interestRate</td></tr>
<tr><td class=fielddesc>Default interest rate for Saving account <br>
e.g. 12</td></tr>
<tr class=alt><td>interestType</td></tr>
<tr><td class=fielddesc>Denotes the interestType for Saving account <br>
simple/compounding</td></tr>
<tr class=alt><td>minInterestRate</td></tr>
<tr><td class=fielddesc>Minimum supported interest rate for Saving account<br>
e.g. 8</td></tr>
<tr class=alt><td>maxInterestRate</td></tr>
<tr><td class=fielddesc>Maximum supported interest rate for Saving account<br>
e.g. 14 </td></tr>
<tr class=alt><td>isPartialDepositAllowed</td></tr>
<tr><td class=fielddesc> Allows to deposit the partial amount for saving account.<br>
Used like: isPartialDepositAllowed:true </td></tr>
<tr class=alt><td>isLockinPeriodAllowed</td></tr>
<tr><td class=fielddesc>This will allow to set the lock-in period for a saving account<br>
If 'true' :isLockinPeriodAllowed otherwise isLockinPeriod not allowed</tr></td>
<tr class=alt><td>lockinPeriod</td></tr>
<tr><td class=fielddesc>Defines a lock-in period for saving account.</tr></td>
<tr class=alt><td>savingProductType</td></tr>
<tr><td class=fielddesc>Defines the savingProductType for saving account.<br>
Recurring/Regular</tr></td>
</tr>
<tr class=alt><td>interestCalculationMethod</td></tr>
<tr><td class=fielddesc>Defines the interestCalculationMethod for saving account.<br>
Montly Collection/Average Balance etc</tr></td>
</tr>
</table>
</div>
</div>
<a id="savingproducts_list" name="savingproducts_list" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List SavingProducts</h4>
<p>Example Requests:</p>
<div class=apiClick>savingproducts</div>
<br><br>
<div class=apiClick>savingproducts?fields=name, ...... </div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingproducts</code>
<code class="method-response">
[{
"id": 1,
"name": "Test",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"digitsAfterDecimal": 2,
"interestRate": 12.000000,
"minInterestRate": 6.000000,
"maxInterestRate": 12.000000,
"savingsDepositAmount": 1000.000000,
"savingProductType": {
"id": 1,
"code": "savings.product.savingProductType.reccuring",
"value": "Recurring"
},
"tenureType": {
"id": 1,
"code": "savings.tenure.tenureTypeEnum.fixedPeriod",
"value": "FixedPeriod"
},
"tenure": 12,
"savingFrequencyType": {
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
},
"interestType": {
"id": 2,
"code": "savings.interest.type.savingsInterestType.compounding",
"value": "Compounding"
},
"interestCalculationMethod": {
"id": 1,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.averagebal",
"value": "AverageBalance"
},
"minimumBalanceForWithdrawal": 100.000000,
"isPartialDepositAllowed": false,
"isLockinPeriodAllowed": false,
"lockinPeriod": 0,
"lockinPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"createdOn": 1360594232000,
"lastModifedOn": 1360594232000,
"depositEvery": 3
}]
</code>
</div>
</div>
<a id="savingproducts_template" name="savingproducts_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve SavingProduct 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>savingproducts/template</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingproducts/template</code>
<code class="method-response">
{
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"digitsAfterDecimal": 2,
"interestRate": 0,
"savingsDepositAmount": 0,
"savingProductType": {
"id": 1,
"code": "savings.product.savingProductType.reccuring",
"value": "Recurring"
},
"tenureType": {
"id": 1,
"code": "savings.tenure.tenureTypeEnum.fixedPeriod",
"value": "FixedPeriod"
},
"tenure": 12,
"savingFrequencyType": {
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
},
"interestType": {
"id": 2,
"code": "savings.interest.type.savingsInterestType.compounding",
"value": "Compounding"
},
"interestCalculationMethod": {
"id": 1,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.averagebal",
"value": "AverageBalance"
},
"minimumBalanceForWithdrawal": 100,
"isPartialDepositAllowed": false,
"isLockinPeriodAllowed": false,
"lockinPeriod": 0,
"lockinPeriodType": {
"id": 2,
"code": "savings.product.lockin.period.type.months",
"value": "Months"
},
"createdOn": 1360596667364,
"lastModifedOn": 1360596667364,
"depositEvery": 3,
"currencyOptions": [{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}],
"savingsProductTypeOptions": [{
"id": 1,
"code": "savings.product.savingProductType.reccuring",
"value": "Recurring"
},
{
"id": 2,
"code": "savings.product.savingProductType.regular",
"value": "Regular"
}],
"tenureTypeOptions": [{
"id": 1,
"code": "savings.tenure.tenureTypeEnum.fixedPeriod",
"value": "FixedPeriod"
},
{
"id": 2,
"code": "savings.tenure.tenureTypeEnum.perpetual",
"value": "Perpetual"
}],
"savingFrequencyOptions": [{
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
}],
"savingsInterestTypeOptions": [{
"id": 1,
"code": "savings.interest.type.savingsInterestType.simple",
"value": "Simple"
},
{
"id": 2,
"code": "savings.interest.type.savingsInterestType.compounding",
"value": "Compounding"
}],
"lockinPeriodTypeOptions": [{
"id": 2,
"code": "savings.product.lockin.period.type.months",
"value": "Months"
}],
"interestCalculationOptions": [{
"id": 1,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.averagebal",
"value": "AverageBalance"
},
{
"id": 2,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.minbal",
"value": "Minimumbalance"
},
{
"id": 3,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.monthlycllection",
"value": "MonthlyCollection"
}]
}
</code>
</div>
</div>
<a id="savingproducts_retrieve" name="savingproducts_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Saving Product</h4>
<p>Example Requests: </p>
<div class=apiClick>savingproducts/1</div>
<br><br>
<div class=apiClick>savingproducts/1?template=true</div>
<br><br>
<div class=apiClick>savingproducts/1?fields=name,description</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/savingproducts/1</code>
<code class="method-response">
{
"id": 1,
"name": "Test",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"digitsAfterDecimal": 2,
"interestRate": 12,
"minInterestRate": 6,
"maxInterestRate": 12,
"savingsDepositAmount": 1000,
"savingProductType": {
"id": 1,
"code": "savings.product.savingProductType.reccuring",
"value": "Recurring"
},
"tenureType": {
"id": 1,
"code": "savings.tenure.tenureTypeEnum.fixedPeriod",
"value": "FixedPeriod"
},
"tenure": 12,
"savingFrequencyType": {
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
},
"interestType": {
"id": 2,
"code": "savings.interest.type.savingsInterestType.compounding",
"value": "Compounding"
},
"interestCalculationMethod": {
"id": 1,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.averagebal",
"value": "AverageBalance"
},
"minimumBalanceForWithdrawal": 100,
"isPartialDepositAllowed": false,
"isLockinPeriodAllowed": false,
"lockinPeriod": 0,
"lockinPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"createdOn": 1360594232000,
"lastModifedOn": 1360594232000,
"depositEvery": 3
}
</code>
<code class="method-declaration">GET https://Domain Name/api/v1/depositproducts/1?template=true</code>
<code class="method-response">
{
"id": 1,
"name": "Test",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"digitsAfterDecimal": 2,
"interestRate": 12,
"minInterestRate": 6,
"maxInterestRate": 12,
"savingsDepositAmount": 1000,
"savingProductType": {
"id": 1,
"code": "savings.product.savingProductType.reccuring",
"value": "Recurring"
},
"tenureType": {
"id": 1,
"code": "savings.tenure.tenureTypeEnum.fixedPeriod",
"value": "FixedPeriod"
},
"tenure": 12,
"savingFrequencyType": {
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
},
"interestType": {
"id": 2,
"code": "savings.interest.type.savingsInterestType.compounding",
"value": "Compounding"
},
"interestCalculationMethod": {
"id": 1,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.averagebal",
"value": "AverageBalance"
},
"minimumBalanceForWithdrawal": 100,
"isPartialDepositAllowed": false,
"isLockinPeriodAllowed": false,
"lockinPeriod": 0,
"lockinPeriodType": {
"id": 2,
"code": "deposit.interest.compounding.period.periodFrequencyType.months",
"value": "Months"
},
"createdOn": 1360594232000,
"lastModifedOn": 1360594232000,
"depositEvery": 3,
"currencyOptions": [
{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
],
"savingsProductTypeOptions": [
{
"id": 1,
"code": "savings.product.savingProductType.reccuring",
"value": "Recurring"
},
{
"id": 2,
"code": "savings.product.savingProductType.regular",
"value": "Regular"
}
],
"tenureTypeOptions": [
{
"id": 1,
"code": "savings.tenure.tenureTypeEnum.fixedPeriod",
"value": "FixedPeriod"
},
{
"id": 2,
"code": "savings.tenure.tenureTypeEnum.perpetual",
"value": "Perpetual"
}
],
"savingFrequencyOptions": [
{
"id": 2,
"code": "saving.product.frequency.period.savingFrequencyType.monthly",
"value": "Months"
}
],
"savingsInterestTypeOptions": [
{
"id": 1,
"code": "savings.interest.type.savingsInterestType.simple",
"value": "Simple"
},
{
"id": 2,
"code": "savings.interest.type.savingsInterestType.compounding",
"value": "Compounding"
}
],
"lockinPeriodTypeOptions": [
{
"id": 2,
"code": "savings.product.lockin.period.type.months",
"value": "Months"
}
],
"interestCalculationOptions": [
{
"id": 1,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.averagebal",
"value": "AverageBalance"
},
{
"id": 2,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.minbal",
"value": "Minimumbalance"
},
{
"id": 3,
"code": "savings.interestCalculation.method.savinginterest.calculation.method.monthlycllection",
"value": "MonthlyCollection"
}
]
}
</code>
</div>
</div>
<a id="savingproducts_create" name="savingproducts_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Saving Product</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
<tr class=alt><td>name, currencyCode, digitsAfterDecimal,interestPostedEvery, minimumBalance,
</td></tr>
<tr><td>
tenureInMonths, maturityDefaultInterestRate,maturityMinInterestRate,
</td></tr>
<tr class=alt><td>
maturityMaxInterestRate,interestCompoundedEvery,preClosureInterestRate.
</td></tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">POST https://Domain Name/api/v1/savingproducts</code>
<code class="method-request">POST savingproducts
Content-Type: application/json
Request Body:
{
"locale": "en",
"interestCalculationMethod": "1",
"name": "Test",
"savingProductType": "1",
"description": "",
"currencyCode": "USD",
"digitsAfterDecimal": "2",
"savingsDepositAmount": "1000",
"minimumBalanceForWithdrawal": "100",
"tenure": "12",
"tenureType": "1",
"isLockinPeriodAllowed": "false",
"isPartialDepositAllowed": "false",
"interestRate": "12",
"interestType": "2",
"minInterestRate": "6",
"maxInterestRate": "12",
"depositEvery": "3",
"frequency": "2",
"lockinPeriod": "0",
"lockinPeriodType": "2"
}
</code>
<code class="method-response">{
"resourceId": 1
}
</code>
</div>
</div>
<a id="savingproducts_update" name="savingproducts_update" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Saving Product</h4>
</div>
<div class="method-example">
<code class="method-declaration">PUT https://Domain Name/api/v1/savingproducts/{depositId}</code>
<code class="method-request">POST savingproducts/1
Content-Type: application/json
Request Body:
{
"locale": "en",
"description": "Update desc"
}
</code>
<code class="method-response">{
"resourceId": 1
}
</code>
</div>
</div>
<a id="savingproducts_delete" name="savingproducts_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Saving Product</h4>
<p>Deletes a Saving Product.</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://Domain Name/api/v1/savingproducts/{productId}
</code>
<code class="method-request">
DELETE savingproducts/1
Content-Type: application/json
</code>
<code class="method-response">{ "resourceId": 1 } </code>
</div>
</div>
<!-- end of saving products api docs -->
<!-- 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 plugin 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_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": "Additional Client Fields Data"
},
{
"applicationTableName": "m_client",
"registeredTableName": "Extra Family Details Data"
},
{
"applicationTableName": "m_loan",
"registeredTableName": "Additional Loan Fields Data"
}
]
</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/userDefinedTableName/m_client
Content-Type: application/json
Request Body:
{}
</code>
<code class="method-response">
{
"resourceId": null
}
</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/userDefinedTableName
Content-Type: application/json
Request Body:
{}
</code>
<code class="method-response">
{
"resourceId": null
}
</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/Additional Client Fields Data/1
Content-Type: application/json
Request Body:
{
"Business Description": "Livestock sales",
Comment: "First comment\nmade",
Education_cv: "Trade",
Gender_cd: "21",
"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</span>
</dd>
<dd>If 'true' a Generic Result Set JSON format is returned.
This format is used by the default data tables UI functionality.</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>datatables/Additional Client Fields
Data/1</div>
<br>
<br>
<div class=apiClick>datatables/Extra Family Details
Data/1?order=`Date of Birth` desc</div>
<br>
<br>
<div class=apiClick>datatables/Additional Client Fields
Data/1?genericResultSet=true</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/datatables/{datatable}/{apptableId}
</code>
<code class="method-response">
[
{
"client_id": 1,
"Business Description": "Livestock sales",
"Years in Business": 5,
"Gender_cd": "21",
"Education_cv": "Trade",
"Next Visit": [2012, 10, 1],
"Highest Rate Paid": 8.500000,
"Comment": "First comment 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/Additional Client Fields Data/1
Content-Type: application/json
Request Body:
{
"Business Description": "Livestock sales updated",
Comment: "First comment\nmade",
Education_cv: "Trade",
Gender_cd: "21",
"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_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/Additional Client Fields Data/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 Data Table (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 Data/1/2
Content-Type: application/json
Request Body:
{}
</code>
<code class="method-response">{ "resourceId": 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>The reports resource allows you to run and receive output
from pre-defined Mifos X reports. 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 Individual Lending client application uses a
JQuery plugin called stretchyreporting which, itself, uses this
reports resource to provide a pretty flexible reporting User
Interface (UI).</p>
</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. If a report has more
than one parameter it will be listed the same number of times as
it has parameters.</p>
<h5>Arguments</h5>
<dl class="argument-list">
<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.</dd>
</dl>
<p>Example Requests:</p>
<div class=apiClick>reports</div>
<br>
<br>
<div class=apiClick>reports?exportCSV=true</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/reports
</code>
<code class="method-response">
{
"columnHeaders": [
{
"columnName": "report_id",
"columnType": "INT",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "report_name",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "report_type",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "report_subtype",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "report_category",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "parameter_id",
"columnType": "INT",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "report_parameter_name",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "parameter_name",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
}
],
"data": [
{
"row": [
"10",
"Active Loans Portfolio Status",
"Table",
null,
"Loan",
"5",
null,
"OfficeIdSelectOne"
]
},
{
"row": [
"10",
"Active Loans Portfolio Status",
"Table",
null,
"Loan",
"6",
null,
"loanOfficerIdSelectAll"
]
},
{
"row": [
"10",
"Active Loans Portfolio Status",
"Table",
null,
"Loan",
"10",
null,
"currencyIdSelectAll"
]
},
{
"row": [
"10",
"Active Loans Portfolio Status",
"Table",
null,
"Loan",
"20",
null,
"fundIdSelectAll"
]
},
{
"row": [
"10",
"Active Loans Portfolio Status",
"Table",
null,
"Loan",
"25",
null,
"loanProductIdSelectAll"
]
},
{
"row": [
"11",
"Active Loans Summary per Branch",
"Table",
null,
"Loan Portfolio",
"5",
null,
"OfficeIdSelectOne"
]
},
{
"row": [
"11",
"Active Loans Summary per Branch",
"Table",
null,
"Loan Portfolio",
"10",
null,
"currencyIdSelectAll"
]
},
{
"row": [
"48",
"Balance Sheet",
"Pentaho",
null,
"Accounting",
"5",
"branch",
"OfficeIdSelectOne"
]
},
{
"row": [
"48",
"Balance Sheet",
"Pentaho",
null,
"Accounting",
"41",
"date",
"endDateSelect"
]
},
{
"row": [
"1",
"Client Listing",
"Table",
null,
"Client",
"5",
null,
"OfficeIdSelectOne"
]
},
{
"row": [
"2",
"Client Loans Listing",
"Table",
null,
"Client",
"5",
null,
"OfficeIdSelectOne"
]
},
{
"row": [
"2",
"Client Loans Listing",
"Table",
null,
"Client",
"6",
null,
"loanOfficerIdSelectAll"
]
},
{
"row": [
"2",
"Client Loans Listing",
"Table",
null,
"Client",
"10",
null,
"currencyIdSelectAll"
]
},
{
"row": [
"2",
"Client Loans Listing",
"Table",
null,
"Client",
"20",
null,
"fundIdSelectAll"
]
},
{
"row": [
"2",
"Client Loans Listing",
"Table",
null,
"Client",
"25",
null,
"loanProductIdSelectAll"
]
},
{
"row": [
"20",
"Funds Disbursed Between Dates Summary",
"Table",
null,
"Fund",
"10",
null,
"currencyIdSelectAll"
]
},
{
"row": [
"20",
"Funds Disbursed Between Dates Summary",
"Table",
null,
"Fund",
"20",
null,
"fundIdSelectAll"
]
},
{
"row": [
"20",
"Funds Disbursed Between Dates Summary",
"Table",
null,
"Fund",
"40",
null,
"startDateSelect"
]
},
{
"row": [
"20",
"Funds Disbursed Between Dates Summary",
"Table",
null,
"Fund",
"41",
null,
"endDateSelect"
]
},
{
"row": [
"21",
"Funds Disbursed Between Dates Summary by Office",
"Table",
null,
"Fund",
"5",
null,
"OfficeIdSelectOne"
]
},
{
"row": [
"21",
"Funds Disbursed Between Dates Summary by Office",
"Table",
null,
"Fund",
"10",
null,
"currencyIdSelectAll"
]
},
{
"row": [
"21",
"Funds Disbursed Between Dates Summary by Office",
"Table",
null,
"Fund",
"20",
null,
"fundIdSelectAll"
]
},
{
"row": [
"21",
"Funds Disbursed Between Dates Summary by Office",
"Table",
null,
"Fund",
"40",
null,
"startDateSelect"
]
},
{
"row": [
"21",
"Funds Disbursed Between Dates Summary by Office",
"Table",
null,
"Fund",
"41",
null,
"endDateSelect"
]
},
{
"row": [
"49",
"Income Statement",
"Pentaho",
null,
"Accounting",
"5",
"branch",
"OfficeIdSelectOne"
]
},
{
"row": [
"49",
"Income Statement",
"Pentaho",
null,
"Accounting",
"40",
"fromDate",
"startDateSelect"
]
},
{
"row": [
"49",
"Income Statement",
"Pentaho",
null,
"Accounting",
"41",
"toDate",
"endDateSelect"
]
},
{
"row": [
"5",
"Loans Awaiting Disbursal",
"Table",
null,
"Loan Portfolio",
"5",
null,
"OfficeIdSelectOne"
]
},
{
"row": [
"5",
"Loans Awaiting Disbursal",
"Table",
null,
"Loan Portfolio",
"6",
null,
"loanOfficerIdSelectAll"
]
},
{
"row": [
"5",
"Loans Awaiting Disbursal",
"Table",
null,
"Loan Portfolio",
"10",
null,
"currencyIdSelectAll"
]
},
{
"row": [
"5",
"Loans Awaiting Disbursal",
"Table",
null,
"Loan Portfolio",
"20",
null,
"fundIdSelectAll"
]
},
{
"row": [
"5",
"Loans Awaiting Disbursal",
"Table",
null,
"Loan Portfolio",
"25",
null,
"loanProductIdSelectAll"
]
},
{
"row": [
"6",
"Loans Awaiting Disbursal Summary",
"Table",
null,
"Loan Portfolio",
"5",
null,
"OfficeIdSelectOne"
]
},
{
"row": [
"6",
"Loans Awaiting Disbursal Summary",
"Table",
null,
"Loan Portfolio",
"6",
null,
"loanOfficerIdSelectAll"
]
},
{
"row": [
"6",
"Loans Awaiting Disbursal Summary",
"Table",
null,
"Loan Portfolio",
"10",
null,
"currencyIdSelectAll"
]
},
{
"row": [
"6",
"Loans Awaiting Disbursal Summary",
"Table",
null,
"Loan Portfolio",
"20",
null,
"fundIdSelectAll"
]
},
{
"row": [
"6",
"Loans Awaiting Disbursal Summary",
"Table",
null,
"Loan Portfolio",
"25",
null,
"loanProductIdSelectAll"
]
},
{
"row": [
"7",
"Loans Awaiting Disbursal Summary by Month",
"Table",
null,
"Loan Portfolio",
"5",
null,
"OfficeIdSelectOne"
]
},
{
"row": [
"7",
"Loans Awaiting Disbursal Summary by Month",
"Table",
null,
"Loan Portfolio",
"6",
null,
"loanOfficerIdSelectAll"
]
},
{
"row": [
"7",
"Loans Awaiting Disbursal Summary by Month",
"Table",
null,
"Loan Portfolio",
"10",
null,
"currencyIdSelectAll"
]
},
{
"row": [
"7",
"Loans Awaiting Disbursal Summary by Month",
"Table",
null,
"Loan Portfolio",
"20",
null,
"fundIdSelectAll"
]
},
{
"row": [
"7",
"Loans Awaiting Disbursal Summary by Month",
"Table",
null,
"Loan Portfolio",
"25",
null,
"loanProductIdSelectAll"
]
},
{
"row": [
"15",
"Portfolio at Risk",
"Table",
null,
"Loan Portfolio",
"5",
null,
"OfficeIdSelectOne"
]
},
{
"row": [
"15",
"Portfolio at Risk",
"Table",
null,
"Loan Portfolio",
"6",
null,
"loanOfficerIdSelectAll"
]
},
{
"row": [
"15",
"Portfolio at Risk",
"Table",
null,
"Loan Portfolio",
"10",
null,
"currencyIdSelectAll"
]
},
{
"row": [
"15",
"Portfolio at Risk",
"Table",
null,
"Loan Portfolio",
"20",
null,
"fundIdSelectAll"
]
},
{
"row": [
"15",
"Portfolio at Risk",
"Table",
null,
"Loan Portfolio",
"25",
null,
"loanProductIdSelectAll"
]
},
{
"row": [
"16",
"Portfolio at Risk by Branch",
"Table",
null,
"Loan Portfolio",
"5",
null,
"OfficeIdSelectOne"
]
},
{
"row": [
"16",
"Portfolio at Risk by Branch",
"Table",
null,
"Loan Portfolio",
"6",
null,
"loanOfficerIdSelectAll"
]
},
{
"row": [
"16",
"Portfolio at Risk by Branch",
"Table",
null,
"Loan Portfolio",
"10",
null,
"currencyIdSelectAll"
]
},
{
"row": [
"16",
"Portfolio at Risk by Branch",
"Table",
null,
"Loan Portfolio",
"20",
null,
"fundIdSelectAll"
]
},
{
"row": [
"16",
"Portfolio at Risk by Branch",
"Table",
null,
"Loan Portfolio",
"25",
null,
"loanProductIdSelectAll"
]
},
{
"row": [
"50",
"Trial Balance",
"Pentaho",
null,
"Accounting",
"5",
"branch",
"OfficeIdSelectOne"
]
},
{
"row": [
"50",
"Trial Balance",
"Pentaho",
null,
"Accounting",
"40",
"fromDate",
"startDateSelect"
]
},
{
"row": [
"50",
"Trial Balance",
"Pentaho",
null,
"Accounting",
"41",
"toDate",
"endDateSelect"
]
}
]
}
</code>
</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>Runs a report and returns the report output.</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>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>
</dl>
<p>Example Requests:</p>
<div class=apiClick>reports/Client%20Listing?R_officeId=1</div>
<br>
<br>
<div class=apiClick>reports/Client%20Listing?R_officeId=1&exportCSV=true</div>
<br>
<br>
<div class=apiClick>reports/selectOfficeId?R_officeId=1&ampparameterType=true</div>
<br>
<br>
<div class=apiClick>reports/selectOfficeId?R_officeId=1&ampparameterType=true&exportCSV=true</div>
<br>
<br>
<div class=apiClick>reports/Client Listing
(Pentaho)?output-type=HTML&R_officeId=1</div>
<br>
<br>
<div class=apiClick>reports/Client Listing
(Pentaho)?output-type=XLS&R_officeId=1</div>
<br>
<br>
<div class=apiClick>reports/Client Listing
(Pentaho)?output-type=CSV&R_officeId=1</div>
<br>
<br>
<div class=apiClick>reports/Client Listing
(Pentaho)?output-type=PDF&R_officeId=1</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/reports/{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
of 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>
<code class="method-response">
{
"username": "mifos",
"userId": 1,
"base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=",
"authenticated": true,
"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/keithwoodlock/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>
</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>
<p>Example Requests:</p>
<div class=apiClick>permissions</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>
<!-- 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 accounts:</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 accounts:</b> represent the different types of economic obligations
by a business, such as accounts payable, bank loan, bonds payable<br/>
<b>Income accounts:</b> represent the company's gross earnings and common examples
include Interest Income, Sales and Service revenue<br/>
<b>Expense accounts:</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 accounts:</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. Header accounts are used
only to group 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 adjustments 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>
</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>manualAdjustmentsAllowed</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>
</dl>
<p>Example Requests:</p>
<div class=apiClick>glaccounts</div>
<br>
<br>
<div class=apiClick>glaccounts?type=1&manualAdjustmentsAllowed=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",
"glCode": "100001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc"
},
{
"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>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/glaccounts/template
</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"
}
]
}
</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 can optionally<br>
create a Hierarchical Chart of Account 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, classification, 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,
"classification": 1,
"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/1
Content-Type: application/json
Request Body:
{
"name": "Cash at Tumkur"
}
</code>
<code class="method-response">
{
"resourceId": 1
}
</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
}
</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
}
</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) prior to the 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",
"allowedOffices": []
},
{
"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",
"allowedOffices": []
}
]
</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",
"allowedOffices": []
}
</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">
{
"resourceId": 1
}
</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 comment associated with it can 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">
{
"resourceId": 1
}
</code>
</div>
<div class="method-example">
<code class="method-request">
PUT glclosures/1
Content-Type: application/json
Request Body:
{
"disabled": true
}
</code>
<code class="method-response">
{
"resourceId": 1
}
</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 closed.
</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">
{
"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 can 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>entryDate</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>entryType</td>
</tr>
<tr>
<td class=fielddesc>Either a Credit(1) or a Debit(2)</td>
</tr>
<tr class=alt>
<td>portfolioGenerated</td>
</tr>
<tr>
<td class=fielddesc>Flag determines if an entry is
generated by the portfolio (posted automatically by
the system during lifecycle of loan and 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>
</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>
<h5>Arguments</h5>
<dl class="argument-list">
<dt>officeId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dt>glAccountId</dt>
<dd>
Integer <span>optional</span>
</dd>
<dt>portfolioGenerated</dt>
<dd>
Boolean <span>optional</span>
</dd>
<dd>Flag determines if portfolio generated Journal
Entries (posted automatically by the system
during lifecycle of loan and saving products)
shall also be returned <br/>
Set to "True" by default if not passed in explicity
</dd>
<dt>fromDate</dt>
<dd>
Date (yyyy-MM-dd)<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 (yyyy-MM-dd)<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?transactionId=PB37X8Y21EQUY4S</div>
<br>
<br>
<div class=apiClick>journalentries?officeId=1&glAccountId=17&portfolioGenerated=false&fromDate=2012-01-01&toDate=2013-01-01</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
</code>
<code class="method-response">
[
{
"id": 81,
"officeId": 1,
"officeName": "Head Office",
"glAccountName": "Something totally else",
"glAccountId": 17,
"glAccountCode": "340098",
"glAccountClassification": {
"id": 3,
"code": "accountType.equity",
"value": "EQUITY"
},
"entryDate": [
2012,
12,
12
],
"entryType": {
"id": 2,
"code": "journalEntrytType.debit",
"value": "DEBIT"
},
"amount": 120,
"transactionId": "PB37X8Y21EQUY4S",
"portfolioGenerated": false,
"createdByUserId": 1,
"createdDate": [
2012,
12,
13
],
"createdByUserName": "mifos",
"reversed": true
},
{
"id": 82,
"officeId": 1,
"officeName": "Head Office",
"glAccountName": "Something else",
"glAccountId": 19,
"glAccountCode": "560050",
"glAccountClassification": {
"id": 3,
"code": "accountType.equity",
"value": "EQUITY"
},
"entryDate": [
2012,
12,
12
],
"entryType": {
"id": 1,
"code": "journalEntryType.credit",
"value": "CREDIT"
},
"amount": 120,
"transactionId": "PB37X8Y21EQUY4S",
"portfolioGenerated": false,
"createdByUserId": 1,
"createdDate": [
2012,
12,
13
],
"createdByUserName": "mifos",
"reversed": true
}
]
</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 sum or all debits and all 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, entryDate
</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 credit entry shall be
made <br/>
amount: Amount of money involved in the credit
<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 involved in the debit
<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,
"entryDate": "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">
{
"resourceId": C1MAE935K0IAEYA
}
</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": 22,
"officeId": 2,
"officeName": "sub branch 1",
"glAccountName": "Income from interest",
"glAccountId": 14,
"glAccountCode": "400001",
"glAccountClassification": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"entryDate": [
2012,
11,
2
],
"entryType": {
"id": 1,
"code": "journalEntryType.credit",
"value": "CREDIT"
},
"amount": 900,
"transactionId": "13",
"portfolioGenerated": 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
</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">
{
"resourceId": C1MAE935K0IAEYA
}
</code>
</div>
</div>
</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">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></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}/loans</td>
<td></td>
<td><a href="#clients_loansummary">Retrieve a Client's
Loan Account Summary</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>clients/{clientId}/notes</td>
<td><a href="#clients_addnote">Add a Client Note</a></td>
<td><a href="#clients_notes">Retrieve a Client's Notes</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>clients/{clientId}/notes/{noteId}</td>
<td></td>
<td><a href="#clients_retrievenote">Retrieve a Client Note</a></td>
<td><a href="#clients_updatenote">Update a Client Note</a></td>
<td></td>
</tr>
<tr>
<td><a href="#loans">LOAN</a></td>
<td>loans</td>
<td><a href="#loans_create">Create a New Loan / Submit a
Loan Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}</td>
<td><a href="#loans_approve_etc">Approve, Undo Approval,
Disburse, Undo Disbursal, Reject a Loan or Withdraw a Loan
Application</a></td>
<td><a href="#loans_retrieve">Retrieve a Loan</a></td>
<td></td>
<td><a href="#loans_delete">Delete a Loan</a></td>
</tr>
<tr class="alt">
<td></td>
<td>loans/{loanId}/transactions</td>
<td><a href="#loans_repayment_etc">Make a Repayment / Loan
Waiver</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>loans/{loanId}/transactions/{transactionId}</td>
<td><a href="#loans_repaymentadjust_etc">Adjust a
Repayment or Waiver</a></td>
<td><a href="#loans_repaymentretrieve_etc">Retrieve a
Repayment or Waiver Details</a></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/{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="#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="#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></td>
<td><a href="#datatables_list">List Data Tables</a></td>
<td></td>
<td></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="#reports">REPORT</a></td>
<td>reports</td>
<td></td>
<td><a href="#reports_list">List Reports</a></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>reports/{reportName}</td>
<td></td>
<td><a href="#report_run">Run a Report</a></td>
<td></td>
<td></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></td>
<td></td>
</tr>
</table>
<br>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td valign="top"><div class="matrixHeadingVerbs">
<table>
<tr>
<td>TEMPLATE 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 Details
Template</a></td>
</tr>
<tr>
<td>loans/template</td>
<td><a href="#loans_template">Retrieve Loan Details
Template</a></td>
</tr>
<tr class="alt">
<td>loans/{loanId}/transactions/template</td>
<td><a href="#loans_repaymenttemplate_etc">Retrieve Loan
Repayment/Loan Waiver Template</a></td>
</tr>
<tr>
<td>offices/template</td>
<td><a href="#offices_template">Retrieve Office Details
Template</a></td>
</tr>
<tr class="alt">
<td>loanproducts/template</td>
<td><a href="#loanproducts_template">Retrieve Loan Product
Details Template</a></td>
</tr>
<tr>
<td>users/template</td>
<td><a href="#users_template">Retrieve User Details
Template</a></td>
</tr>
<tr class="alt">
<td>audit/searchtemplate</td>
<td><a href="#audit_searchtemplate">Retrieve Audit Search
Data</a></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>