3927 lines
137 KiB
HTML
3927 lines
137 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
|
<link rel="stylesheet" href="apicss/apidocs.css" type="text/css" media="screen" title="Mifos X API Docs" charset="utf-8"/>
|
|
<title>Mifos X API Documentation</title>
|
|
</head>
|
|
|
|
|
|
<body>
|
|
<div id="page-wrapper">
|
|
<div id="flybar">
|
|
<div class="flybar-nav">
|
|
<h2 id="toc-menu-button" class="flybar-button">API Navigation</h2>
|
|
<div id="toc-menu" class="flybar-menu">
|
|
|
|
<div class="toc-column1">
|
|
<div class="toc-section">
|
|
<ul>
|
|
<li><a href="#top">Mifos X API Documentation</a></li>
|
|
<li><a href="#authentication_overview">Authentication Overview</a></li>
|
|
<li><a href="#errors">Errors</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<br>
|
|
<br>
|
|
<table><tr><td><h4>API Endpoint:</h4></td><td><h4>https://thedomainname/api</h4></td></tr></table>
|
|
<br>
|
|
<table>
|
|
<tr><td></td><td valign="top">Resources</td><td><table><tr><td>POST</td></tr><tr><td>create/update</td></tr></table></td><td><table><tr><td>GET</td></tr><tr><td>read</td></tr></table></td><td><table><tr><td>PUT</td></tr><tr><td>simple update</td></tr></table></td><td><table><tr><td>DELETE</td></tr><tr><td>delete</td></tr></table></td></tr>
|
|
<tr><td><a href="#clients">CLIENT</a></td><td>/v1/clients</td><td><a href="api.htm#clients_create">Create a Client</a></td><td><a href="#clients_list">List Clients</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/clients/{clientId}</td><td align="center">-</td><td><a href="#clients_retrieve">Retrieve a Client</a></td><td><a href="#clients_update">Update a Client</a></td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/clients/{clientId}/loans</td><td align="center">-</td><td><a href="#clients_loansummary">Retrieve a Client's Loan Account Summary</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/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 align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/clients/{clientId}/notes/{noteId}</td><td align="center">-</td><td><a href="#clients_retrievenote">Retrieve a Client Note</a></td><td><a href="#clients_updatenote">Update a Client Note</a></td><td align="center">-</td></tr>
|
|
<tr><td><a href="#loans">LOAN</a></td><td>/v1/loans</td><td><a href="#loans_create">Create a New Loan/Submit a Loan Application</a></td><td align="center">-</td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/loans/{loanId}</td><td><a href="#loans_approve_etc">Approve, Disburse, Reject a Loan or Withdraw a Loan Application</a></td><td><a href="#loans_retrieve">Retrieve a Loan</a></td><td align="center">-</td><td><a href="#loans_delete">Delete a Loan</a></td></tr>
|
|
<tr><td></td><td>/v1/loans/{loanId}/undo</td><td><a href="#loans_undoapproval_etc">Undo Loan Approval or Disbursal</a></td><td align="center">-</td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/loans/{loanId}/transactions</td><td><a href="#loans_repayment_etc">Make a Repayment / Loan Waiver</a></td><td align="center">-</td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/loans/{loanId}/transactions/{transactionId}</td><td align="center">-</td><td><a href="#loans_repaymentretrieve_etc">Retrieve a Repayment or Waiver Details</a></td><td><a href="#loans_repaymentadjust_etc">Adjust a Repayment or Waiver</a></td><td align="center">-</td></tr>
|
|
<tr><td><a href="#offices">OFFICE</a></td><td>/v1/offices</td><td><a href="#offices_create">Create an Office</a></td><td><a href="#offices_list">List Offices</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/offices/{officeId}</td><td align="center">-</td><td><a href="#offices_retrieve">Retrieve an Office</a></td><td><a href="#offices_update">Update an Office</a></td><td align="center">-</td></tr>
|
|
<tr><td><a href="#loanproducts">LOAN PRODUCT</a></td><td>/v1/loanproducts</td><td><a href="#loanproducts_create">Create a Loan Product</a></td><td><a href="#loanproducts_list">List Loan Products</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/loanproducts/{productId}</td><td align="center">-</td><td><a href="#loanproducts_retrieve">Retrieve a Loan Product</a></td><td><a href="#loanproducts_update">Update a Loan Product</a></td><td align="center">-</td></tr>
|
|
<tr><td><a href="#configs">CONFIGURATION</a></td><td>/v1/configurations/currency</td><td align="center">-</td><td><a href="#configs_currencyretrieve">Retrieve Currency Configuration Settings</a></td><td><a href="#configs_currencyupdate">Update Currency Configuration Settings</a></td><td align="center">-</td></tr>
|
|
<tr><td><a href="#additionalfields">ADDITIONAL FIELDS</a></td><td>/v1/additionalfields</td><td align="center">-</td><td><a href="#additionalfields_list">List Additional Fields Sets</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/additionalfields/{Type}/{Set}/{id}</td><td><a href="#additionalfields_update">Update Additional Fields</a></td><td><a href="#additionalfields_retrieve">Retrieve Additional Fields</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td><a href="#reports">REPORT</a></td><td>/v1/reports</td><td align="center">-</td><td><a href="#reports_list">List Reports</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/reports/{reportName}</td><td align="center">-</td><td><a href="#report_run">Run a Report</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td><a href="#authentication">AUTHENTICATION</a></td><td>/v1/authentication</td><td><a href="#authentication_permissions">Verify Authentication</a></td><td align="center">-</td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td><a href="#useraccounts">USER ACCOUNT</a></td><td>/v1/useraccounts/current</td><td align="center">-</td><td><a href="#useraccount_details_retrieve">Retrieve Current Users' Account Details</a></td><td><a href="#useraccount_details_update">Update Current Users' Account Details</a></td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/useraccounts/current/password</td><td align="center">-</td><td align="center">-</td><td><a href="#useraccount_password_update">Update Current Users' Password</a></td><td align="center">-</td></tr>
|
|
<tr><td><a href="#users">USER</a></td><td>/v1/users</td><td><a href="#users_create">Create a User</a></td><td><a href="#users_list">List Users</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/users/{userId}</td><td align="center">-</td><td><a href="#users_retrieve">Retrieve a User</a></td><td><a href="#users_update">Update a User</a></td><td><a href="#users_delete">Delete a User</a></td></tr>
|
|
<tr><td><a href="#roles">ROLE</a></td><td>/v1/roles</td><td><a href="#roles_create">Create a New Role</a></td><td><a href="#roles_list">List Roles</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
<tr><td></td><td>/v1/roles/{roleId}</td><td align="center">-</td><td><a href="#roles_retrieve">Retrieve a Role</a></td><td><a href="#roles_update">Update a Role</a></td><td align="center">-</td></tr>
|
|
<tr><td><a href="#permissions">PERMISSION</a></td><td>/v1/permissions</td><td align="center">-</td><td><a href="#permissions_list">List Application Permissions</a></td><td align="center">-</td><td align="center">-</td></tr>
|
|
</table>
|
|
<br>
|
|
<table>
|
|
<tr><td valign="top">Convenience Resources</td><td><table><tr><td>GET</td></tr><tr><td>read</td></tr></table></td></tr>
|
|
<tr><td>/v1/clients/template</td><td><a href="#clients_template">Retrieve Client Details Template</a></td></tr>
|
|
<tr><td>/v1/loans/template</td><td><a href="#loans_template">Retrieve Loan Details Template</a></td></tr>
|
|
<tr><td>/v1/loans/{loanId}/transactions/template</td><td><a href="#loans_repaymenttemplate_etc">Retrieve Loan Repayment/Loan Waiver Template</a></td></tr>
|
|
<tr><td>/v1/offices/template</td><td><a href="#offices_template">Retrieve Office Details Template</a></td></tr>
|
|
<tr><td>/v1/loanproducts/template</td><td><a href="#loanproducts_template">Retrieve Loan Product Details Template</a></td></tr>
|
|
<tr><td>/v1/useraccounts/current/password/template</td><td><a href="#useraccount_password_retrieve">Retrieve change password template</a></td></tr>
|
|
<tr><td>/v1/users/template</td><td><a href="#users_template">Retrieve new user template</a></td></tr>
|
|
<tr><td>/v1/roles/template</td><td><a href="#roles_template">Retrieve new role template</a></td></tr>
|
|
</table>
|
|
<div id="main-content-wrapper">
|
|
|
|
|
|
|
|
<a id="top" name="top" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h1>Mifos X API Documentation</h1>
|
|
<p>
|
|
The Mifos X API is organized around
|
|
<a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a>.
|
|
Our API is designed to have predictable, resource-oriented
|
|
URLs, to use HTTP response codes to indicate API errors, and
|
|
to use built-in HTTP features, like HTTP authentication and
|
|
HTTP verbs, which can be understood by off-the-shelf HTTP
|
|
clients. <a href="http://www.json.org/">JSON</a> will be
|
|
returned in all responses from the API, including errors.
|
|
</p>
|
|
<p>
|
|
Much of the presentation ideas here have been taken from the very good API reference (https://stripe.com/docs/api)
|
|
</p>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<a id="authentication_overview" name="authentication_overview" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h3>Authentication Overview</h3>
|
|
<p>
|
|
JPW: Keith, this needs to change to whatever is right after authentication has been added. Don't know if you will go with keys or passwords (I assume passwords)... but can you fix it so we have one user or one user per role that doesn't need a password or always has a password of 'password' so we can let ppl do stuff from the browser and/or REST plugins? We can talk about this.
|
|
</p>
|
|
<p>
|
|
STRIPE content: You authenticate to the Mifos X API by providing one of
|
|
your API keys in the request. You can manage your API
|
|
keys from your
|
|
<a href="https://manage.stripe.com/#account">account</a>.
|
|
You can have multiple API keys
|
|
active at one time. Your API keys carry many
|
|
privileges, so be sure to keep them secret!
|
|
</p>
|
|
|
|
<p>
|
|
Authentication to the API occurs via
|
|
<a href="http://en.wikipedia.org/wiki/Basic_access_authentication">
|
|
HTTP Basic Auth</a>. Provide your API key as the basic
|
|
auth username. You do not need to provide a password.
|
|
</p>
|
|
|
|
<p>
|
|
All API requests must be made
|
|
over <a href="http://en.wikipedia.org/wiki/HTTP_Secure">HTTPS</a>.
|
|
Calls made over plain HTTP will fail. You must
|
|
authenticate for all requests.
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-request"><span class="prompt curl"></span>curl https://api.stripe.com/api/v1/charges \
|
|
-u vtUQeOtUnYr7PGCLQ96Ul4zqpDUO4sOE:
|
|
</code>
|
|
<p>
|
|
JPW: We'll update this after...
|
|
curl uses the -u flag to pass basic auth
|
|
credentials (adding a colon after your API key will prevent
|
|
it from asking you for a password).
|
|
|
|
A sample test API key has been provided in all
|
|
the examples on the page, so you can test out any example right away.
|
|
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="errors" name="errors" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h3>Errors</h3>
|
|
<p>JPW:Need to update this
|
|
Stripe uses conventional HTTP response codes to indicate
|
|
success or failure of an API request. In general,
|
|
codes in the 2xx range indicate success, codes in the
|
|
4xx range indicate an error that resulted from the
|
|
provided information (e.g. a required parameter was
|
|
missing, a charge failed, etc.), and codes in the 5xx
|
|
range indicate an error with Stripe's servers.
|
|
</p>
|
|
|
|
<p>
|
|
Not all errors map cleanly onto HTTP response codes,
|
|
however. When a request is valid but does not complete
|
|
successfully (e.g. a card is declined), we return a 402
|
|
error code.
|
|
</p>
|
|
|
|
|
|
<p>
|
|
All errors return JSON with a type (one of card_error, invalid_request_error,
|
|
or api_error) and message describing the particular problem.
|
|
</p>
|
|
|
|
<h5>Attributes</h5>
|
|
<dl class="argument-list">
|
|
<dt>type</dt>
|
|
<dd></dd>
|
|
<dd>The type of error returned (card_error, invalid_request_error, api_error)
|
|
Card errors are the most common type of error you should expect to handle.
|
|
They result when the user enters a card that can't be charged for some reason.
|
|
Invalid request errors arise when your request has invalid parameters. API
|
|
errors cover any other type of problem (e.g. a temporary problem with Stripe's servers)
|
|
and should turn up only very infrequently.</dd>
|
|
|
|
<dt>message</dt>
|
|
<dd></dd>
|
|
<dd>A user-friendly message describing the error</dd>
|
|
|
|
<dt>code</dt>
|
|
<dd>optional</dd>
|
|
<dd>For card errors, additional information
|
|
about the user-friendly message to display for this error (e.g. "Your
|
|
card was declined.")</dd>
|
|
|
|
<dt>param</dt>
|
|
<dd>optional</dd>
|
|
<dd>The parameter the error relates to if the
|
|
error is parameter-specific. You can use this to display a message near
|
|
the correct form field, for example.</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="method-example">
|
|
<h6>HTTP Status Code Summary</h6>
|
|
<ul>
|
|
<li><strong>200</strong> OK - Everything worked as expected.</li>
|
|
<li><strong>400</strong> Bad Request - Often missing a required parameter.</li>
|
|
<li><strong>401</strong> Unauthorized - No valid API key provided.</li>
|
|
<li><strong>402</strong> Request Failed - Parameters were valid but request failed.</li>
|
|
<li><strong>404</strong> Not Found - The requested item doesn't exist.</li>
|
|
<li><strong>500, 502, 503, 504</strong> Server errors - something went wrong on Stripe's end.</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="method-example">
|
|
<h6>Errors</h6>
|
|
<h7>Invalid Request Errors</h7>
|
|
<code><strong>Type:</strong> invalid_request_error</code>
|
|
|
|
<h7>API Errors</h7>
|
|
<code><strong>Type:</strong> api_error</code>
|
|
|
|
<h7>Card Errors</h7>
|
|
<code><strong>Type:</strong> card_error</code>
|
|
<table>
|
|
<tbody><tr>
|
|
<th>Code</th>
|
|
<th>Details</th>
|
|
</tr>
|
|
<tr>
|
|
<td>invalid_number</td>
|
|
<td>The card number is invalid</td>
|
|
</tr>
|
|
<tr>
|
|
<td>incorrect_number</td>
|
|
<td>The card number is incorrect</td>
|
|
</tr>
|
|
<tr>
|
|
<td>invalid_expiry_month</td>
|
|
<td>The card's expiration month is invalid</td>
|
|
</tr>
|
|
<tr>
|
|
<td>invalid_expiry_year</td>
|
|
<td>The card's expiration year is invalid</td>
|
|
</tr>
|
|
<tr>
|
|
<td>invalid_cvc</td>
|
|
<td>The card's security code is invalid</td>
|
|
</tr>
|
|
<tr>
|
|
<td>expired_card</td>
|
|
<td>The card has expired</td>
|
|
</tr>
|
|
<tr>
|
|
<td>invalid_amount</td>
|
|
<td>An invalid amount was entered</td>
|
|
</tr>
|
|
<tr>
|
|
<td>incorrect_cvc</td>
|
|
<td>The card's security code is incorrect</td>
|
|
</tr>
|
|
<tr>
|
|
<td>card_declined</td>
|
|
<td>The card was declined.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>missing</td>
|
|
<td>There is no card on a customer that is being charged.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>duplicate_transaction</td>
|
|
<td>A transaction with identical amount and credit card information was submitted very recently.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>processing_error</td>
|
|
<td>An error occurred while processing the card.</td>
|
|
</tr>
|
|
</tbody></table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- start of clients api docs -->
|
|
|
|
<a id="clients" name="clients" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h3>Clients</h3>
|
|
<p>Clients ...</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h5>Attributes</h5>
|
|
<dl class="argument-list">
|
|
<dt>
|
|
id
|
|
</dt>
|
|
<dd>
|
|
string <span>jpw ipsum as an example of showing the (at least important) columns</span>
|
|
</dd>
|
|
<dt>
|
|
amount
|
|
</dt>
|
|
<dd>blah <span></span>
|
|
</dd>
|
|
<dd>blah</dd>
|
|
<dt>
|
|
card
|
|
</dt>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="client_list" name="clients_list" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>List Clients</h4>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients">https://localhost:8443/mifosng-provider/api/v1/clients</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/clients</code>
|
|
<code class="method-response">{
|
|
"clients": [
|
|
{
|
|
"organisationId": 1,
|
|
"organisationName": "Demo MFI",
|
|
"officeId": 2,
|
|
"officeName": "sub branch 1",
|
|
"id": 14,
|
|
"firstname": "Patrick",
|
|
"lastname": "Asare-Frimpong",
|
|
"displayName": "Patrick Asare-Frimpong",
|
|
"externalId": null,
|
|
"joinedDate": "2012-04-18",
|
|
"allowedOffices": [],
|
|
"maxJoinedOnOffsetFromToday": -34
|
|
},
|
|
...
|
|
...
|
|
{
|
|
"organisationId": 1,
|
|
"organisationName": "Demo MFI",
|
|
"officeId": 1,
|
|
"officeName": "Demo MFI Head Office",
|
|
"id": 17,
|
|
"firstname": "Fred",
|
|
"lastname": "Ziffle",
|
|
"displayName": "Fred Ziffle",
|
|
"externalId": null,
|
|
"joinedDate": "2012-04-21",
|
|
"allowedOffices": [],
|
|
"maxJoinedOnOffsetFromToday": -31
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a id="clients_template" name="clients_template" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve Client Details Template</h4>
|
|
<p>Returns a template that contains the client fields and allowed value lists. This helps build a maintenance User Interface.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/template">https://localhost:8443/mifosng-provider/api/v1/clients/template</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/clients/template</code>
|
|
<code class="method-response">{
|
|
"organisationId": 1,
|
|
"organisationName": null,
|
|
"officeId": 1,
|
|
"officeName": null,
|
|
"id": -1,
|
|
"firstname": "",
|
|
"lastname": "",
|
|
"displayName": "",
|
|
"externalId": null,
|
|
"joinedDate": "2012-05-22",
|
|
"allowedOffices": [
|
|
{
|
|
"id": 1,
|
|
"name": "Demo MFI Head Office",
|
|
"externalId": "1",
|
|
"openingDate": "2009-01-01",
|
|
"hierarchy": ".",
|
|
"parentName": null,
|
|
"parentId": 0,
|
|
"allowedParents": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "sub branch 1",
|
|
"externalId": "2",
|
|
"openingDate": "2012-01-02",
|
|
"hierarchy": ".2.",
|
|
"parentName": "Demo MFI Head Office",
|
|
"parentId": 1,
|
|
"allowedParents": []
|
|
}
|
|
],
|
|
"maxJoinedOnOffsetFromToday": 0
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a id="clients_retrieve" name="clients_retrieve" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve a Client</h4>
|
|
<p>Returns client fields. It also returns allowed value lists which help build a maintenance User Interface.
|
|
</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1">https://localhost:8443/mifosng-provider/api/v1/clients/1</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/clients/{clientId}</code>
|
|
<code class="method-response">{
|
|
"organisationId": 1,
|
|
"organisationName": "Demo MFI",
|
|
"officeId": 1,
|
|
"officeName": "Demo MFI Head Office",
|
|
"id": 1,
|
|
"firstname": "Patrick",
|
|
"lastname": "O'Meara",
|
|
"displayName": "Patrick O'Meara",
|
|
"externalId": null,
|
|
"joinedDate": "2009-01-04",
|
|
"allowedOffices": [],
|
|
"maxJoinedOnOffsetFromToday": -1234
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="clients_create" name="clients_create" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Create a Client</h4>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/clients</code>
|
|
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/clients
|
|
Content-Type: application/json
|
|
Request Body:
|
|
{
|
|
"officeId": 1,
|
|
"firstname": "Firstname",
|
|
"lastname": "Surname",
|
|
"externalId": null,
|
|
"dateFormat": "dd MMMM yyyy",
|
|
"joiningDateFormatted": "04 March 2009"
|
|
}
|
|
</code>
|
|
<code class="method-response">{ "entityId": 2}</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="clients_update" name="clients_update" class="old-syle-anchor"> </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://thedomainname/api/v1/clients/1</code>
|
|
<code class="method-request">PUT https://localhost:8443/mifosng-provider/api/v1/clients/1
|
|
Content-Type: application/json
|
|
Request Body:
|
|
{
|
|
"officeId": 1,
|
|
"firstname": "Firstname",
|
|
"lastname": "Surname",
|
|
"externalId": null,
|
|
"dateFormat": "dd MMMM yyyy",
|
|
"joiningDateFormatted": "04 March 2009"
|
|
}
|
|
</code>
|
|
<code class="method-response">{ "entityId": 2}</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="clients_loansummary" name="clients_loansummary" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve a Client's Loan Account Summary</h4>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1/loans">https://localhost:8443/mifosng-provider/api/v1/clients/1/loans</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/clients/{clientId}/loans</code>
|
|
<code class="method-response">{
|
|
"pendingApprovalLoans": [],
|
|
"awaitingDisbursalLoans": [
|
|
{
|
|
"id": 17,
|
|
"externalId": null,
|
|
"loanProductId": 1,
|
|
"loanProductName": "Agricultural Loan",
|
|
"loanStatusId": 200,
|
|
"pendingApproval": false,
|
|
"waitingForDisbursal": true,
|
|
"open": false,
|
|
"closed": false,
|
|
"lifeCycleStatusText": "Approved",
|
|
"lifeCycleStatusDate": null
|
|
}
|
|
],
|
|
"openLoans": [],
|
|
"closedLoans": [
|
|
{
|
|
"id": 1,
|
|
"externalId": null,
|
|
"loanProductId": 1,
|
|
"loanProductName": "Agricultural Loan",
|
|
"loanStatusId": 600,
|
|
"pendingApproval": false,
|
|
"waitingForDisbursal": false,
|
|
"open": false,
|
|
"closed": true,
|
|
"lifeCycleStatusText": "Closed",
|
|
"lifeCycleStatusDate": null
|
|
}
|
|
],
|
|
"anyLoanCount": 2,
|
|
"pendingApprovalLoanCount": 0,
|
|
"awaitingDisbursalLoanCount": 1,
|
|
"activeLoanCount": 0,
|
|
"closedLoanCount": 1
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a id="clients_notes" name="clients_notes" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve a Client's Notes</h4>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/2/notes">https://localhost:8443/mifosng-provider/api/v1/clients/2/notes</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/clients/{clientId}/notes</code>
|
|
<code class="method-response">{
|
|
"notes": [
|
|
{
|
|
"id": 20,
|
|
"clientId": 2,
|
|
"loanId": 0,
|
|
"loanTransactionId": 0,
|
|
"noteTypeId": 100,
|
|
"note": "This is an extra note!",
|
|
"createdById": 2,
|
|
"createdByUsername": "super1",
|
|
"createdOn": "2012-04-22T13:50:25.000+01:00",
|
|
"updatedById": 2,
|
|
"updatedByUsername": "super1",
|
|
"updatedOn": "2012-04-22T13:50:25.000+01:00"
|
|
},
|
|
{
|
|
"id": 16,
|
|
"clientId": 2,
|
|
"loanId": 0,
|
|
"loanTransactionId": 0,
|
|
"noteTypeId": 100,
|
|
"note": "loan only 1/2 amount expected\r\nyes",
|
|
"createdById": 2,
|
|
"createdByUsername": "super1",
|
|
"createdOn": "2012-04-18T15:15:04.000+01:00",
|
|
"updatedById": 2,
|
|
"updatedByUsername": "super1",
|
|
"updatedOn": "2012-04-23T09:38:13.000+01:00"
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="clients_addnote" name="clients_addnote" class="old-syle-anchor"> </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://thedomainname/api/v1/clients/{clientId}/notes</code>
|
|
<code class="method-request">POST https://localhost:8443/mifosng-provider/api/v1/clients/1/notes
|
|
Content-Type: application/json
|
|
Request Body:
|
|
{
|
|
"note": "a note about the client"
|
|
}
|
|
</code>
|
|
<code class="method-response">{ "entityId": 40}</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="clients_retrievenote" name="clients_retrievenote" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve a Client Note</h4>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/clients/1/notes/40">https://localhost:8443/mifosng-provider/api/v1/clients/1/notes/40</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/clients/{clientId}/notes/{noteId}</code>
|
|
<code class="method-response">{
|
|
"id": 40,
|
|
"clientId": 2,
|
|
"loanId": 0,
|
|
"loanTransactionId": 0,
|
|
"noteTypeId": 100,
|
|
"note": "a note about the client",
|
|
"createdById": 1,
|
|
"createdByUsername": "mifos",
|
|
"createdOn": "2012-05-22T21:40:05.000+01:00",
|
|
"updatedById": 1,
|
|
"updatedByUsername": "mifos",
|
|
"updatedOn": "2012-05-22T21:40:05.000+01:00"
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="clients_updatenote" name="clients_updatenote" class="old-syle-anchor"> </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://thedomainname/api/v1/clients/{clientId}/notes/{noteId}</code>
|
|
<code class="method-request">PUT https://localhost:8443/mifosng-provider/api/v1/clients/1/notes/40
|
|
Content-Type: application/json
|
|
Request Body:
|
|
{
|
|
"note": "an updated note about the client"
|
|
}
|
|
</code>
|
|
<code class="method-response">{"entityId": 40}</code>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- start of loans api docs -->
|
|
|
|
<a id="loans" name="loans" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h3>Loans</h3>
|
|
<p>Loan stuff.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h5>Attributes</h5>
|
|
<dl class="argument-list">
|
|
<dt>
|
|
id
|
|
</dt>
|
|
<dd>
|
|
string <span>jpw ipsum as an example of showing the (at least important) columns</span>
|
|
</dd>
|
|
<dt>
|
|
amount
|
|
</dt>
|
|
<dd>blah <span></span>
|
|
</dd>
|
|
<dd>blah</dd>
|
|
<dt>
|
|
card
|
|
</dt>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="loans_template" name="loans_template" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve Loan Details Template</h4>
|
|
<p>Returns a template that contains client and loan product fields and allowed value lists. This helps build a maintenance User Interface.
|
|
</p>
|
|
<h5>Arguments</h5>
|
|
<dl class="argument-list">
|
|
<dt>clientId</dt>
|
|
<dd>Integer</dd>
|
|
<dd>The 'id' of the Client</dd>
|
|
<dt>productId</dt>
|
|
<dd>Integer</dd>
|
|
<dd>The 'id' of the Loan Product</dd>
|
|
</dl>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1">https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/loans/template</code>
|
|
<code class="method-response">
|
|
{
|
|
"organisationId": 1,
|
|
"organisationName": "Demo MFI",
|
|
"clientId": 1,
|
|
"clientName": "Patrick O'Meara",
|
|
"productId": 1,
|
|
"productName": "Agricultural Loan",
|
|
"allowedProducts": [
|
|
{
|
|
"id": 1,
|
|
"name": "Agricultural Loan",
|
|
"description": "An agricultural loan given to farmers to help buy crop, stock and machinery. With an arrears tolerance setting of 1,000 CFA, loans are not marked as 'in arrears' or 'in bad standing' if the amount outstanding is less than this. Interest rate is described using monthly percentage rate (MPR) even though the loan typically lasts a year and requires one repayment (typically at time when farmer sells crop)",
|
|
"principalMoney": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"interestRatePerPeriod": 1.75,
|
|
"interestRatePeriod": 2,
|
|
"annualInterestRate": 21,
|
|
"interestMethod": 0,
|
|
"interestRateCalculatedInPeriod": 1,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 12,
|
|
"repaymentPeriodFrequency": 2,
|
|
"numberOfRepayments": 1,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 1000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "1000 CFA"
|
|
},
|
|
"createdOn": "2012-04-12T00:00:00.000+01:00",
|
|
"lastModifedOn": "2012-04-12T00:00:00.000+01:00",
|
|
"possibleCurrencies": [],
|
|
"possibleAmortizationOptions": [],
|
|
"possibleInterestOptions": [],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [],
|
|
"repaymentFrequencyOptions": [],
|
|
"interestFrequencyOptions": [],
|
|
"interestRebateAllowed": false,
|
|
"flexible": false
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "Brunei Loan",
|
|
"description": null,
|
|
"principalMoney": {
|
|
"currencyCode": "BND",
|
|
"currencyDigitsAfterDecimal": 2,
|
|
"amount": 76000,
|
|
"defaultName": "Brunei Dollar",
|
|
"nameCode": "currency.BND",
|
|
"displaySymbol": "BND",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "76000.00 BND"
|
|
},
|
|
"interestRatePerPeriod": 6,
|
|
"interestRatePeriod": 2,
|
|
"annualInterestRate": 72,
|
|
"interestMethod": 0,
|
|
"interestRateCalculatedInPeriod": 1,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 1,
|
|
"repaymentPeriodFrequency": 1,
|
|
"numberOfRepayments": 10,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "BND",
|
|
"currencyDigitsAfterDecimal": 2,
|
|
"amount": 50,
|
|
"defaultName": "Brunei Dollar",
|
|
"nameCode": "currency.BND",
|
|
"displaySymbol": "BND",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "50.00 BND"
|
|
},
|
|
"createdOn": "2012-04-16T00:00:00.000+01:00",
|
|
"lastModifedOn": "2012-04-16T00:00:00.000+01:00",
|
|
"possibleCurrencies": [],
|
|
"possibleAmortizationOptions": [],
|
|
"possibleInterestOptions": [],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [],
|
|
"repaymentFrequencyOptions": [],
|
|
"interestFrequencyOptions": [],
|
|
"interestRebateAllowed": false,
|
|
"flexible": false
|
|
},
|
|
{
|
|
"id": 3,
|
|
"name": "IL Loan",
|
|
"description": null,
|
|
"principalMoney": {
|
|
"currencyCode": "USD",
|
|
"currencyDigitsAfterDecimal": 2,
|
|
"amount": 5000,
|
|
"defaultName": "US Dollar",
|
|
"nameCode": "currency.USD",
|
|
"displaySymbol": "$",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "5000.00 $"
|
|
},
|
|
"interestRatePerPeriod": 15.6,
|
|
"interestRatePeriod": 3,
|
|
"annualInterestRate": 15.6,
|
|
"interestMethod": 1,
|
|
"interestRateCalculatedInPeriod": 1,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 1,
|
|
"repaymentPeriodFrequency": 2,
|
|
"numberOfRepayments": 12,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "USD",
|
|
"currencyDigitsAfterDecimal": 2,
|
|
"amount": 0,
|
|
"defaultName": "US Dollar",
|
|
"nameCode": "currency.USD",
|
|
"displaySymbol": "$",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0.00 $"
|
|
},
|
|
"createdOn": "2012-04-18T00:00:00.000+01:00",
|
|
"lastModifedOn": "2012-04-18T00:00:00.000+01:00",
|
|
"possibleCurrencies": [],
|
|
"possibleAmortizationOptions": [],
|
|
"possibleInterestOptions": [],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [],
|
|
"repaymentFrequencyOptions": [],
|
|
"interestFrequencyOptions": [],
|
|
"interestRebateAllowed": false,
|
|
"flexible": false
|
|
},
|
|
{
|
|
"id": 4,
|
|
"name": "IBL Mabeshte",
|
|
"description": "Individual loan",
|
|
"principalMoney": {
|
|
"currencyCode": "KES",
|
|
"currencyDigitsAfterDecimal": 2,
|
|
"amount": 5000,
|
|
"defaultName": "Kenyan Shilling",
|
|
"nameCode": "currency.KES",
|
|
"displaySymbol": "KSh",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "5000.00 KSh"
|
|
},
|
|
"interestRatePerPeriod": 2,
|
|
"interestRatePeriod": 2,
|
|
"annualInterestRate": 24,
|
|
"interestMethod": 1,
|
|
"interestRateCalculatedInPeriod": 1,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 12,
|
|
"repaymentPeriodFrequency": 2,
|
|
"numberOfRepayments": 12,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "KES",
|
|
"currencyDigitsAfterDecimal": 2,
|
|
"amount": 0,
|
|
"defaultName": "Kenyan Shilling",
|
|
"nameCode": "currency.KES",
|
|
"displaySymbol": "KSh",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0.00 KSh"
|
|
},
|
|
"createdOn": "2012-04-21T00:00:00.000+01:00",
|
|
"lastModifedOn": "2012-04-21T00:00:00.000+01:00",
|
|
"possibleCurrencies": [],
|
|
"possibleAmortizationOptions": [],
|
|
"possibleInterestOptions": [],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [],
|
|
"repaymentFrequencyOptions": [],
|
|
"interestFrequencyOptions": [],
|
|
"interestRebateAllowed": false,
|
|
"flexible": false
|
|
},
|
|
{
|
|
"id": 5,
|
|
"name": "Salary Loan",
|
|
"description": "Loan for salaried workers",
|
|
"principalMoney": {
|
|
"currencyCode": "GHC",
|
|
"currencyDigitsAfterDecimal": 2,
|
|
"amount": 500,
|
|
"defaultName": "Ghana Cedi",
|
|
"nameCode": "currency.GHC",
|
|
"displaySymbol": "GHC",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "500.00 GHC"
|
|
},
|
|
"interestRatePerPeriod": 3.5,
|
|
"interestRatePeriod": 2,
|
|
"annualInterestRate": 42,
|
|
"interestMethod": 1,
|
|
"interestRateCalculatedInPeriod": 1,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 1,
|
|
"repaymentPeriodFrequency": 2,
|
|
"numberOfRepayments": 12,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "GHC",
|
|
"currencyDigitsAfterDecimal": 2,
|
|
"amount": 0,
|
|
"defaultName": "Ghana Cedi",
|
|
"nameCode": "currency.GHC",
|
|
"displaySymbol": "GHC",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0.00 GHC"
|
|
},
|
|
"createdOn": "2012-04-24T00:00:00.000+01:00",
|
|
"lastModifedOn": "2012-04-24T00:00:00.000+01:00",
|
|
"possibleCurrencies": [],
|
|
"possibleAmortizationOptions": [],
|
|
"possibleInterestOptions": [],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [],
|
|
"repaymentFrequencyOptions": [],
|
|
"interestFrequencyOptions": [],
|
|
"interestRebateAllowed": false,
|
|
"flexible": false
|
|
},
|
|
{
|
|
"id": 6,
|
|
"name": "daily-declining-balance",
|
|
"description": "an example loan product based on description for daily declining balance as given by Hugo technologies.",
|
|
"principalMoney": {
|
|
"currencyCode": "USD",
|
|
"currencyDigitsAfterDecimal": 2,
|
|
"amount": 100000,
|
|
"defaultName": "US Dollar",
|
|
"nameCode": "currency.USD",
|
|
"displaySymbol": "$",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000.00 $"
|
|
},
|
|
"interestRatePerPeriod": 2,
|
|
"interestRatePeriod": 2,
|
|
"annualInterestRate": 24,
|
|
"interestMethod": 0,
|
|
"interestRateCalculatedInPeriod": 0,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 1,
|
|
"repaymentPeriodFrequency": 2,
|
|
"numberOfRepayments": 12,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "USD",
|
|
"currencyDigitsAfterDecimal": 2,
|
|
"amount": 0,
|
|
"defaultName": "US Dollar",
|
|
"nameCode": "currency.USD",
|
|
"displaySymbol": "$",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0.00 $"
|
|
},
|
|
"createdOn": "2012-05-01T00:00:00.000+01:00",
|
|
"lastModifedOn": "2012-05-01T00:00:00.000+01:00",
|
|
"possibleCurrencies": [],
|
|
"possibleAmortizationOptions": [],
|
|
"possibleInterestOptions": [],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [],
|
|
"repaymentFrequencyOptions": [],
|
|
"interestFrequencyOptions": [],
|
|
"interestRebateAllowed": false,
|
|
"flexible": false
|
|
},
|
|
{
|
|
"id": 7,
|
|
"name": "New kind of Loan",
|
|
"description": "A description not exceeding 500 characters.",
|
|
"principalMoney": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"interestRatePerPeriod": 1.75,
|
|
"interestRatePeriod": 2,
|
|
"annualInterestRate": 21,
|
|
"interestMethod": 0,
|
|
"interestRateCalculatedInPeriod": 1,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 1,
|
|
"repaymentPeriodFrequency": 2,
|
|
"numberOfRepayments": 1,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 1000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "1000 CFA"
|
|
},
|
|
"createdOn": "2012-05-21T00:00:00.000+01:00",
|
|
"lastModifedOn": "2012-05-21T00:00:00.000+01:00",
|
|
"possibleCurrencies": [],
|
|
"possibleAmortizationOptions": [],
|
|
"possibleInterestOptions": [],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [],
|
|
"repaymentFrequencyOptions": [],
|
|
"interestFrequencyOptions": [],
|
|
"interestRebateAllowed": false,
|
|
"flexible": false
|
|
}
|
|
],
|
|
"dateFormat": null,
|
|
"submittedOnDateFormatted": null,
|
|
"submittedOnDate": null,
|
|
"submittedOnNote": "",
|
|
"expectedDisbursementDateFormatted": null,
|
|
"expectedDisbursementDate": "2012-05-22",
|
|
"repaymentsStartingFromDateFormatted": null,
|
|
"repaymentsStartingFromDate": null,
|
|
"interestCalculatedFromDateFormatted": null,
|
|
"interestCalculatedFromDate": null,
|
|
"repaymentSchedule": null,
|
|
"selectedProduct": {
|
|
"id": 1,
|
|
"name": "Agricultural Loan",
|
|
"description": "An agricultural loan given to farmers to help buy crop, stock and machinery. With an arrears tolerance setting of 1,000 CFA, loans are not marked as 'in arrears' or 'in bad standing' if the amount outstanding is less than this. Interest rate is described using monthly percentage rate (MPR) even though the loan typically lasts a year and requires one repayment (typically at time when farmer sells crop)",
|
|
"principalMoney": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"interestRatePerPeriod": 1.75,
|
|
"interestRatePeriod": 2,
|
|
"annualInterestRate": 21,
|
|
"interestMethod": 0,
|
|
"interestRateCalculatedInPeriod": 1,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 12,
|
|
"repaymentPeriodFrequency": 2,
|
|
"numberOfRepayments": 1,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 1000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "1000 CFA"
|
|
},
|
|
"createdOn": "2012-04-12T00:00:00.000+01:00",
|
|
"lastModifedOn": "2012-04-12T00:00:00.000+01:00",
|
|
"possibleCurrencies": [
|
|
{
|
|
"code": "GBP",
|
|
"name": "Pound Sterling",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": null,
|
|
"nameCode": "currency.GBP",
|
|
"displayLabel": "Pound Sterling [GBP]"
|
|
},
|
|
{
|
|
"code": "USD",
|
|
"name": "US Dollar",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": "$",
|
|
"nameCode": "currency.USD",
|
|
"displayLabel": "US Dollar ($)"
|
|
}
|
|
],
|
|
"possibleAmortizationOptions": [
|
|
{
|
|
"id": 1,
|
|
"value": "Equal installments"
|
|
},
|
|
{
|
|
"id": 0,
|
|
"value": "Equal principle payments"
|
|
}
|
|
],
|
|
"possibleInterestOptions": [
|
|
{
|
|
"id": 0,
|
|
"value": "Declining Balance"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"value": "Flat"
|
|
}
|
|
],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [
|
|
{
|
|
"id": 0,
|
|
"value": "Daily"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"value": "Same as repayment period"
|
|
}
|
|
],
|
|
"repaymentFrequencyOptions": [
|
|
{
|
|
"id": 0,
|
|
"value": "Days"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"value": "Weeks"
|
|
},
|
|
{
|
|
"id": 2,
|
|
"value": "Months"
|
|
}
|
|
],
|
|
"interestFrequencyOptions": [
|
|
{
|
|
"id": 2,
|
|
"value": "Per month"
|
|
},
|
|
{
|
|
"id": 3,
|
|
"value": "Per year"
|
|
}
|
|
],
|
|
}
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="loans_retrieve" name="loans_retrieve" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve a Loan</h4>
|
|
<p>Returns loan fields.
|
|
</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loans/1">https://localhost:8443/mifosng-provider/api/v1/loans/1</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/loans/{loanId}</code>
|
|
<code class="method-response">{
|
|
"open": false,
|
|
"openWithRepaymentMade": false,
|
|
"closed": true,
|
|
"interestRebateOutstanding": false,
|
|
"pendingApproval": false,
|
|
"waitingForDisbursal": false,
|
|
"lifeCycleStatusText": "Closed",
|
|
"lifeCycleStatusDate": "2009-11-13",
|
|
"id": 1,
|
|
"externalId": null,
|
|
"loanProductName": "Agricultural Loan",
|
|
"submittedOnDate": "2009-01-05",
|
|
"approvedOnDate": "2009-01-08",
|
|
"expectedDisbursementDate": "2009-01-15",
|
|
"actualDisbursementDate": "2009-01-15",
|
|
"undoDisbursalAllowed": false,
|
|
"expectedFirstRepaymentOnDate": null,
|
|
"interestCalculatedFromDate": null,
|
|
"closedOnDate": "2009-11-13",
|
|
"expectedMaturityDate": "2009-11-15",
|
|
"principal": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"interestRatePerYear": 21,
|
|
"interestRatePerPeriod": 1.75,
|
|
"interestPeriodFrequencyType": 2,
|
|
"interestPeriodFrequencyText": "MONTHS",
|
|
"interestMethodType": 0,
|
|
"interestMethodText": "DECLINING_BALANCE",
|
|
"amortizationMethodValue": 1,
|
|
"amortizationMethodText": "EQUAL_INSTALLMENTS",
|
|
"numberOfRepayments": 1,
|
|
"repaymentFrequencyNumber": 10,
|
|
"repaymentFrequencyTypeEnumOrdinal": 2,
|
|
"repaymentFrequencyTypeText": "MONTHS",
|
|
"interestRebateOwed": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"loanData": {
|
|
"repaymentSchedule": {
|
|
"periods": [
|
|
{
|
|
"period": 1,
|
|
"date": "2009-11-15",
|
|
"disbursed": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"principal": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"principalPaid": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"principalOutstanding": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"interest": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 17500,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "17500 CFA"
|
|
},
|
|
"interestPaid": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 17500,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "17500 CFA"
|
|
},
|
|
"interestOutstanding": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"total": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 117500,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "117500 CFA"
|
|
},
|
|
"totalPaid": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 117500,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "117500 CFA"
|
|
},
|
|
"totalOutstanding": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"totalWaived": null,
|
|
"totalArrears": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"arrearsFrom": null,
|
|
"arrearsTo": null,
|
|
"paidInFullOn": "2009-11-13",
|
|
"lastAffectingPaymentOn": "2009-11-13",
|
|
"fullyPaid": true
|
|
}
|
|
]
|
|
},
|
|
"summary": {
|
|
"originalPrincipal": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"originalInterest": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 17500,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "17500 CFA"
|
|
},
|
|
"originalTotal": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 117500,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "117500 CFA"
|
|
},
|
|
"principalPaid": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"principalOutstanding": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"interestPaid": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 17500,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "17500 CFA"
|
|
},
|
|
"interestOutstanding": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"totalPaid": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 117500,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "117500 CFA"
|
|
},
|
|
"totalOutstanding": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"totalInArrears": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"totalWaived": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
}
|
|
},
|
|
"loanRepayments": [
|
|
{
|
|
"id": 2,
|
|
"date": "2009-11-13",
|
|
"principal": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"interest": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 17500,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "17500 CFA"
|
|
},
|
|
"total": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 117500,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "117500 CFA"
|
|
},
|
|
"totalWaived": null,
|
|
"overpaid": null,
|
|
"transactionOffsetFromToday": -921
|
|
}
|
|
]
|
|
},
|
|
"arrearsTolerance": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 1000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "1000 CFA"
|
|
},
|
|
"waiveAllowed": false,
|
|
"makeRepaymentAllowed": false,
|
|
"rejectAllowed": false,
|
|
"withdrawnByApplicantAllowed": false,
|
|
"undoApprovalAllowed": false,
|
|
"disbursalAllowed": false,
|
|
"anyActionOnLoanAllowed": false,
|
|
"maxSubmittedOnOffsetFromToday": -1233,
|
|
"maxApprovedOnOffsetFromToday": -1230,
|
|
"maxDisbursedOnOffsetFromToday": -1223,
|
|
"actualLoanTermInDays": 302,
|
|
"actualLoanTermInMonths": 9,
|
|
"loanTermInDays": 304,
|
|
"loanTermInMonths": 10
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="loans_create" name="loans_create" class="old-syle-anchor"> </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. If the value is 'calculateLoanSchedule' then a new loan entry is created without entering the loan life cycle.</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/loans</code>
|
|
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/loans
|
|
|
|
|
|
Content-Type: application/json
|
|
Request Body:
|
|
new json here
|
|
</code>
|
|
<code class="method-response">{"entityId": 2}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="loans_approve_etc" name="loans_approve_etc" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Approve, Disburse, Reject a Loan or Withdraw a Loan Application</h4>
|
|
<h5>Arguments</h5>
|
|
<dl class="argument-list">
|
|
<dt>command</dt>
|
|
<dd>String<span> Mandatory? what happens if command wrong, , 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>
|
|
</dl>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/loans/{loanId}</code>
|
|
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/loans/1?command=approve
|
|
|
|
|
|
Content-Type: application/json
|
|
Request Body:
|
|
new json here
|
|
</code>
|
|
<code class="method-response">{
|
|
"entityId": 2
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
<a id="loans_delete" name="loans_delete" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Delete a Loan</h4>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">DELETE https://thedomainname/api/v1/loans/{loanId}</code>
|
|
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/loans/1
|
|
|
|
|
|
Content-Type: application/json
|
|
Request Body:
|
|
new json here
|
|
</code>
|
|
<code class="method-response">{
|
|
"entityId": 2
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
<a id="loans_undoapproval_etc" name="loans_undoapproval_etc" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Undo Loan Approval/ Undo Loan Disbursal</h4>
|
|
<dl class="argument-list">
|
|
<dt>command</dt>
|
|
<dd>String<span> Mandatory? what happens if command wrong, , case-insensitive</span></dd>
|
|
<dd>'undoapproval' : Undo Loan Approval</dd>
|
|
<dd>'undodisbursal' : Undo Loan Disbursal</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/loans/{loanId}/undo</code>
|
|
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/loans/1/undo
|
|
|
|
|
|
Content-Type: application/json
|
|
Request Body:
|
|
new json here
|
|
</code>
|
|
<code class="method-response">{
|
|
"entityId": 2
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a id="loans_repaymenttemplate_etc" name="loans_repaymenttemplate_etc" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve Loan Repayment/Loan Waiver Template</h4>
|
|
<p>Returns a template to help with entering loan repayments and waivers.
|
|
</p>
|
|
<h5>Arguments</h5>
|
|
<dl class="argument-list">
|
|
<dt>type</dt>
|
|
<dd>String<span> Optional, case-insensitive</span></dd>
|
|
<dd>The default action is to return details for Repayment of a loan. If the value is 'waiver' then details relevant to Waiving a loan amount are returned.</dd>
|
|
</dl>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loans/1/transactions/template?type=waiver">https://localhost:8443/mifosng-provider/api/v1/loans/1/transactions/template?type=waiver"</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/loans/{loanId}/transactions/template"</code>
|
|
<code class="method-response"> to be done
|
|
</code>
|
|
</div>
|
|
</div>
|
|
<a id="loans_repayment_etc" name="loans_repayment_etc" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Make a Repayment / Loan Waiver</h4>
|
|
<dl class="argument-list">
|
|
<dt>type</dt>
|
|
<dd>String<span> Optional, case-insensitive</span></dd>
|
|
<dd>The default action is to make a Loan Repayment. If the value is 'waiver' then a Loan Waiver is made.</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/loans/{loanId}/transactions</code>
|
|
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/loans/1/transactions
|
|
|
|
|
|
Content-Type: application/json
|
|
Request Body:
|
|
new json here
|
|
</code>
|
|
<code class="method-response">{
|
|
"entityId": 2
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="loans_repaymentretrieve_etc" name="loans_repaymentretrieve_etc" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve a Repayment or Waiver Details</h4>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loans/1/transactions/1">https://localhost:8443/mifosng-provider/api/v1/loans/1/transactions/1</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/loans/{loanId}/transactions/{transactionId}</code>
|
|
<code class="method-response">
|
|
</code>
|
|
</div>
|
|
</div>
|
|
<a id="loans_repaymentadjust_etc" name="loans_repaymentadjust_etc" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Adjust a Repayment or Waiver</h4>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">PUT https://thedomainname/api/v1/loans/{loanId}/transactions/{transactionId}</code>
|
|
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/loans/1/transactions/1
|
|
|
|
|
|
Content-Type: application/json
|
|
Request Body:
|
|
new json here
|
|
</code>
|
|
<code class="method-response">{
|
|
"entityId": 2
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- start of offices content -->
|
|
<a id="offices" name="offices" class="old-syle-anchor"> </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>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="offices_list" name="offices_list" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>List Offices</h4>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/offices">https://localhost:8443/mifosng-provider/api/v1/offices</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/offices</code>
|
|
<code class="method-response">
|
|
{
|
|
"offices": [
|
|
{
|
|
"id": 1,
|
|
"name": "Demo MFI Head Office",
|
|
"externalId": "1",
|
|
"openingDate": "2009-01-01",
|
|
"hierarchy": ".",
|
|
"parentName": null,
|
|
"parentId": 0,
|
|
"allowedParents": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "sub branch 1",
|
|
"externalId": "2",
|
|
"openingDate": "2012-01-02",
|
|
"hierarchy": ".2.",
|
|
"parentName": "Demo MFI Head Office",
|
|
"parentId": 1,
|
|
"allowedParents": []
|
|
},
|
|
{
|
|
"id": 3,
|
|
"name": "sub branch 2",
|
|
"externalId": "3",
|
|
"openingDate": "2012-03-01",
|
|
"hierarchy": ".3.",
|
|
"parentName": "Demo MFI Head Office",
|
|
"parentId": 1,
|
|
"allowedParents": []
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="offices_template" name="offices_template" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve Office Details Template</h4>
|
|
<p>Returns a template that contains the office fields and allowed value lists. This is a convienence when building user intereface screens for client applications.
|
|
</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/offices/template">
|
|
https://localhost:8443/mifosng-provider/api/v1/offices/template
|
|
</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/offices/template</code>
|
|
<code class="method-response">
|
|
{
|
|
"id": null,
|
|
"name": null,
|
|
"externalId": null,
|
|
"openingDate": "2012-05-21",
|
|
"hierarchy": null,
|
|
"parentName": null,
|
|
"parentId": null,
|
|
"allowedParents": [
|
|
{
|
|
"id": 1,
|
|
"name": "Demo MFI Head Office",
|
|
"externalId": "1",
|
|
"openingDate": "2009-01-01",
|
|
"hierarchy": ".",
|
|
"parentName": null,
|
|
"parentId": 0,
|
|
"allowedParents": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "sub branch 1",
|
|
"externalId": "2",
|
|
"openingDate": "2012-01-02",
|
|
"hierarchy": ".2.",
|
|
"parentName": "Demo MFI Head Office",
|
|
"parentId": 1,
|
|
"allowedParents": []
|
|
},
|
|
{
|
|
"id": 3,
|
|
"name": "sub branch 2",
|
|
"externalId": "3",
|
|
"openingDate": "2012-03-01",
|
|
"hierarchy": ".3.",
|
|
"parentName": "Demo MFI Head Office",
|
|
"parentId": 1,
|
|
"allowedParents": []
|
|
},
|
|
{
|
|
"id": 4,
|
|
"name": "sub branch 3",
|
|
"externalId": null,
|
|
"openingDate": "2012-04-17",
|
|
"hierarchy": ".4.",
|
|
"parentName": "Demo MFI Head Office",
|
|
"parentId": 1,
|
|
"allowedParents": []
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="offices_retrieve" name="offices_retrieve" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve Office</h4>
|
|
<p>Returns an office details if it exists.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/offices/1">
|
|
https://localhost:8443/mifosng-provider/api/v1/offices/1
|
|
</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/offices/1</code>
|
|
<code class="method-response">
|
|
{
|
|
"id": 1,
|
|
"name": "Demo MFI Head Office",
|
|
"externalId": "1",
|
|
"openingDate": "2009-01-01",
|
|
"hierarchy": ".",
|
|
"parentName": null,
|
|
"parentId": 0,
|
|
"allowedParents": []
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="offices_create" name="offices_create" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Create Office</h4>
|
|
<p>Create an office.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/offices">
|
|
https://localhost:8443/mifosng-provider/api/v1/offices
|
|
</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/offices</code>
|
|
<code class="method-request">POST https://localhost:8443/mifosng-provider/api/v1/offices
|
|
Content-Type: application/json
|
|
Request Body:
|
|
{
|
|
"name": "Demo branch 9",
|
|
"externalId": "9",
|
|
"dateFormat": "dd MMMM yyyy",
|
|
"openingDateFormatted": "01 September 2011",
|
|
"parentId": 1
|
|
}
|
|
</code>
|
|
<code class="method-response">
|
|
{
|
|
"entityId": 9
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="offices_update" name="offices_update" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Update Office</h4>
|
|
<p>Update office details.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/offices/1">
|
|
https://localhost:8443/mifosng-provider/api/v1/offices/1
|
|
</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">PUT https://thedomainname/api/v1/offices/1</code>
|
|
<code class="method-request">PUT https://localhost:8443/mifosng-provider/api/v1/offices/1
|
|
Content-Type: application/json
|
|
Request Body:
|
|
{
|
|
"name": "Demo branch 9 changed",
|
|
"externalId": "11",
|
|
"dateFormat": "dd MMMM yyyy",
|
|
"openingDateFormatted": "05 September 2011",
|
|
"parentId": 1
|
|
}
|
|
</code>
|
|
<code class="method-response">
|
|
{
|
|
"entityId": 9
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
<!-- end of office api docs -->
|
|
|
|
|
|
<!-- start of loan products api docs -->
|
|
|
|
<a id="loanproducts" name="loanproducts" class="old-syle-anchor"> </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 changed during loan creation.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="loanproducts_list" name="loanproducts_list" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>List Loan Products</h4>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loanproducts">https://localhost:8443/mifosng-provider/api/v1/loanproducts</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/loanproducts</code>
|
|
<code class="method-response"> {
|
|
"products": [
|
|
{
|
|
"id": 1,
|
|
"name": "Agricultural Loan",
|
|
"description": "An agricultural loan given to farmers to help buy crop, stock and machinery. With an arrears tolerance setting of 1,000 CFA, loans are not marked as 'in arrears' or 'in bad standing' if the amount outstanding is less than this. Interest rate is described using monthly percentage rate (MPR) even though the loan typically lasts a year and requires one repayment (typically at time when farmer sells crop)",
|
|
"principalMoney": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"interestRatePerPeriod": 1.75,
|
|
"interestRatePeriod": 2,
|
|
"annualInterestRate": 21,
|
|
"interestMethod": 0,
|
|
"interestRateCalculatedInPeriod": 0,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 12,
|
|
"repaymentPeriodFrequency": 2,
|
|
"numberOfRepayments": 1,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 1000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "1000 CFA"
|
|
},
|
|
"createdOn": "2012-04-12T00:00:00.000+10:00",
|
|
"lastModifedOn": "2012-04-12T00:00:00.000+10:00",
|
|
"possibleCurrencies": [],
|
|
"possibleAmortizationOptions": [],
|
|
"possibleInterestOptions": [],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [],
|
|
"repaymentFrequencyOptions": [],
|
|
"interestFrequencyOptions": [],
|
|
"interestRebateAllowed": false,
|
|
"flexible": false
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="loanproducts_template" name="loanproducts_template" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve Loan Product Details Template</h4>
|
|
<p>Returns a template that contains the loan product fields and allowed value lists. This helps build a maintenance User Interface.
|
|
</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loanproducts/template">https://localhost:8443/mifosng-provider/api/v1/loanproducts/template</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/loanproducts/template</code>
|
|
<code class="method-response">{
|
|
"id": null,
|
|
"name": null,
|
|
"description": null,
|
|
"principalMoney": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"interestRatePerPeriod": 0,
|
|
"interestRatePeriod": 2,
|
|
"annualInterestRate": 0,
|
|
"interestMethod": 0,
|
|
"interestRateCalculatedInPeriod": 1,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 1,
|
|
"repaymentPeriodFrequency": 2,
|
|
"numberOfRepayments": 0,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 0,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": true,
|
|
"greaterThanZero": false,
|
|
"displaySymbolValue": "0 CFA"
|
|
},
|
|
"createdOn": null,
|
|
"lastModifedOn": null,
|
|
"possibleCurrencies": [
|
|
{
|
|
"code": "XOF",
|
|
"name": "CFA Franc BCEAO",
|
|
"decimalPlaces": 0,
|
|
"displaySymbol": "CFA",
|
|
"nameCode": "currency.XOF",
|
|
"displayLabel": "CFA Franc BCEAO (CFA)"
|
|
},
|
|
{
|
|
"code": "ETB",
|
|
"name": "Ethiopian Birr",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": null,
|
|
"nameCode": "currency.ETB",
|
|
"displayLabel": "Ethiopian Birr [ETB]"
|
|
}
|
|
],
|
|
"possibleAmortizationOptions": [
|
|
{
|
|
"id": 1,
|
|
"value": "Equal installments"
|
|
},
|
|
{
|
|
"id": 0,
|
|
"value": "Equal principle payments"
|
|
}
|
|
],
|
|
"possibleInterestOptions": [
|
|
{
|
|
"id": 0,
|
|
"value": "Declining Balance"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"value": "Flat"
|
|
}
|
|
],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [
|
|
{
|
|
"id": 0,
|
|
"value": "Daily"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"value": "Same as repayment period"
|
|
}
|
|
],
|
|
"repaymentFrequencyOptions": [
|
|
{
|
|
"id": 0,
|
|
"value": "Days"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"value": "Weeks"
|
|
},
|
|
{
|
|
"id": 2,
|
|
"value": "Months"
|
|
}
|
|
],
|
|
"interestFrequencyOptions": [
|
|
{
|
|
"id": 2,
|
|
"value": "Per month"
|
|
},
|
|
{
|
|
"id": 3,
|
|
"value": "Per year"
|
|
}
|
|
],
|
|
"interestRebateAllowed": false,
|
|
"flexible": false
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="loanproducts_retrieve" name="loanproducts_retrieve" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve a Loan Product</h4>
|
|
<p>Returns loan product fields. It also returns allowed value lists which help build a maintenance User Interface.
|
|
JPW - includes validation values (might be ok or option), enum?
|
|
</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loanproducts/1">https://localhost:8443/mifosng-provider/api/v1/loanproducts/1</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/loanproducts/{productId}</code>
|
|
<code class="method-response">{
|
|
"id": 1,
|
|
"name": "Agricultural Loan",
|
|
"description": "An agricultural loan given to farmers to help buy crop, stock and machinery. With an arrears tolerance setting of 1,000 CFA, loans are not marked as 'in arrears' or 'in bad standing' if the amount outstanding is less than this. Interest rate is described using monthly percentage rate (MPR) even though the loan typically lasts a year and requires one repayment (typically at time when farmer sells crop)",
|
|
"principalMoney": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 100000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "100000 CFA"
|
|
},
|
|
"interestRatePerPeriod": 1.75,
|
|
"interestRatePeriod": 2,
|
|
"annualInterestRate": 21,
|
|
"interestMethod": 0,
|
|
"interestRateCalculatedInPeriod": 0,
|
|
"numberOfInterestFreePeriods": 0,
|
|
"repaidEvery": 12,
|
|
"repaymentPeriodFrequency": 2,
|
|
"numberOfRepayments": 1,
|
|
"amortizationMethod": 1,
|
|
"inArrearsTolerance": {
|
|
"currencyCode": "XOF",
|
|
"currencyDigitsAfterDecimal": 0,
|
|
"amount": 1000,
|
|
"defaultName": "CFA Franc BCEAO",
|
|
"nameCode": "currency.XOF",
|
|
"displaySymbol": "CFA",
|
|
"zero": false,
|
|
"greaterThanZero": true,
|
|
"displaySymbolValue": "1000 CFA"
|
|
},
|
|
"createdOn": "2012-04-12T00:00:00.000+10:00",
|
|
"lastModifedOn": "2012-04-12T00:00:00.000+10:00",
|
|
"possibleCurrencies": [
|
|
{
|
|
"code": "XOF",
|
|
"name": "CFA Franc BCEAO",
|
|
"decimalPlaces": 0,
|
|
"displaySymbol": "CFA",
|
|
"nameCode": "currency.XOF",
|
|
"displayLabel": "CFA Franc BCEAO (CFA)"
|
|
},
|
|
{
|
|
"code": "ETB",
|
|
"name": "Ethiopian Birr",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": null,
|
|
"nameCode": "currency.ETB",
|
|
"displayLabel": "Ethiopian Birr [ETB]"
|
|
}
|
|
],
|
|
"possibleAmortizationOptions": [
|
|
{
|
|
"id": 1,
|
|
"value": "Equal installments"
|
|
},
|
|
{
|
|
"id": 0,
|
|
"value": "Equal principle payments"
|
|
}
|
|
],
|
|
"possibleInterestOptions": [
|
|
{
|
|
"id": 0,
|
|
"value": "Declining Balance"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"value": "Flat"
|
|
}
|
|
],
|
|
"possibleInterestRateCalculatedInPeriodOptions": [
|
|
{
|
|
"id": 0,
|
|
"value": "Daily"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"value": "Same as repayment period"
|
|
}
|
|
],
|
|
"repaymentFrequencyOptions": [
|
|
{
|
|
"id": 0,
|
|
"value": "Days"
|
|
},
|
|
{
|
|
"id": 1,
|
|
"value": "Weeks"
|
|
},
|
|
{
|
|
"id": 2,
|
|
"value": "Months"
|
|
}
|
|
],
|
|
"interestFrequencyOptions": [
|
|
{
|
|
"id": 2,
|
|
"value": "Per month"
|
|
},
|
|
{
|
|
"id": 3,
|
|
"value": "Per year"
|
|
}
|
|
],
|
|
"interestRebateAllowed": false,
|
|
"flexible": false
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="loanproducts_create" name="loanproducts_create" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Create a Loan Product</h4>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/loanproducts</code>
|
|
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/loanproducts
|
|
Content-Type: application/json
|
|
Request Body:
|
|
{
|
|
"name": "New kind of Loan",
|
|
"description": "A description not exceeding 500 characters.",
|
|
"currencyCode": "XOF",
|
|
"digitsAfterDecimal": 0,
|
|
"principal": 100000,
|
|
"inArrearsToleranceAmount": 1000,
|
|
"numberOfRepayments": 1,
|
|
"repaymentEvery": 1,
|
|
"repaymentFrequency": 2,
|
|
"amortizationMethod": 1,
|
|
"interestRatePerPeriod": 1.75,
|
|
"interestRateFrequencyMethod": 2,
|
|
"interestCalculationPeriodMethod": 1,
|
|
"interestMethod": 0
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="loanproducts_update" name="loanproducts_update" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Update a Loan Product</h4>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/loanproducts/{loanId}</code>
|
|
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/loanproducts/1
|
|
Content-Type: application/json
|
|
Request Body:
|
|
{
|
|
"name": "New kind of Loan updated",
|
|
"description": "An updated description not exceeding 500 characters.",
|
|
"currencyCode": "XOF",
|
|
"digitsAfterDecimal": 0,
|
|
"principal": 100000,
|
|
"inArrearsToleranceAmount": 1000,
|
|
"numberOfRepayments": 1,
|
|
"repaymentEvery": 1,
|
|
"repaymentFrequency": 2,
|
|
"amortizationMethod": 1,
|
|
"interestRatePerPeriod": 1.75,
|
|
"interestRateFrequencyMethod": 2,
|
|
"interestCalculationPeriodMethod": 1,
|
|
"interestMethod": 0
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
<!-- end of loan products api docs -->
|
|
|
|
<!-- start of configurations api docs -->
|
|
<a id="configs" name="configs" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h3>Configuration</h3>
|
|
<p>Application related configuration like being able to select what currencies are permitted for use within the MFI.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="configs_currencyretrieve" name="configs_currencyretrieve" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve currency configuration settings</h4>
|
|
<p>Returns the list of selectedCurrencies that are allowed within the MFI and the list of currencies that are currently not selected.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/configurations/currency">https://localhost:8443/mifosng-provider/api/v1/configurations/currency</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/configurations/currency</code>
|
|
<code class="method-response">
|
|
{
|
|
"selectedCurrencyOptions": [
|
|
{
|
|
"code": "KES",
|
|
"name": "Kenyan Shilling",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": "KSh",
|
|
"nameCode": "currency.KES",
|
|
"displayLabel": "Kenyan Shilling (KSh)"
|
|
},
|
|
{
|
|
"code": "BND",
|
|
"name": "Brunei Dollar",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": "BND",
|
|
"nameCode": "currency.BND",
|
|
"displayLabel": "Brunei Dollar (BND)"
|
|
},
|
|
{
|
|
"code": "LBP",
|
|
"name": "Lebanese Pound",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": "L£",
|
|
"nameCode": "currency.LBP",
|
|
"displayLabel": "Lebanese Pound (L£)"
|
|
},
|
|
{
|
|
"code": "GHC",
|
|
"name": "Ghana Cedi",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": "GHC",
|
|
"nameCode": "currency.GHC",
|
|
"displayLabel": "Ghana Cedi (GHC)"
|
|
},
|
|
{
|
|
"code": "USD",
|
|
"name": "US Dollar",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": "$",
|
|
"nameCode": "currency.USD",
|
|
"displayLabel": "US Dollar ($)"
|
|
},
|
|
{
|
|
"code": "XOF",
|
|
"name": "CFA Franc BCEAO",
|
|
"decimalPlaces": 0,
|
|
"displaySymbol": "CFA",
|
|
"nameCode": "currency.XOF",
|
|
"displayLabel": "CFA Franc BCEAO (CFA)"
|
|
}
|
|
],
|
|
"currencyOptions": [
|
|
{
|
|
"code": "AED",
|
|
"name": "UAE Dirham",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": null,
|
|
"nameCode": "currency.AED",
|
|
"displayLabel": "UAE Dirham [AED]"
|
|
},
|
|
{
|
|
"code": "AFN",
|
|
"name": "Afghanistan Afghani",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": null,
|
|
"nameCode": "currency.AFN",
|
|
"displayLabel": "Afghanistan Afghani [AFN]"
|
|
},
|
|
...
|
|
...
|
|
{
|
|
"code": "ZMK",
|
|
"name": "Zambian Kwacha",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": null,
|
|
"nameCode": "currency.ZMK",
|
|
"displayLabel": "Zambian Kwacha [ZMK]"
|
|
},
|
|
{
|
|
"code": "ZWD",
|
|
"name": "Zimbabwe Dollar",
|
|
"decimalPlaces": 2,
|
|
"displaySymbol": null,
|
|
"nameCode": "currency.ZWD",
|
|
"displayLabel": "Zimbabwe Dollar [ZWD]"
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="configs_currencyupdate" name="configs_currencyupdate" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Update currency configuration settings</h4>
|
|
<p>Update list of selectedCurrencies that are allowed within the MFI and the list of currencies that are currently not selected.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/configurations/currency">https://localhost:8443/mifosng-provider/api/v1/configurations/currency</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">PUT https://thedomainname/api/v1/configurations/currency</code>
|
|
<code class="method-response">
|
|
{
|
|
"selectedItems": ["USD", "GBP"]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- start of additionalfields api docs -->
|
|
<a id="additionalfields" name="additionalfields" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h3>Additional Fields</h3>
|
|
<p>
|
|
In Mifos X, any number of "Sets" of "Additional Fields" can be configured for a Mifos X database table ("Type").
|
|
</p>
|
|
<p> For example, portfolio_client is the database table that holds client data. Typically, MFI's want more client related fields than is provided by Mifos X out-of-the-box.
|
|
The MFI might add a Set called "Additional Info" containing some fields that are typically input when creating a client. They might then add another Set called "Highly Improbable Info" containing some fields that are only input in exceptional circumstances.
|
|
</p>
|
|
<p>
|
|
The additional fields resource allows you to retrieve and update any Additional Fields data that has been configured in Mifos X.
|
|
</p>
|
|
<p>
|
|
The Mifos X Individual Lending client application uses a JQuery plugin called stretchydata which, itself, uses this additional fields resource to provide a pretty flexible additional fields User Interface (UI). Put a link to an example here.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a id="additionalfields_list" name="additionalfields_list" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>List Additional Fields Sets</h4>
|
|
<p>
|
|
Lists the Sets of additional fields have been defined in Mifos X.
|
|
</p>
|
|
|
|
<h5>Arguments</h5>
|
|
<dl class="argument-list">
|
|
<dt>type</dt>
|
|
<dd><span>optional</span></dd>
|
|
<dd>The Additional Fields Type (Mifos X database table) to restrict the output to</dd>
|
|
</dl>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client">https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/additionalfields</code>
|
|
<code class="method-response">{
|
|
"additionalFieldsSets": [
|
|
{
|
|
"id": 1,
|
|
"name": "Additional Information",
|
|
"type": "portfolio_client"
|
|
},
|
|
{
|
|
"id": 9,
|
|
"name": "Highly Improbable Info",
|
|
"type": "portfolio_client"
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a id="additionalfields_retrieve" name="additionalfields_retrieve" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve Additional Fields</h4>
|
|
<p>
|
|
Returns the Set of Additional Fields data for the ID provided. The ID is the id field of the Type table e.g. portfolio_client might have an id value of 4. The output is a JSON formatted "Generic Resultset". The Generic Resultset contains Column Heading as well as Data information. The Column Heading information may include allowed values (columnValues array).
|
|
</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2">https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/additionalfields/{type}/{set}/{id}</code>
|
|
<code class="method-response">{
|
|
"columnHeaders": [
|
|
{
|
|
"columnName": "Ethnic Group",
|
|
"columnType": "String",
|
|
"columnLength": 50,
|
|
"columnDisplayType": "List",
|
|
"columnValues": [
|
|
"Bedouin",
|
|
"Berber",
|
|
"Italian",
|
|
"Miknasa",
|
|
"Mrazig",
|
|
"Other",
|
|
"Unknown"
|
|
]
|
|
},
|
|
{
|
|
"columnName": "Ethnic Group Other",
|
|
"columnType": "String",
|
|
"columnLength": 50,
|
|
"columnDisplayType": null,
|
|
"columnValues": []
|
|
},
|
|
{
|
|
"columnName": "Household Location",
|
|
"columnType": "String",
|
|
"columnLength": 50,
|
|
"columnDisplayType": "List",
|
|
"columnValues": [
|
|
"East Sikkim",
|
|
"North Sikkim",
|
|
"South Sikkim",
|
|
"West Sikkim",
|
|
"Other"
|
|
]
|
|
},
|
|
{
|
|
"columnName": "Household Location Other",
|
|
"columnType": "String",
|
|
"columnLength": 50,
|
|
"columnDisplayType": null,
|
|
"columnValues": []
|
|
},
|
|
{
|
|
"columnName": "Religion",
|
|
"columnType": "String",
|
|
"columnLength": 50,
|
|
"columnDisplayType": "List",
|
|
"columnValues": [
|
|
"Protestant",
|
|
"Catholic",
|
|
"Muslim",
|
|
"Animist",
|
|
"Atheist",
|
|
"Other",
|
|
"Unknown"
|
|
]
|
|
},
|
|
{
|
|
"columnName": "Religion Other",
|
|
"columnType": "String",
|
|
"columnLength": 50,
|
|
"columnDisplayType": null,
|
|
"columnValues": []
|
|
},
|
|
{
|
|
"columnName": "Knowledge of Person",
|
|
"columnType": "String",
|
|
"columnLength": 50,
|
|
"columnDisplayType": "List",
|
|
"columnValues": [
|
|
"Staff member",
|
|
"Spouse of staff member",
|
|
"Son/daughter of staff member",
|
|
"Friend of staff member",
|
|
"Not known by any staff member",
|
|
"Other"
|
|
]
|
|
},
|
|
{
|
|
"columnName": "Gender",
|
|
"columnType": "String",
|
|
"columnLength": 10,
|
|
"columnDisplayType": "List",
|
|
"columnValues": [
|
|
"Female",
|
|
"Male"
|
|
]
|
|
},
|
|
{
|
|
"columnName": "Whois",
|
|
"columnType": "Text",
|
|
"columnLength": 0,
|
|
"columnDisplayType": null,
|
|
"columnValues": []
|
|
}
|
|
],
|
|
"data": [
|
|
{
|
|
"row": [
|
|
"Berber",
|
|
null,
|
|
"East Sikkim",
|
|
null,
|
|
"Animist",
|
|
"jjjjjjj",
|
|
"Son/daughter of staff member",
|
|
"Female",
|
|
"its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
<a id="additionalfields_update" name="additionalfields_update" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Update Additional Fields</h4>
|
|
<p>
|
|
Updates (or creates) the Set of Additional Fields data for the ID provided. The ID is the id field of the Type table e.g. portfolio_client might have an id value of 4.
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/additionalfields/{type}/{set}/{id}</code>
|
|
<code class="method-request">https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2
|
|
|
|
|
|
Content-Type: application/json
|
|
Request Body:
|
|
{
|
|
"Ethnic_Group":"Berber",
|
|
"Ethnic_Group_Other":"",
|
|
"Household_Location":"East Sikkim",
|
|
"Household_Location_Other":"",
|
|
"Religion":"Animist",
|
|
"Religion_Other":"jjjjjjj",
|
|
"Knowledge_of_Person":"Son/daughter of staff member",
|
|
"Gender":"Female",
|
|
"Whois":"its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all"
|
|
}
|
|
</code>
|
|
<code class="method-response">{
|
|
"entityId": 2
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="reports" name="reports" class="old-syle-anchor"> </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 URI.
|
|
</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>Add examples showing links to client listing report producing json, then csv, then a pentaho report producing html, pdf, csv</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). Put a link to an example here.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<a id="reports_list" name="reports_list" class="old-syle-anchor"> </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 Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/reports">https://localhost:8443/mifosng-provider/api/v1/reports</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/reports</code>
|
|
<code class="method-response">{
|
|
"columnHeaders": [
|
|
{
|
|
"columnName": "report_id",
|
|
"columnType": "INT",
|
|
"columnLength": null,
|
|
"columnDisplayType": null,
|
|
"columnValues": []
|
|
},
|
|
{
|
|
"columnName": "report_name",
|
|
"columnType": "VARCHAR",
|
|
"columnLength": null,
|
|
"columnDisplayType": null,
|
|
"columnValues": []
|
|
},
|
|
{
|
|
"columnName": "report_type",
|
|
"columnType": "VARCHAR",
|
|
"columnLength": null,
|
|
"columnDisplayType": null,
|
|
"columnValues": []
|
|
},
|
|
... more "columnHeaders" entries
|
|
],
|
|
"data": [
|
|
{
|
|
"row": [
|
|
"29",
|
|
"Client Listing",
|
|
"Table",
|
|
null,
|
|
null,
|
|
"5",
|
|
null,
|
|
"selectOfficeId"
|
|
]
|
|
},
|
|
{
|
|
"row": [
|
|
"42",
|
|
"Client Listing - Additional and Unlikely",
|
|
"Table",
|
|
null,
|
|
null,
|
|
"5",
|
|
null,
|
|
"selectOfficeId"
|
|
]
|
|
},
|
|
{
|
|
"row": [
|
|
"30",
|
|
"Client Loans Listing",
|
|
"Table",
|
|
null,
|
|
null,
|
|
"5",
|
|
null,
|
|
"selectOfficeId"
|
|
]
|
|
},
|
|
... more "Row" entries
|
|
]
|
|
}</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<a id="report_run" name="report_run" class="old-syle-anchor"> </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.</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>
|
|
</dl>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1">https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/reports/{reportName}</code>
|
|
<code class="method-response">{
|
|
"columnHeaders": [
|
|
{
|
|
"columnName": "Office/Branch",
|
|
"columnType": "VARCHAR",
|
|
"columnLength": null,
|
|
"columnDisplayType": null,
|
|
"columnValues": []
|
|
},
|
|
{
|
|
"columnName": "Name",
|
|
"columnType": "VARCHAR",
|
|
"columnLength": null,
|
|
"columnDisplayType": null,
|
|
"columnValues": []
|
|
},
|
|
{
|
|
"columnName": "Joining Date",
|
|
"columnType": "DATE",
|
|
"columnLength": null,
|
|
"columnDisplayType": null,
|
|
"columnValues": []
|
|
}
|
|
],
|
|
"data": [
|
|
{
|
|
"row": [
|
|
"Demo MFI Head Office",
|
|
"O'Meara, Patrick",
|
|
"2009-01-04"
|
|
]
|
|
},
|
|
{
|
|
"row": [
|
|
"Demo MFI Head Office",
|
|
"O'Meara, Dennis",
|
|
"2009-01-04"
|
|
]
|
|
},
|
|
{
|
|
"row": [
|
|
"Demo MFI Head Office",
|
|
"Smith, John",
|
|
"2009-01-11"
|
|
]
|
|
},
|
|
... more "row" entries
|
|
]
|
|
}</code>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- start of authentication api docs -->
|
|
<a id="authentication" name="authentication" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h3>Authentication</h3>
|
|
<p>An API capability to allowed client applications verify authentication details.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="authentication_permissions" name="authentication_permissions" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Verify authentication</h4>
|
|
<p>Verifies that the credentials provided successfully authenticate and returns the set of permissions allowed by that user.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/authentication?username=super1&password=demo">https://localhost:8443/mifosng-provider/api/v1/authentication?username=super1&password=demo</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/authentication?username=super1&password=demo</code>
|
|
<code class="method-request">POST https://localhost:8443/mifosng-provider/api/v1/authentication?username=super1&password=demo
|
|
Content-Type: application/xml
|
|
</code>
|
|
<code class="method-response">
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- start of useraccounts api docs -->
|
|
<a id="useraccounts" name="useraccounts" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h3>User account details</h3>
|
|
<p>An API capability to allowed client applications expose functionality for users to update their account details and password.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="useraccount_details_retrieve" name="useraccount_details_retrieve" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve current users account details</h4>
|
|
<p>Will return user account details.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/useraccounts/current">https://localhost:8443/mifosng-provider/api/v1/useraccounts/current</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/useraccounts/current</code>
|
|
<code class="method-request">GET https://localhost:8443/mifosng-provider/api/v1/useraccounts/current</code>
|
|
<code class="method-response">
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"officeId": 1,
|
|
"officeName": "Demo MFI Head Office",
|
|
"username": "mifos",
|
|
"firstname": "App hello",
|
|
"lastname": "Administrator",
|
|
"email": "demomfi@mifos.org",
|
|
"allowedOffices": [
|
|
{
|
|
"id": 1,
|
|
"name": "Demo MFI Head Office",
|
|
"externalId": "1",
|
|
"openingDate": "2009-01-01",
|
|
"hierarchy": ".",
|
|
"parentName": null,
|
|
"parentId": 0,
|
|
"allowedParents": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "sub branch 1",
|
|
"externalId": "2",
|
|
"openingDate": "2012-01-02",
|
|
"hierarchy": ".2.",
|
|
"parentName": "Demo MFI Head Office",
|
|
"parentId": 1,
|
|
"allowedParents": []
|
|
}
|
|
],
|
|
"availableRoles": [
|
|
{
|
|
"id": 2,
|
|
"orgId": 1,
|
|
"name": "Field officer",
|
|
"description": "A field officer role allows the user to add client and loans and view reports but nothing else.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
},
|
|
{
|
|
"id": 3,
|
|
"orgId": 1,
|
|
"name": "Data Entry (Portfolio only)",
|
|
"description": "This role allows a user full permissions around client and loan functionality but nothing else.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
},
|
|
{
|
|
"id": 4,
|
|
"orgId": 1,
|
|
"name": "Credit Committe Member",
|
|
"description": "This role allows a user to approve reject or withdraw loans (with reporting).",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
},
|
|
{
|
|
"id": 5,
|
|
"orgId": 1,
|
|
"name": "Manager",
|
|
"description": "This role allows a manager to do anything related to portfolio management and also view all reports.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
}
|
|
],
|
|
"selectedRoles": [
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"name": "Super user",
|
|
"description": "This role provides all application permissions.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": [
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"name": "User administration ALL",
|
|
"description": "An application user will have permission to execute all tasks related to user administration.",
|
|
"code": "USER_ADMINISTRATION_SUPER_USER_ROLE",
|
|
"groupType": 1
|
|
},
|
|
{
|
|
"id": 4,
|
|
"orgId": 1,
|
|
"name": "Reporting ALL",
|
|
"description": "An application user will have permission to execute and view all reports.",
|
|
"code": "REPORTING_SUPER_USER_ROLE",
|
|
"groupType": 4
|
|
},
|
|
{
|
|
"id": 3,
|
|
"orgId": 1,
|
|
"name": "Portfolio management ALL",
|
|
"description": "An application user will have permission to execute all tasks related to portfolio management.",
|
|
"code": "PORTFOLIO_MANAGEMENT_SUPER_USER_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 2,
|
|
"orgId": 1,
|
|
"name": "Organisation adminsitration ALL",
|
|
"description": "An application user will have permission to execute all tasks related to organisation administration.",
|
|
"code": "ORGANISATION_ADMINISTRATION_SUPER_USER_ROLE",
|
|
"groupType": 2
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="useraccount_details_update" name="useraccount_details_update" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Update current users account details</h4>
|
|
<p>Will update user account details.</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">PUT https://thedomainname/api/v1/useraccounts/current</code>
|
|
<code class="method-request">PUT https://localhost:8443/mifosng-provider/api/v1/useraccounts/current
|
|
Content-Type: application/json
|
|
Request body:
|
|
{
|
|
"officeId": 1,
|
|
"username": "mifos",
|
|
"firstname": "App hello",
|
|
"lastname": "Administrator",
|
|
"email": "demomfi@mifos.org",
|
|
"selectedItems": ["1"]
|
|
}
|
|
</code>
|
|
<code class="method-response">
|
|
{
|
|
"entityId": 1
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a id="useraccount_password_retrieve" name="useraccount_password_retrieve" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve change password template details</h4>
|
|
<p>Will details for change of password screen.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/useraccounts/current/password/template">https://localhost:8443/mifosng-provider/api/v1/useraccounts/current/password/template</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/useraccounts/current/password/template</code>
|
|
<code class="method-request">GET https://localhost:8443/mifosng-provider/api/v1/useraccounts/current/password/template</code>
|
|
<code class="method-response">
|
|
{
|
|
"password": null,
|
|
"passwordrepeat": null
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="useraccount_password_update" name="useraccount_password_update" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Update current users password</h4>
|
|
<p>Will update users password.</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">PUT https://thedomainname/api/v1/useraccounts/current/password</code>
|
|
<code class="method-request">PUT https://localhost:8443/mifosng-provider/api/v1/useraccounts/current/password
|
|
Content-Type: application/json
|
|
Request body:
|
|
{
|
|
"password": "demo",
|
|
"passwordrepeat": "demo"
|
|
}
|
|
</code>
|
|
<code class="method-response">
|
|
{
|
|
"entityId": 1
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- start of users api docs -->
|
|
<a id="users" name="users" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h3>Users</h3>
|
|
<p>An API capability to support user administration.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="users_list" name="users_list" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve list of users</h4>
|
|
<p>Returns all users.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/users">https://localhost:8443/mifosng-provider/api/v1/users</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/users</code>
|
|
<code class="method-request">GET https://localhost:8443/mifosng-provider/api/v1/users</code>
|
|
<code class="method-response">
|
|
{
|
|
"users": [
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"officeId": 1,
|
|
"officeName": "Demo MFI Head Office",
|
|
"username": "mifos",
|
|
"firstname": "App hello",
|
|
"lastname": "Administrator",
|
|
"email": "demomfi@mifos.org",
|
|
"allowedOffices": [],
|
|
"availableRoles": [],
|
|
"selectedRoles": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"orgId": 1,
|
|
"officeId": 1,
|
|
"officeName": "Demo MFI Head Office",
|
|
"username": "super1",
|
|
"firstname": "super",
|
|
"lastname": "user",
|
|
"email": "fake@email.com",
|
|
"allowedOffices": [],
|
|
"availableRoles": [],
|
|
"selectedRoles": []
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="users_template" name="users_template" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve new user template details</h4>
|
|
<p>Returns details for new user screen</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/users/template">https://localhost:8443/mifosng-provider/api/v1/users/template</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/users/template</code>
|
|
<code class="method-request">GET https://localhost:8443/mifosng-provider/api/v1/users/template</code>
|
|
<code class="method-response">
|
|
{
|
|
"id": null,
|
|
"orgId": null,
|
|
"officeId": null,
|
|
"officeName": null,
|
|
"username": null,
|
|
"firstname": null,
|
|
"lastname": null,
|
|
"email": null,
|
|
"allowedOffices": [
|
|
{
|
|
"id": 1,
|
|
"name": "Demo MFI Head Office",
|
|
"externalId": "1",
|
|
"openingDate": "2009-01-01",
|
|
"hierarchy": ".",
|
|
"parentName": null,
|
|
"parentId": 0,
|
|
"allowedParents": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "sub branch 1",
|
|
"externalId": "2",
|
|
"openingDate": "2012-01-02",
|
|
"hierarchy": ".2.",
|
|
"parentName": "Demo MFI Head Office",
|
|
"parentId": 1,
|
|
"allowedParents": []
|
|
}
|
|
],
|
|
"availableRoles": [
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"name": "Super user",
|
|
"description": "This role provides all application permissions.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"orgId": 1,
|
|
"name": "Field officer",
|
|
"description": "A field officer role allows the user to add client and loans and view reports but nothing else.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
}
|
|
],
|
|
"selectedRoles": []
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="users_retrieve" name="users_retrieve" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve existing user details</h4>
|
|
<p>Returns details for existing application user</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/users/1">https://localhost:8443/mifosng-provider/api/v1/users/1</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/users/1</code>
|
|
<code class="method-request">GET https://localhost:8443/mifosng-provider/api/v1/users/1</code>
|
|
<code class="method-response">
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"officeId": 1,
|
|
"officeName": "Demo MFI Head Office",
|
|
"username": "mifos",
|
|
"firstname": "App hello",
|
|
"lastname": "Administrator",
|
|
"email": "demomfi@mifos.org",
|
|
"allowedOffices": [
|
|
{
|
|
"id": 1,
|
|
"name": "Demo MFI Head Office",
|
|
"externalId": "1",
|
|
"openingDate": "2009-01-01",
|
|
"hierarchy": ".",
|
|
"parentName": null,
|
|
"parentId": 0,
|
|
"allowedParents": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "sub branch 1",
|
|
"externalId": "2",
|
|
"openingDate": "2012-01-02",
|
|
"hierarchy": ".2.",
|
|
"parentName": "Demo MFI Head Office",
|
|
"parentId": 1,
|
|
"allowedParents": []
|
|
}
|
|
],
|
|
"availableRoles": [
|
|
{
|
|
"id": 2,
|
|
"orgId": 1,
|
|
"name": "Field officer",
|
|
"description": "A field officer role allows the user to add client and loans and view reports but nothing else.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
}
|
|
],
|
|
"selectedRoles": [
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"name": "Super user",
|
|
"description": "This role provides all application permissions.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": [
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"name": "User administration ALL",
|
|
"description": "An application user will have permission to execute all tasks related to user administration.",
|
|
"code": "USER_ADMINISTRATION_SUPER_USER_ROLE",
|
|
"groupType": 1
|
|
},
|
|
{
|
|
"id": 4,
|
|
"orgId": 1,
|
|
"name": "Reporting ALL",
|
|
"description": "An application user will have permission to execute and view all reports.",
|
|
"code": "REPORTING_SUPER_USER_ROLE",
|
|
"groupType": 4
|
|
},
|
|
{
|
|
"id": 3,
|
|
"orgId": 1,
|
|
"name": "Portfolio management ALL",
|
|
"description": "An application user will have permission to execute all tasks related to portfolio management.",
|
|
"code": "PORTFOLIO_MANAGEMENT_SUPER_USER_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 2,
|
|
"orgId": 1,
|
|
"name": "Organisation adminsitration ALL",
|
|
"description": "An application user will have permission to execute all tasks related to organisation administration.",
|
|
"code": "ORGANISATION_ADMINISTRATION_SUPER_USER_ROLE",
|
|
"groupType": 2
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a id="users_create" name="users_create" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Create new user</h4>
|
|
<p>Adds new application user to the platform.</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/users</code>
|
|
<code class="method-request">POST https://localhost:8443/mifosng-provider/api/v1/users
|
|
Content-Type: application/json
|
|
Request body:
|
|
{
|
|
"officeId": 1,
|
|
"username": "newuser1",
|
|
"firstname": "Test",
|
|
"lastname": "User",
|
|
"email": "demomfi@mifos.org",
|
|
"selectedItems": ["1"]
|
|
}
|
|
</code>
|
|
<code class="method-response">
|
|
{
|
|
"entityId": 11
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="users_update" name="users_update" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Update existing user</h4>
|
|
<p>Update details of an existing application user.</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">PUT https://thedomainname/api/v1/users/11</code>
|
|
<code class="method-request">PUT https://localhost:8443/mifosng-provider/api/v1/users/11
|
|
Content-Type: application/json
|
|
Request body:
|
|
{
|
|
"officeId": 1,
|
|
"username": "newuser123",
|
|
"firstname": "Test",
|
|
"lastname": "User",
|
|
"email": "demomfi@mifos.org",
|
|
"selectedItems": ["1"]
|
|
}
|
|
</code>
|
|
<code class="method-response">
|
|
{
|
|
"entityId": 11
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="users_delete" name="users_delete" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Delete existing user</h4>
|
|
<p>Delete reference to application user on platform.</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">DELETE https://thedomainname/api/v1/users/11</code>
|
|
<code class="method-request">DELETE https://localhost:8443/mifosng-provider/api/v1/users/11
|
|
Content-Type: application/json
|
|
</code>
|
|
<code class="method-response">
|
|
{
|
|
"entityId": 11
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
<!-- end of users api docs -->
|
|
|
|
|
|
<!-- start of roles api docs -->
|
|
<a id="roles" name="users" class="old-syle-anchor"> </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"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve list of roles</h4>
|
|
<p>Returns all roles.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/roles">https://localhost:8443/mifosng-provider/api/v1/roles</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/roles</code>
|
|
<code class="method-request">GET https://localhost:8443/mifosng-provider/api/v1/roles</code>
|
|
<code class="method-response">
|
|
{
|
|
"roles": [
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"name": "Super user",
|
|
"description": "This role provides all application permissions.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
},
|
|
{
|
|
"id": 2,
|
|
"orgId": 1,
|
|
"name": "Field officer",
|
|
"description": "A field officer role allows the user to add client and loans and view reports but nothing else.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
},
|
|
{
|
|
"id": 3,
|
|
"orgId": 1,
|
|
"name": "Data Entry (Portfolio only)",
|
|
"description": "This role allows a user full permissions around client and loan functionality but nothing else.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
},
|
|
{
|
|
"id": 4,
|
|
"orgId": 1,
|
|
"name": "Credit Committe Member",
|
|
"description": "This role allows a user to approve reject or withdraw loans (with reporting).",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
},
|
|
{
|
|
"id": 5,
|
|
"orgId": 1,
|
|
"name": "Manager",
|
|
"description": "This role allows a manager to do anything related to portfolio management and also view all reports.",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
},
|
|
{
|
|
"id": 6,
|
|
"orgId": 1,
|
|
"name": "new role test",
|
|
"description": "test new role description...",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
},
|
|
{
|
|
"id": 7,
|
|
"orgId": 1,
|
|
"name": "new",
|
|
"description": "test",
|
|
"availablePermissions": [],
|
|
"selectedPermissions": []
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="roles_template" name="roles_template" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve new role template details</h4>
|
|
<p>Returns details for new role screen</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/roles/template">https://localhost:8443/mifosng-provider/api/v1/roles/template</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/roles/template</code>
|
|
<code class="method-request">GET https://localhost:8443/mifosng-provider/api/v1/roles/template</code>
|
|
<code class="method-response">
|
|
{
|
|
"id": null,
|
|
"orgId": null,
|
|
"name": null,
|
|
"description": null,
|
|
"availablePermissions": [
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"name": "User administration ALL",
|
|
"description": "An application user will have permission to execute all tasks related to user administration.",
|
|
"code": "USER_ADMINISTRATION_SUPER_USER_ROLE",
|
|
"groupType": 1
|
|
},
|
|
{
|
|
"id": 2,
|
|
"orgId": 1,
|
|
"name": "Organisation adminsitration ALL",
|
|
"description": "An application user will have permission to execute all tasks related to organisation administration.",
|
|
"code": "ORGANISATION_ADMINISTRATION_SUPER_USER_ROLE",
|
|
"groupType": 2
|
|
},
|
|
...
|
|
...
|
|
{
|
|
"id": 20,
|
|
"orgId": 1,
|
|
"name": "Can add a new client.",
|
|
"description": "Allows an application user to add a new client.",
|
|
"code": "CAN_ENROLL_NEW_CLIENT_ROLE",
|
|
"groupType": 3
|
|
}
|
|
],
|
|
"selectedPermissions": []
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="roles_retrieve" name="roles_retrieve" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve existing role details</h4>
|
|
<p>Returns details for existing application role</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/roles/1">https://localhost:8443/mifosng-provider/api/v1/roles/1</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/roles/1</code>
|
|
<code class="method-request">GET https://localhost:8443/mifosng-provider/api/v1/roles/1</code>
|
|
<code class="method-response">
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"name": "Super user",
|
|
"description": "This role provides all application permissions.",
|
|
"availablePermissions": [
|
|
{
|
|
"id": 5,
|
|
"orgId": 1,
|
|
"name": "Can submit new loan application",
|
|
"description": "Allows an application user to sumit new loan application.",
|
|
"code": "CAN_SUBMIT_NEW_LOAN_APPLICATION_ROLE",
|
|
"groupType": 3
|
|
},
|
|
...
|
|
...
|
|
{
|
|
"id": 19,
|
|
"orgId": 1,
|
|
"name": "Can enter a repayment against a loan in the past",
|
|
"description": "Allows an application user to enter a repayment on the loan where the repayment date is in the past.",
|
|
"code": "CAN_MAKE_LOAN_REPAYMENT_IN_THE_PAST_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 20,
|
|
"orgId": 1,
|
|
"name": "Can add a new client.",
|
|
"description": "Allows an application user to add a new client.",
|
|
"code": "CAN_ENROLL_NEW_CLIENT_ROLE",
|
|
"groupType": 3
|
|
}
|
|
],
|
|
"selectedPermissions": [
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"name": "User administration ALL",
|
|
"description": "An application user will have permission to execute all tasks related to user administration.",
|
|
"code": "USER_ADMINISTRATION_SUPER_USER_ROLE",
|
|
"groupType": 1
|
|
},
|
|
...
|
|
...
|
|
{
|
|
"id": 2,
|
|
"orgId": 1,
|
|
"name": "Organisation adminsitration ALL",
|
|
"description": "An application user will have permission to execute all tasks related to organisation administration.",
|
|
"code": "ORGANISATION_ADMINISTRATION_SUPER_USER_ROLE",
|
|
"groupType": 2
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="roles_create" name="roles_create" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Create new role</h4>
|
|
<p>Adds new application role to the platform.</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">POST https://thedomainname/api/v1/roles</code>
|
|
<code class="method-request">POST https://localhost:8443/mifosng-provider/api/v1/roles
|
|
Content-Type: application/json
|
|
Request body:
|
|
{
|
|
"name": "Some role name",
|
|
"description": "A description outlining the purpose of this role in relation to the application.",
|
|
"selectedItems": ["1", "2", "3"]
|
|
}
|
|
</code>
|
|
<code class="method-response">{
|
|
"entityId": 8
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
<a id="roles_update" name="roles_update" class="old-syle-anchor"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Update existing role</h4>
|
|
<p>Update details of an existing application role.</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">PUT https://thedomainname/api/v1/roles/8</code>
|
|
<code class="method-request">PUT https://localhost:8443/mifosng-provider/api/v1/roles/8
|
|
Content-Type: application/json
|
|
Request body:
|
|
{
|
|
"name": "Some role name update",
|
|
"description": "A description outlining the purpose of this role in relation to the application. [updated]",
|
|
"selectedItems": ["1", "2", "3", "4", "5"]
|
|
}
|
|
</code>
|
|
<code class="method-response">{
|
|
"entityId": 8
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- start of roles api docs -->
|
|
<a id="permissions" name="permissions" class="old-syle-anchor"> </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"> </a>
|
|
<div class="method-section">
|
|
<div class="method-description">
|
|
<h4>Retrieve list of permissions</h4>
|
|
<p>Returns all permissions.</p>
|
|
<p>Example Request:
|
|
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/permissions">https://localhost:8443/mifosng-provider/api/v1/permissions</a>
|
|
</p>
|
|
</div>
|
|
<div class="method-example">
|
|
<code class="method-declaration">GET https://thedomainname/api/v1/permissions</code>
|
|
<code class="method-request">GET https://localhost:8443/mifosng-provider/api/v1/permissions</code>
|
|
<code class="method-response">
|
|
{
|
|
"permissions": [
|
|
{
|
|
"id": 1,
|
|
"orgId": 1,
|
|
"name": "User administration ALL",
|
|
"description": "An application user will have permission to execute all tasks related to user administration.",
|
|
"code": "USER_ADMINISTRATION_SUPER_USER_ROLE",
|
|
"groupType": 1
|
|
},
|
|
{
|
|
"id": 2,
|
|
"orgId": 1,
|
|
"name": "Organisation adminsitration ALL",
|
|
"description": "An application user will have permission to execute all tasks related to organisation administration.",
|
|
"code": "ORGANISATION_ADMINISTRATION_SUPER_USER_ROLE",
|
|
"groupType": 2
|
|
},
|
|
{
|
|
"id": 3,
|
|
"orgId": 1,
|
|
"name": "Portfolio management ALL",
|
|
"description": "An application user will have permission to execute all tasks related to portfolio management.",
|
|
"code": "PORTFOLIO_MANAGEMENT_SUPER_USER_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 4,
|
|
"orgId": 1,
|
|
"name": "Reporting ALL",
|
|
"description": "An application user will have permission to execute and view all reports.",
|
|
"code": "REPORTING_SUPER_USER_ROLE",
|
|
"groupType": 4
|
|
},
|
|
{
|
|
"id": 5,
|
|
"orgId": 1,
|
|
"name": "Can submit new loan application",
|
|
"description": "Allows an application user to sumit new loan application.",
|
|
"code": "CAN_SUBMIT_NEW_LOAN_APPLICATION_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 6,
|
|
"orgId": 1,
|
|
"name": "Can submit historic loan application",
|
|
"description": "Allows an application user to sumit new loan application where the submitted on date is in the past.",
|
|
"code": "CAN_SUBMIT_HISTORIC_LOAN_APPLICATION_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 7,
|
|
"orgId": 1,
|
|
"name": "Can approve loan application",
|
|
"description": "Allows an application user to approve a loan application.",
|
|
"code": "CAN_APPROVE_LOAN_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 8,
|
|
"orgId": 1,
|
|
"name": "Can approve loan application in the past",
|
|
"description": "Allows an application user to approve a loan application where the approval date is in the past.",
|
|
"code": "CAN_APPROVE_LOAN_IN_THE_PAST_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 9,
|
|
"orgId": 1,
|
|
"name": "Can reject loan application",
|
|
"description": "Allows an application user to reject a loan application.",
|
|
"code": "CAN_REJECT_LOAN_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 10,
|
|
"orgId": 1,
|
|
"name": "Can reject loan application in the past",
|
|
"description": "Allows an application user to reject a loan application where the rejected date is in the past.",
|
|
"code": "CAN_REJECT_LOAN_IN_THE_PAST_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 11,
|
|
"orgId": 1,
|
|
"name": "Can withdraw loan application",
|
|
"description": "Allows an application user to mark loan application as withdrawn by client.",
|
|
"code": "CAN_WITHDRAW_LOAN_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 12,
|
|
"orgId": 1,
|
|
"name": "Can withdraw loan application in the past",
|
|
"description": "Allows an application user to mark loan application as withdrawn by client where the withdran on date is in the past.",
|
|
"code": "CAN_WITHDRAW_LOAN_IN_THE_PAST_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 13,
|
|
"orgId": 1,
|
|
"name": "Can delete submitted loan application",
|
|
"description": "Allows an application user to complete delete the loan application if it is submitted but not approved.",
|
|
"code": "CAN_DELETE_LOAN_THAT_IS_SUBMITTED_AND_NOT_APPROVED",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 14,
|
|
"orgId": 1,
|
|
"name": "Can undo loan approval",
|
|
"description": "Allows an application user to undo a loan approval.",
|
|
"code": "CAN_UNDO_LOAN_APPROVAL_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 15,
|
|
"orgId": 1,
|
|
"name": "Can disburse loan",
|
|
"description": "Allows an application user to disburse a loan application.",
|
|
"code": "CAN_DISBURSE_LOAN_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 16,
|
|
"orgId": 1,
|
|
"name": "Can disburse loan in the past",
|
|
"description": "Allows an application user to disburse a loan where the disbursement date is in the past.",
|
|
"code": "CAN_DISBURSE_LOAN_IN_THE_PAST_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 17,
|
|
"orgId": 1,
|
|
"name": "Can undo loan disbursal",
|
|
"description": "Allows an application user to undo a loan disbursal if not payments already made.",
|
|
"code": "CAN_UNDO_LOAN_DISBURSAL_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 18,
|
|
"orgId": 1,
|
|
"name": "Can enter a repayment against a loan",
|
|
"description": "Allows an application user to enter a repayment on the loan.",
|
|
"code": "CAN_MAKE_LOAN_REPAYMENT_LOAN_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 19,
|
|
"orgId": 1,
|
|
"name": "Can enter a repayment against a loan in the past",
|
|
"description": "Allows an application user to enter a repayment on the loan where the repayment date is in the past.",
|
|
"code": "CAN_MAKE_LOAN_REPAYMENT_IN_THE_PAST_ROLE",
|
|
"groupType": 3
|
|
},
|
|
{
|
|
"id": 20,
|
|
"orgId": 1,
|
|
"name": "Can add a new client.",
|
|
"description": "Allows an application user to add a new client.",
|
|
"code": "CAN_ENROLL_NEW_CLIENT_ROLE",
|
|
"groupType": 3
|
|
}
|
|
]
|
|
}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
|
|
</div> <!-- main-content-wrapper -->
|
|
</div>
|
|
|
|
</body>
|
|
</html> |