Apache Fineract API Documentation
Apache Fineract is a secure, multi-tenanted microfinance platform.
The goal of the Apache Fineract API is to empower developers to build apps on top of the Apache Fineract Platform. The reference app (username: mifos, password: password) works on the same demo 'tenant' as the interactive links in this documentation.
The API is organized around REST.
The API is designed to have:
- predictable,
resource-oriented URLs
- to use HTTP response codes to
indicate API errors
- to use built-in HTTP features, like
HTTP authentication and HTTP verbs, which can be understood by
off-the-shelf HTTP clients.
JSON is returned in all responses from the API, including errors.
Much of the API presentation and design ideas are owed to the excellent Apigee "Web API Design" eBook/PDF and the very good Stripe API reference.
Try The API From Your Browser
GET (read) examples can be run directly from this documentation. It is just a matter of clicking a link. Most browsers display the output on the same page (or another tab if you right click and select that option). Internet Explorer will probably treat the output as if you wanted to download a file. In that case just elect to open the output in a text editor.
If you want to check out the POST, PUT and DELETE (update) examples a good approach is to take a moment to install a REST plugin for your browser e.g. RESTClient for FireFox
The REST plugins will allow you to- Select the "Verb" (e.g. POST)
- Enter the resource name (e.g. offices)
- Add a header to indicate you are sending JSON data as part of the request body (Content-Type: application/json)
- Add a header to indicate your 'tenant' (X-Mifos-Platform-TenantId: default)
- Paste the example JSON into a Request Body
- Send the Request (and receive a Response)
Generic Options
Convenience Templates
There are a list of convenience resources (see Template menu option). These resources end with "/template" and can be useful when building maintenance user interface screens for client applications. The template data returned may consist of any or all of:
- Field Defaults
- Allowed Value Lists
Also, many "Retrieve a" type resources (Retrieve a Client for example) allow the parameter option "template=true". This appends any "Allowed Value Lists" which can be useful when building update functionality.
Restrict Returned Fields
Parameter "fields={fieldlist}" can be used on GET requests to restrict the fields returned.
Normal Request:
Request (restricting fields returned):
Pretty JSON Formatting
Parameter "pretty=true" can be used to display JSON from GET requests in an easy-to-read format. This parameter is used in this documentation.
Easy-to-read JSON output for POSTs, PUTs and DELETEs will available in the REST plugin you use e.g. RESTClient for FireFox
Normal Request (with pretty printing/formatting):
Creating and Updating
When you want to 'Create a ...' you have to at least supply the mandatory fields. The mandatory fields are listed in this documentation under the relevant 'Create a ...' heading.
When you want to 'Update a ...' you can update individual fields or a combination of fields (subject to data integrity rules).
Updating Dates and Numbers
Dates
Dates are returned in GET requests as an array e.g. [ 2007, 4, 11]. However, the API accepts them as strings in POST and PUT requests. If there are any dates in your POST or PUT requests, you need to provide the "locale" and "dateFormat". This can be any date pattern supported by Joda-Time. This capability can help you when saving data in your client application as you shouldn't need to do any date format conversion prior to issuing your POST or PUT request.
JSON examples:
{
"locale": "en_US",
"dateFormat": "dd MMMM yyyy",
"openingDate": "01 July 2007"
}
{
"locale": "en_US",
"dateFormat": "yyyy-MM-dd",
"openingDate": "2007-03-21"
}
Numbers
You must provide a "locale" when updating numbers. Numbers are not "Ids" or "Types" but are typically money amounts or percentages that relate to loans. In any case, the API will send back an error message if you forget.
JSON examples:
{
"locale": "en_US",
"principal": "240,400.88"
}
{
"locale": "fr_CH",
"principal": "240 400.88"
}
Field Descriptions
Most fields are self-explanatory. Fields that aren't are described under the relevant resource heading e.g. AUTHENTICATION
Authentication Overview
Authentication to the API can be configured to be supported via HTTP Basic Auth or OAuth2.
Default authentication is using HTTP Basic Auth. Oauth2 can be enabled by using -Psecurity=oauth option on gradle build command , refer the platform setup wiki for additional details.
The platform has been configured to reject plain HTTP requests and to expect all API requests to be made over HTTPS. All requests must be authenticated.
Authentication HTTP Basic
Authentication to the API occurs via HTTP Basic Auth.
// A Javascript/Jquery example of how to login to Apache Fineract and use its api.
// Typically, the javascript application would
// 1) Display a login page to retrieve the username and password.
// 2) Send the username and password to a function
// such as setBasicAuthKey below which sets the HTTP Basic Auth key.
// 3) The HTTP Basic Auth key is used in all subsequent requests
// (see the function executeAjaxRequest below).
function setBasicAuthKey(username, password) {
var jqxhr = $.ajax({
url : "authentication?username=" + username + "&password=" + password,
type : 'POST',
contentType : "application/json; charset=utf-8",
dataType : 'json',
data : "{}",
cache : false,
success : function(data, textStatus, jqXHR) {
basicAuthKey = data.base64EncodedAuthenticationKey;
},
error : function(jqXHR, textStatus, errorThrown) {
//error processing
}
});
}
function executeAjaxRequest(url, verbType, jsonData, basicAuthKey, successFunction, errorFunction) {
var jqxhr = $.ajax({
url : url,
type : verbType, //POST, GET, PUT or DELETE
contentType : "application/json; charset=utf-8",
dataType : 'json',
data : jsonData,
cache : false,
beforeSend : function(xhr) {
xhr.setRequestHeader("Authorization", "Basic " + basicAuthKey);
},
success : successFunction,
error : errorFunction
});
}
Authentication Oauth2
Authentication to the API occurs via OAuth2. 'Resource Owner Password Credentials Grant' type is used.
// A Javascript/Jquery example of how to login to Apache Fineract and use its api.
// Typically, the javascript application would
// 1) Display a login page to retrieve the username and password.
// 2) Send the username, password, client_id , grant_type and client_secret to a function
// such as getOauthToken below which sets the HTTP bearer Auth key.
// 3) The HTTP bearer Auth key is used in all subsequent requests
// (see the function executeAjaxRequest below).
function getOauthToken(username, password) {
var jqxhr = $.ajax({
url : "/fineract-provider/api/oauth/token?username=" + credentials.username + "&password=" + credentials.password +"&client_id=community-app&grant_type=password&client_secret=123,
type : 'POST',
contentType : "application/json; charset=utf-8",
dataType : 'json',
data : "{}",
cache : false,
success : function(data, textStatus, jqXHR) {
authKey = data.access_token;
},
error : function(jqXHR, textStatus, errorThrown) {
//error processing
}
});
}
function executeAjaxRequest(url, verbType, jsonData, authKey, successFunction, errorFunction) {
var jqxhr = $.ajax({
url : url,
type : verbType, //POST, GET, PUT or DELETE
contentType : "application/json; charset=utf-8",
dataType : 'json',
data : jsonData,
cache : false,
beforeSend : function(xhr) {
xhr.setRequestHeader("Authorization", "bearer " + authKey);
},
success : successFunction,
error : errorFunction
});
}
Batch API
The Apache Fineract Batch API enables a consumer to access significant amounts of data in a single call or to make changes to several objects at once. Batching allows a consumer to pass instructions for several operations in a single HTTP request. A consumer can also specify dependencies between related operations. Once all operations have been completed, a consolidated response will be passed back and the HTTP connection will be closed.
The Batch API takes in an array of logical HTTP requests represented as JSON arrays - each request has a requestId (the id of a request used to specify the sequence and as a dependency between requests), a method (corresponding to HTTP method GET/PUT/POST/DELETE etc.), a relativeUrl (the portion of the URL after https://example.org/api/v2/), optional headers array (corresponding to HTTP headers), optional reference parameter if a request is dependent on another request and an optional body (for POST and PUT requests). The Batch API returns an array of logical HTTP responses represented as JSON arrays - each response has a requestId, a status code, an optional headers array and an optional body (which is a JSON encoded string).
Batch API uses Json Path to handle dependent parameters. For example, if request '2' is referencing request '1' and in the "body" or in "relativeUrl" of request '2', there is a dependent parameter (which will look like "$.parameter_name"), then Batch API will internally substitute this dependent parameter from the response body of request '1'.
Batch API is able to handle deeply nested dependent requests as well nested parameters. As shown in the example, requests are dependent on each other as, 1<--2<--6, i.e a nested dependency, where request '6' is not directly dependent on request '1' but still it is one of the nested child of request '1'. In the same way Batch API could handle a deeply nested dependent value, such as {..[..{..,$.parameter_name,..}..]}.
POST https://DomainName/api/v1/batches
POST batches
Content-Type: application/json Request Body:
[
{
"requestId":1,
"relativeUrl":"clients",
"method":"POST",
"headers":[
{
"name":"Content-type",
"value":"text/html"
}
],
"body":"{
\"officeId\": 1,
\"firstname\": \"Petra\",
\"lastname\": \"Yton\",
\"externalId\": \"ex_externalId1\",
\"dateFormat\": \"dd MMMM yyyy\",
\"locale\": \"en\",
\"active\": true,
\"activationDate\": \"04 March 2009\",
\"submittedOnDate\": \"04 March 2009\"
}"
},
{
"requestId":2,
"relativeUrl":"loans",
"method":"POST",
"headers":[
{
"name":"Content-type",
"value":"text/html"
}
],
"reference":1,
"body":"{ \"dateFormat\": \"dd MMMM yyyy\",
\"locale\": \"en_GB\",
\"clientId\": \"$.clientId\",
\"productId\": 26,
\"principal\": \"10,000.00\",
\"loanTermFrequency\": 12,
\"loanTermFrequencyType\": 2,
\"loanType\": \"individual\",
\"numberOfRepayments\": 10,
\"repaymentEvery\": 1,
\"repaymentFrequencyType\": 2,
\"interestRatePerPeriod\": 10,
\"amortizationType\": 1,
\"interestType\": 0,
\"interestCalculationPeriodType\": 1,
\"transactionProcessingStrategyId\": 1,
\"expectedDisbursementDate\": \"10 Jun 2013\",
\"submittedOnDate\": \"10 Jun 2013\"
}"
},
{
"requestId":3,
"relativeUrl":"loans/$.loanId/charges",
"method":"POST",
"reference":2,
"headers":[
{
"name":"Content-type",
"value":"text/html"
}
],
"body":"{
\"chargeId\": \"2\",
\"locale\": \"en\",
\"amount\": \"100\",
\"dateFormat\": \"dd MMMM yyyy\",
\"dueDate\": \"29 April 2013\"
}"
},
{
"requestId":4,
"relativeUrl":"loans/$.loanId/charges",
"method":"GET",
"reference":2,
"headers":[
{
"name":"Content-type",
"value":"text/html"
}
],
"body":"{}"
}
]
[
{
"requestId":1,
"statusCode":200,
"headers":[
{
"name":"Content-type",
"value":"text/html"
},
{
"name":"X-Mifos-Platform-TenantId",
"value":"text/html"
}
],
"body":"{\"officeId\":1,\"clientId\":909,\"resourceId\":909}"
},
{
"requestId":2,
"statusCode":200,
"headers":[
{
"name":"Content-type",
"value":"text/html"
}
],
"body":"{\"officeId\":1,\"clientId\":909,\"loanId\":212,\"resourceId\":212}"
},
{
"requestId":3,
"statusCode":200,
"headers":[
{
"name":"Content-type",
"value":"text/html"
}
],
"body":"{\"officeId\":1,\"clientId\":909,\"loanId\":212,\"resourceId\":155}"
},
{
"requestId":4,
"statusCode":200,
"headers":[
{
"name":"Content-type",
"value":"text/html"
}
],
"body":"[
{
\"id\":155,
\"chargeId\":2,
\"name\":\"Charge_Loans_GEQJC5\",
\"chargeTimeType\":{
\"id\":1,
\"code\":\"chargeTimeType.disbursement\",
\"value\":\"Disbursement\"
},
\"chargeCalculationType\":{
\"id\":2,
\"code\":\"chargeCalculationType.percent.of.amount\",
\"value\":\"% Amount\"
},
\"percentage\":100.000000,
\"amountPercentageAppliedTo\":10000.000000,
\"currency\":{
\"code\":\"USD\",
\"name\":\"USDollar\",
\"decimalPlaces\":2,
\"displaySymbol\":\"$\",
\"nameCode\":\"currency.USD\",
\"displayLabel\":\"US Dollar ($)\"
},
\"amount\":10000.000000,
\"amountPaid\":0,
\"amountWaived\":0,
\"amountWrittenOff\":0,
\"amountOutstanding\":10000.000000,
\"amountOrPercentage\":100.000000,
\"penalty\":false,
\"chargePaymentMode\":{
\"id\":0,
\"code\":\"chargepaymentmode.regular\",
\"value\":\"Regular\"
},
\"paid\":false,
\"waived\":false,
\"chargePayable\":false
}
]"
}
]
Batch requests in a single transaction
The Apache Fineract Batch API is also capable of executing all the requests in a single transaction, by setting a Query Parameter, "enclosingTransaction=true". So, if one or more of the requests in a batch returns an erroneous response all of the Data base transactions made by other successful requests will be rolled back.
If there has been a rollback in a transaction then a single response will be provided, with a '400' status code and a body consisting of the error details of the first failed request.
POST https://DomainName/api/v1/batches?enclosingTransaction=true
POST batches
Content-Type: application/json Request Body:
[
{
"requestId":1,
"relativeUrl":"clients",
"method":"POST",
"headers":[
{
"name":"Content-type",
"value":"text/html"
},
{
"name":"X-Mifos-Platform-TenantId",
"value":"text/html"
}
],
"body":"{
\"officeId\": 1,
\"firstname\": \"Petra\",
\"lastname\": \"Yton\",
\"externalId\": \"externalId_4\",
\"dateFormat\": \"dd MMMM yyyy\",
\"locale\": \"en\", \"active\": true,
\"activationDate\": \"04 March 2009\",
\"submittedOnDate\": \"04 March 2009\"
}"
},
{
"requestId":2,
"relativeUrl":"savingsaccounts",
"method":"POST",
"reference":1,
"headers":[
{
"name":"Content-type",
"value":"text/html"
}
],
"body":"{
\"clientId\": \"$.clientId\",
\"productId\": 1,
\"locale\": \"en\",
\"dateFormat\": \"dd MMMM yyyy\",
\"submittedOnDate\": \"01 March 2011\"
}"
}
]
Successful transaction response:
[
{
"requestId":1,
"statusCode":200,
"headers":[
{
"name":"Content-type",
"value":"text/html"
},
{
"name":"X-Mifos-Platform-TenantId",
"value":"text/html"
}
],
"body":"{\"officeId\":1,\"clientId\":922,\"resourceId\":922}"
},
{
"requestId":2,
"statusCode":200,
"headers":[
{
"name":"Content-type",
"value":"text/html"
}
],
"body":"{\"officeId\":1,\"clientId\":922,\"savingsId\":116,\"resourceId\":116}"
}
]
Batch API Errors
In Batch API without "enclosingTransaction=true", if one of the response is erroneous, then an appropriate status code will be set for that request and the error message will be returned in it's "body", while all other requests will return successful response with a status code of "200".
Available Command Strategies
These are the currently available command strategies within the Mifos Batch API. So, these listed operations can be executed using a Batch Request.
Errors
All errors are returned in JSON.
HTTP Status Code Summary
- 200 OK - Everything Worked.
- 400 Bad Request - Invalid Parameter or Data Integrity Issue.
- 401 Authentication Error.
- 403 Unauthorized Request.
- 404 Resource Not Found
- 500 Platform Internal Server Error.
Error Message returned when attempting to create an Office without passing any parameters
{
"developerMessage": "The request was invalid. This typically will happen due to validation errors which are provided.",
"developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes",
"httpStatusCode": "400",
"defaultUserMessage": "Validation errors exist.",
"userMessageGlobalisationCode": "validation.msg.validation.errors.exist",
"errors": [
{
"developerMessage": "The parameter name cannot be blank.",
"defaultUserMessage": "The parameter name cannot be blank.",
"userMessageGlobalisationCode": "validation.msg.office.name.cannot.be.blank",
"parameterName": "name",
"value": null,
"args": []
},
{
"developerMessage": "The parameter openingDate cannot be blank.",
"defaultUserMessage": "The parameter openingDate cannot be blank.",
"userMessageGlobalisationCode": "validation.msg.office.openingDate.cannot.be.blank",
"parameterName": "openingDate", "value": null, "args": []
},
{
"developerMessage": "The parameter parentId cannot be blank.",
"defaultUserMessage": "The parameter parentId cannot be blank.",
"userMessageGlobalisationCode":
"validation.msg.office.parentId.cannot.be.blank", "parameterName":
"parentId", "value": null, "args": []
}
]
}
Self Service API Overview
Self Service APIs are a set of APIs with restricted data scope. Functional specifications and design can be viewed here.
While creating an user, user can be tagged as self service user. Also you can associate clients that this user has access to. Data scope is restricted to these linked clients.
A self service user shall have access to only self service APIs. Self service APIs cannot be accessed by non-self service user. Vice-versa is also true.
Clients
Clients are people and businesses that have applied (or may apply) to an MFI for loans.
Clients can be created in Pending or straight into Active state.
Field Descriptions |
accountNo |
If provided during client creation, its value is set as account no. for client account, otherwise an auto generated account no. is put in place based on the configured strategy. |
externalId |
A place to put an external reference for
this client e.g. The ID another system uses. If provided, it must be unique. |
active |
Indicates whether this client is to be created as active client. If active=true, then activationDate must be provided. If active=false, then the client is created as pending. |
activationDate |
The date on which the client became active. |
firstname |
Facility to break up name into parts suitable for humans. |
middlename |
Facility to break up name into parts suitable for humans. |
lastname |
Facility to break up name into parts suitable for humans. |
fullname |
Facility to set name of a client or business that doesn't suit the firstname,middlename,lastname structure. |
mobileNo |
Optional: unique mobile number that is used by SMS or Mobile Money functionality. |
staffId |
The staffId of the staff member dealing with the client office. The staff member is not specifically the loan officer. |
savingsProductId |
Optional: Default overdraft savings account of client |
datatables |
Facility to enrich client details. |
Retrieve Client Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Arguments
- officeId
- Integer optional
- staffInSelectedOfficeOnly
- Boolean optional
- Defaults to false if not provided. If staffInSelectedOfficeOnly=true only staff who are associated with the selected branch are returned.
- commandParam
- String optional
- If commandParam=close retrieves all closureReasons which are associated with "ClientClosureReason" value.
Example Request:
GET https://DomainName/api/v1/clients/template
{
"activationDate":[2014,3,4],
"officeId":1,
"officeOptions":[{
"id":1,
"name":"Head Office",
"nameDecorated":"Head Office"
}],
"staffOptions":[{
"id":1,
"firstname":"xyz",
"lastname":"sjs",
"displayName":"sjs, xyz",
"officeId":1,
"officeName":"Head Office",
"isLoanOfficer":true,
"isActive":true
}],
"savingProductOptions":[{
"id":4,
"name":"account overdraft",
"withdrawalFeeForTransfers":false,
"allowOverdraft":false
}],
"datatables": [{
"applicationTableName": "m_client",
"registeredTableName": "Address Details",
"columnHeaderData": [{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "State",
"columnType": "varchar",
"columnLength": 25,
"columnDisplayType": "STRING",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "COUNTRY_cd_Country",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": [{
"id": 17,
"value": "India",
"score": 0
}],
"columnCode": "COUNTRY"
}]
},
{
"applicationTableName": "m_client",
"registeredTableName": "Client Timeline",
"columnHeaderData": [{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Approval Data",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}]
}]
}
GET https://DomainName/api/v1/clients/template
{
"activationDate":[2014,3,4],
"officeId":1,
"officeOptions":[{
"id":1,
"name":"Head Office",
"nameDecorated":"Head Office"
}],
"staffOptions":[{
"id":1,
"firstname":"xyz",
"lastname":"sjs",
"displayName":"sjs, xyz",
"officeId":1,
"officeName":"Head Office",
"isLoanOfficer":true,
"isActive":true
}],
"savingProductOptions":[{
"id":4,
"name":"account overdraft",
"withdrawalFeeForTransfers":false,
"allowOverdraft":false
}],
"datatables": [{
"applicationTableName": "m_client",
"registeredTableName": "Address Details",
"columnHeaderData": [{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "State",
"columnType": "varchar",
"columnLength": 25,
"columnDisplayType": "STRING",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "COUNTRY_cd_Country",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": [{
"id": 17,
"value": "India",
"score": 0
}],
"columnCode": "COUNTRY"
}]
},
{
"applicationTableName": "m_client",
"registeredTableName": "Client Timeline",
"columnHeaderData": [{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Approval Data",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}]
}]
}
if address is enabled
GET https://DomainName/api/v1/clients/template
{
"activationDate":
[
2016,
8,
11
],
"officeId": 1,
"officeOptions":
[
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"savingProductOptions":
[
],
"genderOptions":
[
{
"id": 748,
"name": "Female",
"position": 1,
"isActive": true
},
{
"id": 749,
"name": "Male",
"position": 2,
"isActive": true
}
],
"clientTypeOptions":
[
{
"id": 761,
"name": "JLG",
"position": 1,
"description": "",
"isActive": true
},
{
"id": 760,
"name": "individual",
"position": 2,
"description": "",
"isActive": true
}
],
"clientClassificationOptions":
[
],
"clientNonPersonConstitutionOptions":
[
],
"clientNonPersonMainBusinessLineOptions":
[
],
"clientLegalFormOptions":
[
{
"id": 1,
"code": "legalFormType.person",
"value": "PERSON"
},
{
"id": 2,
"code": "legalFormType.entity",
"value": "ENTITY"
}
],
"address":
{
"countryIdOptions":
[
{
"id": 802,
"name": "INDIA",
"position": 1,
"isActive": true
},
{
"id": 803,
"name": "BANGLADESH",
"position": 2,
"isActive": true
},
{
"id": 807,
"name": "UNITED STATES",
"position": 3,
"isActive": true
}
],
"stateProvinceIdOptions":
[
{
"id": 800,
"name": "MAHARASHTRA",
"position": 1,
"isActive": true
},
{
"id": 801,
"name": "GUJRAT",
"position": 2,
"isActive": true
}
],
"addressTypeIdOptions":
[
{
"id": 804,
"name": "PERMANENT ADDRESS",
"position": 1,
"isActive": true
},
{
"id": 805,
"name": "OFFICE ADDRESS",
"position": 2,
"isActive": true
},
{
"id": 806,
"name": "CURRENT ADDRESS",
"position": 3,
"isActive": true
}
]
},
"isAddressEnabled": true
},
"datatables": [{
"applicationTableName": "m_client",
"registeredTableName": "Address Details",
"columnHeaderData": [{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "State",
"columnType": "varchar",
"columnLength": 25,
"columnDisplayType": "STRING",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "COUNTRY_cd_Country",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": [{
"id": 17,
"value": "India",
"score": 0
}],
"columnCode": "COUNTRY"
}]
},
{
"applicationTableName": "m_client",
"registeredTableName": "Client Timeline",
"columnHeaderData": [{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Approval Data",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}]
}]
Create a Client
Note:1. You can enter either:
firstname/middlename/lastname - for a person (middlename is
optional) OR
fullname - for a business or organisation
(or person known by one name).
2.If address is enable(enable-address=true), then additional field
called address has to be passed
Mandatory Fields |
firstname and lastname OR fullname, officeId, active=true and activationDate OR active=false, if(address enabled) address |
Optional Fields |
groupId, externalId, accountNo, staffId, mobileNo, savingsProductId, genderId, clientTypeId, clientClassificationId |
POST https://DomainName/api/v1/clients
POST clients
Content-Type: application/json Request Body:
{
"officeId": 1,
"firstname": "Petra",
"lastname": "Yton",
"externalId": "786YYH7",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"active": true,
"activationDate": "04 March 2009",
"submittedOnDate":"04 March 2009",
"savingsProductId" : 4,
"datatables": [{
"registeredTableName": "Family Details",
"data": {
"locale": "en",
"Number of members": "5",
"Number of dependents": "3",
"No of Children": "2",
"Date of verification": "14 December 2016",
"dateFormat": "dd MMMM yyyy"
}
},
{
"registeredTableName": "Residency Address",
"data": {
"locale": "en",
"Address Line": "Basavana Gudi Road",
"Street": "Gandhi Bazaar",
"Landmark": "Aashrama",
"COUNTRY_cd_Country": 17,
"STATE_cd_State": "7",
"DISTRICT_cd_District": "13",
"Pincode": "560040"
}
}]
}
{
"officeId": 1,
"clientId": 1,
"resourceId": 1,
"savingsId": 10
}
if address is enabled
POST https://DomainName/api/v1/clients
POST clients
Content-Type: application/json Request Body:
{
"firstname": "Petra",
"lastname": "Yton",
"externalId": "786YYH7",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"active": true,
"activationDate": "04 March 2009",
"submittedOnDate":"04 March 2009",
"officeId":1,
"address":[
{
"addressTypeId": 805,
"isActive": true,
"street": "rapchik",
"stateProvinceId": 800,
"countryId": 802
}
]
}
{
"officeId": 1,
"clientId": 1,
"resourceId": 1,
"savingsId": 10
}
POST clients
Content-Type: application/json
Request Body:
{
"officeId": 1,
"fullname": "Client of group",
"groupId": 1,
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"active": true,
"activationDate": "04 March 2009"
}
{
"officeId": 1,
"groupId": 1,
"clientId": 2,
"resourceId": 2
}
Activate a Client
Clients can be created in a Pending state. This API exists to enable client activation (for when a client becomes an approved member of the financial Institution).
If the client happens to be already active this API will result in an error.
POST https://Domain Name/api/v1/clients/{clientId}?command=activate
POST clients/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activationDate": "01 March 2011"
}
{
"officeId": 1,
"clientId": 1,
"resourceId": 1
}
Close a Client
Clients can be closed if they do not have any non-closed loans/savingsAccount. This API exists to close a client .
If the client have any active loans/savingsAccount this API will result in an error.
POST https://Domain Name/api/v1/clients/{clientId}?command=close
POST clients/1?command=close
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closureDate":"25 June 2013",
"closureReasonId":"11"
}
{
"clientId":15,
"resourceId":15
}
Reject a Client
Clients can be rejected when client is in pending for activation status.
If the client is any other status, this API throws an error.
Mandatory Fields |
rejectionDate, rejectionReasonId |
POST https://Domain Name/api/v1/clients/{clientId}?command=reject
POST clients/1?command=reject
Content-Type: application/json
Request Body:
{
"rejectionDate":"28 November 2014",
"rejectionReasonId":16,
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"clientId":15,
"resourceId":15
}
Withdraw a Client
Client applications can be withdrawn when client is in a pending for activation status.
If the client is any other status, this API throws an error.
Mandatory Fields |
withdrawalDate, withdrawalReasonId |
POST https://Domain Name/api/v1/clients/{clientId}?command=withdraw
POST clients/1?command=withdraw
Content-Type: application/json
Request Body:
{
"withdrawalDate":"28 November 2014",
"withdrawalReasonId":17,
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"officeId":1,
"clientId":15,
"resourceId":15
}
Reactivate a Client
Clients can be reactivated after they have been closed.
Trying to reactivate a client in any other state throws an error.
Mandatory Fields |
reactivationDate |
POST https://Domain Name/api/v1/clients/{clientId}?command=reactivate
POST clients/1?command=reactivate
Content-Type: application/json
Request Body:
{
"reactivationDate":"28 November 2014",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"clientId":15,
"resourceId":15
}
UndoReject a Client
Clients can be reactivated after they have been rejected.
Trying to reactivate a client in any other state throws an error.
Mandatory Fields |
reopenedDate |
POST https://Domain Name/api/v1/clients/{clientId}?command=UndoRejection
POST clients/1?command=UndoRejection
Content-Type: application/json
Request Body:
{
"reopenedDate":"28 November 2014",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"clientId":15,
"resourceId":15
}
UndoWithdraw a Client
Clients can be reactivated after they have been withdrawn.
Trying to reactivate a client in any other state throws an error.
Mandatory Fields |
reopenedDate |
POST https://Domain Name/api/v1/clients/{clientId}?command=UndoWithdrawal
POST clients/1?command=UndoWithdrawal
Content-Type: application/json
Request Body:
{
"reopenedDate":"28 November 2014",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"clientId":15,
"resourceId":15
}
Assign a Staff
Allows you to assign a Staff for existed Client.
The selected Staff should belong to the same office (or an officer higher up in the hierarchy) as the Client he manages.
POST https://Domain Name/api/v1/clients/{clientId}?command=assignStaff
POST clients/1?command=assignStaff
Content-Type: application/json
Request Body:
{
"staffId": "1"
}
{
"officeId": 1,
"clientId": 1,
"resourceId": 1,
"changes": {"staffId":1}
}
Unassign a Staff
Allows you to unassign the Staff assigned to a Client.
POST https://Domain Name/api/v1/clients/{clientId}?command=unassignStaff
POST clients/1?command=unassignStaff
Content-Type: application/json
Request Body:
{
"staffId":"1"
}
{
"officeId": 1,
"clientId": 1,
"resourceId": 1,
"changes": {"staffId":1}
}
Update Default Savings Account
Allows you to modify or assign a default savings account for an existing Client.
The selected savings account should be one among the existing savings account for a particular customer.
POST https://Domain Name/api/v1/clients/{clientId}?command=updateSavingsAccount
POST clients/1?command=updateSavingsAccount
Content-Type: application/json
Request Body:
{
"savingsAccountId": "22"
}
{
"officeId":1,
"clientId":1,
"resourceId":1
,"changes":{
"savingsAccountId":22
}
}
Propose a Client Transfer
Allows you to propose the transfer of a Client to a different Office.
POST https://Domain Name/api/v1/clients/{clientId}?command=proposeTransfer
POST clients/1?command=proposeTransfer
Content-Type: application/json
Request Body:
{
"destinationOfficeId":"2",
"note":"Client Relocating to Bangalore"
}
{
"clientId": 2,
"resourceId": 2
}
Withdraw a Client Transfer
Allows you to withdraw the proposed transfer of a Client to a different Office.
Withdrawal can happen only if the destination Branch (to which the transfer was proposed) has not already accepted the transfer proposal
POST https://Domain Name/api/v1/clients/{clientId}?command=withdrawTransfer
POST clients/1?command=withdrawTransfer
Content-Type: application/json
Request Body:
{
"note":"Sorry, data entry error"
}
{
"clientId": 2,
"resourceId": 2
}
Reject a Client Transfer
Allows the Destination Branch to reject the proposed Client Transfer.
POST https://Domain Name/api/v1/clients/{clientId}?command=rejectTransfer
POST clients/1?command=rejectTransfer
Content-Type: application/json
Request Body:
{
"note":"We cannot accept tranfers of clients having loans with less than 1 repayment left"
}
{
"clientId": 2,
"resourceId": 2
}
Accept a Client Transfer
Allows the Destination Branch to accept the proposed Client Transfer.
The destination branch may also choose to link this client to a group (in which case, any existing active JLG loan of the client is rescheduled to match the meeting frequency of the group) and loan Officer at the time of accepting the transfer
POST https://Domain Name/api/v1/clients/{clientId}?command=acceptTransfer
POST clients/1?command=acceptTransfer
Content-Type: application/json
Request Body:
{
"destinationGroupId":"13",
"staffId":"1",
"note":"Due Diligence done and all documents received"
}
{
"clientId": 2,
"resourceId": 2
}
Propose and Accept a Client Transfer
Abstraction over the Propose and Accept Client Transfer API's which enable a user with Data Scope over both the Target and Destination Branches to directly transfer a Client to the destination Office.
POST https://Domain Name/api/v1/clients/{clientId}?command=proposeAndAcceptTransfer
POST clients/1?command=proposeTransfer
Content-Type: application/json
Request Body:
{
"destinationOfficeId":"2",
"destinationGroupId":"13",
"staffId":"1",
"note":"Client Relocating to Bangalore"
}
{
"clientId": 2,
"resourceId": 2
}
Retrieve a Client
Example Requests:
GET https://DomainName/api/v1/clients/{clientId}
{
"id": 27,
"accountNo": "000000027",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2013,
1,
1
],
"firstname": "savings",
"lastname": "test",
"displayName": "savings test",
"officeId": 1,
"officeName": "Head Office",
"timeline": {
"submittedOnDate": [
2013,
1,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"activatedOnDate": [
2013,
1,
1
],
"activatedByUsername": "mifos",
"activatedByFirstname": "App",
"activatedByLastname": "Administrator"
},
"savingsProductId": 4,
"savingsProductName": "account overdraft",
"groups": []
}
List Clients
The list capability of clients can support pagination and sorting.
Optional Arguments
- offset
- Integer optional, defaults to 0
- Indicates the result from which pagination starts
- limit
- Integer optional, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- orderBy
- String optional, one of displayName, accountNo, officeId, officeName
- Orders results by the indicated field.
- sortBy
- String optional, one of ASC, DESC
- Indicates what way to order results if orderBy is used.
- officeId
- Integer optional
- Provides the ability to restrict list of clients returned based on the office they are associated with.
- underHierarchy
- String optional
- Use the office hierarchy string to return all clients under a given hierarchy.
- displayName
- String optional
- Use displayName of clients to restrict results.
- firstName
- String optional
- Use firstName of clients to restrict results.
- lastName
- String optional
- Use lastName of clients to restrict results.
- externalId
- String optional
- Use externalId of clients to restrict results.
- sqlSearch
- String optional
- Use an sql fragment valid for the underlying client schema to filter results. e.g. display_name like %K%
- orphansOnly
- Boolean optional, defaults to false
- Use orphansOnly as true to list clients which are not associated to any group/parent.
Example Requests:
GET https://DomainName/api/v1/clients
{
"totalFilteredRecords": 2,
"pageItems": [
{
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2013,
3,
1
],
"fullname": "Small shop",
"displayName": "Small shop",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 2,
"accountNo": "000000002",
"status": {
"id": 100,
"code": "clientStatusType.pending",
"value": "Pending"
},
"active": false,
"fullname": "Home Farm Produce",
"displayName": "Home Farm Produce",
"officeId": 1,
"officeName": "Head Office"
}
]
}
Update a Client
Note:You can update any of the basic attributes of a client (but not its associations) using this API.
Changing the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same.
The relationship between a client and a group must be removed through the Groups API.
PUT https://DomainName/api/v1/clients/{clientId}
PUT clients/1
Content-Type: application/json
Request Body:
{
"externalId": "786444UUUYYH7"
}
{
"officeId": 1,
"clientId": 1,
"resourceId": 1,
"changes": {
"externalId": "786444UUUYYH7"
}
}
Delete a Client
If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.
DELETE https://DomainName/api/v1/clients/{clientId}
DELETE clients/3
Content-Type: application/json
Request Body:
{
}
{
"officeId": 1,
"clientId": 3,
"resourceId": 3
}
Retrieve client accounts overview
An example of how a loan portfolio summary can be provided. This
is requested in a specific use case of the community application.
It is quite reasonable to add resources like this to simplify User Interface development.
Example Requests:
GET https://DomainName/api/v1/clients/{clientId}/accounts
{
"loanAccounts": [
{
"id": 1,
"accountNo": "000000001",
"externalId": "456",
"productId": 1,
"productName": "TestOne",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"loanType": {
"id": 1,
"code": "loanType.individual",
"value": "Individual"
},
"loanCycle": 1
}
],
"savingsAccounts": [
{
"id": 7,
"accountNo": "000000007",
"productId": 2,
"productName": "Other product",
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 6,
"accountNo": "000000006",
"productId": 1,
"productName": "Passbook Savings",
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 1828.03
},
{
"id": 5,
"accountNo": "000000005",
"productId": 1,
"productName": "Passbook Savings",
"status": {
"id": 400,
"code": "savingsAccountStatusType.withdrawn.by.applicant",
"value": "Withdrawn by applicant",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": true,
"active": false,
"closed": true
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
]
}
Entity Field Configuration
Entity Field configuration API is a generic and extensible
wherein various entities and subentities can be related.
Also it gives the user an ability to enable/disable fields,
add regular expression for validation
Field Descriptions |
entity |
Entity to which relationship is to be established |
subentity |
Entity which uses/relies on other entity for addional description |
field |
Field of the Enity which is to be configured |
validation_regex |
Regular expression for validating field's data |
is_enabled |
This is used to enable/disable field |
is_mandatory |
This is used to make field mandatory |
GET https://DomainName/api/v1/fieldconfiguration/{entity}
[
{
"fieldConfigurationId": 1,
"entity": "ADDRESS",
"subentity": "CLIENT",
"field": "addressType",
"is_enabled": true,
"is_mandatory": false,
"validation_regex": ""
},
{
"fieldConfigurationId": 2,
"entity": "ADDRESS",
"subentity": "CLIENT",
"field": "street",
"is_enabled": true,
"is_mandatory": true,
"validation_regex": ""
},
{
"fieldConfigurationId": 3,
"entity": "ADDRESS",
"subentity": "CLIENT",
"field": "addressLine1",
"is_enabled": true,
"is_mandatory": false,
"validation_regex": ""
},
{
"fieldConfigurationId": 4,
"entity": "ADDRESS",
"subentity": "CLIENT",
"field": "addressLine2",
"is_enabled": true,
"is_mandatory": false,
"validation_regex": ""
},
{
"fieldConfigurationId": 5,
"entity": "ADDRESS",
"subentity": "CLIENT",
"field": "addressLine3",
"is_enabled": true,
"is_mandatory": false,
"validation_regex": ""
}
]
Client Address
Address module is an optional module and can be configured
into the system by using GlobalConfiguration setting: enable-address.
In order to activate Address module, we need to enable the configuration,
enable-address by setting its value to true.
Field Descriptions |
addressTypeId |
Address module has the ability to store multiple types of address of clients.addressTypeId is basically a code whose value are used to store the different types of addresses. |
street,addressLine1,addressLine2,addressLine3,townVillage,city, countyDistrict,stateProvinceId, countryId,postalCode,latitude,longitude,createdBy,createdOn, updatedBy,updatedOn |
The above are the fields of address which are configurable using settings stored for each field in m_field_configuration table. |
List all addresses for a Client
Example Requests:
GET https://DomainName/api/v1/client/{clientid}/addresses
[
{
"client_id": 111755,
"addressType": "PERMANENT ADDRESS",
"addressId": 14,
"addressTypeId": 804,
"isActive": false,
"street": "anki's home",
"addressLine1": "test123",
"addressLine2": "iuyt",
"addressLine3": "",
"townVillage": "",
"city": "mumbai",
"countyDistrict": "",
"stateProvinceId": 801,
"countryName": "UNITED STATES",
"stateName": "GUJRAT",
"countryId": 807,
"postalCode": "400095",
"createdBy": "",
"updatedBy": ""
},
{
"client_id": 111755,
"addressType": "PERMANENT ADDRESS",
"addressId": 17,
"addressTypeId": 804,
"isActive": false,
"street": "anki's home",
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"townVillage": "",
"city": "",
"countyDistrict": "",
"stateProvinceId": 800,
"countryName": "INDIA",
"stateName": "MAHARASHTRA",
"countryId": 802,
"postalCode": "",
"createdBy": "",
"updatedBy": ""
},
{
"client_id": 111755,
"addressType": "OFFICE ADDRESS",
"addressId": 18,
"addressTypeId": 805,
"isActive": false,
"street": "anki's office",
"addressLine1": "",
"addressLine2": "",
"addressLine3": "",
"townVillage": "",
"city": "",
"countyDistrict": "",
"stateProvinceId": 0,
"countryId": 0,
"postalCode": "",
"createdBy": "",
"updatedBy": ""
}
]
GET https://DomainName/api/v1/client/{clientid}/addresses?type=804&&status=false
[
{
"client_id": 111755,
"addressType": "PERMANENT ADDRESS",
"addressId": 14,
"addressTypeId": 804,
"isActive": false,
"street": "anki's home",
"addressLine1": "test123",
"addressLine2": "iuyt",
"addressLine3": "",
"townVillage": "",
"city": "mumbai",
"countyDistrict": "",
"stateProvinceId": 801,
"countryName": "UNITED STATES",
"stateName": "GUJRAT",
"countryId": 807,
"postalCode": "400095",
"createdBy": "",
"updatedBy": ""
}
}
]
Create an address for a Client
Mandatory Fields |
type and clientId |
POST https://DomainName/api/v1/client/{clientId}/addresses?type={addressTypeId}
POST client/1/address?type=805
Content-Type: application/json Request Body:
{
"street":"Ipca",
"addressLine1":"Kandivali",
"addressLine2":"plot47",
"addressLine3":"charkop",
"city":"Mumbai",
"stateProvinceId":800,
"countryId":802,
"postalCode":"400064"
}
{
"resourceId":15
}
update an address for a Client
All the address fields can be updated by using update client address API
Mandatory Fields |
type and addressId |
PUT https://DomainName/api/v1/client/{clientId}/addresses?type={addressTypeId}
POST client/1/addresses?type=805
Content-Type: application/json Request Body:
{
"addressId":67,
"street":"goldensource"
}
{
"resourceId":67
}
Client Identifiers
Client Identifiers refer to documents that are
used to uniquely identify a customer
Ex: Drivers License, Passport, Ration card etc
Field Descriptions |
documentKey |
Number/String used to uniquely identify a particular document (Driving License number for a driving license etc) |
documentType |
Type of the identification document (License, Passport Etc) |
description |
Any user comments to be associated with the Client Identifier |
List all Identifiers for a Client
Example Requests:
GET https://DomainName/api/v1/clients/{clientId}/identifiers
[
{
"id": 2,
"clientId": 1,
"documentType": {
"id": 3,
"name": "Drivers License"
},
"documentKey": "12345",
"description": "Issued in the year 2--7"
}
]
Retrieve Client Identifier Details Template
This is a convenience resource useful for building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/clients/{clientId}/identifiers/template
{
"allowedDocumentTypes": [
{
"id": 1,
"name": "Passport",
"position": 0
},
{
"id": 2,
"name": "Id",
"position": 0
},
{
"id": 3,
"name": "Drivers License",
"position": 0
},
{
"id": 4,
"name": "Any Other Id Type",
"position": 0
}
]
}
Retrieve a Client Identifier
Example Requests:
GET https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId}
{
"id": 2,
"clientId": 1,
"documentType": {
"id": 3,
"name": "Drivers License"
},
"documentKey": "12345",
"description": "Issued in 2007"
}
Create an Identifier for a Client
Mandatory Fields |
documentKey, documentTypeId |
POST https://DomainName/api/v1/clients/{clientId}/identifiers
POST clients/1/identifiers
Content-Type: application/json
Request Body:
{
"documentTypeId":"1",
"documentKey":"KA-54677",
"description":"Document has been verified"
}
{
"officeId": 1,
"clientId": 1,
"resourceId": 3
}
Update a Client Identifier
PUT https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId}
PUT clients/1/identifiers/3
Content-Type: application/json
Request Body:
{
"documentTypeId":"4",
"documentKey":"KA-94667",
"description":"Document has been updated"
}
{
"officeId": 1,
"clientId": 1,
"resourceId": 3,
"changes": {
"documentTypeId": 4,
"documentKey": "KA-94667",
"description": "Document has been updated"
}
}
Delete a Client Identifier
DELETE https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId}
DELETE clients/1/identifiers/3
Content-Type: application/json
No Request Body:
{
"officeId": 1,
"clientId": 1,
"resourceId": 3
}
Images
The current API provides support for the addition of a single
image for entities like Client (URL pattern /clients) and Staff (URL pattern /staff)
Allowed formats: JPEG (.jpg or .jpeg), GIF (.gif) and PNG (.png)
The API supports two different Approaches for manipulating Images
- Data URI's: For easier manipulation by Javascript clients etc in supported Browsers.
- Multi-part form data: Images can be uploaded using Multi part forms and downloaded as regular binary files
Get Entity Image (DATA URI)
Optional arguments are identical to those of Get Image associated with an Entity (Binary file)
Example Requests:
GET https://DomainName/api/v1/clients/{clientId}/images
Accept: text/plain
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
bWFnZVJlYWR5ccllPAAAAJ1JREFUeNpi+P//PwMIA4E9EG8E4idQDGLbw+WhiiqA+D8OXAFVAzbp
DxBvB2JLIGaGYkuoGEjOhhFIHAbij0BdPgxYACMj42ogJQpifwBiXSDeC8JIbt4LxSC5DyxQjTeB
+BeaYb+Q5EBOAVutCzMJHUNNPADzzDokiYdAfAmJvwLkGeTgWQfyKZICS6hYBTwc0QL8ORSjBDhA
gAEAOg13B6R/SAgAAAAASUVORK5CYII=
Get Image associated with an Entity (Binary file)
Optional Arguments
- output
- String optional one of octet or inline_octet
- The query parameter overrides the "Accept" Header and sets the Media Type to "application/octet-stream"
octet : Returns the image binary file as an attachment. The Content-Disposition header is set to attachment;filename=somefile.ext
inline_octet :The Content-Disposition header is set to inline;filename=somefile.ext - maxWidth
- Integer optional
- Triggers resizing of the image to the defined width
- maxHeight
-
- Integer optional
- Triggers resizing of the image to the defined height
GET https://DomainName/api/v1/clients/{clientId}/images
Accept: application/octet-stream
GET clients/1/images
Accept: application/octet-stream
Not shown: The corresponding binary (image) file
Upload an Image for an Entity (Data URI)
POST https://DomainName/api/v1/clients/{clientId}/images
POST clients/1/images
Content-Type: text/plain
Request Body:
data:image/png;base64,iVBORw0KGgoAA
AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l
EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6
P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
Upload an Image for an Entity (Multi-part Form data)
Mandatory Fields |
file |
The form should contain a required named body part with the
name "file".
If you are using a HTML form, a snippet like
<input type="file" name="file"></input>
can be used for uploading the image file
POST https://DomainName/api/v1/clients/{clientId}/images
POST clients/1/images
Content-Type: multipart/form-data
Request Body: Not shown
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
Update a Image associated with an Entity (Data URI)
PUT https://DomainName/api/v1/clients/{clientId}/images
PUT clients/1/images
Content-Type: text/plain
Request Body:
data:image/png;base64,iVBORw0KGgoAA
AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l
EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6
P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
Update an Entity's Image (Multi-part Form data)
Mandatory Fields |
file |
The form should contain a required named body part with the
name "file".
If you are using a HTML form, a snippet like
<input type="file" name="file"></input>
can be used for uploading the image file
PUT https://DomainName/api/v1/clients/{clientId}/images
PUT clients/1/images
Content-Type: multipart/form-data
Request Body: Not shown
Delete an Entity's Image
DELETE https://DomainName/api/v1/clients/{clientId}/images
DELETE clients/1/images
Content-Type: application/json
No Request Body:
{
"resourceId": 1,
"changes": {},
"resourceIdentifier": "1"
}
Centers
Centers along with Groups are used to provided a distinctive banking distribution channel used in microfinance. Its common in areas such as Southern Asia to use Centers and Group as administrative units in grameen style lending. Typically groups will contain one to five people and centers themselves will be made of anywhere between 2-10 groups.
Field Descriptions |
externalId |
A place to put an external reference for this center e.g. The ID another system uses. If provided, it must be unique. |
name |
Name given to the Center. |
active |
Indicates whether this center is to be created as active. If active=true, then activationDate must be provided. If active=false, then the center is created as pending. |
activationDate |
The date on which the center became active. |
officeId |
The officeId of the office/branch this center is administrated through. |
staffId |
The staffId of the staff member dealing with this center. The staff member is not specifically the loan officer. |
groupMembers |
The array of groupIds to indicate what groups are part of this center. |
Retrieve a Center Template
Example Requests:
GET https://DomainName/fineract-provider/api/v1/centers/template
{
"active": false,
"activationDate": [
2013,
4,
18
],
"officeId": 1,
"officeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
},
{
"id": 2,
"name": "Branch Office 1",
"nameDecorated": "....Branch Office 1"
}
],
"staffOptions": [
{
"id": 1,
"displayName": "C, Mike"
}
],
"groupMembersOptions": [
{
"id": 1,
"name": "First Group",
"externalId": "000-1A",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".1."
},
{
"id": 2,
"name": "Pending Group",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".2."
}
]
}
GET https://DomainName/fineract-provider/api/v1/centers/template?officeId=2
{
"active": false,
"activationDate": [
2013,
4,
18
],
"officeId": 2,
"officeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
},
{
"id": 2,
"name": "Branch Office 1",
"nameDecorated": "....Branch Office 1"
}
],
"staffOptions": [
{
"id": 2,
"displayName": "D, Mary"
},
{
"id": 3,
"displayName": "P, Paul"
}
]
}
Create a Center
Mandatory Fields |
name, officeId, active, activationDate (if active=true) |
Optional Fields |
externalId, staffId, groupMembers |
Create a center as pending with no association to groupMembers.
POST https://DomainName/fineract-provider/api/v1/centers
POST centers
Content-Type: application/json Request Body:
{
"name": "First Center (No groups)",
"officeId": 1,
"active": false
}
{
"officeId": 1,
"groupId": 8,
"resourceId": 8
}
Create a center as active with no association to groupMembers.
POST https://DomainName/fineract-provider/api/v1/centers
POST centers
Content-Type: application/json Request Body:
{
"name": "centerwithgroup",
"officeId": 1,
"groupMembers": ["7"],
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"active": true,
"activationDate": "01 March 2011"
}
{
"officeId": 1,
"groupId": 9,
"resourceId": 9
}
Activate a Center
Centers can be created in a Pending state. This API exists to enable center activation.
If the center happens to be already active, this API will result in an error.
POST https://Domain Name/api/v1/centers/{centerId}?command=activate
POST centers/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activationDate": "01 March 2011"
}
{
"officeId": 1,
"groupId": 1,
"resourceId": 1
}
Close a Center
Centers can be closed if they don't have any non-closed groups or saving accounts.
If the Center has any active groups or savings accounts, this API will result in an error.
POST https://Domain Name/api/v1/centers/{centerId}?command=close
POST centers/1?command=close
Content-Type: application/json
Request Body:
{
"closureReasonId": 32,
"closureDate": "05 May 2014",
"locale": "en",
"dateFormat": "dd MMMM yyyy"
}
{
"resourceId": 1
}
Associate Groups
This API allows associating existing groups to a center.
The groups are listed from the office to which the center is associated.
If group(s) is already associated with a center, this API will result in an error.
POST https://Domain Name/api/v1/centers/{centerId}?command=associateGroups
POST centers/1?command=associateGroups
Content-Type: application/json
Request Body:
{
"grouptMembers":[1,2]
}
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"grouptMembers": [1,2]
}
Disassociate Groups
This API allows to disassociate groups from a center.
POST https://Domain Name/api/v1/centers/{centerId}?command=disassociateGroups
POST center/1?command=disassociateGroups
Content-Type: application/json
Request Body:
{
"grouptMembers":[1,2]
}
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"grouptMembers": [1,2]
}
Retrieve Center accounts overview
An example of how a savings summary for a Center can be provided. This
is requested in a specific use case of the reference application.
It is quite reasonable to add resources like this to simplify User Interface development.
Example Requests:
GET https://DomainName/api/v1/centers/{centerId}/accounts
{
"savingsAccounts": [{
"id": 16,
"accountNo": "000000016",
"productId": 1,
"productName": "Voluntary savings",
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false,
"prematureClosed": false,
"transferInProgress": false,
"transferOnHold": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountType": {
"id": 2,
"code": "accountType.group",
"value": "Group"
},
"timeline": {
"submittedOnDate": [2014,5,1],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator"
},
"depositType": {
"id": 100,
"code": "depositAccountType.savingsDeposit",
"value": "Savings"
}
}]
}
Generate Collection Sheet
This Api retrieves repayment details of all jlg loans under a center as on a specified meeting date.
POST https://Domain Name/api/v1/centers/{centerId}?command=generateCollectionSheet
POST centers/10?command=generateCollectionSheet
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"calendarId":6,
"transactionDate":"04 May 2014"
}
{
"dueDate": [2014,5,4],
"loanProducts": [{
"id": 1,
"name": "IGL",
"includeInBorrowerCycle": false,
"useBorrowerCycle": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principalVariationsForBorrowerCycle": [],
"interestRateVariationsForBorrowerCycle": [],
"numberOfRepaymentVariationsForBorrowerCycle": []
}],
"groups": [{
"groupId": 1,
"groupName": "Group 1",
"staffId": 1,
"staffName": "A, Aliya",
"levelId": 2,
"levelName": "Group",
"clients": [{
"clientId": 10,
"clientName": "saving acc",
"loans": [{
"loanId": 10,
"accountId": "000000010",
"accountStatusId": 300,
"productShortName": "IGL",
"productId": 1,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principalDue": 1200.000000,
"principalPaid": 0.000000,
"interestDue": 21.360000,
"interestPaid": 0.000000,
"totalDue": 1221.360000
}],
"attendanceType": {
"id": 0,
"code": "attendanceType.invalid",
"value": "Invalid"
}
}]
}],
"attendanceTypeOptions": [{
"id": 1,
"code": "attendanceType.present",
"value": "Present"
},
{
"id": 2,
"code": "attendanceType.absent",
"value": "Absent"
},
{
"id": 3,
"code": "attendanceType.approved",
"value": "Approved"
},
{
"id": 4,
"code": "attendanceType.leave",
"value": "Leave"
},
{
"id": 5,
"code": "attendanceType.late",
"value": "Late"
}]
}
Generate Individual Collection Sheet
This Api retrieves repayment details of all individual loans under a office as on a specified meeting date.
POST https://Domain Name/api/v1/collectionsheet?command=generateCollectionSheet
POST collectionsheet?command=generateCollectionSheet
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"transactionDate":"15 January 2015",
"officeId":3
}
{
"dueDate": [
2015,
1,
15
],
"clients": [
{
"clientId": 74,
"clientName": "guarantee test",
"loans": [
{
"loanId": 307,
"accountId": "000000307",
"accountStatusId": 300,
"productShortName": "pr",
"productId": 60,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principalDue": 1126.23,
"principalPaid": 8873.77,
"interestDue": 0,
"interestPaid": 504.95,
"totalDue": 1126.23
}
],
"savings": [
{
"savingsId": 213,
"accountId": "000000213",
"accountStatusId": 300,
"productName": "11",
"productId": 30,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"dueAmount": 2000
}
]
}
],
"paymentTypeOptions": [
{
"id": 19,
"name": "receipt",
"position": 1,
"description": "rec"
},
{
"id": 20,
"name": "check",
"position": 2,
"description": "che"
}
]
}
Save Collection Sheet
This Api allows the loan officer to perform bulk repayments of JLG loans for a center on a given meeting date.
POST https://Domain Name/api/v1/centers/{centerId}?command=saveCollectionSheet
POST centers/10?command=saveCollectionSheet
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"calendarId": 6,
"transactionDate": "04 May 2014",
"actualDisbursementDate": "04 May 2014",
"clientsAttendance": [],
"bulkDisbursementTransactions": [],
"bulkRepaymentTransactions": [{
"loanId": 10,
"transactionAmount": 1221.36
}]
}
{
"groupId": 10,
"resourceId": 10,
"changes": {
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"loanTransactions": [10],
"SavingsTransactions": []
}
}
Save Collection Sheet
This Api allows the loan officer to perform bulk repayments of individual loans and deposit of mandatory savings on a given meeting date.
POST https://Domain Name/api/v1/collectionsheet?command=saveCollectionSheet
POST collectionsheet?command=saveCollectionSheet
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transactionDate": "04 May 2014",
"actualDisbursementDate": "04 May 2014",
"bulkDisbursementTransactions": [],
"bulkRepaymentTransactions": [{
"loanId": 10,
"transactionAmount": 1221.36,
"paymentTypeId":19,
"receiptNumber":"1245356"
}],
"bulkSavingsDueTransactions":[]
}
{
"groupId": 10,
"resourceId": 10,
"changes": {
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"loanTransactions": [15],
"SavingsTransactions": []
}
}
Update a Center
PUT https://DomainName/fineract-provider/api/v1/centers/{centerId}
PUT centers/8
Content-Type: application/json
Request Body:
{
"name": "First Center (No groups)"
}
{
"officeId": 1,
"groupId": 8,
"resourceId": 8,
"changes": {
"name": "First Center (No groups) - modified"
}
}
Delete a Center
A Center can be deleted if it is in pending state and has no association - groups, loans or savings
POST https://DomainName/fineract-provider/api/v1/centers/{centerId}
DELETE centers/8
{
"resourceId":1,
"changes":{}
}
Retrieve a Center
Example Requests:
Retrieve an existing center with no groups information.
GET https://DomainName/fineract-provider/api/v1/centers/8
{
"id": 8,
"status": {
"id": 100,
"code": "groupingStatusType.pending",
"value": "Pending"
},
"active": false,
"name": "First Center (No groups)",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".8."
}
Retrieve an existing center without the details of group associations.
GET https://DomainName/fineract-provider/api/v1/centers/9
{
"id": 9,
"status": {
"id": 300,
"code": "groupingStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2011,
3,
1
],
"name": "centerwithgroup",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".9."
}
List Centers
The default implementation supports pagination and sorting with the default pagination size set to 200 records. The parameter limit with value -1 will return all entries.
Optional Arguments
- paged
- Boolean optional, defaults to false
- If paged is true then results will be paginated.
- offset
- Integer optional, defaults to 0
- Indicates from what result to start from.
- limit
- Integer optional, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- orderBy
- String optional, one of displayName, accountNo, officeId, officeName
- Orders the results by the field indicated.
- sortBy
- String optional, one of ASC, DESC
- Indicates what way to order results if orderBy is used.
- officeId
- Integer optional
- Provides ability to restrict list of centers returned based on the office there associated with.
- underHierarchy
- String optional
- Use the office hierarchy string to return all centers under a given hierarchy.
- name
- String optional
- Use name of centers to restrict results.
- externalId
- String optional
- Use externalId of center to restrict results.
- sqlSearch
- String optional
- Use an sql fragment valid for the underlying center schema to filter results. e.g. display_name like %K%
Example Requests:
GET https://DomainName/fineract-provider/api/v1/centers?paged=true
{
"totalFilteredRecords": 2,
"pageItems": [
{
"id": 2,
"status": {
"id": 100,
"code": "groupingStatusType.pending",
"value": "Pending"
},
"active": false,
"name": "Center 1",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".2."
},
{
"id": 3,
"status": {
"id": 100,
"code": "groupingStatusType.pending",
"value": "Pending"
},
"active": false,
"name": "Center 2",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".3."
}
]
}
Groups
Groups are used to provide a distinctive banking distribution channel used in microfinances throughout the world. The Group is an administrative unit. It can contain as few as 5 people or as many as 40 depending on how its used.
Different styles of group lending - Joint-Liability Group, Grameen Model (Center-Group), Self-Help Groups, Village/Communal Banks)
Field Descriptions |
name |
Name given to the Group. |
externalId |
A place to put an external reference for this group e.g. The ID another system uses. If provided, it must be unique. |
officeId |
The officeId of the office/branch this group is administrated through. |
active |
Indicates whether this group is to be created as active. If active=true, then activationDate must be provided. If active=false, then the group is created as pending. |
activationDate |
The date on which the group became active. |
staffId |
The staffId of the staff member dealing with this group. The staff member is not specifically the loan officer. The staff member must be assigned to the same office as this group. |
clientMembers |
The individual client members that make up the group. The clients must be assigned to the same office as this group. |
calendarId |
The identifier of the calendar to which the transaction is linked with. |
transactionDate |
The date on which the transaction took place. |
role |
The role to be assigned to a client. |
actualDisbursementDate |
The date on which the actual disbursement took place. |
clientsAttendance |
The clients attendance. |
bulkRepaymentTransaction |
The details of any bulk repayment transactions. |
bulkDisbursementTransactions |
The details of any bulk disbursement transactions. |
datatables |
Facility to enrich group details. |
Retrieve Group Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Arguments
- officeId
- Integer optional
- centerId
- Integer optional
- staffInSelectedOfficeOnly
- Boolean optional
- Defaults to false if not provided. If staffInSelectedOfficeOnly=true only staff who are associated with the selected branch are returned.
Example Requests:
Template to create a standard group
GET https://DomainName/fineract-provider/api/v1/groups/template
{
"officeId": 1,
"officeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
},
{
"id": 2,
"name": "Branch Office 1",
"nameDecorated": "....Branch Office 1"
}
],
"staffOptions": [
{
"id": 1,
"displayName": "C, Mike"
}
],
"clientOptions": [
{
"id": 1,
"displayName": "Petra Yton",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 2,
"displayName": "Small shop business",
"officeId": 1,
"officeName": "Head Office"
}
],
"datatables": [{
"applicationTableName": "m_group",
"registeredTableName": "Group Activation Data",
"columnHeaderData": [{
"columnName": "group_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "GROUPROLE_cd_Ctry",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": [{
"id": 13,
"value": "Leader",
"score": 0
},
{
"id": 16,
"value": "Leader1",
"score": 0
},
{
"id": 14,
"value": "Collector",
"score": 0
}],
"columnCode": "GROUPROLE"
}]
},
{
"applicationTableName": "m_group",
"registeredTableName": "Group Enrichment",
"columnHeaderData": [{
"columnName": "group_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "name",
"columnType": "varchar",
"columnLength": 15,
"columnDisplayType": "STRING",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
}]
}]
}
Template to create a standard group with specific office known. This will return only staffOptions and clientMembersOptions relevant for the chosen office.
GET https://DomainName/fineract-provider/api/v1/groups/template?officeId=2
{
"officeId": 2,
"officeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
},
{
"id": 2,
"name": "Branch Office 1",
"nameDecorated": "....Branch Office 1"
}
],
"staffOptions": [
{
"id": 2,
"displayName": "D, Mary"
},
{
"id": 3,
"displayName": "P, Paul"
}
]
}
Template to create a group for an existing center. As an existing center will be assigned to an office, this will return only staffOptions and clientMembersOptions relevant for the chosen center/office.
GET https://DomainName/fineract-provider/api/v1/groups/template?centerId=1
Create a Group
Mandatory Fields |
name, officeId, active, activationDate (if active=true) |
Optional Fields |
externalId, staffId, clientMembers |
POST https://DomainName/fineract-provider/api/v1/groups
POST groups
Content-Type: application/json Request Body:
{
"officeId":"1",
"name":"Pending Group",
"active": false
}
{
"officeId": 1,
"groupId": 2,
"resourceId": 2
}
POST groups
Content-Type: application/json Request Body:
{
"officeId":"1",
"name":"First Group",
"externalId": "000-1A",
"clientMembers": ["1"],
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"active": true,
"activationDate": "04 March 2009",
"submittedOnDate":"04 March 2009",
"datatables": [{
"registeredTableName": "Address Details",
"data": {
"locale": "en",
"COUNTRY_cd_Country": 17
}
},
{
"registeredTableName": "Group Activation Data",
"data": {
"locale": "en",
"GROUPROLE_cd_Ctry": 13,
"Date": "01 December 2016",
"dateFormat": "dd MMMM yyyy"
}
}]
}
{
"officeId": 1,
"groupId": 1,
"resourceId": 1
}
Activate a Group
Groups can be created in a Pending state. This API exists to enable group activation.
If the group happens to be already active this API will result in an error.
Mandatory Fields |
activationDate |
POST https://Domain Name/api/v1/groups/{groupId}?command=activate
POST groups/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activationDate": "01 March 2011"
}
{
"officeId": 1,
"groupId": 1,
"resourceId": 1
}
Associate Clients
This API allows to associate existing clients to a group.
The clients are listed from the office to which the group is associated.
If client(s) is already associated with group then API will result in an error.
Mandatory Fields |
clientMembers |
POST https://Domain Name/api/v1/groups/{groupId}?command=associateClients
POST groups/1?command=associateClients
Content-Type: application/json
Request Body:
{
"clientMembers":[1,2]
}
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"clientMembers": [1,2]
}
Disassociate Clients
This API allows to disassociate clients from a group.
Disassociating a client with active joint liability group loans results in an error.
Mandatory Fields |
clientMembers |
POST https://Domain Name/api/v1/groups/{groupId}?command=disassociateClients
POST groups/1?command=disassociateClients
Content-Type: application/json
Request Body:
{
"clientMembers":[1,2]
}
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"clientMembers": [1,2]
}
Transfer Clients across groups
This API allows to transfer clients from one group to another
Field Descriptions |
destinationGroupId |
The identifier of the group to which the clients are to be transferred ( has to be in the same branch as the source Group). |
clients |
Identifiers of all clients who need to be transferred |
inheritDestinationGroupLoanOfficer |
Flag specifies if the transferred clients (and all their active loans) should be linked to the assigned loan officer for the group |
Mandatory Fields |
destinationGroupId, clients |
Optional Fields |
inheritDestinationGroupLoanOfficer (defaults to true), transferActiveLoans (defaults to true) |
POST https://Domain Name/api/v1/groups/{groupId}?command=transferClients
POST groups/1?command=transferClients
Content-Type: application/json
Request Body:
{
destinationGroupId:2,
clients:[{id:1}]
}
{
"resourceId": 1
}
Generate Collection Sheet
This API retrieves repayment details of all jlg loans of all members of a group on a specified meeting date.
Mandatory Fields |
calendarId, transactionDate |
POST https://Domain Name/api/v1/groups/{groupId}?command=generateCollectionSheet
POST groups/1?command=generateCollectionSheet
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"calendarId":6,
"transactionDate":"04 May 2014"
}
{
"dueDate": [2014,5,4],
"loanProducts": [{
"id": 1,
"name": "IGL",
"includeInBorrowerCycle": false,
"useBorrowerCycle": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principalVariationsForBorrowerCycle": [],
"interestRateVariationsForBorrowerCycle": [],
"numberOfRepaymentVariationsForBorrowerCycle": []
}],
"groups": [{
"groupId": 1,
"groupName": "Group 1",
"staffId": 1,
"staffName": "A, Aliya",
"levelId": 2,
"levelName": "Group",
"clients": [{
"clientId": 10,
"clientName": "saving acc",
"loans": [{
"loanId": 10,
"accountId": "000000010",
"accountStatusId": 300,
"productShortName": "IGL",
"productId": 1,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principalDue": 1200.000000,
"principalPaid": 0.000000,
"interestDue": 21.360000,
"interestPaid": 0.000000,
"totalDue": 1221.360000
}],
"attendanceType": {
"id": 0,
"code": "attendanceType.invalid",
"value": "Invalid"
}
}]
}],
"attendanceTypeOptions": [{
"id": 1,
"code": "attendanceType.present",
"value": "Present"
},
{
"id": 2,
"code": "attendanceType.absent",
"value": "Absent"
},
{
"id": 3,
"code": "attendanceType.approved",
"value": "Approved"
},
{
"id": 4,
"code": "attendanceType.leave",
"value": "Leave"
},
{
"id": 5,
"code": "attendanceType.late",
"value": "Late"
}]
}
Save Collection Sheet
This api allows the loan officer to perform bulk repayments of JLG loans for a group on its meeting date.
Mandatory Fields |
calendarId, transactionDate, actualDisbursementDate |
Optional Fields |
clientsAttendance, bulkRepaymentTransaction, bulkDisbursementTransactions |
POST https://Domain Name/api/v1/groups/{groupId}?command=saveCollectionSheet
POST groups/1?command=saveCollectionSheet
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"calendarId": 6,
"transactionDate": "04 May 2014",
"actualDisbursementDate": "04 May 2014",
"clientsAttendance": [],
"bulkDisbursementTransactions": [],
"bulkRepaymentTransactions": [{
"loanId": 10,
"transactionAmount": 1221.36
}]
}
{
"groupId": 1,
"resourceId": 1,
"changes": {
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"bulkTransations": {
"loanId": 10,
"transactionAmount": 1221.36,
"transactionDate": [2014,5,4]
}
}
}
Unassign a Staff
Allows you to unassign the Staff.
Mandatory Fields |
staffId |
POST https://Domain Name/api/v1/groups/{groupId}?command=unassignStaff
POST groups/1?command=unassignStaff
Content-Type: application/json
Request Body:
{
"staffId":"1"
}
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"changes": {}
}
Assign a Staff
Allows you to assign Staff to an existing Group.
The selected Staff should be belong to the same office (or an office higher up in the hierarchy) as this group
Mandatory Fields |
staffId |
Optional Fields |
inheritStaffForClientAccounts |
Optional: Boolean if true all members of the group (i.e all clients with active loans and savings ) will inherit the staffId |
POST https://Domain Name/api/v1/groups/{groupId}?command=assignStaff
POST groups/1?command=assignStaff
Content-Type: application/json
Request Body:
{
"staffId": "1"
}
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"changes": {"staffId":1}
}
Close a Group
This API exists to close a group. Groups can be closed if they don't have any non-closed clients/loans/savingsAccounts.
If the group has any active clients/loans/savingsAccount, this API will result in an error.
POST https://Domain Name/api/v1/groups/{groupId}?command=close
POST groups/1?command=close
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closureDate":"25 June 2013",
"closureReasonId":"30"
}
{
"groupId": 1,
"resourceId": 1
}
Assign a Role
Allows you to assign a Role to an existing member of a group.
We can define the different roles applicable to group members by adding code values to the pre-defined system code GROUPROLE. Example:Group leader etc.
Mandatory Fields |
clientId, role |
POST https://Domain Name/api/v1/groups/{groupId}?command=assignRole
POST groups/1?command=assignRole
Content-Type: application/json
Request Body:
{
"clientId": "1",
"role":30
}
{
"clientId": 1,
"groupId": 1,
"resourceId": 1
}
Unassign a Role
Allows you to unassign Roles associated tp Group members.
POST https://Domain Name/api/v1/groups/{groupId}?command=unassignRole&roleId=1
POST groups/1?command=unassignRole&roleId=1
Content-Type: application/json
Request Body:
{}
{
"clientId": 1,
"groupId": 1,
"resourceId": 1
}
Update a Role
Allows you to update the member Role.
Mandatory Fields |
role |
POST https://Domain Name/api/v1/groups/{groupId}?command=updateRole&roleId=2
POST groups/1?command=updateRole&roleId=2
Content-Type: application/json
Request Body:
{
"role":"31"
}
{
"groupId": 1,
"resourceId": 2,
"changes":{"role":31}
}
Retrieve a Group
Retrieve group information.
- associations
- String optional
-
One of, or comma separated of clientMembers, activeClientMembers, groupRoles, calendars, collectionMeetingCalendar
or all for all associations. - staffInSelectedOfficeOnly
- Boolean optional, defaults to false
- If staffInSelectedOfficeOnly=true only staff who are associated with the selected branch are returned.
- roleId
- Long optional
- If present, will retrieve group role information
Example Requests:
Group without any associations.
GET https://DomainName/fineract-provider/api/v1/groups/1
{
"id": 1,
"name": "First Group",
"externalId": "000-1A",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".1.",
"timeline": {
"activatedOnDate": [
2013,
11,
14
],
"activatedByUsername": "mifos",
"activatedByFirstname": "App",
"activatedByLastname": "Administrator"
}
}
Group along with all its Clients.
GET https://DomainName/fineract-provider/api/v1/groups/1?associations=clientMembers
{
"id": 1,
"name": "First Group",
"externalId": "000-1A",
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".1.",
"timeline": {
"activatedOnDate": [
2013,
11,
14
],
"activatedByUsername": "mifos",
"activatedByFirstname": "App",
"activatedByLastname": "Administrator"
},
"clientMembers": [
{
"id": 1,
"accountNo": "000000001",
"externalId": "786YYH7",
"activationDate": [
2009,
3,
4
],
"firstname": "Petra",
"lastname": "Yton",
"displayName": "Petra Yton",
"officeId": 1,
"officeName": "Head Office"
}
]
}
Retrieve Group accounts overview
Retrieves details of all Loan and Savings accounts associated with this group.
Example Requests:
memberSavingsAccounts
GET https://DomainName/api/v1/groups/{groupId}/accounts
{
"loanAccounts": [
{
"id": 3,
"accountNo": "000000003",
"productId": 3,
"productName": "daily product",
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"pendingApproval": true,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"loanType": {
"id": 2,
"code": "accountType.group",
"value": "Group"
}
}
],
"savingsAccounts": [
{
"id": 9,
"accountNo": "000000009",
"productId": 1,
"productName": "p_sav",
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountType": {
"id": 2,
"code": "accountType.group",
"value": "Group"
}
},
{
"id": 4,
"accountNo": "000000004",
"productId": 1,
"productName": "p_sav",
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountType": {
"id": 2,
"code": "accountType.group",
"value": "Group"
}
}
],
"memberLoanAccounts": [
{
"id": 4,
"accountNo": "000000004",
"productId": 1,
"productName": "testLoan",
"status": {
"id": 200,
"code": "loanStatusType.approved",
"value": "Approved",
"pendingApproval": false,
"waitingForDisbursal": true,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"loanType": {
"id": 3,
"code": "accountType.jlg",
"value": "JLG"
}
},
{
"id": 7,
"accountNo": "000000007",
"productId": 2,
"productName": "weekly product",
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"pendingApproval": true,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"loanType": {
"id": 3,
"code": "accountType.jlg",
"value": "JLG"
}
}
],
"memberSavingsAccounts": [
{
"id": 3,
"accountNo": "000000003",
"productId": 1,
"productName": "p_sav",
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountType": {
"id": 3,
"code": "accountType.jlg",
"value": "JLG"
}
},
{
"id": 10,
"accountNo": "000000010",
"productId": 1,
"productName": "p_sav",
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountType": {
"id": 3,
"code": "accountType.jlg",
"value": "JLG"
}
}
]
}
Update a Group
PUT https://DomainName/fineract-provider/api/v1/groups/{groupid}
PUT groups/1
Content-Type: application/json
Request Body:
{
"name": "First Group (changed)"
}
{
"officeId": 1,
"groupId": 1,
"resourceId": 1,
"changes": {
"name": "First Group (changed)"
}
}
Delete a Group
A group can be deleted if it is in pending state and has no associations - clients, loans or savings
POST https://DomainName/fineract-provider/api/v1/groups/{groupid}
DELETE groups/2
{
"officeId": 1,
"groupId": 2,
"resourceId": 2
}
List Groups
The default implementation of listing Groups returns 200 entries with support for pagination and sorting. Using the parameter limit with value -1 returns all entries.
Optional Arguments
- paged
- Boolean optional, defaults to false
- If paged is true then results will be paginated.
- offset
- Integer optional, defaults to 0
- Indicates from what result to start from.
- limit
- Integer optional, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- orderBy
- String optional, one of displayName, accountNo, officeId, officeName
- Orders the results by the field indicated.
- sortBy
- String optional, one of ASC, DESC
- Indicates what way to order results if orderBy is used.
- officeId
- Integer optional
- Provides ability to restrict list of groups returned based on the office there associated with.
- underHierarchy
- String optional
- Use the office hierarchy string to return all groups under a given hierarchy.
- name
- String optional
- Use name of groups to restrict results.
- externalId
- String optional
- Use externalId of groups to restrict results.
- sqlSearch
- String optional
- Use an sql fragment valid for the underlying group schema to filter results. e.g. display_name like %K%
- orphansOnly
- Boolean optional, defaults to false
- Use orphansOnly as true to list groups which are not associated to any center/parent.
Example Requests:
GET https://DomainName/fineract-provider/api/v1/groups?paged=true
{
"totalFilteredRecords": 2,
"pageItems": [
{
"id": 4,
"name": "AnotherGroup",
"status": {
"id": 100,
"code": "clientStatusType.pending",
"value": "Pending"
},
"active": false,
"officeId": 1,
"officeName": "Head Office",
"hierarchy": ".4."
}
]
}
Loans
The API concept of loans models the loan application process and the loan contract/monitoring process.
Field Descriptions |
accountNo |
The account no. associated with this loan. Is auto generated if not provided at loan application creation time. |
externalId |
A place to put an external reference for
this loan e.g. The ID another system uses. If provided, it must be unique. |
fundId |
Optional: For associating a loan with a given fund. |
loanOfficerId |
Optional: For associating a loan with a given staff member who is a loan officer. |
loanPurposeId |
Optional: For marking a loan with a given loan purpose option. Loan purposes are configurable and can be setup by system admin through code/code values screens. |
principal |
The loan amount to be disbursed to through loan. |
loanTermFrequency |
The length of loan term Used like: loanTermFrequency loanTermFrequencyType e.g. 12 Months |
loanTermFrequencyType |
The loan term period to use. Used like:
loanTermFrequency loanTermFrequencyType e.g. 12 Months Example Values: 0=Days, 1=Weeks, 2=Months, 3=Years |
numberOfRepayments |
Number of installments to repay. Used like: numberOfRepayments Every repaymentEvery repaymentFrequencyType e.g. 10 (repayments) Every 12 Weeks |
repaymentEvery |
Used like: numberOfRepayments Every
repaymentEvery repaymentFrequencyType e.g. 10 (repayments) Every 12 Weeks |
repaymentFrequencyType |
Used like: numberOfRepayments Every
repaymentEvery repaymentFrequencyType e.g. 10 (repayments) Every 12 Weeks Example Values: 0=Days, 1=Weeks, 2=Months |
interestRatePerPeriod |
Interest Rate. Used like: interestRatePerPeriod % interestRateFrequencyType - interestType e.g. 12.0000% Per year - Declining Balance |
interestRateFrequencyType |
Used like: interestRatePerPeriod%
interestRateFrequencyType - interestType e.g. 12.0000% Per year - Declining Balance Example Values: 2=Per month, 3=Per year |
graceOnPrincipalPayment |
Optional: Integer - represents the number of repayment periods that grace should apply to the principal component of a repayment period. |
graceOnInterestPayment |
Optional: Integer - represents the number of repayment periods that grace should apply to the interest component of a repayment period. Interest is still calculated but offset to later repayment periods. |
graceOnInterestCharged |
Optional: Integer - represents the number of repayment periods that should be interest-free. |
graceOnArrearsAgeing |
Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue. |
interestChargedFromDate |
Optional: Date - The date from with interest is to start being charged. |
expectedDisbursementDate |
The proposed disbursement date of the loan so a proposed repayment schedule can be provided. |
submittedOnDate |
The date the loan application was submitted by applicant. |
linkAccountId |
The Savings Account id for linking with loan account for payments. |
amortizationType |
Example Values: 0=Equal principle payments, 1=Equal installments |
interestType |
Used like: interestRatePerPeriod%
interestRateFrequencyType - interestType e.g. 12.0000% Per year - Declining Balance Example Values: 0=Declining Balance, 1=Flat |
interestCalculationPeriodType |
Example Values: 0=Daily, 1=Same as repayment period |
allowPartialPeriodInterestCalcualtion |
This value will be supported along with interestCalculationPeriodType as Same as repayment period to calculate interest for partial periods. Example: Interest charged from is 5th of April , Principal is 10000 and interest is 1% per month then the interest will be (10000 * 1%)* (25/30) , it calculates for the month first then calculates exact periods between start date and end date(can be a decimal) |
inArrearsTolerance |
The amount that can be 'waived' at end
of all loan payments because it is too small to worry about. This is also the tolerance amount assessed when determining if a loan is in arrears. |
transactionProcessingStrategyId |
An enumeration that indicates the type of transaction processing strategy to be used. This relates to functionality that is also known as Payment Application Logic.
A number of out of the box approaches exist, some are custom to specific MFIs, some are more general and indicate the order in which payments are processed. Refer to the Payment Application Logic / Transaction Processing Strategy section in the appendix for more detailed overview of each available payment application logic provided out of the box. List of current approaches:
|
loanType |
To represent different type of loans. At present there are three type of loans are supported. Available loan types:
|
recalculationRestFrequencyDate |
Specifies rest frequency start date for interest recalculation. This date must be before or equal to disbursement date |
recalculationCompoundingFrequencyDate |
Specifies compounding frequency start date for interest recalculation. This date must be equal to disbursement date |
Retrieve Loan Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Arguments
- templateType
- String mandatory, allowed values are individual, group, jlg, jlgbulk
-
templateType value decides the required template data for creating a new loan application. -
'individual': Loan template data for creating individual loans. - 'group': Loan template data for creating a group loan (loan given to group as a whole).
- 'jlg': Loan template data for creating a Joint liability group loan for a client.
- 'jlgbulk': Loan template data for creating a Joint liability group loan for multiple clients at a time in a group.
- clientId
- Integer mandatory
Optional Arguments
- productId
- Integer optional
- If entered, productId, productName and selectedProduct fields are returned.
- staffInSelectedOfficeOnly
- Boolean optional
- Defaults to false if not provided. If staffInSelectedOfficeOnly=true only loan officers who are associated with the selected branch are returned.
- activeOnly
- Boolean optional
- Defaults to false if not provided. If activeOnly=true only active loan products are returned.
Example Requests:
GET https://DomainName/api/v1/loans/template?templateType=individual&clientId=1
{
"clientId": 1,
"clientName": "Kampala first Client",
"clientOfficeId": 2,
"timeline": {
"expectedDisbursementDate": [
2013,
3,
8
]
},
"productOptions": [
{
"id": 1,
"name": "Kampala Product (with cash accounting)"
}
]
}
GET https://DomainName/api/v1/loans/template?templateType=individual&clientId=1&productId=1
{
"clientId": 1,
"clientName": "Kampala first Client",
"clientOfficeId": 2,
"loanProductId": 1,
"loanProductName": "Kampala Product (with cash accounting)",
"loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.",
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"principal": 1000000,
"termFrequency": 12,
"termPeriodFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRatePerPeriod": 24,
"interestRateFrequencyType": {
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
},
"annualInterestRate": 24,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"timeline": {
"expectedDisbursementDate": [
2013,
3,
8
]
},
"daysInMonthType": {
"id": 30,
"code": "DaysInMonthType.days360",
"value": "30 Days"
},
"daysInYearType": {
"id": 360,
"code": "DaysInYearType.days360",
"value": "360 Days"
},
"isInterestRecalculationEnabled": true,
"interestRecalculationData": {
"interestRecalculationCompoundingType": {
"id": 2,
"code": "interestRecalculationCompoundingMethod.fee",
"value": "Fee"
},
"recalculationCompoundingFrequencyType": {
"id":1,
"code":"interestRecalculationFrequencyType.same.as.repayment.period",
"value":"Same as repayment period"
},
"rescheduleStrategyType": {
"id": 2,
"code": "loanRescheduleStrategyMethod.reduce.number.of.installments",
"value": "Reduce number of installments"
},
"recalculationRestFrequencyType": {
"id":1,
"code":"interestRecalculationFrequencyType.same.as.repayment.period",
"value":"Same as repayment period"
}
}
"charges": [],
"productOptions": [
{
"id": 1,
"name": "Kampala Product (with cash accounting)"
}
],
"loanOfficerOptions": [
{
"id": 2,
"firstname": "Kampala",
"lastname": "LoanOfficer",
"displayName": "LoanOfficer, Kampala",
"officeId": 2,
"officeName": "Uganda (Kampala)",
"isLoanOfficer": true
}
],
"loanPurposeOptions": [
{
"id": 20,
"name": "option.Agriculture",
"position": 1
},
{
"id": 21,
"name": "option.Manufacturing",
"position": 20
},
{
"id": 22,
"name": "option.HousingImprovement",
"position": 21
}
],
"termFrequencyTypeOptions": [
{
"id": 0,
"code": "loanTermFrequency.periodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "loanTermFrequency.periodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "loanTermFrequency.periodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "loanTermFrequency.periodFrequencyType.years",
"value": "Years"
}
],
"repaymentFrequencyTypeOptions": [
{
"id": 0,
"code": "repaymentFrequency.periodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "repaymentFrequency.periodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
}
],
"interestRateFrequencyTypeOptions": [
{
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
{
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
}
],
"amortizationTypeOptions": [
{
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
{
"id": 0,
"code": "amortizationType.equal.principal",
"value": "Equal principle payments"
}
],
"interestTypeOptions": [
{
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
{
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
}
],
"interestCalculationPeriodTypeOptions": [
{
"id": 0,
"code": "interestCalculationPeriodType.daily",
"value": "Daily"
},
{
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
}
],
"transactionProcessingStrategyOptions": [
{
"id": 2,
"code": "heavensfamily-strategy",
"name": "Heavensfamily"
}
],
"chargeOptions": [
{
"id": 1,
"name": "Bank Fee (per installment)",
"active": true,
"penalty": false,
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"amount": 1500,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
}
],
"loanCollateralOptions": [
{
"id": 17,
"name": "option.House",
"position": 1
},
{
"id": 18,
"name": "option.Television",
"position": 17
},
{
"id": 19,
"name": "option.Gold",
"position": 18
}
],
"accountLinkingOptions":[
{
"id":1,
"accountNo":"000000001",
"clientId":1,
"clientName":"pramod nuthakki",
"productId":1,
"productName":"pramod sav",
"fieldOfficerId":0,
"currency":{"code":"USD","name":"US Dollar","decimalPlaces":2,"displaySymbol":"$","nameCode":"currency.USD","displayLabel":"US Dollar ($)"}
}
],
"datatables": [{
"applicationTableName": "m_loan",
"registeredTableName": "loan_balance",
"columnHeaderData": [{
"columnName": "loan_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "account_number",
"columnType": "varchar",
"columnLength": 25,
"columnDisplayType": "STRING",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Balance",
"columnType": "decimal",
"columnLength": 0,
"columnDisplayType": "DECIMAL",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}]
},
{
"applicationTableName": "m_loan",
"registeredTableName": "Loan Enrichment",
"columnHeaderData": [{
"columnName": "loan_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Activation Date",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
}]
}]
}
Retrieve a Loan
Note: template=true parameter doesn't apply to this resource.
Arguments
- associations
- optional, Either 'all' or a comma separated list of loan 'associations' (itemised below).
- exclude
- optional, 'all' and a comma separated list of loan associations (itemised below) as 'exclude'.
-
Associations are just extra pieces of data that you might or might not want to retrieve.
- 'all': Gets all association data.
- 'repaymentSchedule': Loan schedule data.
- 'originalSchedule': Loan schedule data without interest recalculations.
- 'futureSchedule': Loan schedule data from today date(will be displayed only for interest first repayment strategy processors)
- 'transactions': Loan transactions data.
- 'charges': Loan charges data.
- 'guarantors': Loan guarantors data.
- 'collateral': Loan collateral data.
Example Requests:
GET https://DomainName/api/v1/loans/{loanId}
{
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"clientId": 1,
"clientName": "Kampala first Client",
"clientOfficeId": 2,
"loanProductId": 1,
"loanProductName": "Kampala Product (with cash accounting)",
"loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.",
"loanPurposeId": 22,
"loanPurposeName": "option.HousingImprovement",
"loanOfficerId": 2,
"loanOfficerName": "LoanOfficer, Kampala",
"loanType": {
"id": 1,
"code": "loanType.individual",
"value": "Individual"
},
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"principal": 1000000,
"termFrequency": 12,
"termPeriodFrequencyType": {
"id": 2,
"code": "termFrequency.periodFrequencyType.months",
"value": "Months"
},
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRatePerPeriod": 24,
"interestRateFrequencyType": {
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
},
"annualInterestRate": 24,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"timeline": {
"submittedOnDate": [
2012,
4,
3
],
"submittedByUsername": "admin",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedOnDate": [
2012,
4,
3
],
"approvedByUsername": "admin",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"expectedDisbursementDate": [
2012,
4,
10
],
"actualDisbursementDate": [
2012,
4,
10
],
"disbursedByUsername": "admin",
"disbursedByFirstname": "App",
"disbursedByLastname": "Administrator",
"expectedMaturityDate": [
2013,
4,
10
]
},
"summary": {
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"principalDisbursed": 1000000,
"principalPaid": 0,
"principalWrittenOff": 0,
"principalOutstanding": 1000000,
"principalOverdue": 833333.3,
"interestCharged": 240000,
"interestPaid": 0,
"interestWaived": 0,
"interestWrittenOff": 0,
"interestOutstanding": 240000,
"interestOverdue": 200000,
"feeChargesCharged": 18000,
"feeChargesDueAtDisbursementCharged": 0,
"feeChargesPaid": 0,
"feeChargesWaived": 0,
"feeChargesWrittenOff": 0,
"feeChargesOutstanding": 18000,
"feeChargesOverdue": 15000,
"penaltyChargesCharged": 0,
"penaltyChargesPaid": 0,
"penaltyChargesWaived": 0,
"penaltyChargesWrittenOff": 0,
"penaltyChargesOutstanding": 0,
"penaltyChargesOverdue": 0,
"totalExpectedRepayment": 1258000,
"totalRepayment": 0,
"totalExpectedCostOfLoan": 258000,
"totalCostOfLoan": 0,
"totalWaived": 0,
"totalWrittenOff": 0,
"totalOutstanding": 1258000,
"totalOverdue": 1048333.3,
"overdueSinceDate": [
2012,
5,
10
],
"linkedAccount":{
"id":1,
"accountNo":"000000001"
},
"disbursementDetails":[{"id":71,"expectedDisbursementDate":[2013,11,1],"principal":22000.000000,"approvedPrincipal":22000.000000}],
"fixedEmiAmount":1100.000000,
"maxOutstandingLoanBalance":35000,
"canDisburse":false,
"emiAmountVariations": [],
"inArrears": true,
"isNPA":false,
"overdueCharges": [
{
"id": 20,
"name": "overdraft penality",
"active": true,
"penalty": true,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 3.000000,
"chargeTimeType": {
"id": 9,
"code": "chargeTimeType.overdueInstallment",
"value": "overdue fees"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
},
"feeInterval": 2,
"feeFrequency": {
"id": 1,
"code": "feeFrequencyperiodFrequencyType.weeks",
"value": "Weeks"
}
}
]
}
}
List Loans
The list capability of loans can support pagination and sorting.
Optional Arguments
- offset
- Integer optional, defaults to 0
- Indicates from what result to start from.
- limit
- Integer optional, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- orderBy
- String optional, one of displayName, accountNo, officeId, officeName
- Orders the results by the field indicated.
- sortBy
- String optional, one of ASC, DESC
- Indicates what way to order results if orderBy is used.
- officeId
- Integer optional
- Provides ability to restrict list of loans returned based on the office there associated with.
- underHierarchy
- String optional
- Use the office hierarchy string to return all loans under a given hierarchy.
- accountNo
- String optional
- Use account no. of loans to restrict results.
- externalId
- String optional
- Use externalId of loan to restrict results.
- sqlSearch
- String optional
- Use an sql fragment valid for the underlying loan schema to filter results. e.g. display_name like %K%
Example Requests:
GET https://DomainName/fineract-provider/api/v1/loans
{
"totalFilteredRecords": 1,
"pageItems": [
{
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"clientId": 1,
"clientName": "Change To IndividualName",
"clientOfficeId": 1,
"loanProductId": 1,
"loanProductName": "AgriCredit",
"loanProductDescription": "test",
"loanType": {
"id": 1,
"code": "loanType.individual",
"value": "Individual"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principal": 10000,
"termFrequency": 12,
"termPeriodFrequencyType": {
"id": 2,
"code": "termFrequency.periodFrequencyType.months",
"value": "Months"
},
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRatePerPeriod": 2,
"interestRateFrequencyType": {
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
"annualInterestRate": 24,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"timeline": {
"submittedOnDate": [
2012,
6,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedOnDate": [
2012,
6,
1
],
"approvedByUsername": "mifos",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"expectedDisbursementDate": [
2012,
6,
1
],
"actualDisbursementDate": [
2012,
6,
1
],
"disbursedByUsername": "mifos",
"disbursedByFirstname": "App",
"disbursedByLastname": "Administrator",
"expectedMaturityDate": [
2013,
6,
1
]
},
"linkedAccount":{
"id":1,
"accountNo":"000000001"
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principalDisbursed": 10000,
"principalPaid": 3073.07,
"principalWrittenOff": 0,
"principalOutstanding": 6926.93,
"principalOverdue": 5999.92,
"interestCharged": 1347.15,
"interestPaid": 709.33,
"interestWaived": 0,
"interestWrittenOff": 0,
"interestOutstanding": 637.82,
"interestOverdue": 619.28,
"feeChargesCharged": 0,
"feeChargesDueAtDisbursementCharged": 0,
"feeChargesPaid": 0,
"feeChargesWaived": 0,
"feeChargesWrittenOff": 0,
"feeChargesOutstanding": 0,
"feeChargesOverdue": 0,
"penaltyChargesCharged": 0,
"penaltyChargesPaid": 0,
"penaltyChargesWaived": 0,
"penaltyChargesWrittenOff": 0,
"penaltyChargesOutstanding": 0,
"penaltyChargesOverdue": 0,
"totalExpectedRepayment": 11347.15,
"totalRepayment": 3782.4,
"totalExpectedCostOfLoan": 1347.15,
"totalCostOfLoan": 709.33,
"totalWaived": 0,
"totalWrittenOff": 0,
"totalOutstanding": 7564.75,
"totalOverdue": 6619.2,
"overdueSinceDate": [
2012,
11,
1
]
},
"feeChargesAtDisbursementCharged": 0,
"inArrears":false,
"isNPA":false
}
]
}
Modify a loan application
Loan application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method.
PUT https://Domain Name/api/v1/loans/{loanId}
PUT loans/1
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"productId": 1,
"principal": "5000",
"loanTermFrequency": 10,
"loanTermFrequencyType": 0,
"numberOfRepayments": 10,
"repaymentEvery": 1,
"repaymentFrequencyType": 0,
"interestRatePerPeriod": 2,
"interestType": 0,
"interestCalculationPeriodType": 0,
"amortizationType": 1,
"expectedDisbursementDate": "04 March 2014",
"transactionProcessingStrategyId": 1
}
{
"officeId": 2,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"principal": 5000,
"locale": "en"
}
}
Calculate loan repayment schedule
Mandatory Fields |
productId, principal, loanTermFrequency, loanTermFrequencyType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, expectedDisbursementDate, transactionProcessingStrategyId |
POST https://DomainName/api/v1/loans?command=calculateLoanSchedule
POST loans?command=calculateLoanSchedule
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en_GB",
"productId": 1,
"principal": "100,000.00",
"loanTermFrequency": 12,
"loanTermFrequencyType": 2,
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": 2,
"interestRatePerPeriod": 2,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"expectedDisbursementDate": "20 September 2011",
"transactionProcessingStrategyId": 2
}
{
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"loanTermInDays": 366,
"totalPrincipalDisbursed": 100000,
"totalPrincipalExpected": 100000,
"totalPrincipalPaid": 0,
"totalInterestCharged": 13471.52,
"totalFeeChargesCharged": 0,
"totalPenaltyChargesCharged": 0,
"totalWaived": 0,
"totalWrittenOff": 0,
"totalRepaymentExpected": 113471.52,
"totalRepayment": 0,
"totalOutstanding": 0,
"periods": [
{
"period": 0,
"dueDate": [
2011,
9,
20
],
"principalDisbursed": 100000,
"principalLoanBalanceOutstanding": 100000,
"feeChargesDue": 0,
"feeChargesOutstanding": 0,
"totalOriginalDueForPeriod": 0,
"totalDueForPeriod": 0,
"totalOutstandingForPeriod": 0,
"totalOverdue": 0,
"totalActualCostOfLoanForPeriod": 0
},
{
"period": 1,
"fromDate": [
2011,
9,
20
],
"dueDate": [
2011,
10,
20
],
"daysInPeriod": 30,
"principalOriginalDue": 7455.96,
"principalDue": 7455.96,
"principalOutstanding": 7455.96,
"principalLoanBalanceOutstanding": 92544.04,
"interestOriginalDue": 2000,
"interestDue": 2000,
"interestOutstanding": 2000,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 9455.96,
"totalDueForPeriod": 9455.96,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 9455.96,
"totalOverdue": 9455.96,
"totalActualCostOfLoanForPeriod": 2000
},
...
...
{
"period": 12,
"fromDate": [
2012,
8,
20
],
"dueDate": [
2012,
9,
20
],
"daysInPeriod": 31,
"principalOriginalDue": 9270.56,
"principalDue": 9270.56,
"principalOutstanding": 9270.56,
"principalLoanBalanceOutstanding": 0,
"interestOriginalDue": 185.4,
"interestDue": 185.4,
"interestOutstanding": 185.4,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 9455.96,
"totalDueForPeriod": 9455.96,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 9455.96,
"totalOverdue": 9455.96,
"totalActualCostOfLoanForPeriod": 185.4
}
]
}
Submit a new Loan Application
Mandatory Fields |
clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, expectedDisbursementDate, submittedOnDate, loanType |
Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period |
recalculationRestFrequencyDate |
Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period |
recalculationCompoundingFrequencyDate |
Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan. |
datatables |
Optional Fields |
graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) |
POST https://DomainName/api/v1/loans
POST loans
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en_GB",
"clientId": 1,
"productId": 1,
"principal": "10,000.00",
"loanTermFrequency": 12,
"loanTermFrequencyType": 2,
"loanType": "individual",
"numberOfRepayments": 10,
"repaymentEvery": 1,
"repaymentFrequencyType": 2,
"interestRatePerPeriod": 10,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"transactionProcessingStrategyId": 1,
"expectedDisbursementDate": "10 Jun 2013",
"submittedOnDate": "10 Jun 2013",
"linkAccountId" : "1",
"fixedEmiAmount":1100,
"maxOutstandingLoanBalance":"35000",
"disbursementData":[{"expectedDisbursementDate":"01 November 2013",
"principal":22000,"approvedPrincipal":22000}],
"datatables": [{
"registeredTableName": "loan_balance",
"data": {
"locale": "en",
"account_number": "0000001",
"Balance": "3300.00",
"DateField": "01 December 2016 00:00",
"dateFormat": "dd MMMM yyyy HH:mm",
"DateTimeField": "01 December 2016 12:00"
}
},
{
"registeredTableName": "Date Loan Field",
"data": {
"locale": "en",
"Activation Date": "01 December 2016 00:00",
"dateFormat": "dd MMMM yyyy HH:mm"
}
}]
}
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1
}
Approve Loan Application
Mandatory Fields |
approvedOnDate |
Optional Fields |
approvedLoanAmount |
expectedDisbursementDate |
POST https://DomainName/api/v1/loans/{loanId}?command=approve
POST loans/1?command=approve
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "20 September 2011",
"expectedDisbursementDate" : "20 September 2011",
"note": "Loan approval note",
"disbursementData" : [{ id=226, principal="5", expectedDisbursementDate="20 September 2011"},
{ id=227, principal="91", expectedDisbursementDate="21 September 2011"}]
}
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 200,
"code": "loanStatusType.approved",
"value": "Approved",
"pendingApproval": false,
"waitingForDisbursal": true,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "20 September 2011",
"note": "Loan approval note"
}
}
Recover Loan Guarantee
POST https://DomainName/api/v1/loans/{loanId}?command=recoverGuarantees
POST loans/1?command=approve
Content-Type: application/json
No Request Body:
{
"loanId": 1
}
Undo Loan Application Approval
POST https://DomainName/api/v1/loans/{loanId}?command=undoApproval
POST loans/1?command=undoApproval
Content-Type: application/json
Request Body:
{
"note": "Loan undo approval note"
}
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"pendingApproval": true,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"approvedOnDate": ""
}
}
Assign a Loan Officer
Allows you to assign Loan Officer for existing Loan.
POST https://Domain Name/api/v1/loans/{loanId}?command=assignLoanOfficer
POST loans/1?command=assignLoanOfficer
Content-Type: application/json
Request Body:
{
"toLoanOfficerId":2,
"assignmentDate":"02 September 2014",
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"fromLoanOfficerId":""
}
{
"officeId": 2,
"clientId": 6,
"loanId" : 3,
"resourceId": 3
}
Unassign a Loan Officer
Allows you to unassign the Loan Officer.
POST https://Domain Name/api/v1/loans/{loanId}?command=unassignLoanOfficer
POST clients/1?command=unassignLoanOfficer
Content-Type: application/json
Request Body:
{
"unassignedDate":"15 September 2014",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"officeId":2,
"clientId":6,
"loanId":3,
"resourceId":3
}
Reject Loan Application
Mandatory Fields |
rejectedOnDate |
POST https://DomainName/api/v1/loans/{loanId}?command=reject
POST loans/1?command=reject
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "20 September 2011",
"note": "Loan rejection reason."
}
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 500,
"code": "loanStatusType.rejected",
"value": "Rejected",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "20 September 2011",
"closedOnDate": "20 September 2011"
}
}
Applicant Withdraws from Loan Application
Mandatory Fields |
withdrawnOnDate |
POST https://DomainName/api/v1/loans/{loanId}?command=withdrawnByApplicant
POST loans/1?command=withdrawnByApplicant
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "20 September 2011",
"note": "Reason loan applicant withdrew from application."
}
{
"officeId": 1,
"clientId": 1,
"loanId": 2,
"resourceId": 2,
"changes": {
"status": {
"id": 400,
"code": "loanStatusType.withdrawn.by.client",
"value": "Withdrawn by applicant",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "20 September 2011",
"closedOnDate": "20 September 2011"
}
}
Disburse Loan
Mandatory Fields |
actualDisbursementDate |
Optional Fields |
transactionAmount,fixedEmiAmount |
POST https://DomainName/api/v1/loans/{loanId}?command=disburse
POST loans/1?command=disburse
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transactionAmount":10000,
"fixedEmiAmount""1100,
"actualDisbursementDate": "14 May 2013",
"paymentTypeId": "12",
"note": "",
"accountNumber": "accno123",
"checkNumber": "chec123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"accountNumber": "accno123",
"checkNumber": "chec123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"actualDisbursementDate": "14 May 2013",
"transactionAmount":10000
}
}
Disburse Loan To Savings Account
Mandatory Fields |
actualDisbursementDate |
Optional Fields |
transactionAmount,fixedEmiAmount |
POST https://DomainName/api/v1/loans/{loanId}?command=disburseToSavings
POST loans/1?command=disburse
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transactionAmount":10000,
"fixedEmiAmount""1100,
"actualDisbursementDate": "14 May 2013",
"note": ""
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"actualDisbursementDate": "14 May 2013",
"transactionAmount":10000
}
}
Undo Loan Disbursal
POST https://DomainName/api/v1/loans/{loanId}?command=undoDisbursal
POST loans/1?command=undoDisbursal
Content-Type: application/json
{
"note": "Some comment"
}
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 200,
"code": "loanStatusType.approved",
"value": "Approved",
"pendingApproval": false,
"waitingForDisbursal": true,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"actualDisbursementDate": ""
}
}
Delete a Loan Application
Note: Only loans in "Submitted and awaiting approval" status can be deleted.
DELETE https://DomainName/api/v1/loans/{loanId}
DELETE loans/1
Content-Type: application/json
No Request Body:
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1
}
Loan Transactions
Capabilities include loan repayment's, interest waivers and the ability to 'adjust' an existing transaction. An 'adjustment' of a transaction is really a 'reversal' of existing transaction followed by creation of a new transaction with the provided details.
Field Descriptions |
transactionAmount |
The amount of the transaction. |
transactionDate |
The date of the transaction. |
Retrieve Loan Transaction Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Arguments
- command
- String mandatory, case-insensitive
-
'repayment'
"date" is set to the date of the first outstanding installment.
"total" "amount" is set to the amount outstanding. -
'waiver'
"date" is set to the current date.
"total" "amount" is set to the remaining loan principal outstanding. The amount that can be waived is limited to the loan's inArrearsTolerance -
'refundbycash'
"date" is set to the current date
"total" "amount" is set to the total amount paid in advance. -
'foreclosure'
"transaction date" is set to the current date by default
"transaction amount" is set to the sum of total loan outstanding principal and total Interest/ Fee/ Charges / Penalties till foreclosure date.
Example Request:
GET https://DomainName/api/v1/loans/{loanId}/transactions/template"
{
"transactionType": {
"id": 2,
"code": "loanTransactionType.repayment",
"value": "Repayment"
},
"date": [
2009,
8,
1
],
"total": {
"currencyCode": "XOF",
"digitsAfterDecimal": 0,
"inMultiplesOf": 0,
"amount": 471,
"defaultName": "CFA Franc BCEAO",
"nameCode": "currency.XOF",
"displaySymbol": "CFA",
"zero": false,
"greaterThanZero": true,
"displaySymbolValue": "471 CFA"
}
}
Make a Repayment
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=repayment
POST loans/5/transactions?command=repayment
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transactionDate": "14 May 2013",
"transactionAmount": "500.00",
"paymentTypeId": "12",
"note": "check payment",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId": 1,
"clientId": 1,
"loanId": 5,
"resourceId": 564,
"changes": {
"transactionDate": "14 May 2013",
"transactionAmount": "500.00",
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"note": "check payment",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
Make a Refund of an Active Loan by Cash
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=refundByCash
POST loans/5/transactions?command=refundByCash
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transactionDate": "14 May 2013",
"transactionAmount": "500.00",
"paymentTypeId": "12"
}
{
"officeId": 1,
"clientId": 1,
"loanId": 5,
"resourceId": 564,
"changes": {
"transactionDate": "14 May 2013",
"transactionAmount": "500.00",
"locale": "en",
"dateFormat": "dd MMMM yyyy
}
}
Foreclosure of an Active Loan
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=foreclosure
POST loans/5/transactions?command=foreclosure
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transactionDate": "10 December 2012",
"note": "Customer Death"
}
{
"changes": {
"note": "Foreclosure Made!!!",
"eventAmount": 7573.76,
"transactionDate": [2012,
12,
10],
"transactions": [15818]
},
"loanId": 5
}
Waive Interest
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=waiveInterest
POST loans/5/transactions?command=waiveInterest
Content-Type: application/json
Request Body:
{
"locale": "en_GB",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "14 May 2012",
"transactionAmount": "400",
"note": "Optional note related to the waiving of interest."
}
{
"officeId": 1,
"clientId": 1,
"loanId": 5,
"resourceId": 5,
"changes": {
"transactionDate": "14 May 2012",
"transactionAmount": "400",
"locale": "en_GB",
"dateFormat": "dd MMMM yyyy",
"note": "Optional note related to the interest waiver."
}
}
Write-off Loan
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=writeoff
POST loans/70/transactions?command=writeoff
Content-Type: application/json
Request Body:
{
"locale": "en_GB",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "14 May 2012",
"note": "Write-off note"
}
{
"officeId": 1,
"clientId": 7,
"loanId": 70,
"resourceId": 442,
"changes": {
"transactionDate": "1 March 2012",
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"status": {
"id": 601,
"code": "loanStatusType.closed.written.off",
"value": "Closed (written off)",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": true,
"closedRescheduled": false,
"closed": true,
"overpaid": false
},
"closedOnDate": "1 March 2012",
"writtenOffOnDate": "1 March 2012",
"note": "Write-off note"
}
}
Make Recovery Payment
This API allows collecting recovery payments for written-off loans
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=recoverypayment
POST loans/5/transactions?command=recoverypayment
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transactionDate": "14 May 2013",
"transactionAmount": "500.00",
"paymentTypeId": "12",
"note": "check payment",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId": 1,
"clientId": 1,
"loanId": 5,
"resourceId": 564,
"changes": {
"transactionDate": "14 May 2013",
"transactionAmount": "500.00",
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"note": "check payment",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
Undo Loan Write-off Transaction
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=undowriteoff
POST loans/70/transactions?command=undowriteoff
Content-Type: application/json
Request Body:
{ }
{
"officeId": 1,
"clientId": 1,
"loanId": 22
}
Pre-Close template
This Api retrieves pre closure details of loan
POST https://DomainName/api/v1/loans/{loanId}/transactions?command=prepayLoan or
https://DomainName/api/v1/loans/{loanId}/transactions?command=prepayLoan&dateFormat=dd+MMMM+yyyy&locale=en&transactionDate=02+April+2015
POST loans/70/transactions?command=prepayLoan
Content-Type: application/json
Request Body:
{ }
{
"amount":7765.28,
"principalPortion":7573.76,
"interestPortion":191.52,
"feeChargesPortion":0.00,
"penaltyChargesPortion":0.00
}
Retrieve a Transaction Details
Example Request:
GET https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId}
{
"id": 3,
"type": {
"id": 2,
"code": "loanTransactionType.repayment",
"value": "Repayment",
"disbursement": false,
"repaymentAtDisbursement": false,
"repayment": true,
"contra": false,
"waiveInterest": false,
"waiveCharges": false,
"writeOff": false,
"recoveryRepayment": false
},
"date": [
2012,
5,
14
],
"manuallyReversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 559.88,
"interestPortion": 559.88
}
Adjust a Transaction
Note: there is no need to specify command={transactionType} parameter.
Mandatory Fields |
transactionDate, transactionAmount |
POST https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId}
POST loans/1/transactions/2
Content-Type: application/json
Request Body:
{
"locale": "en_GB",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "25 May 2012",
"transactionAmount": "50,000.00",
"note": "An optional note about why your adjusting or changing the transaction."
}
{
"resourceId": 16
}
Guarantors
A person who guarantees to pay for someone else's debt if he or she should default on a loan obligation. A guarantor acts as a co-signor of sorts.
Field Descriptions |
guarantorType |
Identifies if the guarantor is
an existing Client, Staff member or an external
individual Refer Retrieve Guarantor Details Template for complete details |
entityId |
The identifier for guarantors who are an existing Client of Staff member. |
firstname |
Guarantors first name |
lastname |
Guarantors last name |
officeName |
Name of the office with which the internal guarantors are associated |
addressLine1, addressLine2, city, state, zip, country, mobileNumber, housePhoneNumber, comment, dob |
Address, contact and date of birth details of an external guarantor |
savingsId |
Guarantors Savings Account on which Amount will be blocked |
amount |
Guarantee amount which will be blocked on savings account. |
List Guarantors
Example Requests:
GET https://DomainName/api/v1/loans/{loanId}/guarantors
[
{
"id": 1,
"loanId": 1,
"guarantorType": {
"id": 1,
"code": "guarantor.existing.customer",
"value": "CUSTOMER"
},
"firstname": "Declan",
"lastname": "Browne",
"officeName": "Head Office",
"joinedDate": [
2009,
1,
4
]
}
]
Retrieve Guarantors Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/loans/{loanId}/guarantors/template
{
"guarantorType": {
"id": 1,
"code": "guarantor.existing.customer",
"value": "CUSTOMER"
},
"guarantorTypeOptions": [
{
"id": 1,
"code": "guarantor.existing.customer",
"value": "CUSTOMER"
},
{
"id": 2,
"code": "guarantor.staff",
"value": "STAFF"
},
{
"id": 3,
"code": "guarantor.external",
"value": "EXTERNAL"
}
]
}
GET https://DomainName/api/v1/loans/{loanId}/guarantors/accounts/template?clientId={clientId}
{
"guarantorType": {
"id": 1,
"code": "guarantor.existing.customer",
"value": "CUSTOMER"
},
"status": false,
"accountLinkingOptions": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 3,
"clientName": "Client_FirstName_UUV18 Client_LastName_9T2D",
"productId": 1,
"productName": "FIXED_DEPOSIT_PRODUCT_U0NS9T",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 4,
"inMultiplesOf": 100,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
]
}
Retrieve a Guarantor
Example Requests:
GET https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}
{
"id": 1,
"loanId": 1,
"guarantorType": {
"id": 1,
"code": "guarantor.existing.customer",
"value": "CUSTOMER"
},
"firstname": "Declan",
"officeName": "Head Office",
"joinedDate": [
2009,
1,
4
]
}
Create a Guarantor
Note: You may associate any number of Guarantors
to a Loan. The mandatory fields would vary based
on the "guarantorType"
Mandatory Fields
for "internal" guarantors |
guarantorTypeId, entityId |
Mandatory Fields for "external" guarantors |
guarantorTypeId, firstname, lastname |
Optional Fields
for "internal" guarantors |
savingsId, amount |
POST https://DomainName/api/v1//loans/{loanId}}/guarantors
POST /loans/1/guarantors
Content-Type: application/json
Request Body:
{
guarantorTypeId:3,
firstname:Lyndon,
lastname:Johnson
}
{
"officeId": 2,
"loanId": 1,
"resourceId": 9
}
POST /loans/1/guarantors
Content-Type: application/json
Request Body:
{
guarantorTypeId:1,
entityId:2
}
{
"officeId": 2,
"loanId": 1,
"resourceId": 10
}
Update a Guarantor
PUT https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}
PUT loans/1/guarantors/1
Content-Type: application/json
Request Body:
{
entityId:1
}
{
"officeId": 1,
"resourceId": 1,
"changes": {
"entityId": 1
}
}
Remove a Guarantor
Note: A guarantor can be removed only from loans that are not yet approved.
DELETE https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}
DELETE https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}?guarantorFundingId={guarantorFundingId}
DELETE loans/1/guarantors/1
DELETE loans/1/guarantors/1?guarantorFundingId=1
Content-Type: application/json
No Request Body:
{
"officeId": 2,
"loanId": 1,
"resourceId": 1
}
Loan Collateral
In lending agreements, collateral is a borrower's pledge of specific property to a lender, to secure repayment of a loan. The collateral serves as protection for a lender against a borrower's default - that is, any borrower failing to pay the principal and interest under the terms of a loan obligation. If a borrower does default on a loan (due to insolvency or other event), that borrower forfeits (gives up) the property pledged as collateral - and the lender then becomes the owner of the collateral
Field Descriptions |
type |
Identifies the type of a collateral Ex: Gold, property etc (permitted types can be configured using Code Values for the Code LoanCollateral) Refer Retrieve Collateral Details Template for complete details |
value |
The market value of a Collateral. |
description |
Description for the collateral |
currency |
Details of the currency used to estimate the value of a Collateral. The currency defaults to the currency of the Loan for which this Collateral serves as a guarantee |
List Loan Collaterals
Example Requests:
GET https://DomainName/api/v1/loans/{loanId}/collaterals
[
{
"id": 12,
"type": {
"id": 8,
"name": "Gold"
},
"value": 50000,
"description": "24 Carat Gold chain weighing 12 grams",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
]
Retrieve Collateral Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/loans/{loanId}/collaterals/template
{
"allowedCollateralTypes": [
{
"id": 9,
"name": "Silver",
"position": 0
},
{
"id": 8,
"name": "Gold",
"position": 0
},
{
"id": 10,
"name": "Property",
"position": 0
}
]
}
Retrieve a Collateral
Example Requests:
GET https://DomainName/api/v1/loans/{loanId}/collaterals/{guarantorId}
{
"id": 12,
"type": {
"id": 8,
"name": "Gold"
},
"value": 50000,
"description": "24 Carat Gold chain weighing 12 grams",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
Create a Collateral
Note: Currently, Collaterals may be added only before a Loan
is approved
Mandatory Fields
for "internal" collaterals |
collateralTypeId |
POST https://DomainName/api/v1//loans/{loanId}/collaterals
POST /loans/1/collaterals
Content-Type: application/json
Request Body:
{
collateralTypeId:9,
}
{
"loanId": 1,
"resourceId": 12
}
POST /loans/1/collaterals
Content-Type: application/json
Request Body:
{
"collateralTypeId":"8",
"value": "50000",
"dateFormat":"dd MMMM yyyy",
"locale": "en",
"description": "24 Carat Gold chain weighing 12 grams"
}
{
"loanId": 1,
"resourceId": 13
}
Update a Collateral
PUT https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId}
PUT loans/1/collaterals/12
Content-Type: application/json
Request Body:
{
"description": "22 Carat Gold chain weighing 12 grams"
}
{
"loanId": 1,
"resourceId": 12,
"changes": {
"description": "22 Carat Gold chain weighing 12 grams"
}
}
Remove a Collateral
Note: A collateral can only be removed from Loans that are not yet approved.
DELETE https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId}
DELETE loans/1/collaterals/13
Content-Type: application/json
No Request Body:
{
"loanId": 1,
"resourceId": 13
}
Loan Charges
Its typical for MFIs to add extra costs for their loan products. They can be either Fees or Penalties.
Loan Charges are instances of Charges and represent either fees and penalties for loan products. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Loan) are described here
Field Descriptions |
amountPaid |
The Total amount which has been paid for this Charge |
amountWaived |
The Total amount that has been waived for this Charge |
amountWrittenOff |
Total amount written off from this Charge |
amountOutstanding |
The Total outstanding amount for this Charge |
List Loan Charges
Example Requests:
GET https://DomainName/api/v1/loans/{loanId}/charges
[
{
"id": 1,
"chargeId": 1,
"name": "Loan Processing fee",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
},
{
"id": 7,
"chargeId": 2,
"name": "Collection Fee",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2013,
3,
29
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
}
]
Retrieve Loan Charges Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/loans/{loanId}/charges/template
{
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"chargeOptions": [
{
"id": 2,
"name": "Collection Fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
},
{
"id": 3,
"name": "Late payment penalty",
"active": true,
"penalty": true,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 1,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
},
{
"id": 1,
"name": "Loan Processing fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
}
],
"penalty": false
}
Retrieve a Loan Charge
Example Requests:
GET https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}
{
"id": 1,
"chargeId": 1,
"name": "Loan Processing fee",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
}
Create a Loan Charge
Mandatory Fields
for Loan Charges |
chargeId, amount, dueDate |
POST https://DomainName/api/v1/loans/{loanId}/charges
POST /loans/1/charges
Content-Type: application/json
Request Body:
{
"chargeId": "2",
"locale": "en",
"amount": "100",
"dateFormat": "dd MMMM yyyy",
"dueDate": "29 April 2013"
}
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 31
}
Update a Loan Charge
Currently Loan Charges may be updated only if the Loan is not yet approved
PUT https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}
PUT loans/1/charges/12
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"amount": "60",
"dueDate": "27 March 2013"
}
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 6,
"changes": {
"dueDate": "27 March 2013",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"amount": 60.0
}
}
Pay Loan Charge
Loan Charge will be paid if the loan is linked with a savings account
POST https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}?command=pay
POST loans/1/charges/12?command=pay
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transactionDate": "19 September 2013"
}
{
"officeId": 1,
"clientId": 1,
"loanId": 6,
"savingsId": 1,
"resourceId": 12
}
Delete a Loan Charge
Note:Currently, A Loan Charge may only be removed from Loans that are not yet approved.
DELETE https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}
DELETE loans/1/charges/2
Content-Type: application/json
No Request Body:
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 2
}
Loan Rescheduling
Loan rescheduling provides the ability to give clients extra grace periods, extend loan term by adding extra installments and adjust the interest rate of a loan.
Field Descriptions |
loanId |
The ID of the loan to be rescheduled. |
rescheduleFromDate |
Due date of the start point (installment) of the rescheduling. |
graceOnPrincipal |
Number of installments to be added with zero principal. |
graceOnInterest |
Number of installments to be added with zero interest. |
extraTerms |
Number of installments to be added after the last loan repayment schedule installment. |
recalculateInterest |
If recalculateInterest="true", the total interest amount of the loan is recalculated. If recalculateInterest="false", the total interest amount remains the same. |
newInterestRate |
New interest rate to be used in calculating the interest amount for each rescheduled period/installment. |
adjustedDueDate |
New due date for the start point (installment) of the rescheduling. |
rescheduleReasonId |
The ID of the code value that indicates the reason for rescheduling the loan. |
rescheduleReasonComment |
Text provided as extra reason for the rescheduling of the loan. |
submittedOnDate |
The date on which the loan reschedule request was made. |
Create a Loan Reschedule Request
Mandatory Fields |
loanId, rescheduleFromDate, rescheduleReasonId, submittedOnDate, graceOnPrincipal OR graceOnInterest OR extraTerms OR newInterestRate OR adjustedDueDate |
Optional Fields |
recalculateInterest, rescheduleReasonComment |
POST https://DomainName/api/v1/rescheduleloans
POST rescheduleloans
Content-Type: application/json Request Body:
{
"loanId": 1,
"graceOnPrincipal": 2,
"graceOnInterest": 3,
"extraTerms": 2,
"rescheduleFromDate": "04 December 2014",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"recalculateInterest": true,
"submittedOnDate": "04 September 2014",
"newInterestRate" : 28,
"rescheduleReasonId": 1
}
{
"loanId": 1,
"resourceId": 1
}
POST rescheduleloans
Content-Type: application/json Request Body:
{
"loanId": 1,
"graceOnPrincipal": 2,
"rescheduleFromDate": "25 December 2013",
"adjustedDueDate": "31 December 2013",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"submittedOnDate": "04 September 2013",
"rescheduleReasonComment" : "Client has gone AWOL",
"rescheduleReasonId": 1
}
{
"loanId": 1,
"resourceId": 1
}
Retrieve a Loan Reschedule Request
Example Requests:
GET https://DomainName/api/v1/rescheduleloans/{requestId}
{
"id": 1,
"loanId": 1,
"clientId": 1,
"clientName": "test test",
"loanAccountNumber": "000000001",
"statusEnum": {
"id": 100,
"code": "loanStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"pendingApproval": true,
"approved": false,
"rejected": false
},
"rescheduleFromInstallment": 5,
"rescheduleFromDate": [
2013,
12,
25
],
"recalculateInterest": false,
"rescheduleReasonCodeValue": {
"id": 1,
"name": "Passport",
"isActive": false
},
"timeline": {
"submittedOnDate": [
2013,
9,
4
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator"
},
"rescheduleReasonComment": "Client has gone AWOL",
"loanTermVariationsData": [
{
"id": 13,
"termType": {
"id": 4,
"code": "loanTermType.dueDate",
"value": "dueDate"
},
"termVariationApplicableFrom": [
2013,
12,
25
],
"dateValue": [
2013,
12,
31
],
"isSpecificToInstallment": false
},
{
"id": 14,
"termType": {
"id": 8,
"code": "loanTermType.graceOnPrincipal",
"value": "graceOnPrincipal"
},
"termVariationApplicableFrom": [
2013,
12,
25
],
"decimalValue": 2,
"isSpecificToInstallment": false
}
]
}
Retrieve a Preview of The New Loan Repayment Schedule
Example Requests:
GET https://DomainName/api/v1/rescheduleloans/{requestId}?command=previewLoanReschedule
"currency": {
"code": "KES",
"name": "Kenyan Shilling",
"decimalPlaces": 0,
"inMultiplesOf": 10,
"displaySymbol": "KSh",
"nameCode": "currency.KES",
"displayLabel": "Kenyan Shilling (KSh)"
},
"loanTermInDays": 182,
"totalPrincipalDisbursed": 10000,
"totalPrincipalExpected": 10000,
"totalPrincipalPaid": 900.000000,
"totalInterestCharged": 960,
"totalFeeChargesCharged": 0.000000,
"totalPenaltyChargesCharged": 2500.000000,
"totalRepaymentExpected": 13460,
"totalOutstanding": 12060.000000,
"periods": [
{
"period": 1,
"fromDate": [
2013,
11,
8
],
"dueDate": [
2013,
11,
8
],
"daysInPeriod": 0,
"principalOriginalDue": 0,
"principalDue": 0,
"principalOutstanding": 0,
"principalLoanBalanceOutstanding": 10000,
"interestOriginalDue": 0,
"interestDue": 0,
"interestOutstanding": 0,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 0,
"totalDueForPeriod": 0,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 0,
"totalOverdue": 0,
"totalActualCostOfLoanForPeriod": 0
},
...
...
{
"period": 30,
"fromDate": [
2014,
5,
23
],
"dueDate": [
2014,
5,
30
],
"daysInPeriod": 7,
"principalOriginalDue": 300,
"principalDue": 300,
"principalOutstanding": 300,
"principalLoanBalanceOutstanding": 0,
"interestOriginalDue": 130,
"interestDue": 130,
"interestOutstanding": 130,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 430,
"totalDueForPeriod": 430,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 430,
"totalOverdue": 430,
"totalActualCostOfLoanForPeriod": 130
}
]
}
Reject a Loan Reschedule Request
POST https://DomainName/api/v1/rescheduleloans/{requestId}?command=reject
POST rescheduleloans/1?command=reject
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "11 September 2014"
}
{
"loanId": 1,
"resourceId": 1,
"changes": {
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "11 September 2014",
"rejectedByUserId": 1
}
}
Approve a Loan Reschedule Request
Rescheduling of a loan happens once a loan reschedule request is approved.
POST https://DomainName/api/v1/rescheduleloans/{requestId}?command=approve
POST rescheduleloans/1?command=approve
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "11 September 2014"
}
{
"loanId": 1,
"resourceId": 1,
"changes": {
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "11 September 2014",
"approvedByUserId": 1
}
}
Loan Rescheduling
Loan Term Variations provides the ability to change due dates, amounts and number of instalments before loan approval.
Field Descriptions |
loanId |
The ID of the loan to be modified. |
exceptions |
contains exception data for variations(modifiedinstallments,newinstallments and deletedinstallments described below) |
Exception object fields
Modifiedinstallments Array fields
Field Descriptions |
dueDate |
Schedule dueDate for which this exception should be applied. |
modifiedDueDate |
this is the exception data to move the due date to specified date for a instalment |
installmentAmount |
new instalment amount(principal+interest) for the specified instalment. supported only for interest method declining with equal instalments Amortization |
principal |
new Principal amount for the specified instalment. supported only for interest method declining with equal instalments Amortization and for Flat loans. |
newinstallments Array fields
Field Descriptions |
dueDate |
Schedule dueDate for inserting new instalment. |
installmentAmount |
new instalment amount(principal+interest) for the new instalment. supported only for interest method declining with equal instalments Amortization |
principal |
new Principal amount for the new instalment. supported only for interest method declining with equal instalments Amortization and for Flat loans. |
deletedinstallments Array fields
Field Descriptions |
dueDate |
Schedule dueDate for removing specific instalment. |
Calculate loan repayment schedule based on Loan term variations
Mandatory Fields |
exceptions,locale,dateFormat |
POST https://DomainName/api/v1/loans/1/schedule?command=calculateLoanSchedule
POST loans/{loanIdd}/schedule?command=calculateLoanSchedule
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"exceptions": {
"modifiedinstallments": [{
"dueDate": '01 April 2016',
"modifiedDueDate": '05 April 2016'
},
{
"dueDate": '05 January 2016',
"modifiedDueDate": '01 January 2016'
}],
"deletedinstallments": [{
"dueDate": "01 October 2016"
}],
newinstallments: [{
dueDate: '10 October 2016',
installmentAmount: '1000'
}]
}
}
{
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"loanTermInDays": 12,
"totalPrincipalDisbursed": 10000,
"totalPrincipalExpected": 10000,
"totalInterestCharged": 1340.98,
"totalFeeChargesCharged": 0,
"totalPenaltyChargesCharged": 0,
"totalRepaymentExpected": 11340.98,
"periods": [{
"period": 1,
"fromDate": [2015,
11,
1],
"dueDate": [2015,
12,
1],
"daysInPeriod": 30,
"principalOriginalDue": 745.6,
"principalDue": 745.6,
"principalOutstanding": 745.6,
"principalLoanBalanceOutstanding": 9254.4,
"interestOriginalDue": 200,
"interestDue": 200,
"interestOutstanding": 200,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 945.6,
"totalDueForPeriod": 945.6,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 945.6,
"totalOverdue": 945.6,
"totalActualCostOfLoanForPeriod": 200
},
{
"period": 2,
"fromDate": [2015,
12,
1],
"dueDate": [2016,
1,
1],
"daysInPeriod": 31,
"principalOriginalDue": 814.91,
"principalDue": 814.91,
"principalOutstanding": 814.91,
"principalLoanBalanceOutstanding": 8439.49,
"interestOriginalDue": 185.09,
"interestDue": 185.09,
"interestOutstanding": 185.09,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 1000,
"totalDueForPeriod": 1000,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 1000,
"totalActualCostOfLoanForPeriod": 185.09
},
{
"period": 3,
"fromDate": [2016,
1,
1],
"dueDate": [2016,
2,
1],
"daysInPeriod": 31,
"principalOriginalDue": 770.75,
"principalDue": 770.75,
"principalOutstanding": 770.75,
"principalLoanBalanceOutstanding": 7668.74,
"interestOriginalDue": 168.79,
"interestDue": 168.79,
"interestOutstanding": 168.79,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 939.54,
"totalDueForPeriod": 939.54,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 939.54,
"totalActualCostOfLoanForPeriod": 168.79
},
{
"period": 4,
"fromDate": [2016,
2,
1],
"dueDate": [2016,
3,
5],
"daysInPeriod": 33,
"principalOriginalDue": 786.17,
"principalDue": 786.17,
"principalOutstanding": 786.17,
"principalLoanBalanceOutstanding": 6882.57,
"interestOriginalDue": 153.37,
"interestDue": 153.37,
"interestOutstanding": 153.37,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 939.54,
"totalDueForPeriod": 939.54,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 939.54,
"totalActualCostOfLoanForPeriod": 153.37
},
{
"period": 5,
"fromDate": [2016,
3,
5],
"dueDate": [2016,
4,
5],
"daysInPeriod": 31,
"principalOriginalDue": 801.89,
"principalDue": 801.89,
"principalOutstanding": 801.89,
"principalLoanBalanceOutstanding": 6080.68,
"interestOriginalDue": 137.65,
"interestDue": 137.65,
"interestOutstanding": 137.65,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 939.54,
"totalDueForPeriod": 939.54,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 939.54,
"totalActualCostOfLoanForPeriod": 137.65
},
{
"period": 6,
"fromDate": [2016,
4,
5],
"dueDate": [2016,
5,
1],
"daysInPeriod": 26,
"principalOriginalDue": 817.93,
"principalDue": 817.93,
"principalOutstanding": 817.93,
"principalLoanBalanceOutstanding": 5262.75,
"interestOriginalDue": 121.61,
"interestDue": 121.61,
"interestOutstanding": 121.61,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 939.54,
"totalDueForPeriod": 939.54,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 939.54,
"totalActualCostOfLoanForPeriod": 121.61
},
{
"period": 7,
"fromDate": [2016,
5,
1],
"dueDate": [2016,
6,
1],
"daysInPeriod": 31,
"principalOriginalDue": 834.28,
"principalDue": 834.28,
"principalOutstanding": 834.28,
"principalLoanBalanceOutstanding": 4428.47,
"interestOriginalDue": 105.26,
"interestDue": 105.26,
"interestOutstanding": 105.26,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 939.54,
"totalDueForPeriod": 939.54,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 939.54,
"totalActualCostOfLoanForPeriod": 105.26
},
{
"period": 8,
"fromDate": [2016,
6,
1],
"dueDate": [2016,
7,
1],
"daysInPeriod": 30,
"principalOriginalDue": 850.97,
"principalDue": 850.97,
"principalOutstanding": 850.97,
"principalLoanBalanceOutstanding": 3577.5,
"interestOriginalDue": 88.57,
"interestDue": 88.57,
"interestOutstanding": 88.57,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 939.54,
"totalDueForPeriod": 939.54,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 939.54,
"totalActualCostOfLoanForPeriod": 88.57
},
{
"period": 9,
"fromDate": [2016,
7,
1],
"dueDate": [2016,
8,
1],
"daysInPeriod": 31,
"principalOriginalDue": 867.99,
"principalDue": 867.99,
"principalOutstanding": 867.99,
"principalLoanBalanceOutstanding": 2709.51,
"interestOriginalDue": 71.55,
"interestDue": 71.55,
"interestOutstanding": 71.55,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 939.54,
"totalDueForPeriod": 939.54,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 939.54,
"totalActualCostOfLoanForPeriod": 71.55
},
{
"period": 10,
"fromDate": [2016,
8,
1],
"dueDate": [2016,
9,
1],
"daysInPeriod": 31,
"principalOriginalDue": 885.35,
"principalDue": 885.35,
"principalOutstanding": 885.35,
"principalLoanBalanceOutstanding": 1824.16,
"interestOriginalDue": 54.19,
"interestDue": 54.19,
"interestOutstanding": 54.19,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 939.54,
"totalDueForPeriod": 939.54,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 939.54,
"totalActualCostOfLoanForPeriod": 54.19
},
{
"period": 11,
"fromDate": [2016,
9,
1],
"dueDate": [2016,
10,
10],
"daysInPeriod": 39,
"principalOriginalDue": 903.05,
"principalDue": 903.05,
"principalOutstanding": 903.05,
"principalLoanBalanceOutstanding": 921.11,
"interestOriginalDue": 36.48,
"interestDue": 36.48,
"interestOutstanding": 36.48,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 939.53,
"totalDueForPeriod": 939.53,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 939.53,
"totalActualCostOfLoanForPeriod": 36.48
},
{
"period": 12,
"fromDate": [2016,
10,
10],
"dueDate": [2016,
11,
1],
"daysInPeriod": 22,
"principalOriginalDue": 921.11,
"principalDue": 921.11,
"principalOutstanding": 921.11,
"principalLoanBalanceOutstanding": 0,
"interestOriginalDue": 18.42,
"interestDue": 18.42,
"interestOutstanding": 18.42,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 939.53,
"totalDueForPeriod": 939.53,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 939.53,
"totalActualCostOfLoanForPeriod": 18.42
}]
}
Updates loan repayment schedule based on Loan term variations
Mandatory Fields |
exceptions,locale,dateFormat |
POST https://DomainName/api/v1/loans/1/schedule?command=addVariations
POST loans/{loanIdd}/schedule?command=addVariations
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"exceptions": {
"modifiedinstallments": [{
"dueDate": '01 April 2016',
"modifiedDueDate": '05 April 2016'
},
{
"dueDate": '05 January 2016',
"modifiedDueDate": '01 January 2016'
}],
"deletedinstallments": [{
"dueDate": "01 October 2016"
}],
newinstallments: [{
dueDate: '10 October 2016',
installmentAmount: '1000'
}]
}
}
{
"loanId": 1,
"changes": {
"loanTermVariations": [{
"id": 21,
"termType": {
"id": 4,
"code": "loanTermType.dueDate",
"value": "dueDate"
},
"termVariationApplicableFrom": [2016,
1,
1],
"dateValue": [2016,
1,
10],
"isSpecificToInstallment": true
},
{
"id": 22,
"termType": {
"id": 3,
"code": "loanTermType.principalAmount",
"value": "principalAmount"
},
"termVariationApplicableFrom": [2016,
1,
10],
"decimalValue": 1100,
"isSpecificToInstallment": true
},
{
"id": 23,
"termType": {
"id": 3,
"code": "loanTermType.principalAmount",
"value": "principalAmount"
},
"termVariationApplicableFrom": [2016,
8,
1],
"decimalValue": 1000,
"isSpecificToInstallment": true
},
{
"id": 24,
"termType": {
"id": 5,
"code": "loanTermType.dueDate",
"value": "insertInstallment"
},
"termVariationApplicableFrom": [2016,
8,
15],
"decimalValue": 900,
"isSpecificToInstallment": true
}]
}
}
Updates loan repayment schedule by removing Loan term variations
Mandatory Fields |
POST https://DomainName/api/v1/loans/1/schedule?command=deleteVariations
POST loans/{loanIdd}/schedule?command=deleteVariations
Content-Type: application/json
Request Body:
{}
{
"loanId": 1,
"changes": {
"removedEntityIds": [{
21,22}]
}
}
Offices
Offices are used to model an MFIs structure. A hierarchical 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.
Field Descriptions |
externalId |
A place to put an external reference for
this office e.g. The ID another system uses for it. If provided, it must be unique. |
hierarchy |
This field is a system generated
convenience field. It can't be set. It uses "dot notation" to define where an office stands in the office hierarchy. For example, the system default office (id = 1) has a hierarchy value of '.' An office (id = 12) placed directly underneath this default office has a hierarchy value of '.12.' And if a further office (id = 78) is placed directly under office (id = 12) its hierarchy value is '.12.78.' The hierarchy value is useful when you need to display offices in 'hierarchy' order (perhaps indented in a drop down list box). |
List Offices
Example Requests:
GET https://DomainName/api/v1/offices
[
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
}
]
Retrieve Office Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/offices/template
{
"openingDate": [
2013,
2,
4
],
"allowedParents": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
]
}
Retrieve an Office
Example Requests:
GET https://DomainName/api/v1/offices/1
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
}
Create an Office
Mandatory Fields |
name, openingDate, parentId |
POST https://DomainName/api/v1/offices
POST offices
Content-Type: application/json
Request Body:
{
"name": "Example New Branch",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"openingDate": "01 July 2007",
"parentId": 2,
"externalId": "SYS54-88"
}
{
"officeId": 3,
"resourceId": 3
}
Update Office
PUT https://DomainName/api/v1/offices/{officeId}
PUT offices/1
Content-Type: application/json
Request Body:
{
"name": "Name is updated"
}
{
"officeId": 1,
"resourceId": 1,
"changes": {
"name": "Name is updated"
}
}
Loan Products
A Loan product is a template that is used when creating a loan. Much of the template definition can be overridden during loan creation.
Field Descriptions |
name |
Name associated with loan product on system. |
shortName |
Short name associated with a loan product. An abbreviated version of the name, used in reports or menus where space is limited, such as Collection Sheets. |
description |
For providing helpful description of product offering. |
fundId |
For associating a loan product with a given fund by default. |
includeInBorrowerCycle |
It is a flag, Used to denote whether the loans should include in loan cycle counter or not. |
useBorrowerCycle |
It is a flag, Used to denote whether the loans should depend on borrower loan cycle counter or not. |
currencyCode |
A three letter ISO code of currency. |
digitsAfterDecimal |
Override the currency default value for digitsAfterDecimal. |
inMultiplesOf |
Override the default value for rounding currency to multiples of value provided. |
installmentAmountInMultiplesOf |
Override the default value for rounding instalment amount to multiples of value provided. |
principal |
The loan amount to be disbursed to through loan. |
numberOfRepayments |
Number of installments to repay. Used like: numberOfRepayments Every repaymentEvery repaymentFrequencyType e.g. 10 (repayments) Every 12 Weeks |
repaymentEvery |
Used like: numberOfRepayments Every
repaymentEvery repaymentFrequencyType e.g. 10 (repayments) Every 12 Weeks |
repaymentFrequencyType |
Used like: numberOfRepayments Every
repaymentEvery repaymentFrequencyType e.g. 10 (repayments) Every 12 Weeks Example Values: 0=Days, 1=Weeks, 2=Months |
interestRatePerPeriod |
Interest Rate. Used like: interestRatePerPeriod % interestRateFrequencyType - interestType e.g. 12.0000% Per year - Declining Balance |
interestRateFrequencyType |
Used like: interestRatePerPeriod%
interestRateFrequencyType - interestType e.g. 12.0000% Per year - Declining Balance Example Values: 2=Per month, 3=Per year |
amortizationType |
Example Values: 0=Equal principle payments, 1=Equal installments |
interestType |
Used like: interestRatePerPeriod%
interestRateFrequencyType - interestType e.g. 12.0000% Per year - Declining Balance Example Values: 0=Declining Balance, 1=Flat |
interestCalculationPeriodType |
Example Values: 0=Daily, 1=Same as repayment period |
allowPartialPeriodInterestCalcualtion |
This value will be supported along with interestCalculationPeriodType as Same as repayment period to calculate interest for partial periods. Example: Interest charged from is 5th of April , Principal is 10000 and interest is 1% per month then the interest will be (10000 * 1%)* (25/30) , it calculates for the month first then calculates exact periods between start date and end date(can be a decimal) |
inArrearsTolerance |
The amount that can be 'waived' at end
of all loan payments because it is too small to worry about. This is also the tolerance amount assessed when determining if a loan is in arrears. |
principalVariationsForBorrowerCycle,interestRateVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle |
Variations for loan, based on borrower cycle number |
minimumDaysBetweenDisbursalAndFirstRepayment |
The minimum number of days allowed between a Loan disbursal and its first repayment. |
principalThresholdForLastInstalment |
Field represents percentage of current instalment principal amount for comparing against principal outstanding to add another repayment instalment. If the outstanding principal amount is less then calculated amount, remaining outstanding amount will be added to current instalment. Default value for multi disburse loan is 50% and non-multi disburse loan is 0% |
canDefineInstallmentAmount |
if provided as true, then fixed instalment amount can be provided from loan account. |
transactionProcessingStrategyId |
An enumeration that indicates the type of transaction processing strategy to be used. This relates to functionality that is also known as Payment Application Logic.
A number of out of the box approaches exist, some are custom to specific MFIs, some are more general and indicate the order in which payments are processed. Refer to the Payment Application Logic / Transaction Processing Strategy section in the appendix for more detailed overview of each available payment application logic provided out of the box. List of current approaches:
|
graceOnPrincipalPayment |
Optional: Integer - represents the number of repayment periods that grace should apply to the principal component of a repayment period. |
graceOnInterestPayment |
Optional: Integer - represents the number of repayment periods that grace should apply to the interest component of a repayment period. Interest is still calculated but offset to later repayment periods. |
graceOnInterestCharged |
Optional: Integer - represents the number of repayment periods that should be interest-free. |
graceOnArrearsAgeing |
Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue. |
overdueDaysForNPA |
Optional: Integer - represents the maximum number of days a Loan may be overdue before being classified as a NPA (non performing asset) |
accountMovesOutOfNPAOnlyOnArrearsCompletion |
Optional: Boolean - if provided as true, Loan Account moves out of NPA state only when all arrears are cleared |
accountingRule |
Specifies if accounting is enabled for the particular product and the type of the accounting rule to be used Example Values:1=NONE, 2=CASH_BASED, 3=ACCRUAL_PERIODIC, 4=ACCRUAL_UPFRONT |
isInterestRecalculationEnabled |
It is a flag, Used to denote whether interest recalculation is enabled or disabled for the particular product |
daysInYearType |
Specifies the number of days in a year. Example Values:1=ACTUAL(Actual number of days in year), 360=360 DAYS, 364=364 DAYS(52 WEEKS), 365=365 DAYS |
daysInMonthType |
Specifies the number of days in a month. Example Values:1=ACTUAL(Actual number of days in month), 30=30 DAYS |
interestRecalculationCompoundingMethod |
Specifies which amount portion should be added to principal for interest recalculation. Example Values:0=NONE(Only on principal), 1=INTEREST(Principal+Interest), 2=FEE(Principal+Fee), 3=FEE And INTEREST (Principal+Fee+Interest) |
rescheduleStrategyMethod |
Specifies what action should perform on loan repayment schedule for advance payments. Example Values:1=Reschedule next repayments, 2=Reduce number of installments, 3=Reduce EMI amount |
recalculationCompoundingFrequencyType |
Specifies effective date from which the compounding of interest or fee amounts will be considered in recalculation on late payment. Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly |
recalculationCompoundingFrequencyInterval |
Specifies compounding frequency interval for interest recalculation. |
recalculationCompoundingFrequencyDate |
Specifies compounding frequency start date for interest recalculation. |
recalculationRestFrequencyType |
Specifies effective date from which the late or advanced payment amounts will be considered in recalculation. Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly |
recalculationRestFrequencyInterval |
Specifies rest frequency interval for interest recalculation. |
recalculationRestFrequencyDate |
Specifies rest frequency start date for interest recalculation. |
preClosureInterestCalculationStrategy |
Specifies applicable days for interest calculation on pre closure of a loan. Example Values:1=Calculate till pre closure date, 2=Calculate till rest frequency date |
isArrearsBasedOnOriginalSchedule |
If Specified as true, arrears will be identified based on original schedule. |
allowAttributeOverrides |
Specifies if select attributes may be overridden for individual loan accounts. |
List Loan Products
Example Requests:
GET https://DomainName/api/v1/loanproducts
[
{
"id": 1,
"name": "personal loan product",
"shortName": "pe1",
"includeInBorrowerCycle": false,
"useBorrowerCycle": false,
"startDate": [
2013,
9,
2
],
"closeDate": [
2014,
2,
7
],
"status": "loanProduct.active",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principal": 10000.000000,
"minPrincipal": 5000.000000,
"maxPrincipal": 15000.000000,
"numberOfRepayments": 10,
"minNumberOfRepayments": 5,
"maxNumberOfRepayments": 15,
"repaymentEvery": 7,
"repaymentFrequencyType": {
"id": 0,
"code": "repaymentFrequency.periodFrequencyType.days",
"value": "Days"
},
"interestRatePerPeriod": 15.000000,
"interestRateFrequencyType": {
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
},
"annualInterestRate": 15.000000,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyName": "Mifos style",
"principalVariationsForBorrowerCycle": [],
"interestRateVariationsForBorrowerCycle": [],
"numberOfRepaymentVariationsForBorrowerCycle": [],
"daysInMonthType": {
"id": 30,
"code": "DaysInMonthType.days360",
"value": "30 Days"
},
"daysInYearType": {
"id": 360,
"code": "DaysInYearType.days360",
"value": "360 Days"
},
"isInterestRecalculationEnabled": true,
"interestRecalculationData": {
"id": 3,
"productId": 1,
"interestRecalculationCompoundingType": {
"id": 2,
"code": "interestRecalculationCompoundingMethod.fee",
"value": "Fee"
},
"recalculationCompoundingFrequencyType": {
"id":1,
"code":"interestRecalculationFrequencyType.same.as.repayment.period",
"value":"Same as repayment period"
},
"rescheduleStrategyType": {
"id": 2,
"code": "loanRescheduleStrategyMethod.reduce.number.of.installments",
"value": "Reduce number of installments"
},
"recalculationRestFrequencyType": {
"id":1,
"code":"interestRecalculationFrequencyType.same.as.repayment.period",
"value":"Same as repayment period"
},
"preClosureInterestCalculationStrategy": {
"id":1,
"code":"loanPreClosureInterestCalculationStrategy.tillPreClosureDate",
"value":"Till preclose Date"
},
"isArrearsBasedOnOriginalSchedule" : true
},
"accountingRule": {
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
},
"principalThresholdForLastInstalment":0
}
]
Retrieve Loan Product Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/loanproducts/template
{
"includeInBorrowerCycle": false,
"useBorrowerCycle": false,
"currency": {
"code": "",
"name": "",
"decimalPlaces": 0,
"inMultiplesOf": 0,
"displaySymbol": "",
"nameCode": "",
"displayLabel": " []"
},
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRateFrequencyType": {
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"principalVariationsForBorrowerCycle": [],
"interestRateVariationsForBorrowerCycle": [],
"numberOfRepaymentVariationsForBorrowerCycle": [],
"accountingRule": {
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
},
"daysInMonthType": {
"id": 1,
"code": "DaysInMonthType.actual",
"value": "Actual"
},
"daysInYearType": {
"id": 1,
"code": "DaysInYearType.actual",
"value": "Actual"
},
"isInterestRecalculationEnabled": false,
"interestRecalculationData": {
"interestRecalculationCompoundingType": {
"id": 0,
"code": "interestRecalculationCompoundingMethod.none",
"value": "None"
},
"rescheduleStrategyType": {
"id": 3,
"code": "loanRescheduleStrategyMethod.reduce.emi.amount",
"value": "Reduce EMI amount"
},"preClosureInterestCalculationStrategy": {
"id":1,
"code":"loanPreClosureInterestCalculationStrategy.tillPreClosureDate",
"value":"Till preclose Date"
}
},
"paymentTypeOptions": [
{
"id": 10,
"name": "check",
"position": 1
}
],
"currencyOptions": [
{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
],
"repaymentFrequencyTypeOptions": [
{
"id": 0,
"code": "repaymentFrequency.periodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "repaymentFrequency.periodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
}
],
"preClosureInterestCalculationStrategyOptions": [
{
"id":1,
"code":"loanPreClosureInterestCalculationStrategy.tillPreClosureDate",
"value":"Till preclose Date"
},
{
"id":2,
"code":"loanPreClosureInterestCalculationStrategy.tillRestFrequencyDate",
"value":"Till rest Frequency Date"
}
],
"interestRateFrequencyTypeOptions": [
{
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
{
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
}
],
"amortizationTypeOptions": [
{
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
{
"id": 0,
"code": "amortizationType.equal.principal",
"value": "Equal principal payments"
}
],
"interestTypeOptions": [
{
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
{
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
}
],
"interestCalculationPeriodTypeOptions": [
{
"id": 0,
"code": "interestCalculationPeriodType.daily",
"value": "Daily"
},
{
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
}
],
"transactionProcessingStrategyOptions": [
{
"id": 1,
"code": "mifos-standard-strategy",
"name": "Penalties, Fees, Interest, Principal order"
},
{
"id": 2,
"code": "heavensfamily-strategy",
"name": "HeavensFamily Unique"
},
{
"id": 3,
"code": "creocore-strategy",
"name": "Creocore Unique"
},
{
"id": 4,
"code": "rbi-india-strategy",
"name": "Overdue/Due Fee/Int,Principal"
},
{
"id": 5,
"code": "principal-interest-penalties-fees-order-strategy",
"name": "Principal Interest Penalties Fees Order"
},
{
"id": 6,
"code": "interest-principal-penalties-fees-order-strategy",
"name": "Interest Principal Penalties Fees Order"
}
],
"chargeOptions": [
{
"id": 5,
"name": "des charge",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100.000000,
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 1,
"name": "flat install",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 50.000000,
"chargeTimeType": {
"id": 8,
"code": "chargeTimeType.instalmentFee",
"value": "Instalment Fee"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 9,
"name": "install amt+int",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 5.000000,
"chargeTimeType": {
"id": 8,
"code": "chargeTimeType.instalmentFee",
"value": "Instalment Fee"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 3,
"code": "chargeCalculationType.percent.of.amount.and.interest",
"value": "% Loan Amount + Interest"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 10,
"name": "install int",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 5.000000,
"chargeTimeType": {
"id": 8,
"code": "chargeTimeType.instalmentFee",
"value": "Instalment Fee"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 4,
"code": "chargeCalculationType.percent.of.interest",
"value": "% Interest"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 2,
"name": "install per",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 5.000000,
"chargeTimeType": {
"id": 8,
"code": "chargeTimeType.instalmentFee",
"value": "Instalment Fee"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
"chargePaymentMode": {
"id": 1,
"code": "chargepaymentmode.accounttransfer",
"value": "Account transfer"
}
},
{
"id": 8,
"name": "spe int",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 5.000000,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 4,
"code": "chargeCalculationType.percent.of.interest",
"value": "% Interest"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 4,
"name": "specific acc transfer",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100.000000,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 1,
"code": "chargepaymentmode.accounttransfer",
"value": "Account transfer"
}
},
{
"id": 7,
"name": "specific amt+int",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 5.000000,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 3,
"code": "chargeCalculationType.percent.of.amount.and.interest",
"value": "% Loan Amount + Interest"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 3,
"name": "specific per",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 5.000000,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 6,
"name": "xyz",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 50.000000,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 1,
"code": "chargepaymentmode.accounttransfer",
"value": "Account transfer"
}
}
],
"accountingRuleOptions": [
{
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
},
{
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
},
{
"id": 3,
"code": "accountingRuleType.accrual",
"value": "ACCRUAL BASED"
}
],
"accountingMappingOptions": {
"liabilityAccountOptions": [
{
"id": 11,
"name": "over payment",
"glCode": "13",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "over payment",
"tagId": {
"id": 0
},
"organizationRunningBalance": 0
},
],
"assetAccountOptions": [
{
"id": 1,
"name": "fund source",
"glCode": "01",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "fund source",
"tagId": {
"id": 0
},
"organizationRunningBalance": -60000
},
{
"id": 2,
"name": "Loan portfolio",
"glCode": "02",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Loan portfolio",
"tagId": {
"id": 0
},
"organizationRunningBalance": 60000
},
{
"id": 3,
"name": "transfers",
"glCode": "03",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "transfers",
"tagId": {
"id": 0
},
"organizationRunningBalance": 0
},
],
"expenseAccountOptions": [
{
"id": 10,
"name": "loans written off 2",
"glCode": "12",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "loans written off 2",
"tagId": {
"id": 0
},
"organizationRunningBalance": 0
}
],
"incomeAccountOptions": [
{
"id": 4,
"name": "income from interest",
"glCode": "04",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "income from interest",
"tagId": {
"id": 0
},
"organizationRunningBalance": 19
},
{
"id": 8,
"name": "income from fees 2",
"glCode": "10",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "income from fees 2",
"tagId": {
"id": 0
},
"organizationRunningBalance": 0
},
{
"id": 9,
"name": "income from penalities 2",
"glCode": "11",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "income from penalities 2",
"tagId": {
"id": 0
},
"organizationRunningBalance": 0
}
]
},
"valueConditionTypeOptions": [
{
"id": 2,
"code": "LoanProductValueConditionType.equal",
"value": "equals"
},
{
"id": 3,
"code": "LoanProductValueConditionType.greterthan",
"value": "greter than"
}
],
"daysInMonthTypeOptions": [{
"id": 1,
"code": "DaysInMonthType.actual",
"value": "Actual"
},
{
"id": 30,
"code": "DaysInMonthType.days360",
"value": "30 Days"
}],
"daysInYearTypeOptions": [{
"id": 1,
"code": "DaysInYearType.actual",
"value": "Actual"
},
{
"id": 360,
"code": "DaysInYearType.days360",
"value": "360 Days"
},
{
"id": 364,
"code": "DaysInYearType.days364",
"value": "364 Days"
},
{
"id": 365,
"code": "DaysInYearType.days365",
"value": "365 Days"
}],
"interestRecalculationCompoundingTypeOptions": [{
"id": 0,
"code": "interestRecalculationCompoundingMethod.none",
"value": "None"
},
{
"id": 2,
"code": "interestRecalculationCompoundingMethod.fee",
"value": "Fee"
},
{
"id": 1,
"code": "interestRecalculationCompoundingMethod.interest",
"value": "Interest"
},
{
"id": 3,
"code": "interestRecalculationCompoundingMethod.interest.and.fee",
"value": "Fee and Interest"
}],
"rescheduleStrategyTypeOptions": [{
"id": 3,
"code": "loanRescheduleStrategyMethod.reduce.emi.amount",
"value": "Reduce EMI amount"
},
{
"id": 2,
"code": "loanRescheduleStrategyMethod.reduce.number.of.installments",
"value": "Reduce number of installments"
},
{
"id": 1,
"code": "loanRescheduleStrategyMethod.reschedule.next.repayments",
"value": "Reschedule next repayments"
}],
"interestRecalculationFrequencyTypeOptions": [
{
"id":1,
"code":"interestRecalculationFrequencyType.same.as.repayment.period",
"value":"Same as repayment period"
},
{
"id":2,
"code":"interestRecalculationFrequencyType.daily",
"value":"Daily"
},
{
"id":3,
"code":"interestRecalculationFrequencyType.weekly",
"value":"Weekly"
},
{
"id":4,
"code":"interestRecalculationFrequencyType.monthly",
"value":"Monthly"
}]
}
Retrieve a Loan Product
Example Requests:
GET https://DomainName/api/v1/loanproducts/{productId}
{
"id": 11,
"name": "advanced accounting",
"shortName": "ad11",
"includeInBorrowerCycle": true,
"useBorrowerCycle": true,
"status": "loanProduct.active",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"principal": 10000.000000,
"minPrincipal": 2000.000000,
"maxPrincipal": 15000.000000,
"numberOfRepayments": 7,
"repaymentEvery": 7,
"repaymentFrequencyType": {
"id": 0,
"code": "repaymentFrequency.periodFrequencyType.days",
"value": "Days"
},
"interestRatePerPeriod": 5.000000,
"interestRateFrequencyType": {
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
"annualInterestRate": 60.000000,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyName": "Mifos style",
"charges": [],
"principalVariationsForBorrowerCycle": [
{
"id": 21,
"borrowerCycleNumber": 1,
"paramType": {
"id": 1,
"code": "LoanProductParamType.principal",
"value": "principal"
},
"valueConditionType": {
"id": 2,
"code": "LoanProductValueConditionType.equal",
"value": "equals"
},
"minValue": 2000.000000,
"maxValue": 20000.000000,
"defaultValue": 15000.000000
},
{
"id": 20,
"borrowerCycleNumber": 1,
"paramType": {
"id": 1,
"code": "LoanProductParamType.principal",
"value": "principal"
},
"valueConditionType": {
"id": 3,
"code": "LoanProductValueConditionType.greterthan",
"value": "greter than"
},
"minValue": 3000.000000,
"maxValue": 25000.000000,
"defaultValue": 20000.000000
}
],
"interestRateVariationsForBorrowerCycle": [],
"numberOfRepaymentVariationsForBorrowerCycle": [],
"accountingRule": {
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
},
"accountingMappings": {
"fundSourceAccount": {
"id": 1,
"name": "fund source",
"glCode": "01"
},
"loanPortfolioAccount": {
"id": 2,
"name": "Loan portfolio",
"glCode": "02"
},
"transfersInSuspenseAccount": {
"id": 3,
"name": "transfers",
"glCode": "03"
},
"interestOnLoanAccount": {
"id": 4,
"name": "income from interest",
"glCode": "04"
},
"incomeFromFeeAccount": {
"id": 8,
"name": "income from fees 2",
"glCode": "10"
},
"incomeFromPenaltyAccount": {
"id": 9,
"name": "income from penalities 2",
"glCode": "11"
},
"writeOffAccount": {
"id": 10,
"name": "loans written off 2",
"glCode": "12"
},
"overpaymentLiabilityAccount": {
"id": 11,
"name": "over payment",
"glCode": "13"
}
},
"paymentChannelToFundSourceMappings": [
{
"paymentType": {
"id": 10,
"name": "check"
},
"fundSourceAccount": {
"id": 1,
"name": "fund source",
"glCode": "01"
}
}
],
"feeToIncomeAccountMappings": [
{
"charge": {
"id": 1,
"name": "flat install",
"active": false,
"penalty": false
},
"incomeAccount": {
"id": 8,
"name": "income from fees 2",
"glCode": "10"
}
},
{
"charge": {
"id": 2,
"name": "install per",
"active": false,
"penalty": false
},
"incomeAccount": {
"id": 4,
"name": "income from interest",
"glCode": "04"
}
},
{
"charge": {
"id": 5,
"name": "des charge",
"active": false,
"penalty": false
},
"incomeAccount": {
"id": 9,
"name": "income from penalities 2",
"glCode": "11"
}
},
"multiDisburseLoan":true,"maxTrancheCount":3,"outstandingLoanBalance":36000.000000,
"overdueDaysForNPA":2,
"principalThresholdForLastInstalment":50
]
}
Create a Loan Product
Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in.
Refer MifosX Accounting Specs Draft for more details regarding the significance of the selected accounting ruleMandatory Fields |
name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType |
Optional Fields |
inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion |
Additional Mandatory Fields for Cash(2) based accounting |
fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId |
Additional Mandatory Fields for periodic (3) and upfront (4)accrual accounting |
fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId |
Additional Mandatory Fields if interest recalculation is enabled(true) |
interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType |
Additional Optional Fields if interest recalculation is enabled(true) |
isArrearsBasedOnOriginalSchedule, preClosureInterestCalculationStrategy |
Additional Optional Fields if interest recalculation is enabled(true) and recalculationRestFrequencyType is not same as repayment period |
recalculationRestFrequencyInterval, recalculationRestFrequencyDate |
Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled |
recalculationCompoundingFrequencyType |
Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled and
recalculationCompoundingFrequencyType is not same as repayment period |
recalculationCompoundingFrequencyInterval, recalculationCompoundingFrequencyDate |
Additional Mandatory Fields if Hold Guarantee funds is enabled(true) |
mandatoryGuarantee |
Additional Optional Fields if Hold Guarantee funds is enabled(true) |
minimumGuaranteeFromOwnFunds,minimumGuaranteeFromGuarantor |
POST https://DomainName/api/v1/loanproducts
POST loanproducts
Content-Type: application/json
Request Body:
{"currencyCode":"USD",
"includeInBorrowerCycle":"true",
"useBorrowerCycle":true,
"digitsAfterDecimal":"2",
"inMultiplesOf":"0",
"repaymentFrequencyType":0,
"interestRateFrequencyType":2,
"amortizationType":1,
"interestType":0,
"interestCalculationPeriodType":1,
"transactionProcessingStrategyId":1,
"principalVariationsForBorrowerCycle":[],
"interestRateVariationsForBorrowerCycle":[],
"numberOfRepaymentVariationsForBorrowerCycle":[
{
"valueConditionType":2,
"borrowerCycleNumber":"1",
"minValue":"5",
"defaultValue":"10",
"maxValue":"15"
},
{
"valueConditionType":3,
"borrowerCycleNumber":"1",
"minValue":"7",
"defaultValue":"15",
"maxValue":"20"
}
],
"allowAttributeOverrides":
{amortizationType : true,
interestType : true,
transactionProcessingStrategyId : false,
interestCalculationPeriodType : true,
inArrearsTolerance : false,
repaymentEvery : true,
graceOnPrincipalAndInterestPayment : true,
graceOnArrearsAgeing : true},
"accountingRule":"2",
"name":"product 5",
"shortName":"prd5",
"principal":"5000",
"numberOfRepayments":"7",
"repaymentEvery":"7",
"interestRatePerPeriod":"5",
"paymentChannelToFundSourceMappings":[],
"feeToIncomeAccountMappings":[],
"penaltyToIncomeAccountMappings":[],
"charges":[],
"overdueDaysForNPA":2,
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"fundSourceAccountId":1,
"loanPortfolioAccountId":2,
"transfersInSuspenseAccountId":3,
"interestOnLoanAccountId":4,
"incomeFromFeeAccountId":8,
"incomeFromPenaltyAccountId":9,
"writeOffAccountId":10,
"overpaymentLiabilityAccountId":11,
"daysInMonthType":1,
"daysInYearType":1,
"isInterestRecalculationEnabled":"false",
"holdGuaranteeFunds":"false",
"principalThresholdForLastInstallment":20
}
{
"resourceId": 1
}
POST loanproducts
Content-Type: application/json
Request Body:
{
"name": "LP Cash Accounting",
"shortName": "LPCA",
"currencyCode": "USD",
"locale": "en_GB",
"digitsAfterDecimal": "2",
"inMultiplesOf": 0,
"principal": "100,000.00",
"numberOfRepayments": "12",
"repaymentEvery": "1",
"repaymentFrequencyType": 2,
"transactionProcessingStrategyId": 1,
"interestRatePerPeriod": "1.75",
"interestRateFrequencyType": 2,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"daysInMonthType":1,
"daysInYearType":1,
"isInterestRecalculationEnabled":"true",
"interestRecalculationCompoundingMethod":"0",
"rescheduleStrategyMethod":"3",
"recalculationRestFrequencyType":"1",
"preClosureInterestCalculationStrategy":1,
"accountingRule":"2",
"fundSourceAccountId":"4",
"loanPortfolioAccountId":"8",
"interestOnLoanAccountId":"34",
"incomeFromFeeAccountId":"37",
"incomeFromPenaltyAccountId":"35",
"writeOffAccountId":"41",
"transfersInSuspenseAccountId":"4",
"overpaymentLiabilityAccountId":"2",
"paymentChannelToFundSourceMappings": [
{
"paymentTypeId": "11",
"fundSourceAccountId": "11"
}
],
"feeToIncomeAccountMappings": [
{
"chargeId": "1",
"incomeAccountId": "5"
},
{
"chargeId": "2",
"incomeAccountId": "8"
}
],
"penaltyToIncomeAccountMappings": [
{
"chargeId": "6",
"incomeAccountId": "9"
}
]
}
{
"resourceId": 2
}
POST loanproducts
Content-Type: application/json
Request Body:
{
"name": "LP Accrual Accounting",
"shortName": "LPAA",
"currencyCode": "USD",
"locale": "en_GB",
"digitsAfterDecimal": "2",
"inMultiplesOf": 0,
"principal": "100,000.00",
"numberOfRepayments": "12",
"repaymentEvery": "1",
"repaymentFrequencyType": 2,
"transactionProcessingStrategyId": 1,
"interestRatePerPeriod": "1.75",
"interestRateFrequencyType": 2,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"daysInMonthType":1,
"daysInYearType":1,
"isInterestRecalculationEnabled":"false",
"accountingRule":"3",
"fundSourceAccountId":"4",
"loanPortfolioAccountId":"8",
"receivableInterestAccountId":"9",
"receivableFeeAccountId":"11",
"receivablePenaltyAccountId":"10",
"interestOnLoanAccountId":"34",
"incomeFromFeeAccountId":"37",
"incomeFromPenaltyAccountId":"35",
"overpaymentLiabilityAccountId":"2",
"writeOffAccountId":"41"
}
{
"resourceId": 3
}
Update a Loan Product
PUT https://DomainName/api/v1/loanproducts/{loanId}
PUT loanproducts/1
Content-Type: application/json
Request Body:
{
"locale": "en_GB",
"principal": "70,000.00"
}
{
"resourceId": 1,
"changes": {
"principal": 70000,
"locale": "en_GB"
}
}
PUT loanproducts/3
Content-Type: application/json
Request Body:
{
"locale": "en",
"isInterestRecalculationEnabled":"true",
"interestRecalculationCompoundingMethod":"0",
"rescheduleStrategyMethod":"3",
"recalculationRestFrequencyType":"1"
}
{
"resourceId": 1,
"changes": {
"locale": "en",
"isInterestRecalculationEnabled":"true",
"interestRecalculationCompoundingMethod":"0",
"rescheduleStrategyMethod":"3",
"recalculationRestFrequencyType":"1"
}
}
Loan Products Mix
If you have the appropriate permissions, you can decide which types of products a given client or group can mix. In this way, you can restrict clients from having active loans accounts of different products at the same time.
Field Descriptions |
restrictedProducts |
List of productIds to create a product mix |
List Loan Product Mix
Example Requests:
GET https://DomainName/api/v1/loanproducts?associations=productMixes
[
{
"productId": 1,
"productName": "Personal Loan",
"restrictedProducts": [
{
"id": 2,
"name": "Joint Loan",
"includeInBorrowerCycle": false
},
{
"id": 5,
"name": "Primary Loan",
"includeInBorrowerCycle": false
},
{
"id": 3,
"name": "Daily Loan",
"includeInBorrowerCycle": false
}
],
"allowedProducts": [
{
"id": 1,
"name": "Personal Loan",
"includeInBorrowerCycle": false
},
{
"id": 6,
"name": "Personal Loan -2",
"includeInBorrowerCycle": false
},
{
"id": 4,
"name": "Weekly Loan",
"includeInBorrowerCycle": false
}
]
},
{
"productId": 2,
"productName": "Joint Loan",
"restrictedProducts": [
{
"id": 1,
"name": "Personal Loan",
"includeInBorrowerCycle": false
},
{
"id": 6,
"name": "Personal Loan -2",
"includeInBorrowerCycle": false
}
],
"allowedProducts": [
{
"id": 3,
"name": "Daily Loan",
"includeInBorrowerCycle": false
},
{
"id": 2,
"name": "Joint Loan",
"includeInBorrowerCycle": false
},
{
"id": 5,
"name": "Primary Loan",
"includeInBorrowerCycle": false
},
{
"id": 4,
"name": "Weekly Loan",
"includeInBorrowerCycle": false
}
]
}
]
Retrieve Product Mix Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
This request gets all the products details for which productmix is not defined.
This request gets the productmix details for the specific loanproduct.
GET https://DomainName/api/v1/loanproducts/template?isProductMixTemplate=true
{
"productOptions": [
{
"id": 5,
"name": "Primary Loan"
},
{
"id": 4,
"name": "Weekly Loan"
}
]
}
GET https://DomainName/api/v1/loanproducts/5/productmix
{
"restrictedProducts": [
{
"id": 1,
"name": "Personal Loan",
"includeInBorrowerCycle": false
}
],
"allowedProducts": [
{
"id": 3,
"name": "Daily Loan",
"includeInBorrowerCycle": false
},
{
"id": 2,
"name": "Joint Loan",
"includeInBorrowerCycle": false
},
{
"id": 6,
"name": "Personal Loan -2",
"includeInBorrowerCycle": false
},
{
"id": 5,
"name": "Primary Loan",
"includeInBorrowerCycle": false
},
{
"id": 4,
"name": "Weekly Loan",
"includeInBorrowerCycle": false
}
]
}
Retrieve Loan Product Mix
Example Requests:
GET https://DomainName/api/v1/loanproducts/5/productmix
{
"restrictedProducts": [
{
"id": 1,
"name": "Personal Loan",
"includeInBorrowerCycle": false
}
],
"allowedProducts": [
{
"id": 3,
"name": "Daily Loan",
"includeInBorrowerCycle": false
},
{
"id": 2,
"name": "Joint Loan",
"includeInBorrowerCycle": false
},
{
"id": 6,
"name": "Personal Loan -2",
"includeInBorrowerCycle": false
},
{
"id": 5,
"name": "Primary Loan",
"includeInBorrowerCycle": false
},
{
"id": 4,
"name": "Weekly Loan",
"includeInBorrowerCycle": false
}
]
}
Create a Loan Product Mix
Mandatory Fields |
restrictedProducts |
POST https://DomainName/api/v1/loanproducts/5/productmix
POST loanproducts/{productId}/productmix
Content-Type: application/json
Request Body:
{"restrictedProducts":["1"]}
{
"changes":{
"restrictedProductsForMix":[1],
"removedProductsForMix":[]
},
"productId":5
}
Update a Loan Product Mix
PUT https://DomainName/api/v1/loanproducts/{productId}/productmix
PUT loanproducts/5/productmix
Content-Type: application/json
Request Body:
{
"restrictedProducts":["3"]
}
{
"changes": {
"restrictedProductsForMix": [3],
"removedProductsForMix": [1]
},
"productId": 5
}
Delete a Loan Product Mix
DELETE https://DomainName/api/v1/loanproducts/{productId}/productmix
DELETE loanproducts/5/productmix
{
"changes": {
"removedProductsForMix": [3]
},
"productId": 5
}
Holidays
Some MFI's span large regions where different branch offices might observe different holidays. They need the ability to define holidays for specific branch offices and be able to set the repayment rule to follow during those holidays.
The reschedule of repayments to repaymentsRescheduledTo date during defined holidays is turned on/off by enabling/disabling reschedule-repayments-on-holidays in Global configurations.
Allow Repayment transactions on a defined holidays is turned on/off by enabling/disabling allow-transactions-on-holiday in Global configurations.
Field Descriptions |
name |
Name of the holiday. |
fromDate |
The date on holiday begins. |
toDate |
The date on holiday ends. |
repaymentsRescheduledTo |
Date to which repayments will be rescheduled when repayments date falls on a defined holiday. e.g. A holiday is defined on 25th of October 2013 with repaymentsRescheduledTo date to 26th of October 2013 and any loans with repayments date on 25th of October 2013 will be rescheduled to 26th of October 2013. |
officeId |
The officeId represents the office to which holiday is applied. |
List Holidays
Example Requests:
GET https://DomainName/api/v1/holidays?officeId=1
[
{
"id": 1,
"name": "Good Friday",
"fromDate": [
2013,
10,
25
],
"toDate": [
2013,
10,
25
],
"repaymentsScheduleTo": [
2013,
10,
26
],
"status": {
"id": 100,
"code": "holidayStatusType.pending.for.activation",
"value": "Pending for activation"
}
}
]
Create a Holiday
Mandatory Fields |
name, description, fromDate, toDate, repaymentsRescheduledTo, offices |
POST https://DomainName/api/v1/holidays
POST holidays
Content-Type: application/json
Request Body:
{
"name": "Good Friday",
"description": "Good Friday",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"fromDate": "25 October 2013",
"toDate": "25 October 2013",
"repaymentsRescheduledTo": "26 October 2013",
"offices": [
{"officeId":"1"},
{"officeId":"2"}
]
}
{
"resourceId": 1
}
Activate a Holiday
Always Holidays are created in pending state. This API allows to activate a holiday.
Only the active holidays are considered for rescheduling the loan repayment.
POST https://DomainName/api/v1/holidays/{holidayId}?command=activate
POST holidays
Content-Type: application/json
Request Body:
{
}
{
"resourceId": 1
}
Retrieve a Holiday
Example Requests:
GET https://DomainName/api/v1/holidays/{holidayId}
{
"id": 1,
"name": "Good Friday",
"fromDate": [
2013,
10,
25
],
"toDate": [
2013,
10,
25
],
"repaymentsRescheduledTo": [
2013,
10,
26
],
"status": {
"id": 100,
"code": "holidayStatusType.active",
"value": "Active"
}
}
Update a Holiday
If a holiday is in pending state (created and not activated) then all fields are allowed to modify. Once holidays become active only name and descriptions are allowed to modify.
PUT https://DomainName/api/v1/holidays/{holidayId}
PUT holidays/1
Content-Type: application/json
Request Body:
{
name:"Independence day",
description: "Holiday for Independence day celebration"
}
{
"resourceId": 1,
"changes": {
"name": "Independence day",
"description": "Holiday for Independence day celebration"
}
}
Delete a Holiday
This API allows to delete a holiday. This is a soft delete the deleted holiday status is marked as deleted.
DELETE https://DomainName/api/v1/holidays/{holidayId}
DELETE holidays/1
Content-Type: application/json
Request Body:
{
}
{
"resourceId": 1
}
Working days
The days of the week that are workdays.
Rescheduling of repayments when it falls on a non-working is turned on /off by enable/disable reschedule-future-repayments parameter in Global configurations.
Allow transactions on non-working days is configurable by enabling/disbaling the allow-transactions-on-non_workingday parameter in Global configurations.
Mandotory Field Descriptions |
recurrence |
Recurrence pattern |
repaymentRescheduleType |
repayment reschedule type .Options listed on the schedule for repayments on non-working days |
extendTermForDailyRepayments |
Extend the term for loans following a daily repayment schedule.Expects boolean value true/false |
locale |
locale must be provided. |
Schedule for repayments on non-working day |
Same day |
The repayments schedule for same day regardless of it's a non-working day. |
Next workday |
The repayments reschedule to next working day. e.g. if a repayment falls on a non-working day will be rescheduled to next available working day. |
Previous workday |
The repayments reschedule to previous working day. e.g. if a repayment falls on a non-working day will be rescheduled to previous available working day. |
Next scheduled meeting |
The repayments reschduled to next scheduled meeting. |
Working Days Template
This is a convenience resource. It can be useful when building maintenance user interface screens for working days.
Example Request:
GET https://DomainName/api/v1/workingdays/template
{
"repaymentRescheduleOptions": [
{
"id": 1,
"code": "RepaymentRescheduleType.same.day",
"value": "same day"
},
{
"id": 4,
"code": "RepaymentRescheduleType.move.to.previous.working.day",
"value": "move to previous working day"
},
{
"id": 3,
"code": "RepaymentRescheduleType.move.to.next.repayment.meeting.day",
"value": "move to next repayment meeting day"
},
{
"id": 2,
"code": "RepaymentRescheduleType.move.to.next.working.day",
"value": "move to next working day"
}
]
}
List Working days
Example Requests:
GET https://DomainName/api/v1/workingdays
[
{
"id": 1,
"recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR",
"repaymentRescheduleType": {
"id": 4,
"code": "RepaymentRescheduleType.move.to.next.working.day",
"value": "move to next working day"
}
"extendTermForDailyRepayments" : true
}
]
Update a Working Day
Mandatory Fields |
recurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale |
PUT https://DomainName/api/v1/Workingdays/1
PUT holidays
Content-Type: application/json
Request Body:
{
"recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,SU",
"locale": "en",
"repaymentsRescheduledType": 4,
"extendTermForDailyRepayments": false
}
{
"resourceId": 1
}
Currency
Application related configuration around viewing/updating the currencies permitted for use within the MFI.
Retrieve Currency Configuration
Returns the list of currencies permitted for use AND the list of currencies not selected (but available for selection).
Example Requests:
GET https://DomainName/api/v1/currencies
{
"selectedCurrencyOptions": [
{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
],
"currencyOptions": [
{
"code": "AFN",
"name": "Afghanistan Afghani",
"decimalPlaces": 2,
"nameCode": "currency.AFN",
"displayLabel": "Afghanistan Afghani [AFN]"
},
{
"code": "ALL",
"name": "Albanian Lek",
"decimalPlaces": 2,
"nameCode": "currency.ALL",
"displayLabel": "Albanian Lek [ALL]"
},
{
"code": "ZWD",
"name": "Zimbabwe Dollar",
"decimalPlaces": 2,
"nameCode": "currency.ZWD",
"displayLabel": "Zimbabwe Dollar [ZWD]"
}
]
}
Update Currency Configuration
Updates the list of currencies permitted for use.
PUT https://DomainName/api/v1/currencies
PUT currencies
Content-Type: application/json
Request Body:
{
"currencies": [
"KES",
"BND",
"LBP",
"GHC",
"USD",
"XOF",
"AED",
"AMD"
]
}
{
"currencies": [
"KES",
"BND",
"LBP",
"GHC",
"USD",
"XOF",
"AED",
"AMD"
]
}
Global Configuration
Global configuration related to set of supported enable/disable configurations:
- maker-checker - defaults to false - if true turns on maker-checker functionality
- reschedule-future-repayments - defaults to false - if true reschedules repayemnts which falls on a non-working day to configured repayment rescheduling rule
- allow-transactions-on-non_workingday - defaults to false - if true allows transactions on non-working days
- reschedule-repayments-on-holidays - defaults to false - if true reschedules repayemnts which falls on a non-working day to defined reschedule date
- allow-transactions-on-holiday - defaults to false - if true allows transactions on holidays
- savings-interest-posting-current-period-end - Set it at the database level before any savings interest is posted. When set as false(default), interest will be posted on the first date of next period. If set as true, interest will be posted on last date of current period. There is no difference in the interest amount posted.
- financial-year-beginning-month - Set it at the database level before any savings interest is posted. Allowed values 1 - 12 (January - December). Interest posting periods are evaluated based on this configuration.
- meetings-mandatory-for-jlg-loans - if set to true, enforces all JLG loans to follow a meeting schedule belonging to either the parent group or Center.
Retrieve Global Configuration
Returns the list global enable/disable configurations.
Example Requests:
GET https://DomainName/api/v1/configurations
{
"globalConfiguration": [
{
"name": "maker-checker",
"enabled": true,
"value": 0,
"id": 1
},
{
"name": "amazon-S3",
"enabled": false,
"value": 0,
"id": 2
},
]
}
Retrieve Global Configuration
Returns a global enable/disable configurations.
Example Requests:
GET https://DomainName/api/v1/configurations/1
{
"name": "maker-checker",
"enabled": true,
"value": 0,
"id": 1
}
Retrieve Global Configuration for surveys
Returns the list global enable/disable survey configurations.
Example Requests:
GET https://DomainName/api/v1/configurations/survey
{
"ppi_kenya_2005": [
{
"name": "maker-checker",
"enabled": true,
"value": 0,
"id": 1
},
{
"name": "ppi_tanzania_20012",
"enabled": false,
"value": 0,
"id": 2
},
]
}
Update Global Configuration
Updates an enable/disable global configuration item.
PUT https://DomainName/api/v1/configurations/9
PUT configurations
Content-Type: application/json
Request Body: {
"enabled":"true",
"value":2
}
{
"resourceId": 9,
"changes": {
"enabled": true
}
}
Cache
The following settings are possible for cache:
- No Caching: caching turned off
- Single node: caching on for single instance deployments of platorm (works for multiple tenants but only one tomcat)
By default caching is set to No Caching. Switching between caches results in the cache been clear e.g. from Single node to No cache and back again would clear down the single node cache.
Retrieve Cache Types
Returns the list of caches.
Example Requests:
GET https://DomainName/api/v1/caches
[
{
"cacheType": {
"id": 1,
"code": "cacheType.noCache",
"value": "No cache"
},
"enabled": true
},
{
"cacheType": {
"id": 2,
"code": "cacheType.singleNode",
"value": "Single node"
},
"enabled": false
},
{
"cacheType": {
"id": 3,
"code": "cacheType.multiNode",
"value": "Multi node"
},
"enabled": false
}
]
Switch Cache
Switches the cache to chosen one.
PUT https://DomainName/api/v1/caches
PUT caches
Content-Type: application/json
Request Body:
{
"cacheType": 2
}
{
"changes": {
"cacheType": 2
}
}
Hooks
Hooks are a mechanism to trigger custom code on the occurence of events.
Each template during hook creation represents custom behaviour on what actions should be taken on the triggering of a registered event for a hook. The action taken might be firing a HTTP request to another server or execute internal code.
In order for MifosX to send webhook payloads, your server needs to be accessible from the Internet. MifosX will send along a few HTTP headers to differentiate between event types.
X-Mifos-Entity - The entity type that was triggered.
X-Mifos-Action - The action triggered on the entity type.
X-Mifos-Platform-TenantId - The tenant which experienced the event.
Create a Hook
The following parameters can be passed for the creation of a hook :-
- name - string - Required. The name of the template that is being called. (See /hooks/template for the list of valid hook names.)
- isActive - boolean - Determines whether the hook is actually triggered.
- events - array - Determines what events the hook is triggered for.
- config - hash - Required. Key/value pairs to provide settings for this hook. These settings vary between the templates.
- templateId - Optional. The UGD template ID associated with the same entity (client or loan).
POST https://DomainName/api/v1/hooks
POST hooks
Content-Type: application/json
Request Body:
{
"name": "Web",
"isActive": true,
"displayName": "Kremlin",
"templateId": 1,
"events": [
{
"actionName": "DISBURSE",
"entityName": "LOAN"
},
{
"actionName": "REPAYMENT",
"entityName": "LOAN"
}
],
"config": {
"Payload URL": "http://example.com/webhook",
"Content Type": "json"
}
}
{
"resourceId": 4
}
Retrieve Hooks
Returns the list of hooks.
Example Requests:
GET https://DomainName/api/v1/hooks
[
{
"id": 1,
"name": "Web",
"displayName": "Kremlin",
"isActive": true,
"createdAt": [2014, 9, 16],
"updatedAt": [2014, 9, 16],
"templateId": 1,
"templateName": "My UGD",
"events": [
{
"actionName": "DISBURSE",
"entityName": "LOAN"
},
{
"actionName": "REPAYMENT",
"entityName": "LOAN"
}
],
"config": [
{
"fieldName": "Content Type",
"fieldValue": "json"
},
{
"fieldName": "Payload URL",
"fieldValue": "https://abc.com/api"
}
]
}
]
Retrieve a Hook
Returns the details of a Hook.
Example Requests:
GET https://DomainName/api/v1/hooks/{hookId}
{
"id": 1,
"name": "Web",
"displayName": "Kremlin",
"isActive": true,
"createdAt": [2014, 9, 16],
"updatedAt": [2014, 9, 16],
"templateId": 1,
"templateName": "My UGD",
"events": [
{
"actionName": "DISBURSE",
"entityName": "LOAN"
},
{
"actionName": "REPAYMENT",
"entityName": "LOAN"
}
],
"config": [
{
"fieldName": "Content Type",
"fieldValue": "json"
},
{
"fieldName": "Payload URL",
"fieldValue": "https://abc.com/api"
}
]
}
Update a Hook
Updates the details of a hook.
PUT https://DomainName/api/v1/hooks/{hookId}
PUT hooks/4
Content-Type: application/json
Request Body:
{
"name": "Web",
"isActive": true,
"displayName": "Local SMS Provider",
"events": [
{
"actionName": "DISBURSE",
"entityName": "LOAN"
}
],
"config": {
"Payload URL": "http://changed.com/sms",
"Content Type": "json"
}
}
{
"resourceId": 4,
"changes": {
"displayName": "Local SMS Provider",
"events": [
{
"actionName": "DISBURSE",
"entityName": "LOAN"
}
],
"config": {
"Payload URL": "http://changed.com/sms",
"Content Type": "json"
}
}
}
Delete a Hook
Deletes a hook.
DELETE https://DomainName/api/v1/hooks/{hookId}
DELETE hooks/4
Content-Type: application/json
{
"resourceId": 4
}
Retrieve Hooks Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/hooks/template
{
"templates": [
{
"name": "Web",
"schema": [
{
"fieldName": "Content Type",
"fieldType": "string",
"optional": true,
"placeholder": "json / form"
},
{
"fieldName": "Payload URL",
"fieldType": "string",
"optional": false
}
]
},
{
},...
],
"groupings": [
{
"name": "jobs",
"entities": [
{
"name": "SCHEDULER",
"actions": ["EXECUTEJOB", "UPDATE"]
},
{
},...
]
},
{
},...
]
}
Codes
Code and code values: Codes represent a specific category of data, their code values are a specific instance of that category.
Codes are mostly system defined which means the code itself comes out of the box and cannot be modified however its code values can be. e.g. 'Customer Identifier', it defaults to a code value of 'Passport' but could be 'Drivers License, National Id' etc
Create a Code
Creates a code. Codes created through api are always 'user defined' and so system defined is marked as false.
POST https://DomainName/api/v1/codes
POST codes
Content-Type: application/json
Request Body:
{
"name": "MyNewCode"
}
{
"resourceId": 4
}
Retrieve Codes
Returns the list of codes.
Example Requests:
GET https://DomainName/api/v1/codes
[
{
"id": 1,
"name": "Customer Identifier",
"systemDefined": true
},
{
"id": 2,
"name": "Gender",
"systemDefined": true
},
{
"id": 3,
"name": "Education",
"systemDefined": true
}
]
Retrieve a Code
Returns the details of a Code.
Example Requests:
GET https://DomainName/api/v1/codes/{codeId}
{
"id": 1,
"name": "Customer Identifier",
"systemDefined": true
}
Update a Code
Updates the details of a code if it is not system defined.
PUT https://DomainName/api/v1/codes/{codeId}
PUT codes/4
Content-Type: application/json
Request Body:
{
"name": "MyNewCode(changed)"
}
{
"resourceId": 4,
"changes": {
"name": "MyNewCode(changed)"
}
}
Delete a Code
Deletes a code if it is not system defined.
DELETE https://DomainName/api/v1/codes/{codeId}
DELETE codes/4
Content-Type: application/json
{
"resourceId": 4
}
Code Values
Code and code values: Codes represent a specific category of data, their code values are a specific instance of that category.
Codes are mostly system defined which means the code itself comes out of the box and cannot be modified however its code values can be. e.g. 'Customer Identifier', it defaults to a code value of 'Passport' but could be 'Drivers License, National Id' etc
Create a Code Value
POST https://DomainName/api/v1/codes/1/codevalues
POST codes/1/codevalues
Content-Type: application/json
Request Body:
{
"name":"Ration Card",
"description: "Ration card information",
"position":"1"
}
{
"resourceId": 4
}
List Code Values
Returns the list of Code Values for a given Code
Example Requests:
GET https://DomainName/api/v1/codes/{codeId}/codevalues
[
{
"id": 1,
"name": "Passport",
"description: "Passport information",
"position": 0
},
{
"id": 2,
"name": "Id",
"description: "ID information",
"position": 0
},
{
"id": 3,
"name": "Drivers License",
"description: "Drivers License information",
"position": 0
},
{
"id": 4,
"name": "Any Other Id Type",
"description: "Any Other Id Type information",
"position": 0
},
{
"id": 5,
"name": "Ration Card",
"description: "Ration Card information",
"position": 1
}
]
Retrieve a Code Value
Returns the details of a Code Value
Example Requests:
GET https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId}
{
"id": 1,
"name": "Passport",
"description: "Passport information",
"position": 0
}
Update a Code Value
Updates the details of a code value.
PUT https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId}
PUT codes/1/codevalues/1
Content-Type: application/json
Request Body:
{
"name": "Indian Passport",
"description": "Indian Passport information",
"position":2
}
{
"resourceId": 1,
"changes":
{
"name": "Indian Passport",
"description": "Indian Passport information",
"position": 2
}
}
Delete a Code Value
Deletes a code value
DELETE https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId}
DELETE codes/1/codevalues/5
Content-Type: application/json
{
"resourceId": 5
}
Audits
Every non-read Mifos API request is audited. A fully processed request can
not be changed or deleted. See maker checker api for situations where an audit is not
fully processed.
Permissions: To search and look at audit entries a user needs to be attached to a role
that has one of the ALL_FUNCTIONS, ALL_FUNCTIONS_READ or READ_AUDIT permissions.
Data Scope: A user can only see audits that are within their data scope. However,
'head office' users can see all audits including those that aren't office/branch related
e.g. Loan Product changes.
List Audits
Get a 200 list of audits that match the criteria supplied and sorted by audit id in descending order, and are within the requestors' data scope. Also it supports pagination and sorting
Arguments
- actionName
- optional
- Examples: CREATE, UPDATE, DISBURSE
- entityName
- optional
- Examples: CLIENT, LOAN, FUND
- resourceId
- optional, The id value of the entityName
- makerId
- optional, The id value of the application user creating the entry
- makerDateTimeFrom
- optional, Get entries created on or after this
- Example: 2013-04-10 08:00:00
- makerDateTimeTo
- optional, Get entries created on or before this
- Example: 2013-05-10 08:00:00
- checkerId
- optional, The id value of the application user that checked (approved) the entry
- checkerDateTimeFrom
- optional, Get entries checked on or after this
- Example: 2013-04-10 08:00:00
- checkerDateTimeTo
- optional, Get entries checked on or before this
- Example: 2013-05-10 18:00:00
- processingResult
- optional, The enum value of the processing status
- values:
0: Invalid
1: processed
2: awaiting.approval
3: rejected - officeId
- optional, The id value of the office/branch associated with the entry (if there is one)
- groupId
- optional, The id value of the group associated with the entry (if there is one). A group is a general idea and may be a Center, a Group, a Communal Bank or other.
- clientId
- optional, The id value of the client associated with the entry (if there is one)
- loanId
- optional, The id value of the loan associated with the entry (if there is one)
- savingsAccountId
- optional, The id value of the savings account associated with the entry (if there is one)
- includeJson
- optional, Values are true, false. Default is false.
- paged
- Boolean optional, defaults to false
- If paged is true then results will be paginated.
- offset
- Integer optional, defaults to 0
- Indicates from what result to start from.
- limit
- Integer optional, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- orderBy
- String optional, one of id, actionName, entityName, resourceId, subresourceId, madeOnDate, checkedOnDate, officeName, groupName, clientName, loanAccountNo, savingsAccountNo
- Orders the results by the field indicated.
- sortBy
- String optional, one of ASC, DESC
- Indicates what way to order results if orderBy is used.
Example Requests:
GET https://DomainName/api/v1/audits
[
{
"id": 671,
"actionName": "PERMISSIONS",
"entityName": "ROLE",
"resourceId": 6,
"maker": "keithwoodlock",
"madeOnDate": 1365014262000,
"processingResult": "processed"
},
{
"id": 670,
"actionName": "CREATE",
"entityName": "CLIENTNOTE",
"resourceId": 287,
"maker": "keithwoodlock",
"madeOnDate": 1365014204000,
"processingResult": "awaiting.approval",
"officeName": "my office",
"clientName": "gg ggg"
},
{
"id": 668,
"actionName": "UPDATE",
"entityName": "PERMISSION",
"maker": "keithwoodlock",
"madeOnDate": 1365014186000,
"processingResult": "processed"
},
{
"id": 667,
"actionName": "CREATE",
"entityName": "CLIENTNOTE",
"resourceId": 286,
"maker": "keithwoodlock",
"madeOnDate": 1365014169000,
"processingResult": "processed",
"officeName": "my office name",
"clientName": "gg ggg"
},
{
"id": 666,
"actionName": "CREATE",
"entityName": "CLIENT",
"resourceId": 363,
"maker": "keithwoodlock",
"madeOnDate": 1365012843000,
"processingResult": "awaiting.approval",
"officeName": "my office name"
},
{
"id": 657,
"actionName": "CREATE",
"entityName": "CLIENT",
"resourceId": 362,
"maker": "ii",
"madeOnDate": 1364953928000,
"checker": "ii",
"checkedOnDate": 1365010060000,
"processingResult": "processed",
"officeName": "my office name",
"clientName": "gg ggg"
},
{
"id": 645,
"actionName": "CREATE",
"entityName": "LOAN",
"resourceId": 373,
"maker": "keithwoodlock",
"madeOnDate": 1364860260000,
"checker": "keithwoodlock",
"checkedOnDate": 1364861222000,
"processingResult": "processed",
"officeName": "another office",
"clientName": "another client",
"loanAccountNo": "000000373"
},...
]
GET https://DomainName/api/v1/audits?paged=true&limit=5
{
"totalFilteredRecords": 30,
"pageItems": [
{
"id": 671,
"actionName": "PERMISSIONS",
"entityName": "ROLE",
"resourceId": 6,
"maker": "keithwoodlock",
"madeOnDate": 1365014262000,
"processingResult": "processed"
},
{
"id": 670,
"actionName": "CREATE",
"entityName": "CLIENTNOTE",
"resourceId": 287,
"maker": "keithwoodlock",
"madeOnDate": 1365014204000,
"processingResult": "awaiting.approval",
"officeName": "my office",
"clientName": "gg ggg"
},
{
"id": 668,
"actionName": "UPDATE",
"entityName": "PERMISSION",
"maker": "keithwoodlock",
"madeOnDate": 1365014186000,
"processingResult": "processed"
},
{
"id": 667,
"actionName": "CREATE",
"entityName": "CLIENTNOTE",
"resourceId": 286,
"maker": "keithwoodlock",
"madeOnDate": 1365014169000,
"processingResult": "processed",
"officeName": "my office name",
"clientName": "gg ggg"
},
{
"id": 666,
"actionName": "CREATE",
"entityName": "CLIENT",
"resourceId": 363,
"maker": "keithwoodlock",
"madeOnDate": 1365012843000,
"processingResult": "awaiting.approval",
"officeName": "my office name"
}
]
}
Audit Search Template
This is a convenience resource. It can be useful when building an Audit Search UI. "appUsers" are data scoped to the office/branch the requestor is associated with.
Example Requests:
GET https://DomainName/api/v1/audits/searchtemplate
{
"appUsers": [
{
"id": 30,
"username": "user 1"
},
{
"id": 28,
"username": "user 2"
},
{
"id": 35,
"username": "user 3"
},...
],
"actionNames": [
"CREATE",
"DELETE",
"UPDATE",
"ACTIVATE",
"ADJUST",
"APPROVALUNDO",
"APPROVE",
"APPROVEINPAST",
"BULKREASSIGN",
"CALCULATEINTEREST",
"CLOSE",
"CLOSEASRESCHEDULED",
"CREATEHISTORIC",
"DEPOSIT",
"DEREGISTER",
"DISBURSALUNDO",
"DISBURSE",
"DISBURSEINPAST",
"INTEREST",
"PERMISSIONS",
"REGISTER",
"REJECT",...
],
"entityNames": [
"CALENDAR",
"CENTER",
"CHARGE",
"CLIENT",
"CLIENTIDENTIFIER",
"CLIENTIMAGE",
"CLIENTNOTE",
"CODE",
"CODEVALUE",
"COLLATERAL",
"CONFIGURATION",
"CURRENCY",
"DATATABLE",
"DEPOSITACCOUNT",
"DEPOSITNOTE",
"DEPOSITPRODUCT",
"DOCUMENT",
"FUND",
"GLACCOUNT",
"GLCLOSURE",
"GROUP",
"GROUPNOTE",...
],
"processingResults": [
{
"id": 0,
"processingResult": "invalid"
},
{
"id": 1,
"processingResult": "processed"
},
{
"id": 2,
"processingResult": "awaiting.approval"
},
{
"id": 3,
"processingResult": "rejected"
}
]
}
Retrieve an Audit Entry
Example Requests:
GET https://DomainName/api/v1/audits
{
"id": 20,
"actionName": "REPAYMENT",
"entityName": "LOAN",
"resourceId": 868,
"maker": "dataentry1",
"madeOnDate": 1358449025000,
"processingResult": "processed",
"commandAsJson": "{\"transactionDate\":\"28 September 2012\",\"transactionAmount\":\"1,967.00\",\"locale\":\"en\",\"dateFormat\":\"dd MMMM yyyy\"}",
"officeName": "another office",
"clientName": "another client",
"loanAccountNo": "23"
}
Account number format
Account number preferences are used to describe custom formats for account numbers associated with Customer, Loan and Savings accounts.
Field Descriptions |
accountType |
Identifies the type of the Account for which the Account number format applies Refer Retrieve Account number formats Template for complete details |
prefixType |
Identifies a custom prefix for the account number
Refer Retrieve Account number formats Template for complete details |
List Account number formats
Example Requests:
GET https://DomainName/api/v1/accountnumberformats
[
{
"id": 2,
"accountType":
{
"id": 1,
"code": "accountType.client",
"value": "CLIENT"
},
"prefixType":
{
"id": 101,
"code": "accountNumberPrefixType.clientType",
"value": "CLIENT_TYPE"
}
},
{
"id": 3,
"accountType":
{
"id": 2,
"code": "accountType.loan",
"value": "LOAN"
},
"prefixType":
{
"id": 201,
"code": "accountNumberPrefixType.loanProductShortName",
"value": "LOAN_PRODUCT_SHORT_NAME"
}
}
]
Retrieve Account number format Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/accountnumberformats/template
{
"accountTypeOptions":
[
{
"id": 1,
"code": "accountType.client",
"value": "CLIENT"
},
{
"id": 2,
"code": "accountType.loan",
"value": "LOAN"
},
{
"id": 3,
"code": "accountType.savings",
"value": "SAVINGS"
},
{
"id": 4,
"code": "accountType.center",
"value": "CENTER"
},
{
"id": 5,
"code": "accountType.group",
"value": "GROUP"
}
],
"prefixTypeOptions":
{
"accountType.loan":
[
{
"id": 201,
"code": "accountNumberPrefixType.loanProductShortName",
"value": "LOAN_PRODUCT_SHORT_NAME"
},
{
"id": 1,
"code": "accountNumberPrefixType.officeName",
"value": "OFFICE_NAME"
}
],
"accountType.client":
[
{
"id": 1,
"code": "accountNumberPrefixType.officeName",
"value": "OFFICE_NAME"
},
{
"id": 101,
"code": "accountNumberPrefixType.clientType",
"value": "CLIENT_TYPE"
}
],
"accountType.savings":
[
{
"id": 301,
"code": "accountNumberPrefixType.savingsProductShortName",
"value": "SAVINGS_PRODUCT_SHORT_NAME"
},
{
"id": 1,
"code": "accountNumberPrefixType.officeName",
"value": "OFFICE_NAME"
}
],
"accountType.center":
[
{
"id": 1,
"code": "accountNumberPrefixType.officeName",
"value": "OFFICE_NAME"
}
],
"accountType.group":
[
{
"id": 1,
"code": "accountNumberPrefixType.officeName",
"value": "OFFICE_NAME"
},
]
}
}
Retrieve an Account number format
Example Requests:
GET https://DomainName/api/v1/accountnumberformats/{accountnumberformatId}
{
"id": 2,
"accountType":
{
"id": 1,
"code": "accountType.client",
"value": "CLIENT"
},
"prefixType":
{
"id": 101,
"code": "accountNumberPrefixType.clientType",
"value": "CLIENT_TYPE"
}
}
Create an Account number format
Note: You may associate a single Account number format for a given account type
Mandatory Fields
for Account number formats |
accountType |
POST https://DomainName/api/v1/accountnumberformats
POST /accountnumberformats
Content-Type: application/json
Request Body:
{
accountType :1,
prefixType: 101
}
{
"resourceId": 4
}
POST /accountnumberformats
Content-Type: application/json
Request Body:
{
accountType :2,
prefixType: 201
}
{
"resourceId": 5
}
Update an Account number format
PUT https://DomainName/api/v1/accountnumberformats/{accountnumberformatId}
PUT accountnumberformats/2
Content-Type: application/json
Request Body:
{
prefixType:1
}
{
"resourceId": 2,
"changes":
{
"prefixType": "OFFICE_NAME"
}
}
Delete an Account number format
Note: Account numbers created while this format was active would remain unchanged.
DELETE https://DomainName/api/v1/accountnumberformats/{accountnumberformatId}
DELETE accountnumberformats/2
Content-Type: application/json
No Request Body:
{
"resourceId": 2
}
Maker Checker (or 4-eye) functionality
Apache Fineract Maker Checker functionality allows an MFI to define transactions as having a maker and a checker phase. One user enters, deletes or changes data. Then, another user that has "Checker" rights for that transaction, can inspect and approve the data.
By default, Maker Checker functionality is disabled. See Update Global Configuration to enable/disable Maker Checker functionality at a global level.
Additionally, Maker Checker functionality for each transaction (permission) is disabled by default. see Enable/Disable Permissions for Maker Checker to enable/disable Maker Checker functionality at a transaction (permission) level.
Finally, to give checking rights to a user (via a role associated with the user) see Update a Role's Permissions
For example,
{
"permissions":{
"CREATE_GUARANTOR_CHECKER":true,
"CREATE_CLIENT_CHECKER":true
}
}
will give checking rights for CREATE_GUARANTOR and CREATE_CLIENT
Alternatively, the special permissions ALL_FUNCTIONS or CHECKER_SUPER_USER will give blanket checking rights.
When a user "makes" an entry that is enabled for Maker Checker, it is audited and the audit status is set to a value of 2 (awaiting.approval).
Checkers can only Check and approve entries that they have been permitted to check.Checkers can only Check and approve entries that are within their data scope. However, 'head office' Checkers can Check and approve all entries including those that aren't office/branch related (as long as they have the Checker permissions) e.g. Loan Product changes.
List Maker Checker Entries
Get a list of entries that can be checked by the requestor that match the criteria supplied.
Arguments
- actionName
- optional
- Examples: CREATE, UPDATE, DISBURSE
- entityName
- optional
- Examples: CLIENT, LOAN, FUND
- resourceId
- optional, The id value of the entityName
- makerId
- optional, The id value of the application user creating the entry
- makerDateTimeFrom
- optional, Get entries created on or after this
- Example: 2013-04-10 08:00:00
- makerDateTimeTo
- optional, Get entries created on or before this
- Example: 2013-05-10 08:00:00
- officeId
- optional, The id value of the office/branch associated with the entry (if there is one)
- groupId
- optional, The id value of the group associated with the entry (if there is one). A group is a general idea and may be a Center, a Group, a Communal Bank or other.
- clientId
- optional, The id value of the client associated with the entry (if there is one)
- loanId
- optional, The id value of the loan associated with the entry (if there is one)
- savingsAccountId
- optional, The id value of the savings account associated with the entry (if there is one)
- includeJson
- optional, Values are true, false. Default is false.
Example Requests:
GET https://DomainName/api/v1/makercheckers
[
{
"id": 654,
"actionName": "CREATE",
"entityName": "LOANPRODUCT",
"resourceId": 15,
"maker": "keithwoodlock",
"madeOnDate": 1364924512000,
"processingResult": "awaiting.approval"
},
{
"id": 666,
"actionName": "CREATE",
"entityName": "CLIENT",
"resourceId": 363,
"maker": "keithwoodlock",
"madeOnDate": 1365012843000,
"processingResult": "awaiting.approval",
"officeName": "my office name"
},
{
"id": 670,
"actionName": "CREATE",
"entityName": "CLIENTNOTE",
"resourceId": 287,
"maker": "keithwoodlock",
"madeOnDate": 1365014204000,
"processingResult": "awaiting.approval",
"officeName": "my office name",
"clientName": "gg ggg"
}
]
Maker Checker Search Template
This is a convenience resource. It can be useful when building a Checker Inbox UI. "appUsers" are data scoped to the office/branch the requestor is associated with. "actionNames" and "entityNames" returned are those that the requestor has Checker approval permissions for.
Example Requests:
GET https://DomainName/api/v1/audits/searchtemplate
{
"appUsers": [
{
"id": 30,
"username": "user 1"
},
{
"id": 28,
"username": "user 2"
},
{
"id": 35,
"username": "user 3"
},...
],
"actionNames": [
"CREATE",
"DELETE",
"UPDATE",
"ACTIVATE",
"ADJUST",
"APPROVALUNDO",
"APPROVE",...
],
"entityNames": [
"CALENDAR",
"CENTER",
"CHARGE",
"CLIENT",
"CLIENTIDENTIFIER",...
]
}
Approve Maker Checker Entry
POST https://DomainName/api/v1/makercheckers/{auditId}?command=approve
POST makercheckers/1?command=approve
Content-Type: application/json
{ "auditId": 1 }
Reject Maker Checker Entry
POST https://DomainName/api/v1/makercheckers/{auditId}?command=reject
POST makercheckers/1?command=reject
Content-Type: application/json
{ "auditId": 1 }
Delete Maker Checker Entry
DELETE https://DomainName/api/v1/makercheckers/{auditId}
DELETE makercheckers/1
Content-Type: application/json
{ "auditId": 1 }
MIFOSX-BATCH JOBS
Batch jobs (also known as cron jobs on Unix-based systems) are a series of back-end jobs executed on a computer at a particular time defined in job's cron expression.
At any point, you can view the list of batch jobs scheduled to run along with other details specific to each job. Manually you can execute the jobs at any point of time.
The scheduler status can be either "Active" or "Standby". If the scheduler status is Active, it indicates that all batch jobs are running/ will run as per the specified schedule.If the scheduler status is Standby, it will ensure all scheduled batch runs are suspended.
Retrieve Scheduler Jobs
Returns the list of jobs.
Example Requests:
GET https://DomainName/api/v1/jobs
[
{
"jobId": 1,
"displayName": "Update loan Summary",
"cronExpression": "0 0 22 1/1 * ? *",
"active": false,
"currentlyRunning": false,
"lastRunHistory": {
"version": 17,
"jobRunStartTime": "Jul 26, 2013 1:38:26 PM",
"jobRunEndTime": "Jul 26, 2013 1:38:26 PM",
"status": "success",
"triggerType": "application"
}
},
{
"jobId": 2,
"displayName": "Update Loan Arrears Ageing",
"nextRunTime": "Jul 27, 2013 12:01:00 AM",
"cronExpression": "0 1 0 1/1 * ? *",
"active": true,
"currentlyRunning": false,
"lastRunHistory": {
"version": 18,
"jobRunStartTime": "Jul 26, 2013 4:05:32 PM",
"jobRunEndTime": "Jul 26, 2013 4:05:32 PM",
"status": "success",
"triggerType": "application"
}
},
{
"jobId": 3,
"displayName": "Update Loan Paid In Advance",
"nextRunTime": "Jul 27, 2013 12:05:00 AM",
"cronExpression": "0 5 0 1/1 * ? *",
"active": true,
"currentlyRunning": false,
"lastRunHistory": {
"version": 16,
"jobRunStartTime": "Jul 26, 2013 4:15:47 PM",
"jobRunEndTime": "Jul 26, 2013 4:15:47 PM",
"status": "success",
"triggerType": "application"
}
},
{
"jobId": 4,
"displayName": "Apply Annual Fee For Savings",
"nextRunTime": "Jul 26, 2013 10:20:00 PM",
"cronExpression": "0 20 22 1/1 * ? *",
"active": true,
"currentlyRunning": false,
"lastRunHistory": {
"version": 11,
"jobRunStartTime": "Jul 26, 2013 12:00:37 PM",
"jobRunEndTime": "Jul 26, 2013 12:00:38 PM",
"status": "success
"triggerType": "application"
}
},
{
"jobId": 5,
"displayName": "Apply Holidays To Loans",
"nextRunTime": "Jul 27, 2013 12:00:00 PM",
"cronExpression": "0 0 12 * * ?",
"active": true,
"currentlyRunning": false,
"lastRunHistory": {
"version": 16,
"jobRunStartTime": "Jul 26, 2013 4:31:54 PM",
"jobRunEndTime": "Jul 26, 2013 4:31:55 PM",
"status": "success",
"triggerType": "application"
}
}
]
Retrieve a Job
Returns the details of a Job.
Example Requests:
GET https://DomainName/api/v1/jobs/{jobId}
https://localhost:8443/fineract-provider/api/v1/jobs/5
{
"jobId": 5,
"displayName": "Apply Holidays To Loans",
"nextRunTime": "Jul 27, 2013 12:00:00 PM",
"cronExpression": "0 0 12 * * ?",
"active": true,
"currentlyRunning": false,
"lastRunHistory": {
"version": 16,
"jobRunStartTime": "Jul 26, 2013 4:31:54 PM",
"jobRunEndTime": "Jul 26, 2013 4:31:55 PM",
"status": "success",
"triggerType": "application"
}
}
Update a Job
Updates the details of a job.
PUT https://DomainName/api/v1/jobs/{jobId}
PUT jobs/1
Content-Type: application/json
{
"displayName":"Update loan Summary",
"cronExpression":"0 0 22 1/1 * ? *",
"active":"true"
}
Run a Job
Manually Execute Specific Job.
POST https://DomainName/api/v1/jobs/{jobId}?command=executeJob
POST jobs/1?command=executeJob
Retrieve Job Run History
Example Requests:
GET https://DomainName/api/v1/jobs/{jobid}/runhistory?offset=0&limit=200
{
"totalFilteredRecords": 8,
"pageItems": [
{
"version": 1,
"jobRunStartTime": "Jul 16, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 16, 2013 12:00:00 PM",
"status": "success",
"triggerType": "cron"
},
{
"version": 2,
"jobRunStartTime": "Jul 17, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 17, 2013 12:00:00 PM",
"status": "success",
"triggerType": "cron"
},
{
"version": 3,
"jobRunStartTime": "Jul 18, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 18, 2013 12:00:01 PM",
"status": "success",
"triggerType": "cron"
},
{
"version": 4,
"jobRunStartTime": "Jul 19, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 19, 2013 12:00:00 PM",
"status": "success",
"triggerType": "cron"
},
{
"version": 5,
"jobRunStartTime": "Jul 20, 2013 11:16:07 AM",
"jobRunEndTime": "Jul 20, 2013 11:16:07 AM",
"status": "success",
"triggerType": "application"
},
{
"version": 6,
"jobRunStartTime": "Jul 20, 2013 11:35:05 AM",
"jobRunEndTime": "Jul 20, 2013 11:35:05 AM",
"status": "success",
"triggerType": "application"
},
{
"version": 7,
"jobRunStartTime": "Jul 20, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 20, 2013 12:00:00 PM",
"status": "success",
"triggerType": "cron"
},
{
"version": 8,
"jobRunStartTime": "Jul 22, 2013 12:00:00 PM",
"jobRunEndTime": "Jul 22, 2013 12:00:00 PM",
"status": "success",
"triggerType": "cron"
}
]
}
Retrieve Scheduler Status
Returns the scheduler status.
Example Requests:
GET https://DomainName/api/v1/scheduler
https://localhost:8443/fineract-provider/api/v1/scheduler
{
"active": true
}
Activate Scheduler Jobs
Activates the scheduler job service.
POST https://DomainName/api/v1/scheduler?command=start
POST scheduler?command=start
Suspend Scheduler Jobs
Suspends the scheduler job service.
POST https://DomainName/api/v1/scheduler?command=stop
POST scheduler?command=stop
External Services
External Services Configuration related to set of supported configurations for third party services like Amazon S3 and SMTP:
- S3 (Amazon S3):
- s3_access_key -
- s3_bucket_name -
- s3_secret_key -
- SMTP (Email Service):
- username -
- password -
- host -
- port -
- useTLS -
Retrieve External Services Configuration
Returns a external Service configurations based on the Service Name.
Service Names supported are S3 and SMTP.
Example Requests:
GET https://DomainName/api/v1/externalservice/{serviceName}
[
{
"name": "username",
"value": "test@mifos.com"
},
{
"name": "password",
"value": "XXXX"
},
{
"name": "host",
"value": "smtp.gmail.com"
},
{
"name": "port",
"value": "25"
},
{
"name": "useTLS",
"value": "true"
}
]
Update External Service
Updates the external Service Configuration for a Service Name.
PUT https://DomainName/api/v1/externalservice/{serviceName}
PUT externalservice/S3
Content-Type: application/json
{
"username" : "test@mifos.org"
"password" : "XXXX"
}
Funds
Create a Fund
Creates a fund.
POST https://DomainName/api/v1/funds
POST funds
Content-Type: application/json
Request Body:
{
"name": "EU Agri Fund"
}
{
"resourceId": 1
}
Retrieve Funds
Returns the list of funds.
Example Requests:
GET https://DomainName/api/v1/funds
[
{
"id": 1,
"name": "EU Agri Fund"
}
]
Retrieve a Fund
Returns the details of a Fund.
Example Requests:
GET https://DomainName/api/v1/funds/{fundId}
{
"id": 1,
"name": "EU Agri Fund"
}
Update a Fund
Updates the details of a fund.
PUT https://DomainName/api/v1/funds/{fundId}
PUT funds/1
Content-Type: application/json
Request Body:
{
"name": "EU Agri Fund (2010-2020)"
}
{
"resourceId": 1,
"changes": {
"name": "EU Agri Fund (2010-2020)"
}
}
Staff
Allows you to model staff members. At present the key role of significance is whether this staff member is a loan officer or not.
Field Descriptions |
firstname |
First Name of the new Employee. |
lastname |
Last Name of the new Employee. |
externalId |
ID to put an external reference for an Employee. |
mobileNo |
Mobile number of an Employee. |
isLoanOfficer |
Indicates whether the employee account is to be created as Loan Officer. If isLoanOfficer=true, then the employee is Loan Officer. If isLoanOfficer=false, then the employee is not Loan Officer. |
isActive |
Indicates whether the employee account is to be created as Active. If isActive=true, then employee is active. If isActive=false, then employee is inactive. |
Create a staff member
Creates a staff member.
Mandatory Fields |
officeId, firstname, lastname |
Optional Fields |
isLoanOfficer, isActive |
POST https://DomainName/api/v1/staff
POST staff
Content-Type: application/json
Request Body:
{
"officeId": 1,
"firstname": "John",
"lastname": "Doe",
"isLoanOfficer": "true",
"externalId": "17H",
"mobileNo": "+353851239876",
"isActive": "true",
"joiningDate": "01 January 2009",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"officeId": 1,
"resourceId": 1
}
Retrieve Staff
Returns the list of staff members.
Example Requests:
GET https://DomainName/api/v1/staff
[
{
"id": 1,
"firstname": "John",
"lastname": "Doe",
"displayName": "Doe, John",
"officeId": 1,
"officeName": "Head Office",
"isLoanOfficer": true,
"externalId": "17H",
"isActive": "true",
"joiningDate":[2009,8,1]
}
]
Retrieve a Staff Member
Returns the details of a Staff Member.
Example Requests:
GET https://DomainName/api/v1/staff/{staffId}
{
"id": 1,
"firstname": "John",
"lastname": "Doe",
"displayName": "Doe, John",
"officeId": 1,
"officeName": "Head Office",
"isLoanOfficer": true,
"externalId": "17H",
"isActive": "true",
"joiningDate":[2009,8,1]
}
Retrieve a Staff by status
Returns the details of a Staff based on status.
By default it Returns all the ACTIVE Staff.
If status=INACTIVE, then it returns all INACTIVE Staff.
and for status=ALL, it Returns both ACTIVE and INACTIVE Staff.
Example Requests:
GET https://DomainName/api/v1/staff?status={ACTIVE|INACTIVE|ALL}
{
"id": 1,
"firstname": "John",
"lastname": "Doe",
"displayName": "Doe, John",
"officeId": 1,
"officeName": "Head Office",
"isLoanOfficer": true,
"externalId": "17H",
"isActive": "true",
"joiningDate":[2009,8,1]
}
Update a Staff Member
Updates the details of a staff member.
PUT https://DomainName/api/v1/staff/{staffId}
PUT staff/1
Content-Type: application/json
Request Body:
{
"isLoanOfficer": "false",
"externalId": "17Hbb"
}
{
"officeId": 1,
"resourceId": 1,
"changes": {
"isLoanOfficer": false,
"externalId": "17Hbb"
}
}
Charges
Its typical for MFIs to add extra costs for their financial products. These are typically Fees or Penalties.
A Charge on fineract platform is what we use to model both Fees and Penalties.
At present we support defining charges for use with Client accounts and both loan and saving products.
Field Descriptions |
name |
Name associated with this charge. |
chargeAppliesTo |
Enumeration for indicating whether charge is to be applicable for loans, savings or clients. 1=Loans, 2=Savings, 3=Client Once a charge definiton has been created, this attribute cannot be changed at any point. |
active |
Boolean flag determines if the charge is currently active. |
penalty |
Boolean flag determines if the charge is a penalty. If false the charge is considered a Fee |
currencyCode |
A three letter ISO code of currency. |
chargeCalculationType |
Enumeration for indicating whether charge amount is flat or percentage based: 1=Flat, 2=% of Amount Used in combination with amount parameter e.g 1 % of Amount or 3.50 Flat For loans, % of Amount refers to the loan principal disbursed. For savings, % of Amount can be used with 'withrawal fees' and refers to the amount withdrawn. |
amount |
The charge amount. Used in combination with chargeCalculationType parameter. e.g 1 % of Amount or 3.50 Flat |
minCap |
Optional: Can be used when a '% of Amount' value is used for chargeCalculationType.
Used to enforce a minimum charge amount in cases where the calculated amount is less than the minimum amount provided. e.g. A 2% fee with a minimum cap of 500: In case of a 5000 loan, the 2% is 100, and therefore automatically 500 is used as the value of the charge. |
maxCap |
Optional: Can be used when a '% of Amount' value is used for chargeCalculationType.
Used to enforce a maximum charge amount in cases where the calculated amount is greater than the maximum amount provided. e.g. A 2% fee, with a maximum of 2000.: In case of a 150000 loan, the 2% adds up to 3000 charge, and therefore the maximum cap of 2000 will be used. |
chargeTimeType |
An enumeration indicating the time at which the charge becomes due:
1 = Disbursement : Applicable for loans and deducted at the time of loan disbursement. |
chargePaymentMode |
Applicable to loan charges only: Enumeration for indicating whether charge is to be paid through an Account Transfer from savings or through Regular payment mode. 0=Regular, 1=Account Transfer |
feeOnMonthDay |
Used along with monthDayFormat to indicate the recurring charge due date starting on a given day of the month and follow specified feeInterval. e.g. fee due date starting on 10 May with feeInterval of two (2) months then a recurring fee on 10th of every two months is applied to savings account. monthDayFormat indicates day and month formatting used e.g. "dd MMM" for 10 May This field is mandatory if chargeTimeType is of type Monthly Fee |
feeInterval |
Fee to be applied on a specified interval. This field is mandatory if chargeTimeType is of type Monthly Fee or feeFrequency is selcted |
feeFrequency |
This field is Optional Used to indicate the recurring(days,weeks,months and Years) charge due date starting on system calculated date for overdue penalty. |
incomeAccount |
This field is Optional and can be used only when a charge is applied to a Client. It indicates the Income or Liability account which gets
credited when a payment is made on this charge |
Retrieve Charge Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/charges/template
{
"active": false,
"penalty": false,
"currencyOptions": [
{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
],
"chargeCalculationTypeOptions": [
{
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
{
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
{
"id": 3,
"code": "chargeCalculationType.percent.of.amount.and.interest",
"value": "% Loan Amount + Interest"
},
{
"id": 4,
"code": "chargeCalculationType.percent.of.interest",
"value": "% Interest"
}
],
"chargeAppliesToOptions": [
{
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
{
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
}
],
"chargeTimeTypeOptions": [
{
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
{
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
{
"id": 3,
"code": "chargeTimeType.savingsActivation",
"value": "Savings Activation"
},
{
"id": 5,
"code": "chargeTimeType.withdrawalFee",
"value": "Withdrawal Fee"
},
{
"id": 6,
"code": "chargeTimeType.annualFee",
"value": "Annual Fee"
},
{
"id": 7,
"code": "chargeTimeType.monthlyFee",
"value": "Monthly Fee"
},
{
"id": 8,
"code": "chargeTimeType.instalmentFee",
"value": "Instalment Fee"
},
{
"id": 9,
"code": "chargeTimeType.overdueInstallment",
"value": "overdue fees"
},
{
"id": 10,
"code": "chargeTimeType.overdraftFee",
"value": "Overdraft Fee"
}
],
"chargePaymetModeOptions": [
{
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
},
{
"id": 1,
"code": "chargepaymentmode.accounttransfer",
"value": "Account transfer"
}
],
"loanChargeCalculationTypeOptions": [
{
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
{
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
{
"id": 3,
"code": "chargeCalculationType.percent.of.amount.and.interest",
"value": "% Loan Amount + Interest"
},
{
"id": 4,
"code": "chargeCalculationType.percent.of.interest",
"value": "% Interest"
}
],
"loanChargeTimeTypeOptions": [
{
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
{
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
{
"id": 8,
"code": "chargeTimeType.instalmentFee",
"value": "Instalment Fee"
},
{
"id": 9,
"code": "chargeTimeType.overdueInstallment",
"value": "overdue fees"
}
],
"savingsChargeCalculationTypeOptions": [
{
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
{
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
}
],
"savingsChargeTimeTypeOptions": [
{
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
{
"id": 3,
"code": "chargeTimeType.savingsActivation",
"value": "Savings Activation"
},
{
"id": 5,
"code": "chargeTimeType.withdrawalFee",
"value": "Withdrawal Fee"
},
{
"id": 6,
"code": "chargeTimeType.annualFee",
"value": "Annual Fee"
},
{
"id": 7,
"code": "chargeTimeType.monthlyFee",
"value": "Monthly Fee"
},
{
"id": 10,
"code": "chargeTimeType.overdraftFee",
"value": "Overdraft Fee"
}
],
"feeFrequencyOptions": [
{
"id": 0,
"code": "loanTermFrequency.periodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "loanTermFrequency.periodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "loanTermFrequency.periodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "loanTermFrequency.periodFrequencyType.years",
"value": "Years"
}
]
}
Create/Define a Charge
Define a new charge that can later be associated with loans and savings through their respective product definitions or directly on each account instance.
POST https://DomainName/api/v1/charges
POST charges
Content-Type: application/json
Request Body:
{
"name": "Loan service fee",
"chargeAppliesTo": 1,
"currencyCode": "USD",
"locale": "en",
"amount": "230.56",
"chargeTimeType": "1",
"chargeCalculationType": "1",
"chargePaymentMode": "1",
"active": true
}
{
"resourceId": 1
}
POST charges
Content-Type: application/json
Request Body:
{
"locale": "en",
"name": "Default Penalty",
"amount": "2",
"currencyCode": "USD",
"chargeAppliesTo": "1",
"chargeTimeType": "2",
"chargeCalculationType": "2",
"chargePaymentMode": "1",
"active": "true",
"penalty": "true",
"minCap": 50.00,
"maxCap": 100.00
}
{
"resourceId": 4
}
POST charges
Content-Type: application/json
Request Body:
{
"locale": "en",
"name": "Annuaul Fee",
"amount": "20",
"currencyCode": "USD",
"chargeAppliesTo": "2",
"chargeTimeType": "6",
"chargeCalculationType": "1",
"chargePaymentMode": "1",
"active": "true",
"penalty": "false"
}
{
"resourceId": 5
}
POST charges
Content-Type: application/json
Request Body:
{
"locale": "en",
"name": "Quarterly Fee",
"amount": "5",
"currencyCode": "USD",
"chargeAppliesTo": "2",
"chargeTimeType": "7",
"feeOnMonthDay": "10 May",
"monthDayFormat": "dd MMM",
"feeInterval": "4",
"chargeCalculationType": "1",
"active": "true",
"penalty": "false"
}
{
"resourceId": 6
}
POST charges
Content-Type: application/json
Request Body:
{
"chargeAppliesTo":1,
"feeFrequency":1,
"feeInterval":"2",
"name":"overdue charge",
"currencyCode":"USD",
"chargeTimeType":9,
"chargeCalculationType":1,
"chargePaymentMode":0,
"amount":"50",
"active":true,
"penalty":"true",
"locale":"en",
"monthDayFormat":"dd MMM"
}
{
"resourceId": 7
}
POST charges
Content-Type: application/json
Request Body:
{
"chargeAppliesTo": 2,
"name": "Weekly Fee",
"currencyCode": "USD",
"chargeTimeType": 11,
"chargeCalculationType": 1,
"feeInterval": "1",
"amount": "10",
"active": true,
"locale": "en"
}
{
"resourceId": 8
}
Retrieve Charges
Returns the list of defined charges.
Example Requests:
GET https://DomainName/api/v1/charges
[
{
"id": 1,
"name": "Loan service fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 230.56,
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode":{
"id":1,
"code":"chargepaymentmode.accounttransfer",
"value":"Account transfer"
}
},
{
"id": 54,
"chargeId": 12,
"name": "Loan service fee 2",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeCalculationType": {
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
"percentage": 2.000000,
"amountPercentageAppliedTo": 14000.000000,
"currency": {
"code": "KES",
"name": "Kenyan Shilling",
"decimalPlaces": 2,
"displaySymbol": "KSh",
"nameCode": "currency.KES",
"displayLabel": "Kenyan Shilling (KSh)"
},
"amount": 500.000000,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 500.000000,
"amountOrPercentage": 2.000000,
"penalty": false,
"chargePaymentMode": {
"id": 1,
"code": "chargepaymentmode.accounttransfer",
"value": "Account transfer"
},
"paid": false,
"waived": false,
"chargePayable": true,
"minCap": 500.000000,
"maxCap": 1000.000000
},
]
Retrieve a Charge
Returns the details of a defined Charge.
Example Requests:
GET https://DomainName/api/v1/charges/{chargeId}
{
"id": 1,
"name": "Loan service fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 230.56,
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode":{
"id":1,
"code":"chargepaymentmode.accounttransfer",
"value":"Account transfer"
}
}
Update a Charge
Updates the details of a Charge.
PUT https://DomainName/api/v1/charges/{chargeId}
PUT charges/1
Content-Type: application/json
Request Body:
{
"name": "Loan service fee(changed)"
}
{
"resourceId": 1,
"changes": {
"name": "Loan service fee(changed)"
}
}
Delete a Charge
Deletes a Charge.
DELETE https://DomainName/api/v1/charges/{chargeId}
DELETE charges/1
Content-Type: application/json
{ "resourceId": 1 }
Accounting Rules
It is typical scenario in MFI's that non accountants pass journal entries on a regular basis. For Ex: A branch office might deposit their entire cash at hand to their Bank account at the end of a working day. The branch office users might not understand enough of accounting to figure out which account needs to get credited and which account needs to be debited to represent this transaction.
Enter accounting rules, an abstraction on top of manual Journal entires for enabling simpler data entry. An accounting rule can define any of the following abstractions
- A Simple journal entry where both the credit and debit account have been preselected
- A Simple journal entry where either credit or debit accounts have been limited to a pre-selected list of accounts (Ex: Debit account should be one of "Bank of America" of "JP Morgan" and credit account should be "Cash")
- A Compound journal entry where multiple debits and / or multiple credits may be made amongst a set of preselected list of accounts (Ex: Credit account should be either "Bank Of America" or "Cash" and debit account can be "Employee Salary" and/or "Miscellenous Expenses")
An accounting rule can also be optionally associated with a branch, so that only a particular Branch's users have access to the rule
Field Descriptions |
name |
Name of the accounting rule |
description |
A description of the accounting rule. |
officeId |
An Optional Office for this accounting rule is applicable. |
accountToDebit |
ID of the target account to be Debited |
accountToCredit |
ID of the target account to be Credited |
debitTags |
A list of accounting Tags. Any Ledger account with this tag can serve as the
account to be debited. This parameter is optional, if accountToDebit present in the request params |
creditTags |
A list of accounting Tags. Any Ledger account with this tag can serve as the
account to be credited. This parameter is optional, if accountToCredit present in the request params |
allowMultipleDebitEntries |
Allows passing multiple debit entries for the accounting rule |
allowMultipleCreditEntries |
Allows passing multiple credit entries for the accounting rule |
paymentTypeId |
Allows passing multiple credit entries for the accounting rule |
Retrieve Accounting Rule Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/accountingrules/template
{
"systemDefined": false,
"allowedOffices": [{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}],
"allowedAccounts": [{
"id": 21,
"name": "Cash 2",
"parentId": 18,
"glCode": "20011",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Cash",
"nameDecorated": "............Cash 2",
"tagId": {
"id": 10,
"name": "asset tag"
}
},
{
"id": 9,
"name": "Employee Salary",
"parentId": 8,
"glCode": "456674",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Employee Salary",
"tagId": {
"id": 14,
"name": "Expenses Tag"
}
}]
}
Create/Define a Accounting rule
Define a new Accounting rule.
Mandatory Fields |
name, officeId, accountToDebit OR debitTags, accountToCredit OR creditTags. |
Optional Fields |
description |
POST https://DomainName/api/v1/accountingrules
POST accountingrules
Content-Type: application/json
Request Body:
{
"name": "test",
"officeId": "1",
"accountToDebit": "21",
"accountToCredit": "9",
"description": "Employee salary"
}
{
"officeId":1,
"resourceId":1
}
POST accountingrules
Content-Type: application/json
Request Body:
{
"name": "fordocs",
"officeId": "1",
"debitTags": ["10","11"],
"allowMultipleDebitEntries": "true",
"creditTags": ["12","13"],
"allowMultipleCreditEntries": "true",
"description": "for api docs"
}
{
"officeId":1,
"resourceId":2
}
POST accountingrules
Content-Type: application/json
Request Body:
{
"name": "test123",
"officeId": "1",
"accountToDebit": "21",
"creditTags": ["12", "13"],
"allowMultipleCreditEntries": "false",
"description": "Employee salary"
}
{
"officeId":1,
"resourceId":3
}
POST accountingrules
Content-Type: application/json
Request Body:
{
"name": "fordocstest",
"officeId": "1",
"debitTags": ["10","11"],
"allowMultipleDebitEntries": "false",
"accountToCredit": "9",
"description": "for api docs"
}
{
"officeId":1,
"resourceId":4
}
Retrieve Accounting Rules
Returns the list of defined accounting rules.
Example Requests:
GET https://DomainName/api/v1/accountingrules
[{
"id": 1,
"officeId": 1,
"officeName": "Head Office",
"name": "test",
"description": "Employee salary",
"systemDefined": false,
"debitAccountHead": {
"id": 21,
"name": "Cash 2",
"glCode": "20011",
"disabled": false,
"manualEntriesAllowed": false
},
"creditAccountHead": {
"id": 9,
"name": "Employee Salary",
"glCode": "456674",
"disabled": false,
"manualEntriesAllowed": false
}
},
{
"id": 2,
"officeId": 1,
"officeName": "Head Office",
"name": "A L1",
"description": "aafff",
"systemDefined": false,
"debitAccountHead": {
"id": 3,
"name": "A L",
"glCode": "10003",
"disabled": false,
"manualEntriesAllowed": false
},
"creditAccountHead": {
"id": 4,
"name": "car loan",
"glCode": "10004",
"disabled": false,
"manualEntriesAllowed": false
}
}]
Retrieve a Accounting rule
Returns the details of a defined Accounting rule.
Example Requests:
GET https://DomainName/api/v1/accountingrules/{accountingruleId}
{
"id": 1,
"officeId": 1,
"officeName": "Head Office",
"name": "test",
"description": "Employee salary",
"systemDefined": false,
"debitAccountHead": {
"id": 21,
"name": "Cash 2",
"glCode": "20011",
"disabled": false,
"manualEntriesAllowed": false
},
"creditAccountHead": {
"id": 9,
"name": "Employee Salary",
"glCode": "456674",
"disabled": false,
"manualEntriesAllowed": false
}
}
Update a Accounting Rule
Updates the details of a Accounting rule.
PUT https://DomainName/api/v1/accountingrules/{accountingruleId}
PUT accountingrules/1
Content-Type: application/json
Request Body:
{
"name": "Employee Salary posting rule"
}
{
"resourceId": 1,
"changes": {
"name": "Employee Salary posting rule"
}
}
Delete a Accounting Rule
Deletes a Accounting rule.
DELETE https://DomainName/api/v1/accountingrules/{accountingruleId}
DELETE accountingrules/1
Content-Type: application/json
{ "resourceId": 1 }
Savings Product:
An MFIs savings product offerings are modeled using this API.
When creating savings accounts, the details from the savings product are used to auto fill details of the savings account application process.
Field Descriptions |
name |
The name of the product offering. |
shortName |
Shortname associated with a saving product. An abbreviated version of the name, used in reports or menus where space is limited. |
description |
A description of the product offering. |
currencyCode |
Three letter ISO code representing currency. |
digitsAfterDecimal |
Override the currency default value for digitsAfterDecimal. |
inMultiplesOf |
Override the default value for rounding currency to multiples of provided value. |
nominalAnnualInterestRate |
The default interest rate set when creating savings accounts of this type of product. e.g. 5% Per year - It number here is always expressed as the Nominal APR. |
interestCompoundingPeriodType |
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month) |
interestPostingPeriodType |
The period at which interest rate is posted or credited to savings account. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec) |
interestCalculationType |
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance |
interestCalculationDaysInYearType |
The setting for number of days in year to use: 360=360 Days, 365=365 Days |
minRequiredOpeningBalance |
Optional: If provided, sets the minimum deposit amount required to open a savings account e.g. 2,000 |
lockinPeriodFrequency |
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. e.g. 6 Months |
lockinPeriodFrequencyType |
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
withdrawalFeeForTransfers |
Optional: Used along with withdrawalFeeAmount to indicate whether the withdrawal fee should be applied on the account for account transfers . |
accountingRule |
Specifies if accounting is enabled for the particular product and the type of the accounting rule to be used Example Values:1=NONE,2=CASH_BASED |
allowOverdraft |
Optional: If provided, depending on the value mark the savings account as overdraft account |
overdraftLimit |
Optional: If provided, sets the maximum allowed overdraft amount for a savings account e.g. 5,000 else set the limit as zero |
minBalanceForInterestCalculation |
Optional: If provided, balance must be greater than provided value for calculation of interest e.g. 5,000 |
enforceMinRequiredBalance |
Optional: If set to true, validates that the account balance does not fall below minRequiredBalance |
minRequiredBalance |
Optional: If provided, sets an indicator of the minimum required balance of the savings account e.g. 5,000 else set the limit as zero. Note that enforceMinRequiredBalance determines if the minimum required balance is enforced |
withHoldTax |
Optional: If provided, sets an indicator for applying withhold tax on interest posting for savings account |
taxGroupId |
Optional: If withhold tax set as true, with hold tax will be applied as per the tax group provided |
Retrieve Savings Product Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://Domain Name/api/v1/savingsproducts/template
{
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"accountingRule": {
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
},
"currencyOptions": [
{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
],
"interestCompoundingPeriodTypeOptions": [
{
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
{
"id": 2,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.weekly",
"value": "Weekly"
},
{
"id": 3,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.biweekly",
"value": "Bi-Weekly"
},
{
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
},
{
"id": 5,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.quarterly",
"value": "Quarterly"
},
{
"id": 6,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.biannual",
"value": "Semi-Annual"
},
{
"id": 7,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.annual",
"value": "Annually"
},
{
"id": 8,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.nocompounding",
"value": "No Compounding - Simple Interest"
}
],
"interestPostingPeriodTypeOptions": [
{
"id": 4,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.monthly",
"value": "Monthly"
},
{
"id": 5,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.quarterly",
"value": "Quarterly"
},
{
"id": 6,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.biannual",
"value": "Semi-Annual"
},
{
"id": 7,
"code": "savings.interest.posting.period.savingsInterestPostingPeriodType.annual",
"value": "Annually"
}
],
"interestCalculationTypeOptions": [
{
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
{
"id": 2,
"code": "savingsInterestCalculationType.averagedailybalance",
"value": "Average Daily Balance"
}
],
"interestCalculationDaysInYearTypeOptions": [
{
"id": 360,
"code": "savingsInterestCalculationDaysInYearType.days360",
"value": "360 Days"
},
{
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
}
],
"lockinPeriodFrequencyTypeOptions": [
{
"id": 0,
"code": "savings.lockin.savingsPeriodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "savings.lockin.savingsPeriodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "savings.lockin.savingsPeriodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "savings.lockin.savingsPeriodFrequencyType.years",
"value": "Years"
}
],
"withdrawalFeeTypeOptions": [
{
"id": 1,
"code": "savingsWithdrawalFeesType.flat",
"value": "Flat"
},
{
"id": 2,
"code": "savingsWithdrawalFeesType.percent.of.amount",
"value": "% of Amount"
}
],
"paymentTypeOptions": [
{
"id": 14,
"name": "Wire Transfer",
"position": 0
},
{
"id": 13,
"name": "Cash",
"position": 1
}
],
"accountingRuleOptions": [
{
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
},
{
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
},
{
"id": 3,
"code": "accountingRuleType.accrual",
"value": "ACCRUAL BASED"
}
],
"accountingMappingOptions": {
"liabilityAccountOptions": [
{
"id": 15,
"name": "Savings Control",
"glCode": "50001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Savings Control",
"tagId": {
"id": 0
}
}
],
"assetAccountOptions": [
{
"id": 2,
"name": "Cash",
"glCode": "100001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 16,
"name": "Savings Reference",
"glCode": "100007",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Savings Reference",
"tagId": {
"id": 0
}
},
{
"id": 12,
"name": "HDFC Rajajinagar",
"glCode": "100015",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 1,
"name": "Loan Portfolio",
"glCode": "10003",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 7,
"name": "Interest Receivable",
"glCode": "10005",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 8,
"name": "Penalties Receivable",
"glCode": "10008",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 9,
"name": "Fee Receivable",
"glCode": "10009",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
}
],
"expenseAccountOptions": [
{
"id": 6,
"name": "Write Off Expenses",
"glCode": "60001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 13,
"name": "Employee Salary",
"glCode": "60002",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 18,
"name": "Interest On Savings",
"glCode": "60003",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Interest On Savings",
"tagId": {
"id": 0
}
}
],
"incomeAccountOptions": [
{
"id": 3,
"name": "Income from Interest",
"glCode": "40001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 4,
"name": "Income from Fees",
"glCode": "40002",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
},
{
"id": 5,
"name": "Income from Penalties",
"glCode": "40004",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"tagId": {}
}
]
},
"chargeOptions" : [ { "active" : true,
"amount" : 200,
"chargeAppliesTo" : { "code" : "chargeAppliesTo.savings",
"id" : 2,
"value" : "Savings"
},
"chargeCalculationType" : { "code" : "chargeCalculationType.flat",
"id" : 1,
"value" : "Flat"
},
"chargePaymentMode" : { "code" : "chargepaymentmode.regular",
"id" : 0,
"value" : "chargepaymentmode.regular"
},
"chargeTimeType" : { "code" : "chargeTimeType.specifiedDueDate",
"id" : 2,
"value" : "Specified due date"
},
"currency" : { "code" : "USD",
"decimalPlaces" : 2,
"displayLabel" : "US Dollar ($)",
"displaySymbol" : "$",
"name" : "US Dollar",
"nameCode" : "currency.USD"
},
"id" : 4,
"name" : "Savings charge 1",
"penalty" : false
},
{ "active" : true,
"amount" : 300,
"chargeAppliesTo" : { "code" : "chargeAppliesTo.savings",
"id" : 2,
"value" : "Savings"
},
"chargeCalculationType" : { "code" : "chargeCalculationType.flat",
"id" : 1,
"value" : "Flat"
},
"chargePaymentMode" : { "code" : "chargepaymentmode.regular",
"id" : 0,
"value" : "chargepaymentmode.regular"
},
"chargeTimeType" : { "code" : "chargeTimeType.specifiedDueDate",
"id" : 2,
"value" : "Specified due date"
},
"currency" : { "code" : "USD",
"decimalPlaces" : 2,
"displayLabel" : "US Dollar ($)",
"displaySymbol" : "$",
"name" : "US Dollar",
"nameCode" : "currency.USD"
},
"id" : 5,
"name" : "Savings charge 2",
"penalty" : false
}
]
}
Entity-Datatable Checks
This defines Entity-Datatable Check.
Field Descriptions |
entity |
The entity to which the Entity-Datatable Check to be attached. |
status |
The action to be attached to an Entity-Datatable Check. |
datatableName |
Name of the datatable on which the Entity-Datatable Check to be imposed. |
productId |
Optional: The product to be associated with an entity. |
Create Entity-Datatable Checks
Mandatory Fields |
entity, status, datatableName |
Non-Mandatory Fields |
productId |
POST https://Domain Name/api/v1/entityDatatableChecks
POST entitydatatablechecks
Content-Type: application/json
Request Body:
{
"entity": "m_loan",
"status": 100,
"datatableName": "Additional Details",
"productId": 1
}
{
"resourceId": 1
}
List Entity-Datatable Checks
The list capability of Entity-Datatable Checks can support pagination.
Optional Arguments
- offset
- Integer optional, defaults to 0
- Indicates the result from which pagination starts
- limit
- Integer optional, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
Example Request:
GET https://DomainName/api/v1/entityDatatableChecks?offset=0&limit=15
{
"totalFilteredRecords": 15,
"pageItems": [{
"id": 45,
"entity": "m_client",
"status": {
"id": 100,
"code": "CREATE",
"value": "CREATE"
},
"datatableName": "Client Personal Details",
"systemDefined": false,
"order": 45
},
{
"id": 48,
"entity": "m_group",
"status": {
"id": 100,
"code": "CREATE",
"value": "CREATE"
},
"datatableName": "Group Activation Details",
"systemDefined": false,
"order": 48
}, ...]
}
Retrieve Entity-Datatable Checks Template
This is a convenience resource useful for building maintenance user interface screens for Entity-Datatable Checks applications. The template data returned consists of:
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/entityDatatableChecks/template
{
"entities": ["m_client",
"m_loan",
"m_group",
"m_savings_account"],
"statusClient": [{
"name": "CREATE",
"code": 100
},
{
"name": "ACTIVATE",
"code": 300
},
{
"name": "CLOSE",
"code": 600
}],
"statusGroup": [{
"name": "CREATE",
"code": 100
},
{
"name": "ACTIVATE",
"code": 300
},
{
"name": "CLOSE",
"code": 600
}],
"statusSavings": [{
"name": "CREATE",
"code": 100
},
{
"name": "APPROVE",
"code": 200
},
{
"name": "ACTIVATE",
"code": 300
},
{
"name": "WITHDRAWN",
"code": 400
},
{
"name": "REJECTED",
"code": 500
},
{
"name": "CLOSE",
"code": 600
}],
"statusLoans": [{
"name": "CREATE",
"code": 100
},
{
"name": "APPROVE",
"code": 200
},
{
"name": "ACTIVATE",
"code": 300
},
{
"name": "WITHDRAWN",
"code": 400
},
{
"name": "REJECTED",
"code": 500
},
{
"name": "WRITE_OFF",
"code": 601
}],
"datatables": [{
"entity": "m_group",
"dataTableName": "Address Details"
},
{
"entity": "m_client",
"dataTableName": "CACT"
},
{
"entity": "m_client",
"dataTableName": "Family_Details"
}],
"loanProductDatas": [{
"id": 1,
"name": "Sakhi Shakthi",
"includeInBorrowerCycle": false,
"useBorrowerCycle": false,
"isLinkedToFloatingInterestRates": false,
"isFloatingInterestRateCalculationAllowed": false,
"allowVariableInstallments": false,
"isInterestRecalculationEnabled": false,
"canDefineInstallmentAmount": false,
"principalVariationsForBorrowerCycle": [],
"interestRateVariationsForBorrowerCycle": [],
"numberOfRepaymentVariationsForBorrowerCycle": [],
"canUseForTopup": false,
"holdGuaranteeFunds": false,
"accountMovesOutOfNPAOnlyOnArrearsCompletion": false,
"syncExpectedWithDisbursementDate": false
},
{
"id": 2,
"name": "MEL One",
"includeInBorrowerCycle": false,
"useBorrowerCycle": false,
"isLinkedToFloatingInterestRates": false,
"isFloatingInterestRateCalculationAllowed": false,
"allowVariableInstallments": false,
"isInterestRecalculationEnabled": false,
"canDefineInstallmentAmount": false,
"principalVariationsForBorrowerCycle": [],
"interestRateVariationsForBorrowerCycle": [],
"numberOfRepaymentVariationsForBorrowerCycle": [],
"canUseForTopup": false,
"holdGuaranteeFunds": false,
"accountMovesOutOfNPAOnlyOnArrearsCompletion": false,
"syncExpectedWithDisbursementDate": false
}],
"savingsProductDatas": [{
"id": 1,
"name": "Deposit Account",
"withdrawalFeeForTransfers": false,
"allowOverdraft": false,
"enforceMinRequiredBalance": false,
"withHoldTax": false
},
{
"id": 2,
"name": "Savings Account One",
"withdrawalFeeForTransfers": false,
"allowOverdraft": false,
"enforceMinRequiredBalance": false,
"withHoldTax": false
}]
}
Delete Entity-Datatable Checks
Deletes an existing Entity-Datatable Check
DELETE https://Domain Name/api/v1/entityDatatableChecks/{entityDatatableCheckId}
{
"resourceId": 1
}
Create a SMS Campaign
Mandatory Fields |
campaignName, campaignType, triggerType, providerId, runReportId, message |
Mandatory Fields for Cash based on selected report id |
paramValue in json format |
POST https://Domain Name/api/v1/smscampaigns
POST smscampaigns
Content-Type: application/json
Request Body:
{
"campaignName": "Savings Deposit Campaign",
"campaignType": "SMS",
"triggerType": 3,
"providerId": 2,
"runReportId": 180,
"paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}",
"message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}",
}
{
"resourceId": 1
}
List SMS Campaigns
Mandatory Fields |
Example Requests:
GET https://Domain Name/api/v1/smscampaigns
[{
"id": 1,
"campaignName": "Savings Deposit Campaign"
"campaignType": "SMS",
"triggerType": 3,
"providerId": 2,
"runReportId": 180,
"reportName" : "Savings Deposit",
"paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}",
"message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}",
"status" : { "id":"","code":"","value":""}
}]
Retrieve a SMS Campaign
Example Requests:
GET https://Domain Name/api/v1/smscampaigns/1
{
"id": 1,
"campaignName": "Savings Deposit Campaign"
"campaignType": "SMS",
"triggerType": 3,
"providerId": 2,
"runReportId": 180,
"reportName" : "Savings Deposit",
"paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}",
"message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}",
"status" : { "id":"","code":"","value":""}
}
In case of Scheduled Campaign
{
"id": 1,
"campaignName": "Savings Deposit Campaign"
"campaignType": "SMS",
"triggerType": 3,
"providerId": 2,
"runReportId": 180,
"reportName" : "Savings Deposit",
"paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}",
"message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}",
"status" : { "id":"","code":"","value":""},
"nextTriggerDate": "22 Jan 2017",
"lastTriggerDate": "22 Jan 2016",
"recurrenceStartDate":"22 Jan 2016",
"recurrence": "YEARLY"
}
smscampaigns/1?template=true
{
"id": 1,
"campaignName": "Savings Deposit Campaign"
"campaignType": "SMS",
"triggerType": 3,
"providerId": 2,
"runReportId": 180,
"reportName" : "Savings Deposit",
"paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}",
"message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}",
"status" : { "id":"","code":"","value":""}
"smsProviderOptions": [{
"id": 1,
"tenantId": "1",
"phoneNo": "+XXXXXXXXXX",
"providerName": "Twilio SMS Provider",
"providerDescription": "Twilio, just for testing"
}],
"businessRulesOptions": [
{
"reportId": 166,
"reportName": "Active Clients",
"reportType": "SMS",
"reportSubType": "NonTriggered",
"reportDescription": "All clients with the status ‘Active’",
"reportParamName": {
"Office": "OfficeIdSelectOne",
"Loan Officer": "loanOfficerIdSelectAll"
}
}
],
"triggerTypeOptions": [
{"id": 1,"code": "triggerType.direct", "value": "Direct"},
{"id": 2, "code": "triggerType.schedule","value": "Scheduled"},
{"id": 3,"code": "triggerType.triggered","value": "Triggered"}
],
"months": [
{ "id": 1, "code": "JANUARY", "value": "JANUARY" },
{ "id": 2, "code": "FEBRUARY", "value": "FEBRUARY" },
{ "id": 3, "code": "MARCH", "value": "MARCH" },
{ "id": 4, "code": "APRIL", "value": "APRIL" },
{ "id": 5, "code": "MAY", "value": "MAY" },
{ "id": 6, "code": "JUNE", "value": "JUNE" },
{ "id": 7, "code": "JULY", "value": "JULY" },
{ "id": 8, "code": "AUGUST", "value": "AUGUST" },
{ "id": 9, "code": "SEPTEMBER", "value": "SEPTEMBER"},
{ "id": 10, "code": "OCTOBER", "value": "OCTOBER"},
{ "id": 11, "code": "NOVEMBER", "value": "NOVEMBER" }
],
"weekDays": [
{ "id": 1, "code": "calendarWeekDaysType.monday", "value": "MO" },
{ "id": 2, "code": "calendarWeekDaysType.tuesday", "value": "TU" },
{ "id": 3, "code": "calendarWeekDaysType.wednesday", "value": "WE" },
{ "id": 4, "code": "calendarWeekDaysType.thursday", "value": "TH"},
{ "id": 5, "code": "calendarWeekDaysType.friday", "value": "FR" },
{ "id": 6, "code": "calendarWeekDaysType.saturday", "value": "SA" },
{ "id": 7, "code": "calendarWeekDaysType.sunday", "value": "SU" }
],
"frequencyTypeOptions": [
{ "id": 1, "code": "calendarFrequencyType.daily", "value": "DAILY" },
{ "id": 2, "code": "calendarFrequencyType.weekly", "value": "WEEKLY"},
{ "id": 3, "code": "calendarFrequencyType.monthly", "value": "MONTHLY"},
{ "id": 4, "code": "calendarFrequencyType.yearly", "value": "YEARLY" }
],
"periodFrequencyOptions": [
{ "id": 0, "code": "periodFrequencyType.days", "value": "DAYS" },
{ "id": 1, "code": "periodFrequencyType.weeks", "value": "WEEKS" },
{ "id": 2, "code": "periodFrequencyType.months", "value": "MONTHS" },
{ "id": 3, "code": "periodFrequencyType.years", "value": "YEARS" }
]
}
smscampaigns/template
{
"smsProviderOptions": [{
"id": 1,
"tenantId": "1",
"phoneNo": "+XXXXXXXXXX",
"providerName": "Twilio SMS Provider",
"providerDescription": "Twilio, just for testing"
}],
"businessRulesOptions": [
{
"reportId": 166,
"reportName": "Active Clients",
"reportType": "SMS",
"reportSubType": "NonTriggered",
"reportDescription": "All clients with the status ‘Active’",
"reportParamName": {
"Office": "OfficeIdSelectOne",
"Loan Officer": "loanOfficerIdSelectAll"
}
}
],
"triggerTypeOptions": [
{"id": 1,"code": "triggerType.direct", "value": "Direct"},
{"id": 2, "code": "triggerType.schedule","value": "Scheduled"},
{"id": 3,"code": "triggerType.triggered","value": "Triggered"}
],
"months": [
{ "id": 1, "code": "JANUARY", "value": "JANUARY" },
{ "id": 2, "code": "FEBRUARY", "value": "FEBRUARY" },
{ "id": 3, "code": "MARCH", "value": "MARCH" },
{ "id": 4, "code": "APRIL", "value": "APRIL" },
{ "id": 5, "code": "MAY", "value": "MAY" },
{ "id": 6, "code": "JUNE", "value": "JUNE" },
{ "id": 7, "code": "JULY", "value": "JULY" },
{ "id": 8, "code": "AUGUST", "value": "AUGUST" },
{ "id": 9, "code": "SEPTEMBER", "value": "SEPTEMBER"},
{ "id": 10, "code": "OCTOBER", "value": "OCTOBER"},
{ "id": 11, "code": "NOVEMBER", "value": "NOVEMBER" }
],
"weekDays": [
{ "id": 1, "code": "calendarWeekDaysType.monday", "value": "MO" },
{ "id": 2, "code": "calendarWeekDaysType.tuesday", "value": "TU" },
{ "id": 3, "code": "calendarWeekDaysType.wednesday", "value": "WE" },
{ "id": 4, "code": "calendarWeekDaysType.thursday", "value": "TH"},
{ "id": 5, "code": "calendarWeekDaysType.friday", "value": "FR" },
{ "id": 6, "code": "calendarWeekDaysType.saturday", "value": "SA" },
{ "id": 7, "code": "calendarWeekDaysType.sunday", "value": "SU" }
],
"frequencyTypeOptions": [
{ "id": 1, "code": "calendarFrequencyType.daily", "value": "DAILY" },
{ "id": 2, "code": "calendarFrequencyType.weekly", "value": "WEEKLY"},
{ "id": 3, "code": "calendarFrequencyType.monthly", "value": "MONTHLY"},
{ "id": 4, "code": "calendarFrequencyType.yearly", "value": "YEARLY" }
],
"periodFrequencyOptions": [
{ "id": 0, "code": "periodFrequencyType.days", "value": "DAYS" },
{ "id": 1, "code": "periodFrequencyType.weeks", "value": "WEEKS" },
{ "id": 2, "code": "periodFrequencyType.months", "value": "MONTHS" },
{ "id": 3, "code": "periodFrequencyType.years", "value": "YEARS" }
]
}
Update a Campaign
PUT https://Domain Name/api/v1/smscampaigns/{campaignId}
POST smscampaigns/1
Content-Type: application/json
Request Body:
{
"message": "Hello your savings account {savingsAccountNo} debited with {withdrawAmount}"
}
{
"resourceId": 1,
"changes": {
"message": "Hello your savings account {savingsAccountNo} debited with {withdrawAmount}"
}
}
Delete a SMS Campaign
Note: Only closed SMS Campaigns can be deleted
DELETE https://DomainName/api/v1/smscampaigns/{campaignId}
DELETE smscampaigns/1
Content-Type: application/json
No Request Body:
{
"resourceId": 1,
"changes": {}
}
Activates SMS Campaign
POST https://Domain Name/api/v1/smscampaigns/{campaignId}?command=activate
POST smscampaigns/1?command=activate
Content-Type: application/json
Request Body:
{
"activationDate":"01 May 2016",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"resourceId": 1,
"changes": {
"status": {
"id": 300,
"code": "smsCampaignStatus.active",
"value": "active",
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activationDate": "01 May 2016"
}
}
Deactivates SMS Campaign
POST https://Domain Name/api/v1/smscampaigns/{campaignId}?command=close
POST smscampaigns/1?command=close
Content-Type: application/json
Request Body:
{
"closureDate":"01 May 2016",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"resourceId": 1,
"changes": {
"status": {
"id": 600,
"code": "smsCampaignStatus.closed",
"value": "closed",
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"closureDate": "01 May 2016"
}
}
Reactivates SMS Campaign
POST https://Domain Name/api/v1/smscampaigns/{campaignId}?command=reactivate
POST smscampaigns/1?command=reactivate
Content-Type: application/json
Request Body:
{
"activationDate":"01 May 2016",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"resourceId": 1,
"changes": {
"status": {
"id": 300,
"code": "smsCampaignStatus.active",
"value": "active",
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activationDate": "01 May 2016"
}
}
Create a Share Product
Mandatory Fields |
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, locale, totalShares, unitPrice, nominalShares,allowDividendCalculationForInactiveClients,accountingRule |
Mandatory Fields for Cash based accounting (accountingRule = 2) |
shareReferenceId, shareSuspenseId, shareEquityId, incomeFromFeeAccountId |
Optional Fields |
sharesIssued, minimumShares, maximumShares, minimumActivePeriodForDividends, minimumactiveperiodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType, marketPricePeriods, chargesSelected |
POST https://Domain Name/api/v1/products/share
POST shareproducts
Content-Type: application/json
Request Body:
{
"name": "Share Product",
"shortName": "SP",
"description": "Description",
"currencyCode": "USD",
"digitsAfterDecimal": 2,
"inMultiplesOf": "1",
"locale": "en",
"totalShares": "1000",
"sharesIssued": "1000",
"unitPrice": "1",
"minimumShares": "10",
"nominalShares": "20",
"maximumShares": "30",
"minimumActivePeriodForDividends": "1",
"minimumactiveperiodFrequencyType": 0,
"lockinPeriodFrequency": "1",
"lockinPeriodFrequencyType": 1,
"allowDividendCalculationForInactiveClients": "true",
"marketPricePeriods": [{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"fromDate": "04 May 2016",
"shareValue": "2"
}],
"chargesSelected": [{
"id": 20
}],
"accountingRule": "1"
}
{
"resourceId": 1
}
POST shareproducts
Content-Type: application/json
Request Body:
{
"name": "Share Product",
"shortName": "SP",
"description": "Description",
"currencyCode": "USD",
"digitsAfterDecimal": 2,
"inMultiplesOf": "1",
"locale": "en",
"totalShares": "100000",
"sharesIssued": "100000",
"unitPrice": "1",
"minimumShares": "1000",
"nominalShares": "2000",
"maximumShares": "5000",
"minimumActivePeriodForDividends": "1",
"minimumactiveperiodFrequencyType": 0,
"lockinPeriodFrequency": "1",
"lockinPeriodFrequencyType": 1,
"allowDividendCalculationForInactiveClients": "true",
"marketPricePeriods": [{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"fromDate": "04 May 2016",
"shareValue": "2"
}],
"chargesSelected": [{
"id": 20
}],
"accountingRule": "2",
"shareReferenceId": 5,
"shareSuspenseId": 8,
"shareEquityId": 66,
"incomeFromFeeAccountId": 2
}
{
"resourceId": 1
}
Retrieve a Share Product
Example Requests:
GET https://Domain Name/api/v1/products/share/1
{
"id": 1,
"name": "Share Product",
"shortName": "SP",
"description": "SP",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 100,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"totalShares": 100,
"totalSharesIssued": 50,
"unitPrice": 1.00,
"shareCapital": 50.00,
"minimumShares": 1,
"nominalShares": 10,
"maximumShares": 50,
"marketPrice": [
{
"id": 4,
"fromDate": "Feb 1, 2016",
"shareValue": 1.00
},
{
"id": 5,
"fromDate": "May 3, 2016",
"shareValue": 5.00
}],
"charges": [{
"id": 20,
"name": "Share Account Activation Flat",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 1.000000,
"chargeTimeType": {
"id": 13,
"code": "chargeTimeType.activation",
"value": "Share Account Activate"
},
"chargeAppliesTo": {
"id": 4,
"code": "chargeAppliesTo.shares",
"value": "Shares"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
}],
"allowDividendCalculationForInactiveClients": true,
"lockinPeriod": 1,
"lockPeriodTypeEnum": {
"id": 0,
"value": "Days"
},
"minimumActivePeriod": 1,
"minimumActivePeriodForDividendsTypeEnum": {
"id": 0,
"value": "Days"
},
"accountingRule": {
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
},
"accountingMappings": {
"shareReferenceId": {
"id": 1,
"name": "ACCOUNT_NAME_1FJBQ",
"glCode": "ASSET_ED1461237837829"
},
"incomeFromFeeAccountId": {
"id": 14,
"name": "ACCOUNT_NAME_1FJBQ",
"glCode": "INCOME_OY1461237869836"
},
"shareEquityId": {
"id": 66,
"name": "Equity Account",
"glCode": "EQUITY1"
},
"shareSuspenseId": {
"id": 8,
"name": "ACCOUNT_NAME_1FJBQ",
"glCode": "LIABILITY_MA1461237860198"
}
},
"currencyOptions": [{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}],
"chargeOptions": [{
"id": 20,
"name": "Share Account Activation Flat",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 1.000000,
"chargeTimeType": {
"id": 13,
"code": "chargeTimeType.activation",
"value": "Share Account Activate"
},
"chargeAppliesTo": {
"id": 4,
"code": "chargeAppliesTo.shares",
"value": "Shares"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 21,
"name": "Share Purchase %",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 0.500000,
"chargeTimeType": {
"id": 14,
"code": "chargeTimeType.sharespurchase",
"value": "Share Purchase"
},
"chargeAppliesTo": {
"id": 4,
"code": "chargeAppliesTo.shares",
"value": "Shares"
},
"chargeCalculationType": {
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
}
],
"minimumActivePeriodFrequencyTypeOptions": [{
"id": 0,
"code": "savings.lockin.sharePeriodFrequencyType.days",
"value": "Days"
}],
"lockinPeriodFrequencyTypeOptions": [{
"id": 0,
"code": "savings.lockin.sharePeriodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "savings.lockin.sharePeriodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "savings.lockin.sharePeriodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "savings.lockin.sharePeriodFrequencyType.years",
"value": "Years"
}],
"accountingMappingOptions": {
"liabilityAccountOptions": [{
"id": 4,
"name": "ACCOUNT_NAME_1FJBQ",
"glCode": "LIABILITY_2T1461237838897",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "DEFAULT_DESCRIPTION",
"nameDecorated": "ACCOUNT_NAME_1FJBQ",
"tagId": {
"id": 0,
"isActive": false
}
}],
"assetAccountOptions": [{
"id": 1,
"name": "ACCOUNT_NAME_1FJBQ",
"glCode": "ASSET_ED1461237837829",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "DEFAULT_DESCRIPTION",
"nameDecorated": "ACCOUNT_NAME_1FJBQ",
"tagId": {
"id": 0,
"isActive": false
}
}],
"incomeAccountOptions": [{
"id": 2,
"name": "ACCOUNT_NAME_1FJBQ",
"glCode": "INCOME_9O1461237838422",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "DEFAULT_DESCRIPTION",
"nameDecorated": "ACCOUNT_NAME_1FJBQ",
"tagId": {
"id": 0,
"isActive": false
}
}],
"equityAccountOptions": [{
"id": 66,
"name": "Equity Account",
"glCode": "EQUITY1",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 3,
"code": "accountType.equity",
"value": "EQUITY"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Equity Account",
"tagId": {
"id": 0,
"isActive": false
}
}]
}
}
Update a Share Product
PUT https://Domain Name/api/v1/products/share/{productId}
POST shareproducts/1
Content-Type: application/json
Request Body:
{
"description": "Share Product Description.",
"locale": "en",
"unitPrice": "5.0"
}
{
"resourceId": 1,
"changes": {
"description": "Share Product Description.",
"unitPrice": 5.0,
"locale": "en"
}
}
List Share Products
Mandatory Fields |
limit, offset |
Example Requests:
GET https://Domain Name/api/v1/products/share?limit=10&offset=0
{
"totalFilteredRecords": 1,
"pageItems": [{
"id": 1,
"name": "Share Product",
"shortName": "Share Product Description",
"totalShares": 100
}]
}
Create a Savings Product
Mandatory Fields |
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType,accountingRule |
Mandatory Fields for Cash based accounting (accountingRule = 2) |
savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId |
Optional Fields |
minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, allowOverdraft, overdraftLimit, minBalanceForInterestCalculation,withHoldTax,taxGroupId |
POST https://Domain Name/api/v1/savingsproducts
POST savingsproducts
Content-Type: application/json
Request Body:
{
"name": "Passbook Savings",
"shortName": "PBSV",
"description": "Daily compounding using Daily Balance, 5% per year, 365 days in year",
"currencyCode": "USD",
"digitsAfterDecimal": 2,
"inMultiplesOf": 0,
"locale": "en",
"nominalAnnualInterestRate": "5.0",
"interestCompoundingPeriodType": 1,
"interestPostingPeriodType":4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": "365",
"accountingRule":"1",
"charges":[{"id":"1"}]
}
{
"resourceId": 1
}
POST savingsproducts
Content-Type: application/json
Request Body:
{
"locale": "en",
"name": "New Passbook Savings ",
"shortName": "NPBS",
"description": "A savings product",
"currencyCode": "USD",
"digitsAfterDecimal": "2",
"inMultiplesOf": 0,
"nominalAnnualInterestRate": "15",
"interestCompoundingPeriodType": "1",
"interestPostingPeriodType": "4",
"interestCalculationType": "1",
"interestCalculationDaysInYearType": "365",
"minRequiredOpeningBalance": "50",
"allowOverdraft":true,
"overdraftLimit":5000,
"minBalanceForInterestCalculation":5000,
"minRequiredBalance":20,
"enforceMinRequiredBalance":true,
"lockinPeriodFrequency": "4",
"lockinPeriodFrequencyType": "1",
"withdrawalFeeForTransfers":false,
"accountingRule": "2",
"charges":[{"id":"1"},{"id":3}]
"savingsReferenceAccountId": "16",
"transfersInSuspenseAccountId": "16",
"savingsControlAccountId": "15",
"interestOnSavingsAccountId": "18",
"incomeFromFeeAccountId": "4",
"incomeFromPenaltyAccountId": "4",
"feeToIncomeAccountMappings":[
{
"chargeId":"6",
"incomeAccountId":"16"
}
],
"penaltyToIncomeAccountMappings":[
{
"chargeId":"4",
"incomeAccountId":"15"
}
],
"paymentChannelToFundSourceMappings": [
{
"paymentTypeId": "14",
"fundSourceAccountId": "2"
}
]
}
{
"resourceId": 1
}
Retrieve a Savings Product
Example Requests:
GET https://Domain Name/api/v1/savingsproducts/1
{
"id": 1,
"name": "savings product",
"shortName": "sa1",
"description": "gtasga",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5.000000,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"withdrawalFeeForTransfers": false,
"accountingRule": {
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
},
"accountingMappings": {
"savingsReferenceAccount": {
"id": 12,
"name": "savings ref",
"glCode": "20"
},
"incomeFromFeeAccount": {
"id": 16,
"name": "income from savings fee",
"glCode": "24"
},
"incomeFromPenaltyAccount": {
"id": 17,
"name": "income from sav penalites",
"glCode": "25"
},
"interestOnSavingsAccount": {
"id": 15,
"name": "interest on savings",
"glCode": "23"
},
"savingsControlAccount": {
"id": 13,
"name": "savings ref tool kit",
"glCode": "21"
},
"transfersInSuspenseAccount": {
"id": 14,
"name": "saving transfers",
"glCode": "22"
}
},
"paymentChannelToFundSourceMappings": [
{
"paymentType": {
"id": 10,
"name": "check"
},
"fundSourceAccount": {
"id": 12,
"name": "savings ref",
"glCode": "20"
}
}
],
"feeToIncomeAccountMappings": [
{
"charge": {
"id": 11,
"name": "sav charge",
"active": false,
"penalty": false
},
"incomeAccount": {
"id": 16,
"name": "income from savings fee",
"glCode": "24"
}
}
],
"penaltyToIncomeAccountMappings": [
{
"charge": {
"id": 12,
"name": "sav 2",
"active": false,
"penalty": true
},
"incomeAccount": {
"id": 17,
"name": "income from sav penalites",
"glCode": "25"
}
}
],
"charges": []
}
Update a Savings Product
PUT https://Domain Name/api/v1/savingsproducts/{productId}
POST savingsproducts/1
Content-Type: application/json
Request Body:
{
"description": "Passbook Savings Lite.",
"locale": "en",
"interestRate": "5.73"
}
{
"resourceId": 1,
"changes": {
"description": "Passbook Savings Lite.",
"interestRate": 5.73,
"locale": "en"
}
}
Delete a Savings Product
DELETE https://Domain Name/api/v1/savingsproducts/{productId}
DELETE savingsproducts/1
Content-Type: application/json
{
"resourceId": 1
}
List Savings Products
Example Requests:
GET https://Domain Name/api/v1/savingsproducts
[
{
"id": 1,
"name": "Savings product",
"shortName": "sa1",
"description": "gtasga",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5.000000,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"withdrawalFeeForTransfers": false,
"accountingRule": {
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
}
}
]
Fixed Deposit Product:
This is one of the advanced term deposit product offered by MFI's. The Fixed Deposit Products (aka FD) product offerings are modeled using this API.
The FD products are deposit accounts which are held for a fixed term – like 1 year, 2 years etc.
When creating fixed deposit accounts, the details from the fixed deposit product are used to auto fill details of the fixed deposit account application process.
Field Descriptions |
name |
The name of the product offering. |
shortName |
Shortname associated with a fixed deposit product. An abbreviated version of the name, used in reports or menus where space is limited. |
description |
A description of the product offering. |
currencyCode |
Three letter ISO code representing currency. |
digitsAfterDecimal |
Override the currency default value for digitsAfterDecimal. |
inMultiplesOf |
Override the default value for rounding currency to multiples of provided value. |
interestCompoundingPeriodType |
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month) |
interestPostingPeriodType |
The period at which interest rate is posted or credited to fixed deposit account. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec) |
interestCalculationType |
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance |
interestCalculationDaysInYearType |
The setting for number of days in year to use: 360=360 Days, 365=365 Days |
lockinPeriodFrequency |
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the fixed deposit account is 'locked in' and premature closure is not allowed. e.g. 2 Months |
lockinPeriodFrequencyType |
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the fixed deposit account is 'locked in' and premature closure is not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 2 Months |
minDepositTerm |
This is used along with minDepositTermTypeId to define allowed minimum deposit term for creating a fixed deposit account using this product. e.g. 6 Months |
minDepositTermTypeId |
Used along with minDepositTerm to define allowed minimum deposit term for creating a fixed deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
maxDepositTerm |
Optional: If provided, used along with maxDepositTermTypeId to define allowed maximum deposit term for creating a fixed deposit account using this product. e.g. 3 Years |
maxDepositTermTypeId |
Optional: If provided, used along with maxDepositTerm to define allowed maximum deposit term for creating a fixed deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 3 Years |
inMultiplesOfDepositTerm |
Optional: If provided, used along with inMultiplesOfDepositTermTypeId to indicate the allowed deposit periods after minimum deposit period. e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. |
inMultiplesOfDepositTermTypeId |
Optional: If provided, used along with inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. |
preClosurePenalApplicable |
Optional: expects boolean value true/false, If provided as true then must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId. |
preClosurePenalInterest |
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than the interest rate applicable. |
preClosurePenalInterestOnTypeId |
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterest to decide what should be the applicable interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable till premature withdrawal. |
accountingRule |
Specifies if accounting is enabled for the particular product and the type of the accounting rule to be used Example Values:1=NONE,2=CASH_BASED |
withHoldTax |
Optional: If provided, sets an indicator for applying withhold tax on interest posting for savings account |
taxGroupId |
Optional: If withhold tax set as true, with hold tax will be applied as per the tax group provided |
Create a Fixed Deposit Product
Mandatory Fields |
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, accountingRule |
Mandatory Fields for Cash based accounting (accountingRule = 2) |
savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId |
Optional Fields |
lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, , withHoldTax, taxGroupId |
POST https://Domain Name/api/v1/fixeddepositproducts
POST fixeddepositproducts
Content-Type: application/json
Request Body:
{
"name": "Fixed deposit product",
"shortName": "FD01",
"description": "Daily compounding using Daily Balance, 5% per year, 365 days in year",
"currencyCode": "USD",
"digitsAfterDecimal": 2,
"inMultiplesOf": 0,
"locale": "en",
"interestCompoundingPeriodType": 1,
"interestPostingPeriodType":4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": "365",
"accountingRule":"1",
"preClosurePenalApplicable":"true",
"preClosurePenalInterest":"1.75",
"preClosurePenalInterestOnTypeId":1,
"minDepositTerm":1,
"minDepositTermTypeId":1,
"maxDepositTerm":5,
"maxDepositTermTypeId":3,
"charts":[
{
"fromDate": "01 Jan 2014",
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"dateFormat":"dd MMMM yyyy",
"chartSlabs":[
{
"description":"from 0 to 90 days",
"periodType":"1",
"fromPeriod":"0",
"toPeriod":"90",
"annualInterestRate":"4.5"
}
]
}
]
}
{
"resourceId": 1
}
Retrieve a Fixed Deposit Product
Example Requests:
GET https://Domain Name/api/v1/fixeddepositproducts/1
{
"id": 1,
"name": "Fixed deposit product",
"shortName": "FD01",
"description": "Daily compounding using Daily Balance, 5% per year, 365 days in year",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"accountingMappings": {
"savingsReferenceAccount": {
"id": 12,
"name": "savings ref",
"glCode": "20"
},
"incomeFromFeeAccount": {
"id": 16,
"name": "income from savings fee",
"glCode": "24"
},
"incomeFromPenaltyAccount": {
"id": 17,
"name": "income from sav penalites",
"glCode": "25"
},
"interestOnSavingsAccount": {
"id": 15,
"name": "interest on savings",
"glCode": "23"
},
"savingsControlAccount": {
"id": 13,
"name": "savings ref tool kit",
"glCode": "21"
},
"transfersInSuspenseAccount": {
"id": 14,
"name": "saving transfers",
"glCode": "22"
}
},
"feeToIncomeAccountMappings": [
{
"charge": {
"id": 11,
"name": "sav charge",
"active": false,
"penalty": false
},
"incomeAccount": {
"id": 16,
"name": "income from savings fee",
"glCode": "24"
}
}
],
"penaltyToIncomeAccountMappings": [
{
"charge": {
"id": 12,
"name": "sav 2",
"active": false,
"penalty": true
},
"incomeAccount": {
"id": 17,
"name": "income from sav penalites",
"glCode": "25"
}
}
],
"preClosurePenalApplicable":"true",
"preClosurePenalInterest":"1.75",
"preClosurePenalInterestOnType": {
"id": 1,
"code": "preClosurePenalInterestOnType.wholeTerm",
"value": "Whole term"
},
"minDepositTerm":1,
"minDepositTermType": {
"id": 1,
"code": "deposit.term.savingsPeriodFrequencyType.weeks",
"value": "Weeks"
},
"maxDepositTerm":5,
"maxDepositTermType": {
"id": 3,
"code": "deposit.term.savingsPeriodFrequencyType.years",
"value": "Years"
},
"activeChart": {
"id": 8,
"fromDate": [
2014,
1,
1
],
"savingsProductId": 8,
"savingsProductName": "Fixed deposit product",
"chartSlabs": [
{
"id": 18,
"description": "from 0 to 90 days",
"periodType": {
"id": 1,
"code": "interestChartPeriodType.weeks",
"value": "Weeks"
},
"fromPeriod": 0,
"toPeriod": 90,
"annualInterestRate": 4.5,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
],
"periodTypes": [
{
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
{
"id": 1,
"code": "interestChartPeriodType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "interestChartPeriodType.months",
"value": "Months"
},
{
"id": 3,
"code": "interestChartPeriodType.years",
"value": "Years"
}
]
}
}
Update a Fixed Deposit Product
PUT https://Domain Name/api/v1/fixeddepositproducts/{productId}
POST fixeddepositproducts/1
Content-Type: application/json
Request Body:
{
"description": "Fixed deposit product new offerings",
"locale": "en",
"minDepositTerm":5,
"minDepositTermTypeId":1,
}
{
"resourceId": 1,
"changes": {
"description": "Fixed deposit product new offerings",
"minDepositTerm": 5
}
}
Delete a Fixed Deposit Product
DELETE https://Domain Name/api/v1/fixeddepositdproducts/{productId}
DELETE fixeddepositdproducts/1
Content-Type: application/json
{
"resourceId": 1
}
List Fixed Deposit Products
Example Requests:
GET https://Domain Name/api/v1/fixeddepositproducts
[
{
"id": 3,
"name": "FD01",
"shortName": "FD01",
"description": "FD01",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"preClosurePenalApplicable": false,
"minDepositTerm": 3,
"maxDepositTerm": 4,
"minDepositTermType": {
"id": 2,
"code": "deposit.term.savingsPeriodFrequencyType.months",
"value": "Months"
},
"maxDepositTermType": {
"id": 3,
"code": "deposit.term.savingsPeriodFrequencyType.years",
"value": "Years"
},
"nominalAnnualInterestRate": 0,
"interestCompoundingPeriodType": {
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"accountingRule": {
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
}
}
]
Recurring Deposit Product:
Recurring Deposits are a special kind of Term Deposits offered by MFI's. The Recurring Deposit Products (aka RD) product offerings are modeled using this API.
Recurring Deposits help people with regular incomes to deposit a fixed amount every month (specified recurring frequency) into their Recurring Deposit account.
When creating recurring deposit accounts, the details from the recurring deposit product are used to auto fill details of the recurring deposit account application process.
Field Descriptions |
name |
The name of the product offering. |
shortName |
Shortname associated with a recurring deposit product. An abbreviated version of the name, used in reports or menus where space is limited. |
description |
A description of the product offering. |
currencyCode |
Three letter ISO code representing currency. |
digitsAfterDecimal |
Override the currency default value for digitsAfterDecimal. |
inMultiplesOf |
Override the default value for rounding currency to multiples of provided value. |
interestCompoundingPeriodType |
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month) |
interestPostingPeriodType |
The period at which interest rate is posted or credited to recurring deposit account. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec) |
interestCalculationType |
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance |
interestCalculationDaysInYearType |
The setting for number of days in year to use: 360=360 Days, 365=365 Days |
lockinPeriodFrequency |
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the recurring deposit account is 'locked in' and premature closure is not allowed. e.g. 2 Months |
lockinPeriodFrequencyType |
recurringDepositFrequency |
The frequency for depositing a fixed amount to recurring deposit account. |
recurringDepositFrequencyTypeId |
Used along with recurringDepositFrequency to define frequency for depositing a fixed amount to recurring deposit account. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. deposit every 1 Months |
minDepositTerm |
This is used along with minDepositTermTypeId to define allowed minimum deposit term for creating a recurring deposit account using this product. e.g. 6 Months |
minDepositTermTypeId |
Used along with minDepositTerm to define allowed minimum deposit term for creating a recurring deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
maxDepositTerm |
Optional: If provided, used along with maxDepositTermTypeId to define allowed maximum deposit term for creating a recurring deposit account using this product. e.g. 3 Years |
maxDepositTermTypeId |
Optional: If provided, used along with maxDepositTerm to define allowed maximum deposit term for creating a recurring deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 3 Years |
inMultiplesOfDepositTerm |
Optional: If provided, used along with inMultiplesOfDepositTermTypeId to indicate the allowed deposit periods after minimum deposit period. e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. |
inMultiplesOfDepositTermTypeId |
Optional: If provided, used along with inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. |
preClosurePenalApplicable |
Optional: expects boolean value true/false, If provided as true then must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId. |
preClosurePenalInterest |
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than the interest rate applicable. |
preClosurePenalInterestOnTypeId |
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterest to decide what should be the applicable interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable till premature withdrawal. |
accountingRule |
Specifies if accounting is enabled for the particular product and the type of the accounting rule to be used Example Values:1=NONE,2=CASH_BASED |
withHoldTax |
Optional: If provided, sets an indicator for applying withhold tax on interest posting for savings account |
taxGroupId |
Optional: If withhold tax set as true, with hold tax will be applied as per the tax group provided |
Create a Recurring Deposit Product
Mandatory Fields |
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, recurringDepositFrequency, recurringDepositFrequencyTypeId, accountingRule, depositAmount |
Mandatory Fields for Cash based accounting (accountingRule = 2) |
savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId |
Optional Fields |
lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, minDepositAmount, maxDepositAmount, withHoldTax, taxGroupId |
POST https://Domain Name/api/v1/recurringdepositproducts
POST recurringdepositproducts
Content-Type: application/json
Request Body:
{
"name": "Recurring deposit product",
"shortName": "RD01",
"description": "Daily compounding using Daily Balance, 5% per year, 365 days in year",
"currencyCode": "USD",
"digitsAfterDecimal": 2,
"inMultiplesOf": 0,
"locale": "en",
"interestCompoundingPeriodType": 1,
"interestPostingPeriodType":4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": "365",
"accountingRule":"1",
"recurringDepositFrequency":1,
"recurringDepositFrequencyTypeId":2,
"preClosurePenalApplicable":"true",
"preClosurePenalInterest":"1.75",
"preClosurePenalInterestOnTypeId":1,
"minDepositTerm":1,
"minDepositTermTypeId":1,
"maxDepositTerm":5,
"maxDepositTermTypeId":3,
depositAmount: "10000",
minDepositAmount: "100",
maxDepositAmount: "1000000",
"charts":[
{
"fromDate": "01 Jan 2014",
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"dateFormat":"dd MMMM yyyy",
"chartSlabs":[
{
"description":"from 0 to 90 days",
"periodType":"1",
"fromPeriod":"0",
"toPeriod":"90",
"annualInterestRate":"4.5"
}
]
}
]
}
{
"resourceId": 1
}
Retrieve a Recurring Deposit Product
Example Requests:
GET https://Domain Name/api/v1/recurringdepositproducts/1
{
"id": 1,
"name": "Recurring deposit product",
"shortName": "RD01",
"description": "Daily compounding using Daily Balance, 5% per year, 365 days in year",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"accountingMappings": {
"savingsReferenceAccount": {
"id": 12,
"name": "savings ref",
"glCode": "20"
},
"incomeFromFeeAccount": {
"id": 16,
"name": "income from savings fee",
"glCode": "24"
},
"incomeFromPenaltyAccount": {
"id": 17,
"name": "income from sav penalites",
"glCode": "25"
},
"interestOnSavingsAccount": {
"id": 15,
"name": "interest on savings",
"glCode": "23"
},
"savingsControlAccount": {
"id": 13,
"name": "savings ref tool kit",
"glCode": "21"
},
"transfersInSuspenseAccount": {
"id": 14,
"name": "saving transfers",
"glCode": "22"
}
},
"feeToIncomeAccountMappings": [
{
"charge": {
"id": 11,
"name": "sav charge",
"active": false,
"penalty": false
},
"incomeAccount": {
"id": 16,
"name": "income from savings fee",
"glCode": "24"
}
}
],
"penaltyToIncomeAccountMappings": [
{
"charge": {
"id": 12,
"name": "sav 2",
"active": false,
"penalty": true
},
"incomeAccount": {
"id": 17,
"name": "income from sav penalites",
"glCode": "25"
}
}
],
"recurringDepositFrequency":1,
"recurringDepositFrequencyType": {
"id": 2,
"code": "recurring.deposit.savingsPeriodFrequencyType.months",
"value": "Months"
},
"minDepositAmount":100.00,
"depositAmount":10000.00,
"maxDepositAmount":1000000.00,
"preClosurePenalApplicable":"true",
"preClosurePenalInterest":"1.75",
"preClosurePenalInterestOnType": {
"id": 1,
"code": "preClosurePenalInterestOnType.wholeTerm",
"value": "Whole term"
},
"minDepositTerm":1,
"minDepositTermType": {
"id": 1,
"code": "deposit.term.savingsPeriodFrequencyType.weeks",
"value": "Weeks"
},
"maxDepositTerm":5,
"maxDepositTermType": {
"id": 3,
"code": "deposit.term.savingsPeriodFrequencyType.years",
"value": "Years"
},
"activeChart": {
"id": 8,
"fromDate": [
2014,
1,
1
],
"savingsProductId": 8,
"savingsProductName": "Fixed deposit product",
"chartSlabs": [
{
"id": 18,
"description": "from 0 to 90 days",
"periodType": {
"id": 1,
"code": "interestChartPeriodType.weeks",
"value": "Weeks"
},
"fromPeriod": 0,
"toPeriod": 90,
"annualInterestRate": 4.5,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
],
"periodTypes": [
{
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
{
"id": 1,
"code": "interestChartPeriodType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "interestChartPeriodType.months",
"value": "Months"
},
{
"id": 3,
"code": "interestChartPeriodType.years",
"value": "Years"
}
]
}
}
Update a Recurring Deposit Product
PUT https://Domain Name/api/v1/recurringdepositproducts/{productId}
POST recurringdepositproducts/1
Content-Type: application/json
Request Body:
{
"description": "Recurring deposit product new offerings",
"locale": "en",
"minDepositTerm":5,
"minDepositTermTypeId":1,
}
{
"resourceId": 1,
"changes": {
"description": "Recurring deposit product new offerings",
"minDepositTerm": 5
}
}
Delete a Recurring Deposit Product
DELETE https://Domain Name/api/v1/recurringdepositdproducts/{productId}
DELETE recurringdepositdproducts/1
Content-Type: application/json
{
"resourceId": 1
}
List Recuring Deposit Products
Example Requests:
GET https://Domain Name/api/v1/recurringdepositproducts
[
{
"id": 3,
"name": "RD01",
"shortName": "RD01",
"description": "RD01",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"recurringDepositFrequency":1,
"recurringDepositFrequencyType": {
"id": 2,
"code": "recurring.deposit.savingsPeriodFrequencyType.months",
"value": "Months"
},
"preClosurePenalApplicable": false,
"minDepositTerm": 3,
"maxDepositTerm": 4,
"minDepositTermType": {
"id": 2,
"code": "deposit.term.savingsPeriodFrequencyType.months",
"value": "Months"
},
"maxDepositTermType": {
"id": 3,
"code": "deposit.term.savingsPeriodFrequencyType.years",
"value": "Years"
},
"interestCompoundingPeriodType": {
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"accountingRule": {
"id": 1,
"code": "accountingRuleType.none",
"value": "NONE"
}
}
]
Share Account:
Share accounts are instances of a praticular share product created for an individual. An application process around the creation of accounts is also supported.
Starting State | Action | Resultant State |
- | Submit | Submitted and pending approval |
Submitted and pending approval | Reject | Closed - Rejected |
Submitted and pending approval | Approve | Approved |
Approved | Undo Approval | Submitted and pending approval |
Approved | Activate | Active |
Field Descriptions |
clientId |
The client you are creating the share account for. clientId must be provided. |
productId |
The id of the product used for this share account. The share account inherits the selected currency of the product and possibly other details if not overridden in the share account creation request. |
accountNo |
The account no. associated with this account. Is auto generated if not provided at creation time. |
externalId |
A place to put an external reference for this share account useful in migrations e.g. The ID another system uses. If provided, it must be unique. |
submittedOnDate |
submittedOnDate must be provided when initially creating share account application. locale and dateFormat parameters must be provided with this. |
savingsAccountId |
The saving account id in which dividend amount should be posted. |
minimumActivePeriod |
Optional: If provided, used along with minimumActivePeriodFrequencyType to indicate the length of time that the share account for considering dividends. e.g. 60 Days |
minimumActivePeriodFrequencyType |
Optional: If provided, used along with minimumActivePeriod to indicate the length of time that the share account for considering dividends. 0=Days e.g. 60 Days |
lockinPeriodFrequency |
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the shares is 'locked in' and redeems are not allowed. e.g. 6 Months |
lockinPeriodFrequencyType |
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the shares is 'locked in' and redeems are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
applicationDate |
Application date on which the first shares purchase should be considerd. |
requestedShares |
Retrieve Share Account Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Arguments
- clientId
- Integer mandatory
- productId
- Integer optional
- If entered, productId, productName and selectedProduct fields are returned.
Example Requests:
GET https://Domain Name/api/v1/accounts/share/template?clientId={clientId}
{
"clientId": 7,
"clientName": "Client Name",
"productOptions": [{
"id": 1,
"name": "Share Product",
"shortName": "SP",
"totalShares": 100
}]
}
GET https://Domain Name/api/v1/accounts/share/template?clientId={clientId}&productId={productId}
{
"clientId": 7,
"clientName": "Client Name",
"defaultShares": 100,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 100,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"currentMarketPrice": 5.00,
"charges": [{
"chargeId": 20,
"name": "Share Account Activation Flat",
"chargeTimeType": {
"id": 13,
"code": "chargeTimeType.activation",
"value": "Share Account Activate"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"amount": 1.000000,
}],
"lockinPeriodFrequencyTypeOptions": [{
"id": 0,
"code": "savings.lockin.sharePeriodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "savings.lockin.sharePeriodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "savings.lockin.sharePeriodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "savings.lockin.sharePeriodFrequencyType.years",
"value": "Years"
}],
"minimumActivePeriodFrequencyTypeOptions": [{
"id": 0,
"code": "savings.lockin.sharePeriodFrequencyType.days",
"value": "Days"
}],
"clientSavingsAccounts": [{
"id": 13,
"accountNo": "000000013",
"depositType": {
"id": 100,
"code": "depositAccountType.savingsDeposit",
"value": "Savings"
}
}]
}
Submit new share application
Mandatory Fields |
clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate |
Optional Fields |
accountNo, externalId |
Inherited from Product (if not provided) |
minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType |
Minimal request: accountNo auto generated, remaining details inherited from savings product.
POST https://Domain Name/api/v1/accounts/share
POST savingsaccount
Content-Type: application/json
Request Body:
{
"clientId": "7",
"productId": 1,
"requestedShares": 100,
"externalId": "1",
"submittedDate": "01 May 2016",
"minimumActivePeriod": "1",
"minimumActivePeriodFrequencyType": 0,
"lockinPeriodFrequency": "1",
"lockinPeriodFrequencyType": 0,
"applicationDate": "01 May 2016",
"allowDividendCalculationForInactiveClients": true,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"charges": [{
"chargeId": 20,
"amount": 1
},
{
"chargeId": 21,
"amount": 0.5
},
{
"chargeId": 23,
"amount": 2
}],
"savingsAccountId": 13
}
{
"resourceId": 1
}
Approve share application
Approves share application so long as its in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=approve
POST shareaccount/1?command=approve
Content-Type: application/json
Request Body:
{
"note":"notes",
"approvedDate":"01 May 2016",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"resourceId": 1,
"changes": {
"status": {
"id": 200,
"code": "shareAccountStatusType.approved",
"value": "Approved",
"submittedAndPendingApproval": false,
"approved": true,
"rejected": false,
"active": false,
"closed": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedDate": "01 May 2016"
}
}
Undo approval share application
Will move 'approved' share application back to 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=undoApproval
POST shareaccount/1?command=undoApproval
Content-Type: application/json
Request Body:
{
}
{
"resourceId": 1,
"changes": {
"status": {
"id": 100,
"code": "shareAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"active": false,
"closed": false
},
"approvedOnDate": ""
}
}
Reject share application
Rejects share application so long as its in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=reject
POST shareaccount/1?command=reject
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedDate": "03 March 2013"
}
{
"resourceId": 1,
"changes": {
"status": {
"id": 500,
"code": "shareAccountStatusType.rejected",
"value": "Rejected",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": true,
"active": false,
"closed": true
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedDate": "03 March 2013",
"closedDate": "03 March 2013"
}
}
Activate a share account
Results in an approved share application being converted into an 'active' share account.
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=activate
POST shareaccount/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activatedDate": "01 March 2013"
}
{
"resourceId": 1,
"changes": {
"status": {
"id": 300,
"code": "shareAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"active": true,
"closed": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activatedDate": "01 March 2013"
}
}
Close a share account
Results in an Activated share application being converted into an 'closed' share account.
closedDate is closure date of share account
Mandatory Fields |
dateFormat,locale,closedDate |
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=close
POST shareaccount/5?command=close
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closedDate":"26 August 2013",
"note":"close note"
}
{
"resourceId":5,
"changes":{
"status":{
"id":600,
"code":"shareAccountStatusType.closed",
"value":"Closed",
"submittedAndPendingApproval":false,
"approved":false,
"rejected":false,
"active":false,
"closed":true
},
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"closedOnDate":"26 August 2013",
"note":"close note"
}
}
Apply additional shares on a share account
requestedDate is requsted date of share purchase
requestedShares is number of shares to be purchase
Mandatory Fields |
dateFormat,locale,requestedDate, requestedShares |
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=applyadditionalshares
POST shareaccount/5?command=applyadditionalshares
Content-Type: application/json
Request Body:
{
"requestedDate": "04 May 2016",
"requestedShares": "10",
"locale": "en",
"dateFormat": "dd MMMM yyyy"
}
{
"resourceId":5,
}
Approve additional shares request on a share account
requestedShares is Share purchase transaction ids
Mandatory Fields |
requestedShares |
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=approveadditionalshares
POST shareaccount/5?command=approveadditionalshares
Content-Type: application/json
Request Body:
{
"requestedShares": [{
"id": 34
}]
}
{
"resourceId":5,
}
Reject additional shares request on a share account
requestedShares is Share purchase transaction ids
Mandatory Fields |
requestedShares |
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=rejectadditionalshares
POST shareaccount/5?command=rejectadditionalshares
Content-Type: application/json
Request Body:
{
"requestedShares":[{"id":35}]
}
{
"resourceId":5,
}
Redeem shares on a share account
Results redeem some/all shares from share account.
requestedDate is requsted date of shares redeem
requestedShares is number of shares to be redeemed
Mandatory Fields |
dateFormat,locale,requestedDate,requestedShares |
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=redeemshares
POST shareaccount/5?command=redeemshares
Content-Type: application/json
Request Body:
{
"requestedDate": "04 May 2016",
"requestedShares": "4",
"locale": "en",
"dateFormat": "dd MMMM yyyy"
}
{
"resourceId":5,
}
List share applications/accounts
Example Requests:
GET https://Domain Name/api/v1/accounts/share
{
"totalFilteredRecords": 1,
"pageItems": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Client Name",
"productId": 1,
"productName": "Share Product Name",
"status": {
"id": 100,
"code": "shareAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"active": false,
"closed": false
},
"timeline": {
"submittedOnDate": [
2013,
3,
1
]
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"purchasedShares" : [
{"id":1,
"purchasedDate":"01 May 2013",
"numberOfShares": 10,
"purchasedPrice": 5
}
],
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
}
}
]
}
Retrieve a share application/account:
Example Requests :
GET https://DomainName/api/v1/accounts/share/{accountId}
{
"id": 2,
"accountNo": "000000002",
"savingsAccountNumber": "000000013",
"clientId": 7,
"clientName": "Client_FirstName_2KX8C Client_LastName_NWNG",
"productId": 1,
"productName": "Share Product",
"status": {
"id": 300,
"code": "shareAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"active": true,
"closed": false
},
"timeline": {
"submittedOnDate": [2016,
4,
1],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedDate": [2016,
4,
1],
"approvedByUsername": "mifos",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"activatedDate": [2016,
4,
1]
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 100,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"summary": {
"id": 2,
"accountNo": "000000002",
"totalApprovedShares": 1,
"totalPendingForApprovalShares": 0,
"productId": 1,
"productName": "Conflux Share Product",
"status": {
"id": 300,
"code": "shareAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"active": true,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 100,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"timeline": {
"submittedOnDate": [2016,
4,
1],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedDate": [2016,
4,
1],
"approvedByUsername": "mifos",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"activatedDate": [2016,
4,
1]
}
},
"purchasedShares": [{
"id": 6,
"accountId": 2,
"purchasedDate": [2016,
4,
1],
"numberOfShares": 10,
"purchasedPrice": 0.50,
"status": {
"id": 300,
"code": "purchasedSharesStatusType.approved",
"value": "Approved"
},
"type": {
"id": 500,
"code": "purchasedSharesType.purchased",
"value": "Purchase"
},
"amount": 5.05,
"chargeAmount": 0.05,
"amountPaid": 5.05
},
{
"id": 7,
"accountId": 2,
"purchasedDate": [2016,
4,
21],
"status": {
"id": 300,
"code": "purchasedSharesStatusType.approved",
"value": "Approved"
},
"type": {
"id": 700,
"code": "charge.payment",
"value": "Charge Payment"
},
"amount": 1.00,
"chargeAmount": 0,
"amountPaid": 1.00
},
{
"id": 8,
"accountId": 2,
"purchasedDate": [2016,
4,
2],
"numberOfShares": 5,
"purchasedPrice": 0.50,
"status": {
"id": 300,
"code": "purchasedSharesStatusType.approved",
"value": "Approved"
},
"type": {
"id": 600,
"code": "purchasedSharesType.redeemed",
"value": "Redeem"
},
"amount": 2.45,
"chargeAmount": 0.05,
"amountPaid": 2.45
},
{
"id": 9,
"accountId": 2,
"purchasedDate": [2016,
4,
3],
"numberOfShares": 10,
"purchasedPrice": 0.50,
"status": {
"id": 300,
"code": "purchasedSharesStatusType.approved",
"value": "Approved"
},
"type": {
"id": 500,
"code": "purchasedSharesType.purchased",
"value": "Purchase"
},
"amount": 5.05,
"chargeAmount": 0.05,
"amountPaid": 5.05
},
{
"id": 10,
"accountId": 2,
"purchasedDate": [2016,
4,
4],
"numberOfShares": 5,
"purchasedPrice": 0.50,
"status": {
"id": 300,
"code": "purchasedSharesStatusType.approved",
"value": "Approved"
},
"type": {
"id": 500,
"code": "purchasedSharesType.purchased",
"value": "Purchase"
},
"amount": 2.52,
"chargeAmount": 0.02,
"amountPaid": 2.52
},
{
"id": 11,
"accountId": 2,
"purchasedDate": [2016,
4,
5],
"numberOfShares": 15,
"purchasedPrice": 0.50,
"status": {
"id": 300,
"code": "purchasedSharesStatusType.approved",
"value": "Approved"
},
"type": {
"id": 600,
"code": "purchasedSharesType.redeemed",
"value": "Redeem"
},
"amount": 7.35,
"chargeAmount": 0.15,
"amountPaid": 7.35
},
{
"id": 31,
"accountId": 2,
"purchasedDate": [2016,
5,
4],
"numberOfShares": 4,
"purchasedPrice": 5.00,
"status": {
"id": 300,
"code": "purchasedSharesStatusType.approved",
"value": "Approved"
},
"type": {
"id": 600,
"code": "purchasedSharesType.redeemed",
"value": "Redeem"
},
"amount": 19.60,
"chargeAmount": 0.40,
"amountPaid": 19.60
}],
"savingsAccountId": 13,
"currentMarketPrice": 5.00,
"lockinPeriod": 1,
"lockPeriodTypeEnum": {
"id": 0,
"code": "savings.lockin.sharePeriodFrequencyType.days",
"value": "Days"
},
"minimumActivePeriod": 1,
"minimumActivePeriodTypeEnum": {
"id": 0,
"code": "savings.lockin.sharePeriodFrequencyType.days",
"value": "Days"
},
"allowDividendCalculationForInactiveClients": true,
"charges": [{
"id": 9,
"chargeId": 20,
"accountId": 2,
"name": "Share Account Activation Flat",
"chargeTimeType": {
"id": 13,
"code": "chargeTimeType.activation",
"value": "Share Account Activate"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 1.000000,
"amountPaid": 1.000000,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 0.000000,
"amountOrPercentage": 1.000000,
"isActive": true
},
{
"id": 7,
"chargeId": 21,
"accountId": 2,
"name": "Share Purchase %",
"chargeTimeType": {
"id": 14,
"code": "chargeTimeType.sharespurchase",
"value": "Share Purchase"
},
"chargeCalculationType": {
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
"percentage": 1.000000,
"amountPercentageAppliedTo": 12.500000,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 0.120000,
"amountPaid": 0.120000,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 0.000000,
"amountOrPercentage": 1.000000,
"isActive": true
},
{
"id": 8,
"chargeId": 23,
"accountId": 2,
"name": "Share Redeem %",
"chargeTimeType": {
"id": 15,
"code": "chargeTimeType.sharesredeem",
"value": "Share Redeem"
},
"chargeCalculationType": {
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
"percentage": 2.000000,
"amountPercentageAppliedTo": 30.000000,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 0.600000,
"amountPaid": 0.600000,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 0.000000,
"amountOrPercentage": 2.000000,
"isActive": true
}],
"dividends": []
}
Modify a share application
Share application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc
PUT https://Domain Name/api/v1/accounts/share/{accountsId}
PUT shareaccount/1
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"applicationDate": "01 April 2016",
"requestedShares": "20",
}
{
"resourceId": 1,
"changes": {
"dateFormat": "dd MMMM yyyy",
"applicationDate": "01 April 2016",
"requestedShares": "20",
"locale": "en"
}
}
Savings Account:
Savings accounts are instances of a praticular savings product created for an individual or group. An application process around the creation of accounts is also supported.
Starting State | Action | Resultant State |
- | Submit | Submitted and pending approval |
Submitted and pending approval | Reject | Closed - Rejected |
Submitted and pending approval | Withdrawn by Applicant | Closed - Withdrawn by Applicant |
Submitted and pending approval | Approve | Approved |
Approved | Undo Approval | Submitted and pending approval |
Approved | Activate | Active |
Field Descriptions |
clientId |
The client you are creating the savings account for. Either clientId or groupId must be provided. |
groupId |
The group you are creating the savings account for. Either clientId or groupId must be provided. |
productId |
The id of the product used for this savings account. The savings account inherits the selected currency of the product and possibly other details if not overridden in the savings account creation request. |
accountNo |
The account no. associated with this loan. Is auto generated if not provided at creation time. |
externalId |
A place to put an external reference for this savings account useful in migrations e.g. The ID another system uses. If provided, it must be unique. |
submittedOnDate |
submittedOnDate must be provided when initially creating savings account application. locale and dateFormat parameters must be provided with this. |
nominalAnnualInterestRate |
The interest rate set for savings account e.g. 5% Per year - It is always expressed as the Nominal APR. |
interestCompoundingPeriodType |
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month) |
interestPostingPeriodType |
The period at which interest rate is posted or credited to savings account. The actual crediting or posting transaction is date as occurring on the day after the end of the period. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec), 7=Annually (at end of calendar year 31st Dec) |
interestCalculationType |
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance |
interestCalculationDaysInYearType |
The setting for number of days in year to use: 360=360 Days, 365=365 Days |
minRequiredOpeningBalance |
Optional: If provided, sets the minimum deposit amount required to open a savings account e.g. 2,000 |
lockinPeriodFrequency |
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. e.g. 6 Months |
lockinPeriodFrequencyType |
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
withdrawalFeeForTransfers |
Optional: Used along with withdrawalFeeAmount to indicate whether the withdrawal fee should be applied on the account for account transfers . |
allowOverdraft |
Optional: If provided, depending on the value mark the savings account as overdraft account |
overdraftLimit |
Optional: If provided, sets the maximum allowed overdraft amount for a savings account e.g. 5,000 else set the limit as zero |
withHoldTax |
Optional: If tax group provided at product level, will allow to Enable or disable withhold tax on interest posting for savings account |
datatables |
Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type Savings. |
Retrieve Savings Account Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Arguments
- clientId
- Integer mandatory
- productId
- Integer optional
- If entered, productId, productName and selectedProduct fields are returned.
Example Requests:
GET https://Domain Name/api/v1/savingsaccounts/template?clientId={clientId}
{
"clientId": 1,
"clientName": "small business",
"productOptions": [
{
"id": 1,
"name": "Passbook Savings"
}
]
}
GET https://Domain Name/api/v1/savingsaccounts/template?clientId={clientId}&productId={productId}
{
"clientId": 1,
"clientName": "small business",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"timeline": {},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"productOptions": [
{
"id": 1,
"name": "Passbook Savings"
}
],
"fieldOfficerOptions": [
{
"id": 3,
"firstname": "Mrs.",
"lastname": "loanofficerB1",
"displayName": "loanofficerB1, Mrs.",
"officeId": 2,
"officeName": "branch 1",
"isLoanOfficer": true
},
{
"id": 1,
"firstname": "Mr.",
"lastname": "loanofficerHO",
"displayName": "loanofficerHO, Mr.",
"officeId": 1,
"officeName": "branch 1",
"isLoanOfficer": true
}
],
"interestCompoundingPeriodTypeOptions": [
{
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
{
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
}
],
"interestPostingPeriodTypeOptions": [
{
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
{
"id": 5,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly",
"value": "Quarterly"
},
{
"id": 7,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual",
"value": "Annually"
}
],
"interestCalculationTypeOptions": [
{
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
{
"id": 2,
"code": "savingsInterestCalculationType.averagedailybalance",
"value": "Average Daily Balance"
}
],
"interestCalculationDaysInYearTypeOptions": [
{
"id": 360,
"code": "savingsInterestCalculationDaysInYearType.days360",
"value": "360 Days"
},
{
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
}
],
"lockinPeriodFrequencyTypeOptions": [
{
"id": 0,
"code": "savings.lockin.savingsPeriodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "savings.lockin.savingsPeriodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "savings.lockin.savingsPeriodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "savings.lockin.savingsPeriodFrequencyType.years",
"value": "Years"
}
],
"withdrawalFeeTypeOptions": [
{
"id": 1,
"code": "savingsWithdrawalFeesType.flat",
"value": "Flat"
},
{
"id": 2,
"code": "savingsWithdrawalFeesType.percent.of.amount",
"value": "% of Amount"
}
],
"chargeOptions": [
{
"id": 4,
"name": "Savings charge 1",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 200,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "chargepaymentmode.regular"
}
},
{
"id": 5,
"name": "Savings charge 2",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 300,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "chargepaymentmode.regular"
}
},
{
"id": 6,
"name": "Annual fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 50,
"chargeTimeType": {
"id": 6,
"code": "chargeTimeType.annualFee",
"value": "Annual Fee"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 7,
"name": "Quarterly fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 5,
"chargeTimeType": {
"id": 7,
"code": "chargeTimeType.monthlyFee",
"value": "Monthly Fee"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
},
"feeOnMonthDay": [
10,
5
],
"feeInterval": 4
}
],
"datatables": [{
"applicationTableName": "m_savings_account",
"registeredTableName": "Savings Address Enrichment",
"columnHeaderData": [{
"columnName": "savings_account_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Name",
"columnType": "varchar",
"columnLength": 25,
"columnDisplayType": "STRING",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "COUNTRY_cd_country details",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": [{
"id": 17,
"value": "India",
"score": 0
}],
"columnCode": "COUNTRY"
}]
}]
}
Submit new savings application
Mandatory Fields |
clientId or groupId, productId, submittedOnDate |
Optional Fields |
accountNo, externalId, fieldOfficerId |
Inherited from Product (if not provided) |
nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, allowOverdraft, overdraftLimit, withHoldTax |
Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type Savings. |
datatables |
Minimal request: accountNo auto generated, remaining details inherited from savings product.
POST https://Domain Name/api/v1/savingsaccounts
POST savingsaccount
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2011"
}
Minimal request: accountNo provided (must be unique), remaining details inherited from savings product.
POST savingsaccount
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2011",
"accountNo": "SA000023",
"externalId": "SYS-23"
}
Full request: accountNo provided (must be unique), remaining details override details from savings product (except currency).
POST savingsaccount
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"fieldOfficerId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2013",
"accountNo": "SA000023",
"externalId": "SYS-23",
"nominalAnnualInterestRate": "5.65",
"interestCompoundingPeriodType": 1,
"interestPostingPeriodType": 4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": 365,
"minRequiredOpeningBalance": "1,000",
"lockinPeriodFrequency": 6,
"lockinPeriodFrequencyType": 2,
"allowOverdraft":true,
"overdraftLimit":5000,
"charges":[{"id":"1"}],
"datatables": [{
"registeredTableName": "Savings Enrichment",
"data": {
"locale": "en",
"Name": "Raj",
"COUNTRY_cd_country details": 17
}
},
{
"registeredTableName": "SavingsDataTableCreate",
"data": {
"locale": "en",
"Volume": "25",
"CurrentTimestamp": "01 December 2016 12:44",
"dateFormat": "dd MMMM yyyy HH:mm",
"DateData": "01 December 2016 00:00"
}
}]
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
Approve savings application
Approves savings application so long as its in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=approve
POST savingsaccount/1?command=approve
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "01 March 2013"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 200,
"code": "savingsAccountStatusType.approved",
"value": "Approved",
"submittedAndPendingApproval": false,
"approved": true,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "02 March 2013"
}
}
Undo approval savings application
Will move 'approved' savings application back to 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=undoApproval
POST savingsaccount/1?command=undoApproval
Content-Type: application/json
Request Body:
{
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"approvedOnDate": ""
}
}
Assign Savings Officer
Allows you to assign Savings Officer for existing Savings Account.
POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=assignSavingsOfficer
POST savingsaccounts/1?command=assignSavingsOfficer
Content-Type: application/json
Request Body:
{
assignmentDate : "04 September 2014",
dateFormat : "dd MMMM yyyy",
fromSavingsOfficerId : "",
locale : "en",
toSavingsOfficerId : 2
}
{
"officeId":2,
"savingsId":8,
"resourceId":8,
"changes":{"savingsOfficerId":2}
}
Unassign Savings Officer
Allows you to unassign the Savings Officer.
POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=unassignSavingsOfficer
POST savingsaccounts/1?command=unassignSavingsOfficer
Content-Type: application/json
Request Body:
{
dateFormat : "dd MMMM yyyy",
locale : "en",
unassignedDate : "05 September 2014"
}
{
"officeId":2,
"clientId":8,
"resourceId":8,
"changes":{}
}
Reject savings application
Rejects savings application so long as its in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=reject
POST savingsaccount/1?command=reject
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "03 March 2013"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 500,
"code": "savingsAccountStatusType.rejected",
"value": "Rejected",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": true,
"withdrawnByApplicant": false,
"active": false,
"closed": true
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "03 March 2013",
"closedOnDate": "03 March 2013"
}
}
Withdraw savings application
Used when an applicant withdraws from the savings application. It must be in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=withdrawnByApplicant
POST savingsaccount/1?command=withdrawnByApplicant
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "03 March 2013"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 400,
"code": "savingsAccountStatusType.withdrawn.by.applicant",
"value": "Withdrawn by applicant",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": true,
"active": false,
"closed": true
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "03 March 2013",
"closedOnDate": "03 March 2013"
}
}
Activate a savings account
Results in an approved savings application being converted into an 'active' savings account.
POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=activate
POST savingsaccount/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activatedOnDate": "01 March 2013"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activatedOnDate": "01 March 2013"
}
}
Close a savings account
Results in an Activated savings application being converted into an 'closed' savings account.
closedOnDate is closure date of savings account
withdrawBalance is a boolean value, true value of this field performs a withdrawal transaction with account's running balance.
Mandatory Fields |
dateFormat,locale,closedOnDate |
Optional Fields |
note, withdrawBalance, paymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber |
POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=close
POST savingsaccount/5?command=close
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closedOnDate":"26 August 2013",
"note":"close note"
}
{
"officeId":1,
"clientId":1,
"savingsId":5,
"resourceId":5,
"changes":{
"status":{
"id":600,
"code":"savingsAccountStatusType.closed",
"value":"Closed",
"submittedAndPendingApproval":false,
"approved":false,
"rejected":false,
"withdrawnByApplicant":false,
"active":false,
"closed":true
},
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"closedOnDate":"26 August 2013",
"note":"close note"
}
}
POST savingsaccount/5?command=close
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closedOnDate":"26 August 2013",
"note":"close note",
"withdrawBalance":true,
"paymentTypeId": "14",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId":1,
"clientId":1,
"savingsId":5,
"resourceId":5,
"changes":{
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123",
"status":{
"id":600,
"code":"savingsAccountStatusType.closed",
"value":"Closed",
"submittedAndPendingApproval":false,
"approved":false,
"rejected":false,
"withdrawnByApplicant":false,
"active":false,
"closed":true
},
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"closedOnDate":"26 August 2013",
"note":"close note"
}
}
Calculate Interest on Savings Account
Calculates interest earned on a savings account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process.
POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=calculateInterest
POST savingsaccount/1?command=calculateInterest
Content-Type: application/json
Request Body:
{
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
Post Interest on Savings Account
Calculates and Posts interest earned on a savings account based on todays date and whether an interest posting or crediting event is due.
POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=postInterest
POST savingsaccount/1?command=postInterest
Content-Type: application/json
Request Body:
{
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
List savings applications/accounts
Example Requests:
GET https://Domain Name/api/v1/savingsaccounts
{
"totalFilteredRecords": 1,
"pageItems": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "small business",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"fieldOfficerId": 0,
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"timeline": {
"submittedOnDate": [
2013,
3,
1
]
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 0
}
}
]
}
Retrieve a savings application/account:
Arguments
- associations
- optional, Either 'all' or a comma separated list of savings 'associations' (itemized below).
Associations are just extra pieces of data that you might or might not want to retrieve.- 'all': Gets data related to all associations e.g. ?associations=all.
- 'transactions': Gets data related to transactions on the account e.g. ?associations=transactions
- 'charges':Savings Account charges data.
Example Requests :
GET https://DomainName/api/v1/savingsaccounts/{accountId}
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "small business",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"fieldOfficerId": 0,
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"timeline": {
"submittedOnDate": [
2013,
3,
1
]
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 0
}
}
Modify a savings application
Savings application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc
PUT https://Domain Name/api/v1/savingsaccounts/{accountsId}
PUT savingsaccounts/1
Content-Type: application/json
No Request Body:
{
"locale": "en",
"nominalAnnualInterestRate": "5.9999999999"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"nominalAnnualInterestRate": 5.9999999999,
"locale": "en"
}
}
Modify savings account withhold tax applicability
Savings application's withhold tax can be modified when in 'Active' state. Once the application is activated, can modify the account withhold tax to post tax or vice-versa
PUT https://Domain Name/api/v1/savingsaccounts/{accountsId}?command=updateWithHoldTax
PUT savingsaccounts/1?command=updateWithHoldTax
Content-Type: application/json
No Request Body:
{
"withHoldTax": false
}
{
"savingsId": 138,
"resourceId": 138,
"changes": {
"withHoldTax": false
}
}
Delete a savings application
At present we support hard delete of savings application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the savings account.
DELETE https://Domain Name/api/v1/savingsaccounts/{accountsId}
DELETE savingsaccounts/1
Content-Type: application/json
No Request Body:
{
"officeId": 1,
"clientId": 1,
"resourceId": 1
}
Savings Account Transactions:
Transactions possible on a savings account.
Field Descriptions |
transactionDate |
The date of the transaction. |
transactionAmount |
The amount of the transaction. |
Retrieve Savings Account Transaction Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Requests:
GET https://Domain Name/api/v1/savingsaccounts/{accountId}/transactions/template
{
"accountId": 1,
"accountNo": "000000001",
"date": [
2013,
5,
27
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"paymentTypeOptions": [
{
"id": 14,
"name": "Wire Transfer",
"position": 0
},
{
"id": 13,
"name": "Cash",
"position": 1
}
]
}
Retrieve Savings Account Transaction:
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Requests:
GET https://Domain Name/api/v1/savingsaccounts/{accountId}/transactions/{transactionId}
{
"id": 1,
"transactionType": {
"id": 2,
"code": "savingsAccountTransactionType.withdrawal",
"value": "Withdrawal",
"deposit": false,
"withdrawal": true,
"interestPosting": false,
"feeDeduction": false
},
"accountId": 1,
"accountNo": "000000001",
"date": [
2013,
8,
7
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"paymentDetailData": {
"id": 62,
"paymentType": {
"id": 11,
"name": "cash"
},
"accountNumber": "",
"checkNumber": "",
"routingCode": "",
"receiptNumber": "",
"bankNumber": ""
},
"amount": 5000,
"runningBalance": 0,
"reversed": true
}
Deposit Transaction
POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions?command=deposit
POST savingsaccounts/1/transactions?command=deposit
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "27 May 2013",
"transactionAmount": "500",
"paymentTypeId": "14",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 47,
"changes": {
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
Withdrawal Transaction
POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions?command=withdrawal
POST savingsaccounts/1/transactions?command=withdrawal
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "27 May 2013",
"transactionAmount": "500",
"paymentTypeId": "14",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 48,
"changes": {
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
Adjust Transaction
This command modifies the given transaction.
POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions/{transactionId}?command=modify
POST savingsaccounts/1/transactions/1?command=modify
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "27 May 2013",
"transactionAmount": "500",
"paymentTypeId": "14",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 48,
"changes": {
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
Undo transaction
This command reverses the given transaction.
POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions/{transactionId}?command=undo
POST savingsaccounts/1/transactions/1?command=undo
Content-Type: application/json
No Request Body:
{
}
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 1
}
Savings Charges
Its typical for MFIs to add maintenance and operating charges. They can be either Fees or Penalties.
Savings Charges are instances of Charges and represent either fees and penalties for savings products. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Savings account) are described here
Field Descriptions |
amountPaid |
The Total amount which has been paid for this Charge |
amountWaived |
The Total amount that has been waived for this Charge |
amountWrittenOff |
Total amount written off from this Charge |
amountOutstanding |
The Total outstanding amount for this Charge |
List Savings Charges
Example Requests:
GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges
[
{
"id": 1,
"chargeId": 3,
"accountId": 57,
"name": "Savings account maintenance fee",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
},
{
"id": 2,
"chargeId": 4,
"accountId": 57,
"name": "Pass book Fee",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2013,
3,
29
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
},
{
"id": 9,
"chargeId": 4,
"accountId": 57,
"name": "Withdrawal fee percentage",
"chargeTimeType": {
"id": 5,
"code": "chargeTimeType.withdrawalFee",
"value": "Withdrawal Fee"
},
"chargeCalculationType": {
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
"percentage": 0.25,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 0,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 0,
"amountOrPercentage": 0.25,
"penalty": false
},
{
"id": 10,
"chargeId": 6,
"accountId": 57,
"name": "Annual fee - INR",
"chargeTimeType": {
"id": 6,
"code": "chargeTimeType.annualFee",
"value": "Annual Fee"
},
"feeOnMonthDay": [
10,
9
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 50,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 50,
"amountOrPercentage": 50,
"penalty": false
}
]
Retrieve Savings Charges Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges/template
{
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"chargeOptions": [
{
"id": 2,
"name": "Passbook Fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
},
{
"id": 3,
"name": "Chequebook fee",
"active": true,
"penalty": true,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 1,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
},
{
"id": 6,
"name": "Annual fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 50,
"chargeTimeType": {
"id": 6,
"code": "chargeTimeType.annualFee",
"value": "Annual Fee"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
}
],
"penalty": false
}
Retrieve a Savings account Charge
Example Requests:
GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}
{
"id": 1,
"chargeId": 1,
"name": "Passbook fee",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
}
Create a Savings account Charge
Mandatory Fields
for Savings account Charges |
chargeId, amount |
Mandatory Fields
for Savings account Charges of Specified due date type |
chargeId, amount, dueDate, dateFormat, locale |
Mandatory Fields
for Savings account Charges of Annual fee type |
chargeId, amount, feeOnMonthDay, monthDayFormat, locale |
POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges
POST /savingsaccounts/1/charges
Content-Type: application/json
Request Body:
{
"chargeId": "2",
"locale": "en",
"amount": "100",
"dateFormat": "dd MMMM yyyy",
"dueDate": "29 April 2013"
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 6
}
POST /savingsaccounts/1/charges
Content-Type: application/json
Request Body:
{
"chargeId": "2",
"locale": "en",
"amount": "25",
"monthDayFormat": "dd MMMM",
"feeOnMonthDay": "09 October"
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 7
}
Update a Savings account Charge
Currently Savings account Charges may be updated only if the Savings account is not yet approved.
PUT https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}
PUT savingsaccounts/1/charges/6
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"amount": "60",
"dueDate": "27 March 2013"
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 6,
"changes": {
"dueDate": "27 March 2013",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"amount": 60.0
}
}
Delete a Savings account Charge
Note:Currently, A Savings account Charge may only be removed from Savings that are not yet approved.
DELETE https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}
DELETE savingsaccounts/1/charges/2
Content-Type: application/json
No Request Body:
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 2
}
Pay a Savings account Charge
An active charge will be paid when savings account is active and having sufficient balance.
POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=paycharge
POST savingsaccounts/1/charges/2?command=paycharge
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"amount": "60",
"dueDate": "12 September 2013"
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 2
}
Waive off a Savings account Charge
Outstanding charge amount will be waived off.
POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=waive
POST savingsaccounts/1/charges/2?command=waive
Content-Type: application/json
No Request Body:
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 2
}
Inactivate a Savings account Charge
A charge will be allowed to inactivate when savings account is active and not having any dues as of today. If charge is overpaid, corresponding charge payment transactions will be reversed.
POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=inactivate
POST savingsaccounts/1/charges/2?command=inactivate
Content-Type: application/json
No Request Body:
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 2
}
Fixed Deposit Account:
Fixed Deposit accounts are instances of a praticular fixed deposit product created. An application process around the creation of accounts is also supported.
Starting State | Action | Resultant State |
- | Submit | Submitted and pending approval |
Submitted and pending approval | Reject | Closed - Rejected |
Submitted and pending approval | Withdrawn by Applicant | Closed - Withdrawn by Applicant |
Submitted and pending approval | Approve | Approved |
Approved | Undo Approval | Submitted and pending approval |
Approved | Activate | Active |
Field Descriptions |
clientId |
The client you are creating the fixed deposit account for. Either clientId or groupId must be provided. |
groupId |
The group you are creating the fixed deposit account for. Either clientId or groupId must be provided. |
productId |
The id of the product used for this fixed deposit account. The fixed deposit account inherits the selected currency of the product and possibly other details if not overridden in the fixed deposit account creation request. |
accountNo |
The account no. associated with this fixed deposit. Is auto generated if not provided at creation time. |
externalId |
A place to put an external reference for this fixed deposit account useful in migrations e.g. The ID another system uses. If provided, it must be unique. |
submittedOnDate |
submittedOnDate must be provided when initially creating fixed deposit account application. locale and dateFormat parameters must be provided with this. |
interestCompoundingPeriodType |
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month) |
interestPostingPeriodType |
The period at which interest rate is posted or credited to fixed deposit account. The actual crediting or posting transaction is date as occurring on the day after the end of the period. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec), 7=Annually (at end of calendar year 31st Dec) |
interestCalculationType |
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance |
interestCalculationDaysInYearType |
The setting for number of days in year to use: 360=360 Days, 365=365 Days |
lockinPeriodFrequency |
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the fixed deposit account is 'locked in' and withdrawals are not allowed. e.g. 6 Months |
lockinPeriodFrequencyType |
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the fixed deposit account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
depositAmount |
The fixed deposit amount for which interest is provided on maturity. |
depositPeriod |
Used along with depositPeriodFrequencyId to define term for which amount is deposited in fixed deposit. e.g. 6 Months |
depositPeriodFrequencyId |
Used along with depositPeriod to define term for which amount is deposited in fixed deposit. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
minDepositTerm |
This is used along with minDepositTermTypeId to define allowed minimum deposit term for creating a fixed deposit account using this product. e.g. 6 Months |
minDepositTermTypeId |
Used along with minDepositTerm to define allowed minimum deposit term for creating a fixed deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
maxDepositTerm |
Optional: If provided, used along with maxDepositTermTypeId to define allowed maximum deposit term for creating a fixed deposit account using this product. e.g. 3 Years |
maxDepositTermTypeId |
Optional: If provided, used along with maxDepositTerm to define allowed maximum deposit term for creating a fixed deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 3 Years |
inMultiplesOfDepositTerm |
Optional: If provided, used along with inMultiplesOfDepositTermTypeId to indicate the allowed deposit periods after minimum deposit period. e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. |
inMultiplesOfDepositTermTypeId |
Optional: If provided, used along with inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. |
preClosurePenalApplicable |
Optional: expects boolean value true/false, If provided as true then must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId. |
preClosurePenalInterest |
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than the interest rate applicable. |
preClosurePenalInterestOnTypeId |
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterest to decide what should be the applicable interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable till premature withdrawal. |
withHoldTax |
Optional: If tax group provided at product level, will allow to Enable or disable withhold tax on interest posting for savings account |
Retrieve Fixed Deposit Account Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for fixed deposit applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Arguments
- clientId
- Integer mandatory
- productId
- Integer optional
- If entered, productId, productName and selectedProduct fields are returned.
Example Requests:
GET https://Domain Name/api/v1/fixeddepositaccounts/template?clientId={clientId}
{
"clientId": 1,
"clientName": "small business",
"productOptions": [
{
"id": 1,
"name": "Passbook Savings"
}
]
}
GET https://Domain Name/api/v1/fixeddepositaccounts/template?clientId={clientId}&productId={productId}
{
"clientId": 1,
"clientName": "small business",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"timeline": {},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"productOptions": [
{
"id": 1,
"name": "Passbook Savings"
}
],
"fieldOfficerOptions": [
{
"id": 3,
"firstname": "Mrs.",
"lastname": "loanofficerB1",
"displayName": "loanofficerB1, Mrs.",
"officeId": 2,
"officeName": "branch 1",
"isLoanOfficer": true
},
{
"id": 1,
"firstname": "Mr.",
"lastname": "loanofficerHO",
"displayName": "loanofficerHO, Mr.",
"officeId": 1,
"officeName": "branch 1",
"isLoanOfficer": true
}
],
"interestCompoundingPeriodTypeOptions": [
{
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
{
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
}
],
"interestPostingPeriodTypeOptions": [
{
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
{
"id": 5,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly",
"value": "Quarterly"
},
{
"id": 7,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual",
"value": "Annually"
}
],
"interestCalculationTypeOptions": [
{
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
{
"id": 2,
"code": "savingsInterestCalculationType.averagedailybalance",
"value": "Average Daily Balance"
}
],
"interestCalculationDaysInYearTypeOptions": [
{
"id": 360,
"code": "savingsInterestCalculationDaysInYearType.days360",
"value": "360 Days"
},
{
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
}
],
"lockinPeriodFrequencyTypeOptions": [
{
"id": 0,
"code": "savings.lockin.savingsPeriodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "savings.lockin.savingsPeriodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "savings.lockin.savingsPeriodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "savings.lockin.savingsPeriodFrequencyType.years",
"value": "Years"
}
],
"withdrawalFeeTypeOptions": [
{
"id": 1,
"code": "savingsWithdrawalFeesType.flat",
"value": "Flat"
},
{
"id": 2,
"code": "savingsWithdrawalFeesType.percent.of.amount",
"value": "% of Amount"
}
],
"chargeOptions": [
{
"id": 4,
"name": "Savings charge 1",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 200,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "chargepaymentmode.regular"
}
},
{
"id": 5,
"name": "Savings charge 2",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 300,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "chargepaymentmode.regular"
}
},
{
"id": 6,
"name": "Annual fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 50,
"chargeTimeType": {
"id": 6,
"code": "chargeTimeType.annualFee",
"value": "Annual Fee"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 7,
"name": "Quarterly fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 5,
"chargeTimeType": {
"id": 7,
"code": "chargeTimeType.monthlyFee",
"value": "Monthly Fee"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
},
"feeOnMonthDay": [
10,
5
],
"feeInterval": 4
}
]
}
Submit new fixed deposit application
Mandatory Fields |
clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId |
Optional Fields |
accountNo, externalId, fieldOfficerId,linkAccountId(if provided initial deposit amount will be collected from this account),transferInterestToSavings(By enabling this flag all interest postings will be transferred to linked saving account ) |
Inherited from Product (if not provided) |
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, lockinPeriodFrequency, lockinPeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, charts, withHoldTax |
Minimal request: accountNo auto generated, remaining details inherited from fixed deposit product.
POST https://Domain Name/api/v1/fixeddepositaccounts
POST fixeddepositaccount
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2014",
"depositAmount":"5000",
"depositPeriod":"6",
"depositPeriodFrequencyId":"2"
}
Minimal request: accountNo provided (must be unique), remaining details inherited from fixed deposit product.
POST fixeddepositaccount
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2014",
"depositAmount":"5000",
"depositPeriod":"6",
"depositPeriodFrequencyId":"2",
"accountNo": "FD000023",
"externalId": "FD-23"
}
Full request: accountNo provided (must be unique), remaining details override details from fixed deposit product (except currency).
POST savingsaccount
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"fieldOfficerId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2014",
"accountNo": "FD000024",
"externalId": "FD-24",
"interestCompoundingPeriodType": 1,
"interestPostingPeriodType": 4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": 365,
"depositAmount":"5000",
"depositPeriod":"6",
"depositPeriodFrequencyId":"2",
"lockinPeriodFrequency": 6,
"lockinPeriodFrequencyType": 2,
"charges":[{"id":"1"}]
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
Approve fixed deposit application
Approves fixed deposit application so long as its in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=approve
POST fixeddepositaccounts/1?command=approve
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "01 March 2013"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 200,
"code": "savingsAccountStatusType.approved",
"value": "Approved",
"submittedAndPendingApproval": false,
"approved": true,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "01 March 2013"
}
}
Undo approval fixed deposit application
Will move 'approved' fixed deposit application back to 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=undoApproval
POST fixeddepositaccounts/1?command=undoApproval
Content-Type: application/json
Request Body:
{
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"approvedOnDate": ""
}
}
Reject fixed deposit application
Rejects fixed deposit application so long as its in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=reject
POST fixeddepositaccounts/1?command=reject
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "03 March 2013"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 500,
"code": "savingsAccountStatusType.rejected",
"value": "Rejected",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": true,
"withdrawnByApplicant": false,
"active": false,
"closed": true
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "03 March 2013",
"closedOnDate": "03 March 2013"
}
}
Withdraw fixed deposit application
Used when an applicant withdraws from the fixed deposit application. It must be in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/fixeddepositaccounts/{savingsId}?command=withdrawnByApplicant
POST savingsaccount/1?command=withdrawnByApplicant
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "03 March 2013"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 400,
"code": "savingsAccountStatusType.withdrawn.by.applicant",
"value": "Withdrawn by applicant",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": true,
"active": false,
"closed": true
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "03 March 2013",
"closedOnDate": "03 March 2013"
}
}
Activate a fixed deposit account
Results in an approved fixed deposit application being converted into an 'active' fixed deposit account.
POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=activate
POST savingsaccount/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activatedOnDate": "01 March 2013"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activatedOnDate": "01 March 2013"
}
}
Close a fixed deposit account
Results in a Matured fixed deposit account being converted into a 'closed' fixed deposit account.
On account close allowed actions are.
Action on Close | Result |
Withdraw Deposit | Matured amount withdrawn and paid to client |
Transfer to Savings | Matured amount transfered to specified savings account. |
Re-Invest | Create new Fixed deposit application with matured amount as deposit amount. |
POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=close
POST fixeddepositaccounts/1?command=close
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closedOnDate":"19 April 2014",
"note":"Closing and transfering amount to savings",
"onAccountClosureId":"200",
"toSavingsAccountId":1,
"transferDescription":"Transfered matured amount to savings account"
}
{
"officeId":1,
"clientId":1,
"savingsId":5,
"resourceId":5,
"changes":{
"status":{
"id":600,
"code":"savingsAccountStatusType.closed",
"value":"Closed",
"submittedAndPendingApproval":false,
"approved":false,
"rejected":false,
"withdrawnByApplicant":false,
"active":false,
"closed":true
},
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"closedOnDate":"19 April 2014",
"note":"Closing and transfering amount to savings"
}
}
Premature Close a fixed deposit account
Results in an Active fixed deposit account being converted into a 'Premature Closed' fixed deposit account with options to withdraw prematured amount. (premature amount is calculated using interest rate chart applicable along with penal interest if any.)
On account premature closure allowed actions are.
Action on Premature Close | Result |
Withdraw Deposit | Matured amount withdrawn and paid to client |
Transfer to Savings | Matured amount transfered to specified savings account. |
POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=prematureClose
POST fixeddepositaccounts/1?command=prematureClose
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closedOnDate":"19 April 2014",
"note":"Close and transfer amount to savings",
"onAccountClosureId":"200",
"toSavingsAccountId":1,
"transferDescription":"Transfered matured amount to savings account"
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 700,
"code": "savingsAccountStatusType.pre.mature.closure",
"value": "Premature Closed",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false,
"prematureClosed": true,
"transferInProgress": false,
"transferOnHold": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"closedOnDate": "19 April 2014",
"note": "Close and transfer amount to savings"
}
}
Calculate Premature amount on Fixed deposit account
Calculate premature amount on fixed deposit account till premature close date. Premature amount is calculated based on interest chart and penal interest applicable.
POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=calculatePrematureAmount
POST fixeddepositaccounts/1?command=calculatePrematureAmount
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closedOnDate":"19 April 2014"
}
{
"maturityAmount": 100.65,
"savingsAccounts": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Sangamesh N",
"savingsProductId": 1,
"savingsProductName": "FD-0001"
}
],
"onAccountClosureOptions": [
{
"id": 100,
"code": "depositAccountClosureType.withdrawDeposit",
"value": "Withdra Deposit"
},
{
"id": 200,
"code": "depositAccountClosureType.transferToSavings",
"value": "Transfer to Savings"
},
{
"id": 300,
"code": "depositAccountClosureType.reinvest",
"value": "Re-Invest"
}
],
"paymentTypeOptions": [],
"id": 12,
"depositType": {
"id": 300,
"code": "depositAccountType.recurringDeposit",
"value": "Recurring Deposit"
}
}
Calculate Interest on Fixed Deposit Account
Calculates interest earned on a fixed deposit account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process.
POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=calculateInterest
POST fixeddepositaccount/1?command=calculateInterest
Content-Type: application/json
Request Body:
{
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
Post Interest on Fixed Deposit Account
Calculates and Posts interest earned on a fixed deposit account based on todays date and whether an interest posting or crediting event is due.
POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=postInterest
POST fixeddepositaccount/1?command=postInterest
Content-Type: application/json
Request Body:
{
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
List Fixed deposit applications/accounts
Example Requests:
GET https://Domain Name/api/v1/fixeddepositaccounts
[
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Sangamesh N",
"savingsProductId": 3,
"savingsProductName": "FD01",
"fieldOfficerId": 0,
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false,
"prematureClosed": false,
"transferInProgress": false,
"transferOnHold": false
},
"timeline": {
"submittedOnDate": [
2014,
3,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"interestCompoundingPeriodType": {
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 0
},
"interestFreePeriodApplicable": false,
"preClosurePenalApplicable": false,
"minDepositTerm": 3,
"maxDepositTerm": 4,
"minDepositTermType": {
"id": 2,
"code": "deposit.term.savingsPeriodFrequencyType.months",
"value": "Months"
},
"maxDepositTermType": {
"id": 3,
"code": "deposit.term.savingsPeriodFrequencyType.years",
"value": "Years"
},
"depositAmount": 5000,
"maturityAmount": 5140.25,
"maturityDate": [
2014,
9,
1
],
"depositPeriod": 6,
"depositPeriodFrequency": {
"id": 2,
"code": "deposit.period.savingsPeriodFrequencyType.months",
"value": "Months"
}
}
]
Retrieve a fixed deposit application/account:
Arguments
- associations
- optional, Either 'all' or a comma separated list of fixed deposit 'associations' (itemized below).
Associations are just extra pieces of data that you might or might not want to retrieve.- 'all': Gets data related to all associations e.g. ?associations=all.
- 'transactions': Gets data related to transactions on the account e.g. ?associations=transactions
- 'charges':fixed deposit Account charges data.
Example Requests :
GET https://DomainName/api/v1/fixeddepositaccounts/{accountId}
{
"id": 1,
"accountNo": "FD000023",
"externalId": "FD-23",
"clientId": 1,
"clientName": "Sangamesh N",
"savingsProductId": 3,
"savingsProductName": "FD01",
"fieldOfficerId": 0,
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false,
"prematureClosed": false,
"transferInProgress": false,
"transferOnHold": false
},
"timeline": {
"submittedOnDate": [
2014,
3,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"interestCompoundingPeriodType": {
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"interestFreePeriodApplicable": false,
"preClosurePenalApplicable": false,
"minDepositTerm": 3,
"maxDepositTerm": 4,
"minDepositTermType": {
"id": 2,
"code": "deposit.term.savingsPeriodFrequencyType.months",
"value": "Months"
},
"maxDepositTermType": {
"id": 3,
"code": "deposit.term.savingsPeriodFrequencyType.years",
"value": "Years"
},
"depositAmount": 5000,
"maturityAmount": 5140.25,
"maturityDate": [
2014,
9,
1
],
"depositPeriod": 6,
"depositPeriodFrequency": {
"id": 2,
"code": "deposit.period.savingsPeriodFrequencyType.months",
"value": "Months"
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 0
},
"accountChart": {
"id": 4,
"fromDate": [
2013,
10,
2
],
"accountId": 5,
"accountNumber": "FD000023",
"chartSlabs": [
{
"id": 13,
"periodType": {
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
"fromPeriod": 181,
"toPeriod": 365,
"annualInterestRate": 5.5,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 12,
"periodType": {
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
"fromPeriod": 1,
"toPeriod": 180,
"annualInterestRate": 5,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 11,
"periodType": {
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
"fromPeriod": 366,
"annualInterestRate": 6,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
],
"periodTypes": [
{
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
{
"id": 1,
"code": "interestChartPeriodType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "interestChartPeriodType.months",
"value": "Months"
},
{
"id": 3,
"code": "interestChartPeriodType.years",
"value": "Years"
}
]
}
}
Modify a fixed deposit application
Fixed deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc
PUT https://Domain Name/api/v1/fixeddepositaccounts/{accountId}
PUT fixeddepositaccounts/1
Content-Type: application/json
No Request Body:
{
"locale": "en",
"depositAmount": 6000
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"depositAmount": 6000,
"locale": "en"
}
}
Delete a fixed deposit application
At present we support hard delete of fixed deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the fixed deposit account.
DELETE https://Domain Name/api/v1/fixeddepositaccounts/{accountsId}
DELETE fixeddepositaccounts/1
Content-Type: application/json
No Request Body:
{
"officeId": 1,
"clientId": 1,
"resourceId": 1
}
Recurring Deposit Account:
Recurring Deposit accounts are instances of a praticular recurring deposit product created. An application process around the creation of accounts is also supported.
Starting State | Action | Resultant State |
- | Submit | Submitted and pending approval |
Submitted and pending approval | Reject | Closed - Rejected |
Submitted and pending approval | Withdrawn by Applicant | Closed - Withdrawn by Applicant |
Submitted and pending approval | Approve | Approved |
Approved | Undo Approval | Submitted and pending approval |
Approved | Activate | Active |
Field Descriptions |
clientId |
The client you are creating the recurring deposit account for. Either clientId or groupId must be provided. |
groupId |
The group you are creating the recurring deposit account for. Either clientId or groupId must be provided. |
productId |
The id of the product used for this recurring deposit account. The recurring deposit account inherits the selected currency of the product and possibly other details if not overridden in the recurring deposit account creation request. |
accountNo |
The account no. associated with this recurring deposit. Is auto generated if not provided at creation time. |
externalId |
A place to put an external reference for this recurring deposit account useful in migrations e.g. The ID another system uses. If provided, it must be unique. |
submittedOnDate |
submittedOnDate must be provided when initially creating recurring deposit account application. locale and dateFormat parameters must be provided with this. |
interestCompoundingPeriodType |
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month) |
interestPostingPeriodType |
The period at which interest rate is posted or credited to recurring deposit account. The actual crediting or posting transaction is date as occurring on the day after the end of the period. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec), 7=Annually (at end of calendar year 31st Dec) |
interestCalculationType |
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance |
interestCalculationDaysInYearType |
The setting for number of days in year to use: 360=360 Days, 365=365 Days |
lockinPeriodFrequency |
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the recurring deposit account is 'locked in' and withdrawals are not allowed. e.g. 6 Months |
lockinPeriodFrequencyType |
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the recurring deposit account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
recurringDepositAmount |
The recurring deposit amount to be deposited regularly on a specified by deposit frequency. |
recurringDepositFrequency |
Used along with recurringDepositFrequencyTypeId to define the frequency at which recurringDepositAmount to be deposited into RD account. e.g. 6 Months |
recurringDepositFrequencyTypeId |
Used along with recurringDepositFrequency to define the frequency at which recurringDepositAmount to be deposited into RD account. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
depositPeriod |
Used along with depositPeriodFrequencyId to define term for which amount is deposited in recurring deposit. e.g. 6 Months |
depositPeriodFrequencyId |
Used along with depositPeriod to define term for which amount is deposited in recurring deposit. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
minDepositTerm |
This is used along with minDepositTermTypeId to define allowed minimum deposit term for creating a recurring deposit account using this product. e.g. 6 Months |
minDepositTermTypeId |
Used along with minDepositTerm to define allowed minimum deposit term for creating a recurring deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 6 Months |
maxDepositTerm |
Optional: If provided, used along with maxDepositTermTypeId to define allowed maximum deposit term for creating a recurring deposit account using this product. e.g. 3 Years |
maxDepositTermTypeId |
Optional: If provided, used along with maxDepositTerm to define allowed maximum deposit term for creating a recurring deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. 3 Years |
inMultiplesOfDepositTerm |
Optional: If provided, used along with inMultiplesOfDepositTermTypeId to indicate the allowed deposit periods after minimum deposit period. e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. |
inMultiplesOfDepositTermTypeId |
Optional: If provided, used along with inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. |
preClosurePenalApplicable |
Optional: expects boolean value true/false, If provided as true then must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId. |
preClosurePenalInterest |
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than the interest rate applicable. |
preClosurePenalInterestOnTypeId |
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterest to decide what should be the applicable interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable till premature withdrawal. |
withHoldTax |
Optional: If tax group provided at product level, will allow to Enable or disable withhold tax on interest posting for savings account |
Retrieve recurring Deposit Account Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for recurring deposit applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Arguments
- clientId
- Integer mandatory
- productId
- Integer optional
- If entered, productId, productName and selectedProduct fields are returned.
Example Requests:
GET https://Domain Name/api/v1/fixeddepositaccounts/template?clientId={clientId}
{
"clientId": 1,
"clientName": "small business",
"productOptions": [
{
"id": 1,
"name": "Passbook Savings"
}
]
}
GET https://Domain Name/api/v1/fixeddepositaccounts/template?clientId={clientId}&productId={productId}
{
"clientId": 1,
"clientName": "small business",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"timeline": {},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"productOptions": [
{
"id": 1,
"name": "Passbook Savings"
}
],
"fieldOfficerOptions": [
{
"id": 3,
"firstname": "Mrs.",
"lastname": "loanofficerB1",
"displayName": "loanofficerB1, Mrs.",
"officeId": 2,
"officeName": "branch 1",
"isLoanOfficer": true
},
{
"id": 1,
"firstname": "Mr.",
"lastname": "loanofficerHO",
"displayName": "loanofficerHO, Mr.",
"officeId": 1,
"officeName": "branch 1",
"isLoanOfficer": true
}
],
"interestCompoundingPeriodTypeOptions": [
{
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
{
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
}
],
"interestPostingPeriodTypeOptions": [
{
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
{
"id": 5,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly",
"value": "Quarterly"
},
{
"id": 7,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual",
"value": "Annually"
}
],
"interestCalculationTypeOptions": [
{
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
{
"id": 2,
"code": "savingsInterestCalculationType.averagedailybalance",
"value": "Average Daily Balance"
}
],
"interestCalculationDaysInYearTypeOptions": [
{
"id": 360,
"code": "savingsInterestCalculationDaysInYearType.days360",
"value": "360 Days"
},
{
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
}
],
"lockinPeriodFrequencyTypeOptions": [
{
"id": 0,
"code": "savings.lockin.savingsPeriodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "savings.lockin.savingsPeriodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "savings.lockin.savingsPeriodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "savings.lockin.savingsPeriodFrequencyType.years",
"value": "Years"
}
],
"withdrawalFeeTypeOptions": [
{
"id": 1,
"code": "savingsWithdrawalFeesType.flat",
"value": "Flat"
},
{
"id": 2,
"code": "savingsWithdrawalFeesType.percent.of.amount",
"value": "% of Amount"
}
],
"chargeOptions": [
{
"id": 4,
"name": "Savings charge 1",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 200,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "chargepaymentmode.regular"
}
},
{
"id": 5,
"name": "Savings charge 2",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 300,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "chargepaymentmode.regular"
}
},
{
"id": 6,
"name": "Annual fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 50,
"chargeTimeType": {
"id": 6,
"code": "chargeTimeType.annualFee",
"value": "Annual Fee"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
},
{
"id": 7,
"name": "Quarterly fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 5,
"chargeTimeType": {
"id": 7,
"code": "chargeTimeType.monthlyFee",
"value": "Monthly Fee"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
},
"feeOnMonthDay": [
10,
5
],
"feeInterval": 4
}
]
}
Submit new recurring deposit application
Mandatory Fields |
clientId or groupId, productId, submittedOnDate, depositPeriod, depositPeriodFrequencyId, recurringFrequency, recurringFrequencyType, depositAmount,isCalendarInherited, mandatoryRecommendedDepositAmount |
Optional Fields |
accountNo, externalId, fieldOfficerId, expectedFirstDepositOnDate, allowWithdrawal, adjustAdvanceTowardsFuturePayments, isMandatoryDeposit |
Inherited from Product (if not provided) |
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, lockinPeriodFrequency, lockinPeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, charts, withHoldTax |
Minimal request: accountNo auto generated, remaining details inherited from recurring deposit product.
POST https://Domain Name/api/v1/recurringdepositaccounts
POST recurringdepositaccounts
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "02 June 2014",
"depositPeriod":"20",
"depositPeriodFrequencyId":"1",
"depositAmount":10000,
"isCalendarInherited":false,
"recurringFrequency":"2",
"recurringFrequencyType":1,
"mandatoryRecommendedDepositAmount":"2000"
}
Minimal request: accountNo provided (must be unique), remaining details inherited from recurring deposit product.
POST recurringdepositaccounts
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "02 June 2014",
"depositPeriod":"20",
"depositPeriodFrequencyId":"1",
"depositAmount":10000,
"isCalendarInherited":false,
"recurringFrequency":"2",
"recurringFrequencyType":1,
"mandatoryRecommendedDepositAmount":"2000",
"accountNo": "RD000023",
"externalId": "RD-23",
"expectedFirstDepositOnDate": "02 June 2014",
"allowWithdrawal":false,
"adjustAdvanceTowardsFuturePayments":false,
"isMandatoryDeposit":false
}
Full request: accountNo provided (must be unique), remaining details override details from recurring deposit product (except currency).
POST recurringdepositaccounts
Content-Type: application/json
Request Body:
{
"clientId": 1,
"productId": 1,
"fieldOfficerId": 1,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"submittedOnDate": "02 June 2014",
"depositPeriod":"20",
"depositPeriodFrequencyId":"1",
"depositAmount":10000,
"isCalendarInherited":false,
"recurringFrequency":"2",
"recurringFrequencyType":1,
"mandatoryRecommendedDepositAmount":"2000",
"accountNo": "RD000023",
"externalId": "RD-23",
"expectedFirstDepositOnDate": "02 June 2014",
"allowWithdrawal":false,
"adjustAdvanceTowardsFuturePayments":false,
"isMandatoryDeposit":false,
"interestCompoundingPeriodType": 1,
"interestPostingPeriodType": 4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": 365,
"lockinPeriodFrequency": 6,
"lockinPeriodFrequencyType": 2,
"charges":[{"id":"1"}]
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
Approve recurring deposit application
Approves recurring deposit application so long as its in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=approve
POST recurringdepositaccounts/1?command=approve
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "01 March 2014"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 200,
"code": "savingsAccountStatusType.approved",
"value": "Approved",
"submittedAndPendingApproval": false,
"approved": true,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"approvedOnDate": "01 March 2014"
}
}
Undo approval recurring deposit application
Will move 'approved' recurring deposit application back to 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=undoApproval
POST recurringdepositaccounts/1?command=undoApproval
Content-Type: application/json
Request Body:
{
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"approvedOnDate": ""
}
}
Reject recurring deposit application
Rejects recurring deposit application so long as its in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=reject
POST recurringdepositaccounts/1?command=reject
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "03 March 2014"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 500,
"code": "savingsAccountStatusType.rejected",
"value": "Rejected",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": true,
"withdrawnByApplicant": false,
"active": false,
"closed": true
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"rejectedOnDate": "03 March 2014",
"closedOnDate": "03 March 2014"
}
}
Withdraw recurring deposit application
Used when an applicant withdraws from the recurring deposit application. It must be in 'Submitted and pending approval' state.
POST https://Domain Name/api/v1/recurringdepositaccounts/{savingsId}?command=withdrawnByApplicant
POST recurringdepositaccounts/1?command=withdrawnByApplicant
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "03 March 2014"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 400,
"code": "savingsAccountStatusType.withdrawn.by.applicant",
"value": "Withdrawn by applicant",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": true,
"active": false,
"closed": true
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "03 March 2014",
"closedOnDate": "03 March 2014"
}
}
Activate a recurring deposit account
Results in an approved recurring deposit application being converted into an 'active' recurring deposit account.
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=activate
POST recurringdepositaccounts/1?command=activate
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activatedOnDate": "01 March 2013"
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"activatedOnDate": "01 March 2013"
}
}
Update the recommended deposit amount for a recurring deposit account
Updates the recommended deposit amount for a RD account as on the effective date.
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=updateDepositAmount
POST recurringdepositaccounts/4?command=updateDepositAmount
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"effectiveDate": "01 Dec 2014"
"mandatoryRecommendedDepositAmount": 398
}
{
"officeId": 1,
"clientId": 6,
"savingsId": 4,
"resourceId": 4,
"changes":
{
"mandatoryRecommendedDepositAmount": 398
}
}
Close a recurring deposit account
Results in a Matured recurring deposit account being converted into a 'closed' recurring deposit account.
On account close allowed actions are.
Action on Close | Result |
Withdraw Deposit | Matured amount withdrawn and paid to client |
Transfer to Savings | Matured amount transfered to specified savings account. |
Re-Invest | Create new Fixed deposit application with matured amount as deposit amount. |
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=close
POST recurringdepositaccounts/1?command=close
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closedOnDate":"19 April 2014",
"note":"Closing and transfering amount to savings",
"onAccountClosureId":"100",
"transferDescription":"Transfered matured amount to savings account"
}
{
"officeId":1,
"clientId":1,
"savingsId":5,
"resourceId":5,
"changes":{
"status":{
"id":600,
"code":"savingsAccountStatusType.closed",
"value":"Closed",
"submittedAndPendingApproval":false,
"approved":false,
"rejected":false,
"withdrawnByApplicant":false,
"active":false,
"closed":true
},
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"closedOnDate":"19 April 2014",
"note":"Closing and transfering amount to savings"
}
}
Premature Close a recurring deposit account
Results in an Active recurring deposit account being converted into a 'Premature Closed' recurring deposit account with options to withdraw prematured amount. (premature amount is calculated using interest rate chart applicable along with penal interest if any.)
On account premature closure allowed actions are.
Action on Premature Close | Result |
Withdraw Deposit | Matured amount withdrawn and paid to client |
Transfer to Savings | Matured amount transfered to a savings account. |
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=prematureClose
POST recurringdepositaccounts/1?command=prematureClose
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closedOnDate":"19 April 2014",
"note":"Close and transfer amount to savings",
"onAccountClosureId":"200",
"toSavingsAccountId":1,
"transferDescription":"Transfered matured amount to savings account"
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"status": {
"id": 700,
"code": "savingsAccountStatusType.pre.mature.closure",
"value": "Premature Closed",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false,
"prematureClosed": true,
"transferInProgress": false,
"transferOnHold": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"closedOnDate": "19 April 2014",
"note": "Close and transfer amount to savings"
}
}
Calculate Premature amount on Recurring deposit account
Calculate premature amount on recurring deposit till premature close date. Premature amount is calculated based on interest chart and penal interest applicable if any.
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=calculatePrematureAmount
POST recurringdepositaccounts/1?command=calculatePrematureAmount
Content-Type: application/json
Request Body:
{
"dateFormat":"dd MMMM yyyy",
"locale":"en",
"closedOnDate":"19 April 2014"
}
{
"maturityAmount": 100.65,
"savingsAccounts": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Sangamesh N",
"savingsProductId": 1,
"savingsProductName": "sa",
"fieldOfficerId": 0,
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false,
"prematureClosed": false,
"transferInProgress": false,
"transferOnHold": false
},
"timeline": {
"submittedOnDate": [
2014,
1,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedOnDate": [
2014,
1,
1
],
"approvedByUsername": "mifos",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"activatedOnDate": [
2014,
1,
1
]
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"minRequiredOpeningBalance": 5000,
"withdrawalFeeForTransfers": false,
"allowOverdraft": false,
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"totalDeposits": 13353.41,
"totalInterestEarned": 107.79,
"totalInterestPosted": 76.74,
"accountBalance": 13430.15
}
}
],
"onAccountClosureOptions": [
{
"id": 100,
"code": "depositAccountClosureType.withdrawDeposit",
"value": "Withdra Deposit"
},
{
"id": 200,
"code": "depositAccountClosureType.transferToSavings",
"value": "Transfer to Savings"
},
{
"id": 300,
"code": "depositAccountClosureType.reinvest",
"value": "Re-Invest"
}
],
"paymentTypeOptions": [],
"id": 12,
"depositType": {
"id": 300,
"code": "depositAccountType.recurringDeposit",
"value": "Recurring Deposit"
}
}
Calculate Interest on recurring Deposit Account
Calculates interest earned on a recurring deposit account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process.
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=calculateInterest
POST recurringdepositaccounts/1?command=calculateInterest
Content-Type: application/json
Request Body:
{
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
Post Interest on recurring Deposit Account
Calculates and Posts interest earned on a recurring deposit account based on todays date and whether an interest posting or crediting event is due.
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=postInterest
POST recurringdepositaccounts/1?command=postInterest
Content-Type: application/json
Request Body:
{
}
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 1
}
List Fixed deposit applications/accounts
Example Requests:
GET https://Domain Name/api/v1/recurringdepositaccounts
[
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Sangamesh N",
"savingsProductId": 3,
"savingsProductName": "RD01",
"fieldOfficerId": 0,
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false,
"prematureClosed": false,
"transferInProgress": false,
"transferOnHold": false
},
"timeline": {
"submittedOnDate": [
2014,
3,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"interestCompoundingPeriodType": {
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 0
},
"depositAmount": 1150,
"maturityAmount": 252.59,
"maturityDate": [
2014,
4,
3
],
"recurringDepositAmount": 100,
"recurringDepositFrequency": 1,
"recurringDepositFrequencyType": {
"id": 2,
"code": "recurring.deposit.savingsPeriodFrequencyType.months",
"value": "Months"
},
"preClosurePenalApplicable": false,
"minDepositTerm": 3,
"maxDepositTerm": 4,
"minDepositTermType": {
"id": 2,
"code": "deposit.term.savingsPeriodFrequencyType.months",
"value": "Months"
},
"maxDepositTermType": {
"id": 3,
"code": "deposit.term.savingsPeriodFrequencyType.years",
"value": "Years"
},
"depositAmount": 5000,
"maturityAmount": 5140.25,
"maturityDate": [
2014,
9,
1
],
"depositPeriod": 6,
"depositPeriodFrequency": {
"id": 2,
"code": "deposit.period.savingsPeriodFrequencyType.months",
"value": "Months"
}
}
]
Retrieve a recurring deposit application/account:
Arguments
- associations
- optional, Either 'all' or a comma separated list of recurring deposit 'associations' (itemized below).
Associations are just extra pieces of data that you might or might not want to retrieve.- 'all': Gets data related to all associations e.g. ?associations=all.
- 'transactions': Gets data related to transactions on the account e.g. ?associations=transactions
- 'charges':recurring deposit Account charges data.
Example Requests :
GET https://DomainName/api/v1/recurringdepositaccounts/{accountId}
{
"id": 1,
"accountNo": "RD000023",
"externalId": "RD-23",
"clientId": 1,
"clientName": "Sangamesh N",
"savingsProductId": 3,
"savingsProductName": "RD01",
"fieldOfficerId": 0,
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false,
"prematureClosed": false,
"transferInProgress": false,
"transferOnHold": false
},
"timeline": {
"submittedOnDate": [
2014,
3,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"interestCompoundingPeriodType": {
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"preClosurePenalApplicable": false,
"minDepositTerm": 3,
"maxDepositTerm": 4,
"minDepositTermType": {
"id": 2,
"code": "deposit.term.savingsPeriodFrequencyType.months",
"value": "Months"
},
"maxDepositTermType": {
"id": 3,
"code": "deposit.term.savingsPeriodFrequencyType.years",
"value": "Years"
},
"recurringDepositAmount": 100,
"recurringDepositFrequency": 1,
"expectedFirstDepositOnDate": [
2014,
4,
2
],
"recurringDepositFrequencyType": {
"id": 2,
"code": "recurring.deposit.savingsPeriodFrequencyType.months",
"value": "Months"
},
"depositPeriod": 6,
"depositPeriodFrequency": {
"id": 2,
"code": "deposit.period.savingsPeriodFrequencyType.months",
"value": "Months"
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 0
},
"accountChart": {
"id": 4,
"fromDate": [
2013,
10,
2
],
"accountId": 5,
"accountNumber": "RD000023",
"chartSlabs": [
{
"id": 13,
"periodType": {
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
"fromPeriod": 181,
"toPeriod": 365,
"annualInterestRate": 5.5,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 12,
"periodType": {
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
"fromPeriod": 1,
"toPeriod": 180,
"annualInterestRate": 5,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 11,
"periodType": {
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
"fromPeriod": 366,
"annualInterestRate": 6,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
],
"periodTypes": [
{
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
{
"id": 1,
"code": "interestChartPeriodType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "interestChartPeriodType.months",
"value": "Months"
},
{
"id": 3,
"code": "interestChartPeriodType.years",
"value": "Years"
}
]
}
}
Modify a recurring deposit application
Recurring deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc
PUT https://Domain Name/api/v1/recurringdepositaccounts/{accountId}
PUT recurringdepositaccounts/1
Content-Type: application/json
No Request Body:
{
"locale": "en",
"depositAmount": 6000
}
{
"officeId": 2,
"clientId": 1,
"savingsId": 1,
"resourceId": 1,
"changes": {
"depositAmount": 6000,
"locale": "en"
}
}
Delete a recurring deposit application
At present we support hard delete of recurring deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the recurring deposit account.
DELETE https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}
DELETE recurringdepositaccounts/1
Content-Type: application/json
No Request Body:
{
"officeId": 1,
"clientId": 1,
"resourceId": 1
}
Recurring Deposit Account Transactions:
Transactions possible on a recurring deposit account.
Field Descriptions |
transactionDate |
The date of the transaction. |
transactionAmount |
The amount of the transaction. |
Retrieve Recurring Deposit Account Transaction Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Requests:
GET https://Domain Name/api/v1/recurringdepositaccounts/{accountId}/transactions/template?command=deposit
{
"id": 1,
"transactionType": {
"id": 1,
"code": "savingsAccountTransactionType.deposit",
"value": "Deposit",
"deposit": true,
"withdrawal": false,
"interestPosting": false,
"feeDeduction": false,
"initiateTransfer": false,
"approveTransfer": false,
"withdrawTransfer": false,
"rejectTransfer": false,
"overdraftInterest": false,
"writtenoff": false,
"overdraftFee": true
},
"accountId": 1,
"accountNo": "000000001",
"date": [
2014,
6,
25
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 4,
"inMultiplesOf": 100,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100000.000000,
"reversed": false,
"paymentTypeOptions": []
}
Retrieve Recurring Deposit Account Transaction:
Example Requests:
GET https://Domain Name/api/v1/recurringdepositaccounts/{accountId}/transactions/{transactionId}
{
"id": 1,
"transactionType": {
"id": 2,
"code": "savingsAccountTransactionType.withdrawal",
"value": "Withdrawal",
"deposit": false,
"withdrawal": true,
"interestPosting": false,
"feeDeduction": false
},
"accountId": 1,
"accountNo": "000000001",
"date": [
2013,
8,
7
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"paymentDetailData": {
"id": 62,
"paymentType": {
"id": 11,
"name": "cash"
},
"accountNumber": "",
"checkNumber": "",
"routingCode": "",
"receiptNumber": "",
"bankNumber": ""
},
"amount": 5000,
"runningBalance": 0,
"reversed": true
}
Deposit Transaction
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions?command=deposit
POST recurringdepositaccounts/1/transactions?command=deposit
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "27 May 2013",
"transactionAmount": "500",
"paymentTypeId": "14",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 47,
"changes": {
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
Withdrawal Transaction
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions?command=withdrawal
POST recurringdepositaccounts/1/transactions?command=withdrawal
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "27 May 2013",
"transactionAmount": "500",
"paymentTypeId": "14",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 48,
"changes": {
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
Adjust Transaction
This command modifies the given transaction.
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions/{transactionId}?command=modify
POST recurringdepositaccounts/1/transactions/1?command=modify
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"transactionDate": "27 May 2013",
"transactionAmount": "500",
"paymentTypeId": "14",
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 48,
"changes": {
"accountNumber": "acc123",
"checkNumber": "che123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
}
Undo transaction
This command reverses the given transaction.
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions/{transactionId}?command=undo
POST recurringdepositaccounts/1/transactions/1?command=undo
Content-Type: application/json
No Request Body:
{
}
{
"officeId": 1,
"clientId": 2,
"savingsId": 1,
"resourceId": 1
}
Account Transfers:
Ability to be able to transfer monetary funds from one account to another.
Note: At present only savings account to savings account transfers are supported.
Mandatory Parameters |
fromOfficeId |
The id of the office/branch from which the transfer is made. |
fromClientId |
The id of the client from which the transfer is made. |
fromAccountType |
The type of account from which the transfer is made. 1=Loan Account, 2=Savings Account |
fromAccountId |
The id of the account from which the transfer is made. |
toOfficeId |
The id of the office/branch to which the transfer is made. |
toClientId |
The id of the client to which the transfer is made. |
toAccountType |
The type of account to which the transfer is made. 1=Loan Account, 2=Savings Account |
toAccountId |
The id of the account to which the transfer is made. The accouont must be active and must have the same currency as that of the selected fromAccountId. |
transferDate |
The date of the transfer. Requires dateFormat and locale parameters. |
transferAmount |
The amount of the transfer. Requires locale parameter. |
transferDescription |
Description of the transfer itself. |
Retrieve Account Transfer Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Requests:
GET https://Domain Name/api/v1/accounttransfers/template?fromAccountType=2&fromOfficeId=1
{
"transferAmount": 0,
"transferDate": [
2013,
8,
15
],
"fromOffice": {
"id": 1,
"name": "HO",
"nameDecorated": "HO",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"fromClientOptions": [
{
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
{
"id": 3,
"displayName": "Third client",
"officeId": 1,
"officeName": "HO"
}
],
"fromAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
],
"toOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"toAccountTypeOptions": [
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
]
}
GET https://Domain Name/api/v1/accounttransfers/template?fromAccountType=2&fromOfficeId=1&fromClientId=1
{
"transferAmount": 0,
"transferDate": [
2013,
8,
15
],
"fromOffice": {
"id": 1,
"name": "HO",
"nameDecorated": "HO",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"fromClient": {
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2013,
3,
1
],
"fullname": "Small shop",
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO",
"groups": []
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"fromClientOptions": [
{
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
{
"id": 3,
"displayName": "Third client",
"officeId": 1,
"officeName": "HO"
}
],
"fromAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
],
"fromAccountOptions": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Small shop",
"productId": 1,
"productName": "Passbook",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 3,
"accountNo": "000000003",
"clientId": 1,
"clientName": "Small shop",
"productId": 2,
"productName": "Shilling product",
"fieldOfficerId": 0,
"currency": {
"code": "KES",
"name": "Kenyan Shilling",
"decimalPlaces": 0,
"inMultiplesOf": 0,
"displaySymbol": "KSh",
"nameCode": "currency.KES",
"displayLabel": "Kenyan Shilling (KSh)"
}
}
],
"toOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"toAccountTypeOptions": [
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
]
}
GET https://Domain Name/api/v1/accounttransfers/template?fromClientId=1&fromAccountType=2&fromAccountId=1
{
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 0,
"transferDate": [
2013,
8,
15
],
"fromOffice": {
"id": 1,
"name": "HO",
"nameDecorated": "HO",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"fromClient": {
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2013,
3,
1
],
"fullname": "Small shop",
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO",
"groups": []
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Small shop",
"productId": 1,
"productName": "Passbook",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
"fromOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"fromClientOptions": [
{
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
{
"id": 3,
"displayName": "Third client",
"officeId": 1,
"officeName": "HO"
}
],
"fromAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
],
"fromAccountOptions": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Small shop",
"productId": 1,
"productName": "Passbook",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 3,
"accountNo": "000000003",
"clientId": 1,
"clientName": "Small shop",
"productId": 2,
"productName": "Shilling product",
"fieldOfficerId": 0,
"currency": {
"code": "KES",
"name": "Kenyan Shilling",
"decimalPlaces": 0,
"inMultiplesOf": 0,
"displaySymbol": "KSh",
"nameCode": "currency.KES",
"displayLabel": "Kenyan Shilling (KSh)"
}
}
],
"toOfficeOptions": [
{
"id": 1,
"name": "HO",
"nameDecorated": "HO"
},
{
"id": 2,
"name": "Branch 1",
"nameDecorated": "....Branch 1"
}
],
"toAccountTypeOptions": [
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
]
}
Create new Transfer
Ability to create new transfer of monetary funds from one account to another.
POST https://Domain Name/api/v1/accounttransfers
POST accounttransfers/
Content-Type: application/json
No Request Body:
{
"fromOfficeId": 1,
"fromClientId": 1,
"fromAccountType": 2,
"fromAccountId": 1,
"toOfficeId": 1,
"toClientId": 1,
"toAccountType": 2,
"toAccountId": 2,
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transferDate": "01 August 2011",
"transferAmount": "112.45",
"transferDescription": "A description of the transfer"
}
{
"savingsId": 1,
"resourceId": 1
}
List account transfers
Example Requests:
GET https://Domain Name/api/v1/accounttransfers
{
"totalFilteredRecords": 4,
"pageItems": [
{
"id": 1,
"reversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 200,
"transferDate": [
2013,
4,
1
],
"transferDescription": "pay off loan from savings.",
"fromOffice": {
"id": 1,
"name": "HO"
},
"fromClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001"
},
"toOffice": {
"id": 1,
"name": "HO"
},
"toClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"toAccountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"toAccount": {
"id": 1,
"accountNo": "000000001"
}
},
{
"id": 2,
"reversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 112.45,
"transferDate": [
2013,
6,
1
],
"transferDescription": "A description of the transfer",
"fromOffice": {
"id": 1,
"name": "HO"
},
"fromClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001"
},
"toOffice": {
"id": 1,
"name": "HO"
},
"toClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 3,
"accountNo": "000000003"
}
},
{
"id": 3,
"reversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 112.45,
"transferDate": [
2013,
6,
1
],
"transferDescription": "A description of the transfer",
"fromOffice": {
"id": 1,
"name": "HO"
},
"fromClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001"
},
"toOffice": {
"id": 1,
"name": "HO"
},
"toClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 3,
"accountNo": "000000003"
}
},
{
"id": 4,
"reversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 112.45,
"transferDate": [
2013,
6,
1
],
"transferDescription": "A description of the transfer",
"fromOffice": {
"id": 1,
"name": "HO"
},
"fromClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001"
},
"toOffice": {
"id": 1,
"name": "HO"
},
"toClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 3,
"accountNo": "000000003"
}
}
]
}
Retrieve account transfer:
Example Requests :
GET https://DomainName/api/v1/accounttransfers/{transferId}
{
"id": 1,
"reversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 200,
"transferDate": [
2013,
4,
1
],
"transferDescription": "pay off loan from savings.",
"fromOffice": {
"id": 1,
"name": "HO"
},
"fromClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001"
},
"toOffice": {
"id": 1,
"name": "HO"
},
"toClient": {
"id": 1,
"displayName": "Small shop",
"officeId": 1,
"officeName": "HO"
},
"toAccountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"toAccount": {
"id": 1,
"accountNo": "000000001"
}
}
Retrieve Refund of an Active Loan by Transfer Template:
Example Requests :
GET https://DomainName/api/v1/accounttransfers/templateRefundByTransfer
{
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 0,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"transferAmount": 130,
"transferDate": [
2014,
11,
1
],
"fromOffice": {
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"fromClient": {
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2012,
2,
1
],
"firstname": "Daniel",
"lastname": "Owusu",
"displayName": "Daniel Owusu",
"gender": {},
"clientType": {},
"clientClassification": {},
"officeId": 1,
"officeName": "Head Office",
"timeline": {
"submittedOnDate": [
2012,
2,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"activatedOnDate": [
2012,
2,
1
],
"activatedByUsername": "mifos",
"activatedByFirstname": "App",
"activatedByLastname": "Administrator"
},
"groups": []
},
"fromAccountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"fromAccount": {
"id": 2,
"accountNo": "000000002",
"clientId": 1,
"clientName": "Daniel Owusu",
"productId": 1,
"productName": "CTRL",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 0,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amtForTransfer": 130
},
"toOffice": {
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"toClient": {
"id": 1,
"displayName": "Daniel Owusu",
"officeId": 1,
"officeName": "Head Office"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Daniel Owusu",
"productId": 1,
"productName": "TEST",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 0,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
"fromOfficeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"fromClientOptions": [
{
"id": 1,
"displayName": "Daniel Owusu",
"officeId": 1,
"officeName": "Head Office"
}
],
"fromAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
}
],
"fromAccountOptions": [
{
"id": 2,
"accountNo": "000000002",
"clientId": 1,
"clientName": "Daniel Owusu",
"productId": 1,
"productName": "CTRL",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 0,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
],
"toOfficeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"toClientOptions": [
{
"id": 1,
"displayName": "Daniel Owusu",
"officeId": 1,
"officeName": "Head Office"
}
],
"toAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
],
"toAccountOptions": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "Daniel Owusu",
"productId": 1,
"productName": "TEST",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 0,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
]
}
Refund of an Active Loan by Transfer
Ability to refund an active loan by transferring to a savings account.
POST https://Domain Name/api/v1/accounttransfers
POST refundByTransfer/
Content-Type: application/json
No Request Body:
{
"fromAccountId": "2",
"fromAccountType": 1,
"toOfficeId": 1,
"toClientId": 1,
"toAccountType": 2,
"toAccountId": 1,
"transferAmount": 130,
"transferDate": "31 October 2014",
"transferDescription": "Transfer refund to my savings account",
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"fromClientId": 1,
"fromOfficeId": 1
}
{
"savingsId": 1,
"resourceId": 1
}
Standing Instructions
Standing instructions (or standing orders) refer to instructions a bank account holder ("the payer") gives to his or her bank to pay a set amount at regular intervals to another's ("the payee's") account.
Note: At present only savings account to savings account and savings account to Loan account transfers are permitted.
Mandatory Parameters |
name |
A name for this Standing Instruction |
fromOfficeId |
The id of the office/branch from which the transfer is made. |
fromClientId |
The id of the client (payer) who makes the transfer |
fromAccountType |
The type of account from which the transfer is made. 1=Loan Account, 2=Savings Account |
fromAccountId |
The id of the account from which the transfer is made. |
toOfficeId |
The id of the office/branch to which the transfer is made. |
toClientId |
The id of the client (payee), to whose account the transfer is made. |
toAccountType |
The type of account to which the transfer is made. 1=Loan Account, 2=Savings Account |
toAccountId |
The id of the account to which the transfer is made. The account must be active and must be in the same currency as that of the selected fromAccountId. |
priority |
The priority of instruction while executing instructions. 1= URGENT,2 = HIGH, 3 = MEDIUM, 4 = LOW |
transferType |
Identifies the source and destination account types. 1=Account Transfer(savings to savings), 2=Loan Repayment |
instructionType |
Determines the amount to be transferred while executing a standing instruction. 1. FIXED, 2.DUES |
status |
The Standing instruction state. 1. Active, 2.Disabled, 3.Deleted |
recurrenceType |
Determines the recurrence of this standing instruction, can be either 1. Periodic or 2.As per dues |
validFrom |
The Standing instruction's Start date. |
Optional Parameters |
amount |
Transfer amount while running the instruction. must be provided if the selected instructionType is fixed |
validTill |
The Standing instruction's end date. |
recurrenceFrequency |
The recurrence frequency of a Standing instruction's execution. Must be provided if the recurrenceType is Periodic. 0 = days, 1 = weekly, 2 = monthly, 3 = yearly |
recurrenceInterval |
The recurrence interval of a standing instruction execution, determines the recurrence schedule when combined with recurrenceFrequency. Must be provided if the recurrenceType is periodic |
recurrenceOnMonthDay |
The Month and Day of recurrence. Must be provided if the recurrenceFrequency is monthly or yearly |
Retrieve Standing Instruction Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Requests:
GET https://Domain Name/api/v1/standinginstructions/template?fromAccountType=2&fromOfficeId=1
{
"fromOffice": {
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromOfficeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"fromClientOptions": [
{
"id": 1,
"displayName": "Client_FirstName_2VRAG Client_LastName_9QCY",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 20,
"displayName": "Client_FirstName_9KYLE Client_LastName_I0GJ",
"officeId": 1,
"officeName": "Head Office"
}
],
"fromAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
}
],
"toOfficeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"toAccountTypeOptions": [
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
],
"transferTypeOptions": [
{
"id": 1,
"code": "accountTransferType.account.transfer",
"value": "Account Transfer"
},
{
"id": 2,
"code": "accountTransferType.loan.repayment",
"value": "Loan Repayment"
}
],
"statusOptions": [
{
"id": 1,
"code": "standingInstructionStatus.active",
"value": "Active"
},
{
"id": 2,
"code": "standingInstructionStatus.disabled",
"value": "Disabled"
}
],
"instructionTypeOptions": [
{
"id": 1,
"code": "standingInstructionType.fixed",
"value": "Fixed"
},
{
"id": 2,
"code": "standingInstructionType.dues",
"value": "Dues"
}
],
"priorityOptions": [
{
"id": 1,
"code": "standingInstructionPriority.urgent",
"value": "Urgent Priority"
},
{
"id": 2,
"code": "standingInstructionPriority.high",
"value": "High Priority"
},
{
"id": 3,
"code": "standingInstructionPriority.medium",
"value": "Medium Priority"
},
{
"id": 4,
"code": "standingInstructionPriority.low",
"value": "Low Priority"
}
],
"recurrenceTypeOptions": [
{
"id": 1,
"code": "accountTransferRecurrenceType.periodic",
"value": "Periodic Recurrence"
},
{
"id": 2,
"code": "accountTransferRecurrenceType.as.per.dues",
"value": "As Per Dues Recurrence"
}
],
"recurrenceFrequencyOptions": [
{
"id": 0,
"code": "frequencyperiodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "frequencyperiodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "frequencyperiodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "frequencyperiodFrequencyType.years",
"value": "Years"
}
]
}
GET https://Domain Name/api/v1/standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=1
{
"fromOffice": {
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"fromClient": {
"id": 1,
"accountNo": "000000001",
"externalId": "ID_UTMYOEQ",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2011,
1,
1
],
"firstname": "Client_FirstName_2VRAG",
"lastname": "Client_LastName_9QCY",
"displayName": "Client_FirstName_2VRAG Client_LastName_9QCY",
"officeId": 1,
"officeName": "Head Office",
"timeline": {
"submittedOnDate": [
2011,
1,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"activatedOnDate": [
2011,
1,
1
],
"activatedByUsername": "mifos",
"activatedByFirstname": "App",
"activatedByLastname": "Administrator"
},
"groups": []
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromOfficeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"fromClientOptions": [
{
"id": 1,
"displayName": "Client_FirstName_2VRAG Client_LastName_9QCY",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 2,
"displayName": "Client_FirstName_ZYDN2 Client_LastName_XVOP",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 3,
"displayName": "Client_FirstName_89LYT Client_LastName_4EY6",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 4,
"displayName": "Client_FirstName_PRCBG Client_LastName_JZU2",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 5,
"displayName": "Client_FirstName_J37GR Client_LastName_1T3X",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 6,
"displayName": "Client_FirstName_ZVHM2 Client_LastName_RUGS",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 7,
"displayName": "Client_FirstName_RBALP Client_LastName_437P",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 8,
"displayName": "Client_FirstName_R7M4V Client_LastName_Q5ED",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 9,
"displayName": "Client_FirstName_WIBDE Client_LastName_U91T",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 10,
"displayName": "Client_FirstName_26QJT Client_LastName_BEHD",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 11,
"displayName": "Client_FirstName_W071M Client_LastName_L7Z2",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 12,
"displayName": "Client_FirstName_QUHDJ Client_LastName_S4C5",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 13,
"displayName": "Client_FirstName_MNP4W Client_LastName_J8Y3",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 14,
"displayName": "Client_FirstName_TL6I8 Client_LastName_5YHG",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 15,
"displayName": "Client_FirstName_LUTBO Client_LastName_DITS",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 16,
"displayName": "Client_FirstName_UE39Z Client_LastName_PUWZ",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 17,
"displayName": "Client_FirstName_M8SD2 Client_LastName_J6QK",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 18,
"displayName": "Client_FirstName_SG8NF Client_LastName_BM1J",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 19,
"displayName": "Client_FirstName_BW0C8 Client_LastName_LGV9",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 20,
"displayName": "Client_FirstName_9KYLE Client_LastName_I0GJ",
"officeId": 1,
"officeName": "Head Office"
}
],
"fromAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
],
"fromAccountOptions": [],
"toOfficeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"toAccountTypeOptions": [
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
}
],
"transferTypeOptions": [
{
"id": 1,
"code": "accountTransferType.account.transfer",
"value": "Account Transfer"
},
{
"id": 2,
"code": "accountTransferType.loan.repayment",
"value": "Loan Repayment"
}
],
"statusOptions": [
{
"id": 1,
"code": "standingInstructionStatus.active",
"value": "Active"
},
{
"id": 2,
"code": "standingInstructionStatus.disabled",
"value": "Disabled"
}
],
"instructionTypeOptions": [
{
"id": 1,
"code": "standingInstructionType.fixed",
"value": "Fixed"
},
{
"id": 2,
"code": "standingInstructionType.dues",
"value": "Dues"
}
],
"priorityOptions": [
{
"id": 1,
"code": "standingInstructionPriority.urgent",
"value": "Urgent Priority"
},
{
"id": 2,
"code": "standingInstructionPriority.high",
"value": "High Priority"
},
{
"id": 3,
"code": "standingInstructionPriority.medium",
"value": "Medium Priority"
},
{
"id": 4,
"code": "standingInstructionPriority.low",
"value": "Low Priority"
}
],
"recurrenceTypeOptions": [
{
"id": 1,
"code": "accountTransferRecurrenceType.periodic",
"value": "Periodic Recurrence"
},
{
"id": 2,
"code": "accountTransferRecurrenceType.as.per.dues",
"value": "As Per Dues Recurrence"
}
],
"recurrenceFrequencyOptions": [
{
"id": 0,
"code": "frequencyperiodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "frequencyperiodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "frequencyperiodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "frequencyperiodFrequencyType.years",
"value": "Years"
}
]
}
GET https://Domain Name/api/v1/standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=2&fromAccountId=1
{
"fromOffice": {
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office",
"externalId": "1",
"openingDate": [
2009,
1,
1
],
"hierarchy": "."
},
"fromClient": {
"id": 3,
"accountNo": "000000003",
"externalId": "ID_ECEAKAP",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2011,
3,
4
],
"firstname": "Client_FirstName_89LYT",
"lastname": "Client_LastName_4EY6",
"displayName": "Client_FirstName_89LYT Client_LastName_4EY6",
"officeId": 1,
"officeName": "Head Office",
"timeline": {
"submittedOnDate": [
2011,
3,
4
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"activatedOnDate": [
2011,
3,
4
],
"activatedByUsername": "mifos",
"activatedByFirstname": "App",
"activatedByLastname": "Administrator"
},
"groups": []
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001",
"clientId": 3,
"clientName": "Client_FirstName_89LYT Client_LastName_4EY6",
"productId": 1,
"productName": "SAVINGS_PRODUCT_MVA619",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 4,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
"fromOfficeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"fromClientOptions": [
{
"id": 1,
"displayName": "Client_FirstName_2VRAG Client_LastName_9QCY",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 2,
"displayName": "Client_FirstName_ZYDN2 Client_LastName_XVOP",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 3,
"displayName": "Client_FirstName_89LYT Client_LastName_4EY6",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 4,
"displayName": "Client_FirstName_PRCBG Client_LastName_JZU2",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 5,
"displayName": "Client_FirstName_J37GR Client_LastName_1T3X",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 6,
"displayName": "Client_FirstName_ZVHM2 Client_LastName_RUGS",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 7,
"displayName": "Client_FirstName_RBALP Client_LastName_437P",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 8,
"displayName": "Client_FirstName_R7M4V Client_LastName_Q5ED",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 9,
"displayName": "Client_FirstName_WIBDE Client_LastName_U91T",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 10,
"displayName": "Client_FirstName_26QJT Client_LastName_BEHD",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 11,
"displayName": "Client_FirstName_W071M Client_LastName_L7Z2",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 12,
"displayName": "Client_FirstName_QUHDJ Client_LastName_S4C5",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 13,
"displayName": "Client_FirstName_MNP4W Client_LastName_J8Y3",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 14,
"displayName": "Client_FirstName_TL6I8 Client_LastName_5YHG",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 15,
"displayName": "Client_FirstName_LUTBO Client_LastName_DITS",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 16,
"displayName": "Client_FirstName_UE39Z Client_LastName_PUWZ",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 17,
"displayName": "Client_FirstName_M8SD2 Client_LastName_J6QK",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 18,
"displayName": "Client_FirstName_SG8NF Client_LastName_BM1J",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 19,
"displayName": "Client_FirstName_BW0C8 Client_LastName_LGV9",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 20,
"displayName": "Client_FirstName_9KYLE Client_LastName_I0GJ",
"officeId": 1,
"officeName": "Head Office"
}
],
"fromAccountTypeOptions": [
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
}
],
"fromAccountOptions": [
{
"id": 1,
"accountNo": "000000001",
"clientId": 3,
"clientName": "Client_FirstName_89LYT Client_LastName_4EY6",
"productId": 1,
"productName": "SAVINGS_PRODUCT_MVA619",
"fieldOfficerId": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 4,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
],
"toOfficeOptions": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"toAccountTypeOptions": [
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
}
],
"transferTypeOptions": [
{
"id": 1,
"code": "accountTransferType.account.transfer",
"value": "Account Transfer"
},
{
"id": 2,
"code": "accountTransferType.loan.repayment",
"value": "Loan Repayment"
}
],
"statusOptions": [
{
"id": 1,
"code": "standingInstructionStatus.active",
"value": "Active"
},
{
"id": 2,
"code": "standingInstructionStatus.disabled",
"value": "Disabled"
}
],
"instructionTypeOptions": [
{
"id": 1,
"code": "standingInstructionType.fixed",
"value": "Fixed"
},
{
"id": 2,
"code": "standingInstructionType.dues",
"value": "Dues"
}
],
"priorityOptions": [
{
"id": 1,
"code": "standingInstructionPriority.urgent",
"value": "Urgent Priority"
},
{
"id": 2,
"code": "standingInstructionPriority.high",
"value": "High Priority"
},
{
"id": 3,
"code": "standingInstructionPriority.medium",
"value": "Medium Priority"
},
{
"id": 4,
"code": "standingInstructionPriority.low",
"value": "Low Priority"
}
],
"recurrenceTypeOptions": [
{
"id": 1,
"code": "accountTransferRecurrenceType.periodic",
"value": "Periodic Recurrence"
},
{
"id": 2,
"code": "accountTransferRecurrenceType.as.per.dues",
"value": "As Per Dues Recurrence"
}
],
"recurrenceFrequencyOptions": [
{
"id": 0,
"code": "frequencyperiodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "frequencyperiodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "frequencyperiodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "frequencyperiodFrequencyType.years",
"value": "Years"
}
]
}
Create new Standing Instruction
Ability to create new instruction for transfer of monetary funds from one account to another.
POST https://Domain Name/api/v1/standinginstructions
POST standinginstructions/
Content-Type: application/json
No Request Body:
{
"fromOfficeId":1,
"fromClientId":1,
"fromAccountType":2,
"name":"standing instruction",
"transferType":1,
"priority":2,
"status":1,
"fromAccountId":1,
"toOfficeId":1,
"toClientId":1,
"toAccountType":2,
"toAccountId":3,
"instructionType":1,
"amount":"221",
"validFrom":"08 April 2014",
"recurrenceType":1,
"recurrenceInterval":"1",
"recurrenceFrequency":2,
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"recurrenceOnMonthDay":"02 April",
"monthDayFormat":"dd MMMM"
}
{
"clientId":1,
"resourceId":65
}
Update Standing Instruction
Ability to modify existing instruction for transfer of monetary funds from one account to another.
PUT https://Domain Name/api/v1/standinginstructions/1?command=update
PUT standinginstructions/1?command=update
Content-Type: application/json
No Request Body:
{
"recurrenceInterval":"2"
}
{
"resourceId":20,
"changes":{
"recurrenceInterval":2
}
}
Delete Standing Instruction
Ability to modify existing instruction for transfer of monetary funds from one account to another.
PUT https://Domain Name/api/v1/standinginstructions/1?command=delete
PUT standinginstructions/1?command=delete
Content-Type: application/json
No Request Body:
{
}
{
"resourceId":20,
"changes":{
"status":3
}
}
List Standing Instructions
Example Requests:
GET https://Domain Name/api/v1/standinginstructions
{
"totalFilteredRecords": 2,
"pageItems": [
{
"id": 1,
"accountDetailId": 6,
"name": "test standing",
"fromOffice": {
"id": 1,
"name": "Head Office"
},
"fromClient": {
"id": 1,
"displayName": "Test test",
"officeId": 1,
"officeName": "Head Office"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 14,
"accountNo": "000000014",
"productId": 1,
"productName": "savings old"
},
"toOffice": {
"id": 1,
"name": "Head Office"
},
"toClient": {
"id": 1,
"displayName": "Test test",
"officeId": 1,
"officeName": "Head Office"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 3,
"accountNo": "000000003",
"productId": 4,
"productName": "account overdraft"
},
"transferType": {
"id": 1,
"code": "accountTransferType.account.transfer",
"value": "Account Transfer"
},
"priority": {
"id": 3,
"code": "standingInstructionPriority.medium",
"value": "Medium Priority"
},
"instructionType": {
"id": 1,
"code": "standingInstructionType.fixed",
"value": "Fixed"
},
"status": {
"id": 3,
"code": "standingInstructionStatus.deleted",
"value": "Deleted"
},
"amount": 150.000000,
"validFrom": [
2014,
4,
3
],
"recurrenceType": {
"id": 1,
"code": "accountTransferRecurrenceType.periodic",
"value": "Periodic Recurrence"
},
"recurrenceFrequency": {
"id": 2,
"code": "recurrenceperiodFrequencyType.months",
"value": "Months"
},
"recurrenceInterval": 1,
"recurrenceOnMonthDay": [
4,
3
]
},
{
"id": 2,
"accountDetailId": 7,
"name": "test standing 2",
"fromOffice": {
"id": 1,
"name": "Head Office"
},
"fromClient": {
"id": 1,
"displayName": "Test test",
"officeId": 1,
"officeName": "Head Office"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 14,
"accountNo": "000000014",
"productId": 1,
"productName": "savings old"
},
"toOffice": {
"id": 1,
"name": "Head Office"
},
"toClient": {
"id": 1,
"displayName": "Test test",
"officeId": 1,
"officeName": "Head Office"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 3,
"accountNo": "000000003",
"productId": 4,
"productName": "account overdraft"
},
"transferType": {
"id": 1,
"code": "accountTransferType.account.transfer",
"value": "Account Transfer"
},
"priority": {
"id": 2,
"code": "standingInstructionPriority.high",
"value": "High Priority"
},
"instructionType": {
"id": 1,
"code": "standingInstructionType.fixed",
"value": "Fixed"
},
"status": {
"id": 3,
"code": "standingInstructionStatus.deleted",
"value": "Deleted"
},
"amount": 100.000000,
"validFrom": [
2014,
4,
3
],
"recurrenceType": {
"id": 1,
"code": "accountTransferRecurrenceType.periodic",
"value": "Periodic Recurrence"
},
"recurrenceFrequency": {
"id": 2,
"code": "recurrenceperiodFrequencyType.months",
"value": "Months"
},
"recurrenceInterval": 1,
"recurrenceOnMonthDay": [
2,
1
]
}
]
}
Retrieve Standing Instruction:
Example Requests :
GET https://DomainName/api/v1/standinginstructions/{standingInstructionId}
{
"id": 1,
"accountDetailId": 6,
"name": "test standing",
"fromOffice": {
"id": 1,
"name": "Head Office"
},
"fromClient": {
"id": 1,
"displayName": "Test test",
"officeId": 1,
"officeName": "Head Office"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 14,
"accountNo": "000000014",
"productId": 1,
"productName": "savings old"
},
"toOffice": {
"id": 1,
"name": "Head Office"
},
"toClient": {
"id": 1,
"displayName": "Test test",
"officeId": 1,
"officeName": "Head Office"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 3,
"accountNo": "000000003",
"productId": 4,
"productName": "account overdraft"
},
"transferType": {
"id": 1,
"code": "accountTransferType.account.transfer",
"value": "Account Transfer"
},
"priority": {
"id": 3,
"code": "standingInstructionPriority.medium",
"value": "Medium Priority"
},
"instructionType": {
"id": 1,
"code": "standingInstructionType.fixed",
"value": "Fixed"
},
"status": {
"id": 3,
"code": "standingInstructionStatus.deleted",
"value": "Deleted"
},
"amount": 150.000000,
"validFrom": [
2014,
4,
3
],
"recurrenceType": {
"id": 1,
"code": "accountTransferRecurrenceType.periodic",
"value": "Periodic Recurrence"
},
"recurrenceFrequency": {
"id": 2,
"code": "recurrenceperiodFrequencyType.months",
"value": "Months"
},
"recurrenceInterval": 1,
"recurrenceOnMonthDay": [
4,
3
]
}
Standing Instructions Logged History:
The list capability of history can support pagination and sorting.
Optional Arguments
- offset
- Integer optional, defaults to 0
- Indicates from what result to start from.
- limit
- Integer optional, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- orderBy
- String optional, one of name,standingInstructionId
- Orders the results by the field indicated.
- sortBy
- String optional, one of ASC, DESC
- Indicates what way to order results if orderBy is used.
- clientId
- Integer optional
- Use clientId of clients to restrict results.
- clientName
- String optional
- Use displayName of clients to restrict results.
- fromAccountId
- Integer optional
- Use fromAccountId of standing instruction transaction to restrict results. fromAccountId is id of fromAccountType.
- fromAccountType
- Integer optional
- Use fromAccountType of standing instruction transaction to restrict results. fromAccountType is enum value entity type Ex:Loan Account:1, Savings Account:2
- transferType
- Integer optional
- Use transferType of standing instruction transaction to restrict results. transferType is enum value transfer type Ex:Loan Repayment:2, Account Transfer:1
- fromDate
- Dateoptional
- Filters for transactions whose entry Date is greater than or equal to the passed in Date
- toDate
- Date optional
- Filters for transactions whose entry Date is lesser than or equal to the passed in Date
- sqlSearch
- String optional
- Use an sql fragment valid for the underlying standing instruction schema to filter results. e.g. name like %K%
Example Requests :
GET https://DomainName/api/v1/standinginstructionrunhistory
{
"totalFilteredRecords": 2,
"pageItems": [
{
"standingInstructionId": 1,
"name": "ACC Transfer",
"fromOffice": {
"id": 1,
"name": "Head Office"
},
"fromClient": {
"id": 1,
"displayName": "Test client",
"officeId": 1,
"officeName": "Head Office"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 2,
"accountNo": "000000002",
"productId": 1,
"productName": "General Savings"
},
"toAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"toAccount": {
"id": 1,
"accountNo": "000000001",
"productId": 1,
"productName": "General Savings"
},
"toOffice": {
"id": 1,
"name": "Head Office"
},
"toClient": {
"id": 1,
"displayName": "Test client",
"officeId": 1,
"officeName": "Head Office"
},
"amount": 10,
"status": "success",
"executionTime": [
2014,
6,
30
],
"errorLog": ""
},
{
"standingInstructionId": 2,
"name": "Pay overdues",
"fromOffice": {
"id": 1,
"name": "Head Office"
},
"fromClient": {
"id": 1,
"displayName": "Test client",
"officeId": 1,
"officeName": "Head Office"
},
"fromAccountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"fromAccount": {
"id": 1,
"accountNo": "000000001",
"productId": 1,
"productName": "General Savings"
},
"toAccountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"toAccount": {
"id": 1,
"accountNo": "000000001",
"productId": 1,
"productName": "Daily Loan"
},
"toOffice": {
"id": 1,
"name": "Head Office"
},
"toClient": {
"id": 1,
"displayName": "Test client",
"officeId": 1,
"officeName": "Head Office"
},
"amount": 7038.01,
"status": "success",
"executionTime": [
2014,
6,
30
],
"errorLog": ""
}
]
}
Data Tables
The datatables API allows you to plug-in your own tables (MySql) that have a relationship to a Apache Fineract core table. For example, you might want to add some extra client fields and record information about each of the clients' family members. Via the API you can create, read, update and delete entries for each 'plugged-in' table. The API checks for permission and for 'data scoping' (only data within the users' office hierarchy can be managed by the user).
The Apache Fineract Reference App uses a JQuery plug-in called stretchydatatables (which in turn uses this datatables resource) to provide a pretty flexible CRUD (Create, Read, Update, Delete) User Interface.
Create Data Table
Create a new data table and registers it with the Apache Fineract Core application table.
Field Descriptions |
Mandatory - datatableName |
The name of the Data Table. |
Mandatory - apptableName |
Application table name. Must be one of the following:
|
Mandatory - columns |
An array of columns in the new Data Table. |
Optional - multiRow |
Allows to create multiple entries in the Data Table. Optional, defaults to false. If this property is not provided Data Table will allow only one entry. |
Field Descriptions - columns |
Mandatory - name |
Name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space. |
Mandatory - type |
Column type. Must be one of the following:
|
Mandatory [type = Dropdown] - code |
Used in Code Value fields. Column name becomes: code_cd_name. Mandatory if using type Dropdown, otherwise an error is returned. |
Optional - mandatory |
Determines whether this column must have a value in every entry. Optional, defaults to false. |
Mandatory [type = String] - length |
Length of the text field. Mandatory if type String is used, otherwise an error is returned. |
POST https://DomainName/api/v1/datatables
POST https://DomainName/api/v1/datatables
Content-Type: application/json
Request Body:
{
"datatableName": "extra_client_details",
"apptableName": "m_client",
"columns": [
{
"name": "Gender",
"type": "Dropdown",
"code": "Gender"
},
{
"name": "Some Decimal",
"type": "Decimal",
"mandatory": true
},
{
"name": "Birth Date",
"type": "Date"
},
{
"name": "Question 2",
"type": "String",
"length": 100,
"mandatory": false
}
]
}
{
"resourceIdentifier": "extra_client_details"
}
POST https://DomainName/api/v1/datatables
Content-Type: application/json
Request Body:
{
"datatableName": "client_address",
"apptableName": "m_client",
"multiRow":"true",
"columns": [
{
"name": "Address1",
"type": "String",
"length": 100,
"mandatory": true
},
{
"name": "Address2",
"length": 100,
"type": "String"
}
]
}
{
"resourceIdentifier": "client_address"
}
List Data Tables
Lists registered data tables and the Apache Fineract Core application table they are registered to.
Arguments
- apptable
- optional
- The Apache Fineract core application table.
Example Requests:
GET https://DomainName/api/v1/datatables
[
{
"applicationTableName": "m_client",
"registeredTableName": "extra_client_details",
"columnHeaderData": [
{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Gender_cd_Question",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Some Decimal",
"columnType": "decimal",
"columnLength": 0,
"columnDisplayType": "DECIMAL",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Birth Date",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}
]
}
]
Retrieve Data Table Details
Lists a registered data table details and the Apache Fineract Core application table they are registered to.
GET https://DomainName/api/v1/datatables/{datatable}
{
"applicationTableName": "m_client",
"registeredTableName": "extra_client_details",
"columnHeaderData": [
{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Gender_cd_Question",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Some Decimal",
"columnType": "decimal",
"columnLength": 0,
"columnDisplayType": "DECIMAL",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Birth Date",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}
]
}
Update Data Table
Modifies fields of a data table. If the apptableName parameter is passed, data table is deregistered and registered with the new application table.
Field Descriptions |
Optional - apptableName |
Application table name. Only necessary if changing the application table this Data Table is registered to. Must be one of the following:
|
Optional - dropColumns |
An array of columns to be deleted from the Data Table. |
Optional - addColumns |
An array of columns to be added to the Data Table. |
Optional - changeColumns |
An array of columns to be changed in the Data Table. |
Field Descriptions - dropColumns |
Mandatory - name |
Requires a full name of the deleted column to be provided. |
Field Descriptions - addColumns |
Mandatory - name |
Name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space. |
Mandatory - type |
Column type. Must be one of the following:
|
Mandatory [type = Dropdown] - code |
Used in Code Value fields. Column name becomes: code_cd_name. Mandatory if using type Dropdown, otherwise an error is returned. |
Optional - mandatory |
Determines whether this column must have a value in every entry. Optional, defaults to false. |
Mandatory [type = String] - length |
Length of the text field. Mandatory if type String is used, otherwise an error is returned. |
Optional - after |
Only used when re-ordering Data Table columns. Requires a full column name to be provided. |
Field Descriptions - changeColumns |
Mandatory - name |
Name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space. |
Optional - newName |
New name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space. |
Mandatory [type = Dropdown] - code |
Used in Code Value fields. Column name becomes: code_cd_name. Mandatory if using type Dropdown, otherwise an error is returned. |
Optional [type = Dropdown] - newCode |
Used in Code Value fields. Column name becomes: code_cd_name. Optional if using type Dropdown, otherwise an error is returned. |
Optional - mandatory |
Determines whether this column must have a value in every entry. Optional, defaults to false. |
Mandatory [type = String] - length |
Length of the text field. Mandatory if type String is used, otherwise an error is returned. |
Optional - after |
Only used when re-ordering Data Table columns. Requires a full column name to be provided. |
PUT https://DomainName/api/v1/datatables/{datatables}
PUT https://DomainName/api/v1/datatables/extra_client_details
Content-Type: application/json
Request Body:
{
"apptableName": "m_client",
"dropColumns": [
{
"name": "Gender_cd_Question"
}
],
"addColumns": [
{
"name": "Question",
"type": "Dropdown",
"code": "Gender",
"mandatory": true
},
{
"name": "Some Number",
"type": "Number",
"after": "Some Field"
}
],
"changeColumns": [
{
"name": "Question",
"newName": "Question 2",
"mandatory": true,
"code": "Gender",
"newCode": "Gender2"
}
]
}
{
"resourceIdentifier": "extra_client_details"
}
Delete Data Table
Deletes a data table and deregisters it from the Apache Fineract Core application table.
DELETE https://DomainName/api/v1/datatables/{datatables}
DELETE https://DomainName/api/v1/datatables/extra_client_details
Content-Type: application/json
No Request Body
{
"resourceIdentifier": "extra_client_details"
}
Register Data Table
Registers a data table with the Apache Fineract Core application table. This allows the data table to be maintained through the API. In case the datatable is a PPI (survey table), a parameter category should be pass along with the request. The API currently support one category (200)
POST https://DomainName/api/v1/datatables/register/{datatable}/{apptable}
POST datatables/register/extra_client_details/m_client
Content-Type: application/json
Request Body:
{}
{
"resourceIdentifier": "extra_client_details"
}
Deregister Data Table
Deregisters a data table. It will no longer be available through the API.
POST https://DomainName/api/v1/datatables/deregister/{datatable}
POST datatables/deregister/extra_client_details
Content-Type: application/json
Request Body:
{}
{
"resourceIdentifier": "extra_client_details"
}
Create Entry in Data Table
Adds a row to the data table.
Note that the default datatable UI functionality converts any field name containing spaces to underscores when using the API. This means the field name "Business Description" is considered the same as "Business_Description". So you shouldn't have both "versions" in any data table.
POST https://DomainName/api/v1/datatables/{datatable}/{apptableId}
POST datatables/extra_client_details/1
Content-Type: application/json
Request Body:
{
"Business Description": "Livestock sales",
"Comment": "First comment made",
"Education_cv": "Primary",
"Gender_cd": "6",
"Highest Rate Paid": "8.5",
"Next Visit": "01 October 2012",
"Years in Business": "5",
"dateFormat": "dd MMMM yyyy",
"locale": "en"
}
{
"resourceId": 1
}
Retrieve Entry(s) from Data Table
Gets the entry (if it exists) for data tables that are one to one
with the application table.
Gets the entries (if they
exist) for data tables that are one to many with the application
table.
Note: The 'fields' parameter is not available for datatables.
Arguments
- order
- optional
- Specifies the order in which data is returned.
- genericResultSet
- optional, defaults to false
- If 'true' an optimised JSON format is returned suitable for tabular display of data. This format is used by the default data tables UI functionality.
Example Requests:
GET https://DomainName/api/v1/datatables/{datatable}/{apptableId}?genericResultSet=true
{
"columnHeaders": [
{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Business Description",
"columnType": "varchar",
"columnLength": 100,
"columnDisplayType": "STRING",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Years in Business",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Gender_cd",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": [
{
"id": 5,
"value": "option.Male"
},
{
"id": 6,
"value": "option.Female"
}
]
},
{
"columnName": "Education_cv",
"columnType": "varchar",
"columnLength": 60,
"columnDisplayType": "CODEVALUE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": [
{
"id": 9,
"value": "Primary"
},
{
"id": 10,
"value": "Secondary"
},
{
"id": 11,
"value": "University"
}
]
},
{
"columnName": "Next Visit",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Highest Rate Paid",
"columnType": "decimal",
"columnLength": 0,
"columnDisplayType": "DECIMAL",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Comment",
"columnType": "text",
"columnLength": 65535,
"columnDisplayType": "TEXT",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}
],
"data": [
{
"row": [
"1",
"Livestock sales",
"5",
"6",
"Primary",
"2012-10-01",
"8.500000",
"First\tcomment made"
]
}
]
}
Update Entry in Data Table (One to One)
Updates the row (if it exists) of the data table.
PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId}
PUT datatables/extra_client_details/1
Content-Type: application/json
Request Body:
{
"Business Description": "Livestock sales updated",
}
{
"resourceId": 1,
"changes": {
"Business Description": "Livestock sales updated"
}
}
Update Entry in Data Table (One to Many)
Updates the row (if it exists) of the data table.
PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId}
PUT datatables/Extra Family Details Data/1/2
Content-Type: application/json
Request Body:
{
"Date of Birth": "01 June 1982",
Education_cdHighest: "5",
Name: "June",
"Other Notes": "More\nnotes",
"Points Score": "20",
dateFormat: "dd MMMM yyyy",
locale: "en"
}
{ "resourceId": 1 }
Delete Entry(s) in Data Table
Deletes the entry (if it exists) for data tables that are one-to-one with the application table.
Deletes the entries (if they exist) for data tables that are one-to-many with the application table.
DELETE https://DomainName/api/v1/datatables/{datatable}/{apptableId}
DELETE datatables/extra_client_details/1
Content-Type: application/json
Request Body:
{}
{
"resourceId": 1
}
Delete Entry in Datatable (One to Many)
Deletes the entry (if it exists) for data tables that are one to many with the application table.
DELETE https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId}
DELETE datatables/extra_family_details/1/2
Content-Type: application/json
Request Body:
{}
{
"resourceId": 1
}
Retrieve surveys
Retrieve surveys. This allows to retrieve the list of survey tables registered .
GET https://DomainName/api/v1/survey/
GET survey/
Content-Type: application/json
Request Body:
{}
[
{
"datatableData": {
"applicationTableName": "m_client",
"registeredTableName": "ppi_kenya_2005",
"columnHeaderData": [
{
"columnName": "id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "client_id",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "ppi_household_members_cd_q1_householdmembers",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": [
{
"id": 167,
"value": "Nine or More",
"score": 0
},
{
"id": 168,
"value": "Seven or eight",
"score": 5
},
{
"id": 169,
"value": "Six",
"score": 8
},
],
"columnCode": "ppi_household_members"
},
{
"columnName": "date",
"columnType": "datetime",
"columnLength": 0,
"columnDisplayType": "DATETIME",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
}
]
},
"enabled": false
},
{
"datatableData": {
"applicationTableName": "m_client",
"registeredTableName": "ppi_tanzania_20012",
"columnHeaderData": [
{
"columnName": "id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "client_id",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "ppi_youngerthan17_cd_q1_youngerthan17",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "CODELOOKUP",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": [
{
"id": 204,
"value": "four or More",
"score": 0
},
],
"columnCode": "ppi_youngerthan17"
},
],
"columnCode": "ppi_how_many_tables"
},
]
},
"enabled": true
}
]
Retrieve survey
Lists a registered survey table details and the Apache Fineract Core application table they are registered to.
GET https://DomainName/api/v1/survey/ppi_kenya_2005
GET survey/{surveyName}
Content-Type: application/json
Request Body:
{}
{
"applicationTableName": "m_client",
"registeredTableName": "extra_client_details",
"columnHeaderData": [
{
"columnName": "client_id",
"columnType": "bigint",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": false,
"isColumnPrimaryKey": true,
"columnValues": []
},
{
"columnName": "Gender_cd_Question",
"columnType": "int",
"columnLength": 0,
"columnDisplayType": "INTEGER",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Some Decimal",
"columnType": "decimal",
"columnLength": 0,
"columnDisplayType": "DECIMAL",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Birth Date",
"columnType": "date",
"columnLength": 0,
"columnDisplayType": "DATE",
"isColumnNullable": true,
"isColumnPrimaryKey": false,
"columnValues": []
}
enabled:false
]
}
Create an entry in the survey table
Insert and entry in a survey table (full fill the survey).
POST https://DomainName/api/v1/survey/ppi_kenya_2005/87
POST survey/{surveyName}/{clientId}
Content-Type: application/json
Request Body:
{
ppi_household_members_cd_q1_householdmembers : 167,
ppi_highestschool_cd_q2_highestschool : 174 ,
ppi_businessoccupation_cd_q3_businessoccupation : 180,
ppi_habitablerooms_cd_q4_habitablerooms :184,
ppi_floortype_cd_q5_floortype : 188,
ppi_lightingsource_cd_q6_lightingsource :190,
ppi_irons_cd_q7_irons:193,
ppi_mosquitonets_cd_q8_mosquitonets:195,
ppi_towels_cd_q9_towels:198,
ppi_fryingpans_cd_q10_fryingpans:201,
date:"2014-12-02 20:30:00",
dateFormat:"Y-m-d H:i:s",
locale:"en_GB"
}
{
"officeId": 2,
"clientId": 87,
"resourceId": 87
}
Notes
Notes API allows to enter notes for supported resources.
Field Descriptions |
note |
A simple text note created for supported resources. |
Supported Resources |
Client
Loan Group Savings Account |
Add a Resource Note
Adds a new note to a supported resource.
Mandatory Fields |
note |
Example Requests:
POST https://DomainName/api/v1/{resource}/{resourceId}/notes
POST clients/1/notes
Content-Type: application/json
Request Body:
{
"note": "a note about the client"
}
{
"officeId": 1,
"clientId": 1,
"resourceId": 76
}
Retrieve a Resource's Notes
Note: Notes are returned in descending createOn order.
Example Requests:
GET https://DomainName/api/v1/{resource}/{resourceId}/notes
[
{
"id": 2,
"clientId": 1,
"noteType": {
"id": 100,
"code": "noteType.client",
"value": "Client note"
},
"note": "First note edited",
"createdById": 1,
"createdByUsername": "mifos",
"createdOn": 1342498505000,
"updatedById": 1,
"updatedByUsername": "mifos",
"updatedOn": 1342498517000
}
]
Retrieve a Resource Note
Example Requests:
GET https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId}
{
"id": 76,
"clientId": 1,
"noteType": {
"id": 100,
"code": "noteType.client",
"value": "Client note"
},
"note": "a note about the client",
"createdById": 1,
"createdByUsername": "mifos",
"createdOn": 1359463135000,
"updatedById": 1,
"updatedByUsername": "mifos",
"updatedOn": 1359463135000
}
Update a Resource Note
PUT https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId}
PUT clients/1/notes/76
Content-Type: application/json
Request Body:
{
"note": "and here the note is updated nicely."
}
{
"officeId": 1,
"clientId": 1,
"resourceId": 76,
"changes": {
"note": "and here the note is updated nicely."
}
}
Delete a Resource Note
DELETE https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId}
DELETE clients/1/notes/76
Content-Type: application/json
No Request Body:
{
"resourceId": 76
}
Documents
Multiple Documents (a combination of a name, description and a file) may be attached to different Entities like Clients, Groups, Staff, Loans, Savings and Client Identifiers in the system
Note: The currently allowed Entities are
- Clients: URL Pattern as clients
- Staff: URL Pattern as staff
- Loans: URL Pattern as loans
- Savings: URL Pattern as savings
- Client Identifiers: URL Pattern as client_identifiers
- Groups: URL Pattern as groups
Field Descriptions |
parentEntityType |
The type of the Entity with which this document is associated |
parentEntityId |
The ID of the entity (client, loan etc) with which this document is associated |
name |
User Defined name for the document, need not be the same as the name of the file associated with the document |
fileName |
The name of the file associated with this document |
size |
The size (in bytes) of the file associated with this document |
type |
Mime Type of the file associated with this document |
description |
A description of this document |
List documents
Example Requests:
GET https://DomainName/api/v1/{entityType}/{entityId}/documents
[
{
"id": 1,
"parentEntityType": "clients",
"parentEntityId": 1,
"name": "Client Details Form ",
"fileName": "CGAP.pdf",
"size": 5246719,
"type": "application/pdf",
"description": "A signed form signed by new member"
}
]
Retrieve a Document
Example Requests:
GET https://DomainName/api/v1/documents/{clientId}
{
"id": 1,
"parentEntityType": "clients",
"parentEntityId": 1,
"name": "Client Details Form ",
"fileName": "CGAP.pdf",
"size": 5246719,
"type": "application/pdf",
"description": "A signed form signed by new member"
}
Create a Document
Note: A document is created using a Multi-part form upload
Body Parts |
name |
Name or summary of the document |
description |
Description of the document |
file |
The file to be uploaded |
Mandatory Fields |
file and description |
POST https://DomainName/api/v1/{entityType}/{entityId}/documents
POST clients/1/documents
Content-Type: multipart/form-data
Request Body:
Not Shown (multi-part form data)
{
"resourceId":3,
"resourceIdentifier":"3"
}
Update a Document
Note: A document is updated using a Multi-part form upload
Body Parts |
name |
Name or summary of the document |
description |
Description of the document |
file |
The file to be uploaded |
PUT https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}
PUT clients/1/documents/1
Content-Type: multipart/form-data
Request Body:
Not Shown (multi-part form data)
{
"resourceId":3,
"changes":{},
"resourceIdentifier":"3"
}
Retrieve Binary File associated with Document
Request used to download the file associated with the document
Example Requests:
GET https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}/attachment
Not Shown: The corresponding Binary file
Remove a Document
DELETE https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}
DELETE clients/1/documents/1
Content-Type: application/json
No Request Body:
{
"resourceId":1,
"changes":{},
"resourceIdentifier":"1"
}
DELETE https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}
DELETE loans/1/documents/1
Content-Type: application/json
No Request Body:
{
"resourceId":1,
"changes":{},
"resourceIdentifier":"1"
}
Reports
Non-core reports can be added, updated and deleted.
Core reports (supplied at installation/upgrade time) can only have their "useReport" updated. "useReport" is used, for example, in the reference UI report page to 'show'/'not show' reports. Reports that have useReport set to false can still be run. Reports only used for workflow purposes are examples of reports that would have their useReport set to false.
Placeholders can be put in the reportSql to act as parameters. They have the format ${paramName}.
The runreports api will translate the value of any query parameter beginning R_ with the equivalent placeholder.
e.g. query parameter R_myName=john will replace ${myName} with john
There is a special 'automatic' placeholder ${currentUserHierarchy} - if this is included in reportSql
it gets replaced by the requesting users' office hierarchy value. This enables data scoping.
Usage example "where o.hierarchy like CONCAT('${currentUserHierarchy}', '%')"
Note:
The reports api allows parameters (not just placeholders in reportSql) to be associated with reports.
These associated parameters are only required to allow the reference UI reporting functionality implement
user-friendly parameter input.
Retrieve Report Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/reports/template
{
"allowedReportTypes": [
"Table",
"Pentaho",
"Chart"
],
"allowedReportSubTypes": [
"Bar",
"Pie"
],
"allowedParameters": [
{
"id": 1,
"parameterName": "startDateSelect"
},
{
"id": 2,
"parameterName": "endDateSelect"
},
{
"id": 3,
"parameterName": "obligDateTypeSelect"
},
{
"id": 5,
"parameterName": "OfficeIdSelectOne"
},
{
"id": 6,
"parameterName": "loanOfficerIdSelectAll"
},
{
"id": 10,
"parameterName": "currencyIdSelectAll"
},
{
"id": 20,
"parameterName": "fundIdSelectAll"
},
{
"id": 25,
"parameterName": "loanProductIdSelectAll"
},
{
"id": 26,
"parameterName": "loanPurposeIdSelectAll"
},
{
"id": 100,
"parameterName": "parTypeSelect"
}
]
}
Create a Report
POST https://DomainName/api/v1/reports
POST reports
Content-Type: application/json
Request Body:
{
"reportName":"Completely New Report",
"reportType":"Table",
"reportSubType":"",
"reportCategory":"Loan",
"useReport":"false",
"description":"Just\nAn\nExample",
"reportSql":"select 'very good sql' as AComment",
"reportParameters":[{"id":"","parameterId":"5","reportParameterName":""},{"id":"","parameterId":"6","reportParameterName":""}]
}
{
"resourceId": 132
}
List Reports
Lists all reports and their parameters.
Example Request:
GET https://DomainName/api/v1/reports
[
{
"id": 1,
"reportName": "Client Listing",
"reportType": "Table",
"reportCategory": "Client",
"description": "Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \u0027one to one\u0027 additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t \n\nhave that client browser/memory impact).",
"coreReport": true,
"useReport": true,
"reportParameters": [
{
"id": 1,
"parameterId": 5,
"parameterName": "OfficeIdSelectOne"
}
]
},
{
"id": 2,
"reportName": "Client Loans Listing",
"reportType": "Table",
"reportCategory": "Client",
"description": "Individual Client Report\n\nPretty \n\nwide report that lists the basic details of client loans. \n\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t have that client browser/memory impact).",
"coreReport": false,
"useReport": true,
"reportParameters": [
{
"id": 2,
"parameterId": 5,
"parameterName": "OfficeIdSelectOne"
},
{
"id": 3,
"parameterId": 6,
"parameterName": "loanOfficerIdSelectAll"
},
{
"id": 4,
"parameterId": 10,
"parameterName": "currencyIdSelectAll"
},
{
"id": 5,
"parameterId": 20,
"parameterName": "fundIdSelectAll"
},
{
"id": 6,
"parameterId": 25,
"parameterName": "loanProductIdSelectAll"
},
{
"id": 7,
"parameterId": 26,
"parameterName": "loanPurposeIdSelectAll"
}
]
},...
]
Retrieve a Report
Example Requests:
GET https://DomainName/api/v1/reports/{id}
{
"id": 1,
"reportName": "Client Listing",
"reportType": "Table",
"reportCategory": "Client",
"description": "Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \u0027one to one\u0027 additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t \n\nhave that client browser/memory impact).",
"reportSql": "select \nconcat(repeat(\"..\", \n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \u0027.\u0027, \u0027\u0027)) - 1))), ounder.`name`) as \"Office/Branch\",\n c.account_no as \"Client Account No.\", \nc.display_name as \"Name\", \nr.enum_message_property as \"Status\",\nc.activation_date as \"Activation\", c.external_id as \"External Id\"\nfrom m_office o \njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \u0027%\u0027)\nand ounder.hierarchy like concat(\u0027${currentUserHierarchy}\u0027, \u0027%\u0027)\njoin m_client c on c.office_id \u003d ounder.id\nleft join r_enum_value r on r.enum_name \u003d \u0027status_enum\u0027 and r.enum_id \u003d c.status_enum\nwhere o.id \u003d ${officeId}\norder by ounder.hierarchy, c.account_no",
"coreReport": true,
"useReport": true,
"reportParameters": [
{
"id": 1,
"parameterId": 5,
"parameterName": "OfficeIdSelectOne"
}
]
}
Update a Report
Only the useReport value can be updated for core reports.
PUT https://DomainName/api/v1/reports/{id}
PUT reports/129
Content-Type: application/json
Request Body:
{
"reportName": "New rpt name",
"reportParameters": [
{
"id": 194,
"parameterId": 5,
"reportParameterName": "m"
}
]
}
{
"resourceId": 129,
"changes": {
"reportName": "New rpt name",
"reportParameters": "[{\"id\":194,\"parameterId\":5,\"reportParameterName\":\"m\"}]"
}
}
Delete a Report
Only non-core reports can be deleted.
DELETE https://DomainName/api/v1/reports/{id}
DELETE reports/100
Content-Type: application/json
Request Body:
{}
{
"resourceId": 100
}
Run Reports
Running a Report
This resource allows you to run and receive output from pre-defined Apache Fineract reports.
Reports can also be used to provide data for searching and workflow functionality.
The default output is a JSON formatted "Generic Resultset". The Generic Resultset contains Column Heading as well as Data information. However, you can export to CSV format by simply adding "&exportCSV=true" to the end of your URL.
If Pentaho reports have been pre-defined, they can also be run through this resource. Pentaho reports can return HTML, PDF or CSV formats.
The Apache Fineract reference application uses a JQuery plugin called stretchyreporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI).
Arguments
- R_'parameter names' ...
- optional, No defaults
- 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.
- Note: the prefix R_ stands for Reporting
- genericResultSet
- optional, defaults to true
- If 'true' an optimised JSON format is returned suitable for tabular display of data.
- If 'false' a simple JSON format is returned.
- parameterType
- optional, The only valid value is 'true'. If any other value is provided the argument will be ignored
- Determines whether the request looks in the list of reports or the list of parameters for its data. Doesn't apply to Pentaho reports.
- exportCSV
- optional, The only valid value is 'true'. If any other value is provided the argument will be ignored
- Output will be delivered as a CSV file instead of JSON. Doesn't apply to Pentaho reports.
- output-type
- optional, Defaults to HTML.
- Valid Values are HTML, XLS, XSLX, CSV and PDF for html, Excel, Excel 2007+, CSV and PDF formats respectively.
- Only applies to Pentaho reports.
- locale
- optional
- Any valid locale Ex: en_US, en_IN, fr_FR etc
- Only applies to Pentaho reports.
Example Requests:
GET https://DomainName/api/v1/runreports/{reportName}
{
"columnHeaders": [
{
"columnName": "Office/Branch",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Client Account No.",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Name",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "Joined",
"columnType": "DATE",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
},
{
"columnName": "External Id",
"columnType": "VARCHAR",
"isColumnNullable": false,
"isColumnPrimaryKey": false,
"columnValues": []
}
],
"data": [
{
"row": [
"Head Office",
"000000001",
"Petra Yton",
"2009-03-04",
"786YYH7"
]
},
{
"row": [
"Head Office",
"000000002",
"Keith(changed) Yton",
"2009-03-04",
null
]
},
{
"row": [
"Head Office",
"000000003",
"Jorge lastname",
"2013-02-05",
null
]
}
]
}
Report Mailing Jobs
This resource allows you to create a scheduled job that runs a report and sents it by email to specified email addresses.
The scheduled job can be configured to run once or on a regular basis (once a day, twice a week, etc).
Field Descriptions |
name |
The name of the report mailing job. It must be unique. |
description |
Optional: Description of the report mailing job. |
startDateTime |
Date and time to start the report mailing job. |
stretchyReportId |
The identifier of the stretchy report to be sent. |
emailRecipients |
Comma separated report recipient email addresses. |
emailSubject |
The subject of the email to be sent. |
emailMessage |
The body of the email to be sent. |
emailAttachmentFileFormatId |
The Enum constant id of the email attachment file format. |
recurrence |
Rule or repeating pattern for recurring events. See - http://www.kanzaki.com/docs/ical/rrule.html |
isActive |
Indicates whether or not the scheduler should be created as active. |
stretchyReportParamMap |
Optional: A map of the stretchy report parameter names to values. |
Retrieve Report Mailing Job Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for report mailing job applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/reportmailingjobs/template
{
"isActive": false,
"emailAttachmentFileFormatOptions": [
{
"id": 1,
"code": "ReportMailingJobEmailAttachmentFileFormat.xls",
"value": "xls"
},
{
"id": 2,
"code": "ReportMailingJobEmailAttachmentFileFormat.pdf",
"value": "pdf"
},
{
"id": 3,
"code": "ReportMailingJobEmailAttachmentFileFormat.csv",
"value": "csv"
}
],
"stretchyReportParamDateOptions": [
{
"id": 1,
"code": "reportMailingJobStretchyReportParamDateOption.today",
"value": "today"
},
{
"id": 2,
"code": "reportMailingJobStretchyReportParamDateOption.yesterday",
"value": "yesterday"
},
{
"id": 3,
"code": "reportMailingJobStretchyReportParamDateOption.tomorrow",
"value": "tomorrow"
}
]
}
Retrieve a Report Mailing Job
Example Requests:
GET https://DomainName/api/v1/reportmailingjobs/{id}
{
"id": 1,
"name": "Client Numbers Report",
"description": "Client Numbers Report",
"startDateTime": 1469627093000,
"recurrence": "",
"timeline": {
"createdOnDate": [
2016,
7,
27
],
"createdByUsername": "musoni",
"createdByFirstname": "firstname",
"createdByLastname": "lastname"
},
"emailRecipients": "info@musonisystem.com",
"emailSubject": "Client Numbers Report",
"emailMessage": "Client Numbers Report",
"emailAttachmentFileFormat": {
"id": 1,
"code": "ReportMailingJobEmailAttachmentFileFormat.xls",
"value": "xls"
},
"stretchyReport": {
"id": 120,
"reportName": "Client Numbers Report",
"reportType": "Pentaho",
"reportCategory": "Client",
"description": "",
"coreReport": false,
"useReport": true
},
"stretchyReportParamMap": "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}",
"nextRunDateTime": 1469627093000,
"numberOfRuns": 0,
"isActive": true,
"runAsUserId": 1
}
List Report Mailing Jobs
Example Requests:
GET https://DomainName/api/v1/reportmailingjobs
[
{
"id": 1,
"name": "Client Numbers Report",
"description": "Client Numbers Report",
"startDateTime": 1469627093000,
"recurrence": "",
"timeline": {
"createdOnDate": [
2016,
7,
27
],
"createdByUsername": "musoni",
"createdByFirstname": "firstname",
"createdByLastname": "lastname"
},
"emailRecipients": "info@musonisystem.com",
"emailSubject": "Client Numbers Report",
"emailMessage": "Client Numbers Report",
"emailAttachmentFileFormat": {
"id": 1,
"code": "ReportMailingJobEmailAttachmentFileFormat.xls",
"value": "xls"
},
"stretchyReport": {
"id": 120,
"reportName": "Client Numbers Report",
"reportType": "Pentaho",
"reportCategory": "Client",
"description": "",
"coreReport": false,
"useReport": true
},
"stretchyReportParamMap": "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}",
"nextRunDateTime": 1469627093000,
"numberOfRuns": 0,
"isActive": true,
"runAsUserId": 1
}
]
List Report Mailing Job History
The list capability of report mailing job history can support pagination and sorting.
Optional Arguments
- offset
- Integer optional, defaults to 0
- Indicates the result from which pagination starts
- limit
- Integer optional, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- orderBy
- String optional, one of startDateTime, endDateTime, status
- Orders results by the indicated field.
- sortBy
- String optional, one of ASC, DESC
- Indicates what way to order results if orderBy is used.
Example Requests:
GET https://DomainName/api/v1/reportmailingjobrunhistory/{reportMailingJobId}
[
{
"id": 1,
"reportMailingJobId": 1,
"startDateTime": 1469627093000",
"endDateTime": 1469627093050,
"status": "success",
"errorMessage": "",
"errorLog": ""
}
]
Create a Report Mailing Job
Mandatory Fields |
name, startDateTime, stretchyReportId, emailRecipients, emailSubject, emailMessage, emailAttachmentFileFormatId, recurrence, isActive |
Optional Fields |
description, stretchyReportParamMap |
POST https://DomainName/api/v1/reportmailingjobs
POST reportmailingjobs
Content-Type: application/json Request Body:
{
"locale": "en_GB",
"dateFormat": "dd-MM-yyyy HH:mm:ss",
"name": "Client Numbers Report",
"description": "Client Numbers Report",
"startDateTime": "02-08-2016 11:34:18",
"stretchyReportId": "120",
"emailRecipients": "info@musonisystem.com",
"emailSubject": "Client Numbers Report",
"emailMessage": "Client Numbers Report",
"emailAttachmentFileFormatId": "1",
"recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR",
"isActive": true,
"stretchyReportParamMap": "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}"
}
{
"resourceId": 1
}
Update a Report Mailing Job
PUT https://DomainName/api/v1/reportmailingjobs/{id}
PUT reportmailingjobs/1
Content-Type: application/json
Request Body:
{
"locale": "en_GB",
"dateFormat": "dd-MM-yyyy HH:mm:ss",
"startDateTime": "10-08-2016 23:30:00"
}
{
"resourceId": 1,
"changes": {
"startDateTime": "10-08-2016 23:30:00"
}
}
Delete a Report Mailing Job
DELETE https://DomainName/api/v1/reportmailingjobs/{id}
DELETE reportmailingjobs/1
Content-Type: application/json
Request Body:
{
}
{
"resourceId": 1
}
Authentication HTTP Basic
An API capability that allows client applications to verify authentication details using HTTP Basic Authentication.
Field Descriptions |
base64EncodedAuthenticationKey |
HTTP Basic Auth key. See Authentication Overview for an example of its use. |
Verify authentication
Authenticates the credentials provided and returns the set roles and permissions allowed.
POST https://DomainName/api/v1/authentication?username={username}&password={password}
POST authentication?username=mifos&password=password
Content-Type: application/json
No Request Body
Example response of autentication for user that is not linked with any staff.
{
"username": "mifos",
"userId": 1,
"base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=",
"authenticated": true,
"officeId": 1,
"officeName": "Head Office",
"roles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
],
"permissions": [
"ALL_FUNCTIONS"
]
}
Example response of autentication for user that is linked with a staff member and role.
{
"username": "mifos",
"userId": 1,
"base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=",
"authenticated": true,
"officeId": 1,
"officeName": "Head Office",
"staffId": 1,
"staffDisplayName": "Director, Program",
"organisationalRole": {
"id": 100,
"code": "staffOrganisationalRoleType.programDirector",
"value": "Program Director"
},
"roles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
],
"permissions": [
"ALL_FUNCTIONS"
]
}
POST authentication?username=mifos&password=fail
Content-Type: application/json
No Request Body
{
"developerMessage": "Invalid authentication details were passed in api request.",
"developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes",
"httpStatusCode": "401",
"defaultUserMessage": "Unauthenticated. Please login.",
"userMessageGlobalisationCode": "error.msg.not.authenticated",
"errors": []
}
Authentication Oauth2
An API capability that allows client applications to fetch current user details details using Oauth2.
Field Descriptions |
accessToken |
HTTP Auth bearer key. See Authentication Overview for an example of its use. |
Authentication via OAuth2
API for requesting OAuth2 access token and refresh token.
Field Descriptions |
grant_type |
Mandatory field. Indicates the requested grant type. Supported values: password. |
client_id |
Mandatory field. Indicates the client application identity. |
client_secret |
Optional field. Indicates the client application password. |
username |
Mandatory field. Application User(resource) login name. |
password |
Mandatory field. Application User(resource) password. |
OAuth2 Refresh and Access Token Request
POST https://DomainName/api/oauth/token?username={username}&password={password}&client_id={clientId}&grant_type={grant_type}&client_secret={client_secret}
POST api/oauth/token?username=mifos&password=password&client_id=community-app&grant_type=password&client_secret=123
Content-Type: application/json
No Request Body
{
""access_token": "b771987f-82fc-45ba-b521-bfe280c4e603",
"token_type": "bearer",
"refresh_token":"a2a89b23-8d22-4d90-8585-8f464db433b0",
"expires_in": 3599,
"scope": "all"
}
Authentication via OAuth2
API for requesting OAuth2 access tokens through oAuth2 refresh tokens.
Field Descriptions |
grant_type |
Mandatory field. Indicates the requested grant type. Supported values: refresh_token. |
client_id |
Mandatory field. Indicates the client application identity. |
client_secret |
Optional field. Indicates the client application password. |
refresh_token |
Mandatory field. Application refresh token to generate access token. |
OAuth2 Token Request through Refresh Token
POST https://DomainName/api/oauth/token?refresh_token={refresh_token}&client_id={clientId}&grant_type={grant_type}&client_secret={client_secret}
POST api/oauth/token?client_id=community-app&grant_type=refresh_token&client_secret=123&refresh_token=a2a89b23-8d22-4d90-8585-8f464db433b0
Content-Type: application/json
No Request Body
{
""access_token": "b771987f-82fc-45ba-b521-bfe280c4e643",
"token_type": "bearer",
"refresh_token":"a2a89b23-8d22-4d90-8585-8f464db433b0",
"expires_in": 3599,
"scope": "all"
}
Fetch authenticated user details
checks the Authentication and returns the set roles and permissions allowed.
POST https://DomainName/api/v1/userdetails?access_token={access_token}
POST userdetails?access_token=bWlmb3M6cGFzc3dvcmQ=
Content-Type: application/json
No Request Body
Example response of authenticated user user that is not linked with any staff.
{
"username": "mifos",
"userId": 1,
"accessToken": "bWlmb3M6cGFzc3dvcmQ=",
"authenticated": true,
"officeId": 1,
"officeName": "Head Office",
"roles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
],
"permissions": [
"ALL_FUNCTIONS"
]
}
Example response of authenticated user that is linked with a staff member and role.
{
"username": "mifos",
"userId": 1,
"accessToken": "bWlmb3M6cGFzc3dvcmQ=",
"authenticated": true,
"officeId": 1,
"officeName": "Head Office",
"staffId": 1,
"staffDisplayName": "Director, Program",
"organisationalRole": {
"id": 100,
"code": "staffOrganisationalRoleType.programDirector",
"value": "Program Director"
},
"roles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
],
"permissions": [
"ALL_FUNCTIONS"
]
}
POST api/oauth/token?username=mifos&password=password&client_id=community-app&grant_type=password&client_secret=123
Content-Type: application/json
No Request Body
{
"developerMessage": "Invalid authentication details were passed in api request.",
"developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes",
"httpStatusCode": "401",
"defaultUserMessage": "Unauthenticated. Please login.",
"userMessageGlobalisationCode": "error.msg.not.authenticated",
"errors": []
}
Users
An API capability to support administration of application users.
Retrieve list of users
Example Requests:
GET https://DomainName/api/v1/users
[
{
"id": 1,
"username": "mifos",
"officeId": 1,
"officeName": "Head Office",
"firstname": "App",
"lastname": "Administrator",
"email": "demomfi@mifos.org",
"passwordNeverExpires": false,
"staff": {
"id": 1,
"firstname": "Test",
"lastname": "123",
"displayName": "123, Test",
"mobileNo": "12312312",
"officeId": 1,
"officeName": "Head Office",
"isLoanOfficer": true,
"isActive": true
}
"selectedRoles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
]
}
]
Retrieve User Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/users/template
{
"allowedOffices": [
{
"id": 1,
"name": "Head Office",
"nameDecorated": "Head Office"
}
],
"availableRoles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
]
}
Retrieve a User
Example Requests:
GET https://DomainName/api/v1/users/{userId}
{
"id": 1,
"username": "mifos",
"officeId": 1,
"officeName": "Head Office",
"firstname": "App",
"lastname": "Administrator",
"email": "demomfi@mifos.org",
"passwordNeverExpires": true,
"staff": {
"id": 1,
"firstname": "Test",
"lastname": "123",
"displayName": "123, Test",
"mobileNo": "12312312",
"officeId": 1,
"officeName": "Head Office",
"isLoanOfficer": true,
"isActive": true
}
"availableRoles": [],
"selectedRoles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
]
}
Create a User
Adds new application user.
Note: Password information is not required (or processed). Password details at present are auto-generated and then sent to the email account given (which is why it can take a few seconds to complete).
Mandatory Fields |
username, firstname, lastname, email, officeId, roles, sendPasswordToEmail |
Optional Fields |
staffId,passwordNeverExpires,isSelfServiceUser,clients |
POST https://DomainName/api/v1/users
POST users
Content-Type: application/json
Request body:
{
"username": "newuser",
"firstname": "Test",
"lastname": "User",
"email": "whatever@mifos.org",
"officeId": 1,
"staffId": 1,
"roles": [2,3],
"sendPasswordToEmail": true
}
{
"officeId": 1,
"resourceId": 11
}
POST users
Content-Type: application/json
Request body:
{
"username": "newuser",
"firstname": "Test",
"lastname": "User",
"email": "whatever@mifos.org",
"officeId": 1,
"staffId": 1,
"roles": [2,3],
"sendPasswordToEmail": false,
"password": "123",
"repeatPassword": "123"
}
{
"officeId": 1,
"resourceId": 12
}
POST https://DomainName/api/v1/users
POST users
Content-Type: application/json
Request body:
{
"username": "newuser",
"firstname": "Test",
"lastname": "User",
"email": "whatever@mifos.org",
"officeId": 1,
"staffId": 1,
"roles": [2,3],
"sendPasswordToEmail": true,
"isSelfServiceUser": true,
"clients": [1,2,3]
}
{
"officeId": 1,
"resourceId": 11
}
Update a User
Note: When updating a password you must provide the repeatPassword parameter also.
PUT https://DomainName/api/v1/users/{userId)
PUT users/3
Content-Type: application/json
Request body:
{
"firstname": "Test",
"password": "window75",
"repeatPassword": "window75"
}
{
"officeId": 1,
"resourceId": 3,
"changes": {
"firstname": "Test",
"passwordEncoded": "abc3326b1bb376351c7baeb4175f5e0504e33aadf6a158474a6d71de1befae51"
}
}
Delete a User
Removes the user and the associated roles and permissions.
DELETE https://DomainName/api/v1/users/{userId}
DELETE users/20
Content-Type: application/json
No Request Body
{
"officeId": 1,
"resourceId": 20,
"changes": {}
}
Roles
An API capability to support management of application roles for user administration.
List Roles
Example Requests:
GET https://DomainName/api/v1/roles
[
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
]
Delete a Role
Description : Delete the role in case role is not associated with any users.
DELETE https://DomainName/api/v1/roles/{roleId}
DELETE roles/20
Content-Type: application/json
No Request Body
{
"resourceId":1
}
Retrieve a Role
Example Requests:
GET https://DomainName/api/v1/roles/{roleId}
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
Create a New Role
Mandatory Fields |
name, description |
POST https://DomainName/api/v1/roles
POST roles
Content-Type: application/json
Request body:
{
"name": "Another Role Name",
"description": "A description outlining the purpose of this role in relation to the application."
}
{ "resourceId": 2}
Update a Role
PUT https://DomainName/api/v1/roles/{roleId}
PUT roles/1
Content-Type: application/json
Request body:
{
"description": "some description(changed)"
}
{
"resourceId": 1,
"changes": {
"description": "some description(changed)"
}
}
Retrieve a Role's Permissions
Example Requests:
GET https://DomainName/api/v1/roles/{roleId}/permissions
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions.",
"permissionUsageData": [
{
"grouping": "authorisation",
"code": "READ_PERMISSION",
"entityName": "PERMISSION",
"actionName": "READ",
"selected": false
},
...
{
"grouping": "transaction_loan",
"code": "WRITEOFF_LOAN_CHECKER",
"entityName": "LOAN",
"actionName": "WRITEOFF",
"selected": false
}
]
}
Enable Role
Description : Enable role in case role is disabled.
POST https://DomainName/api/v1/roles/{roleId}?command=enable
POST roles/1?command=enable
Content-Type: application/json
No Request Body
{
"resourceId":1
}
Disable Role
Description : Disable the role in case role is not associated with any users.
POST https://DomainName/api/v1/roles/{roleId}?command=disable
POST roles/1?command=disable
Content-Type: application/json
No Request Body
{
"resourceId":1
}
Update a Role's Permissions
PUT https://DomainName/api/v1/roles/{roleId}/permissions
PUT roles/8
Content-Type: application/json
Request body:
{
"permissions": {
"ALL_FUNCTIONS_READ": "true"
}
}
{
"resourceId": 8,
"changes": {
"permissions": {
"ALL_FUNCTIONS_READ": true
}
}
}
Permissions
An API capability to support management of application permissions for user administration.
There is no Apache Fineract functionality for creating or deleting permissions. Permissions come pre-installed.
Permissions are not updated, except in the case of enabling or disabling non-read transactions for Maker Checker functionality
List Application Permissions
Arguments
- makerCheckerable
- optional,
Values are true, false. Default is false.
If makerCheckerable=false or not supplied then a list of application permissions is returned. The "selected" attribute is always true in this case.
If makerCheckerable=true then the "selected" attribute shows whether the permission is enabled for Maker Check functionality.
Note: Each Apache Fineract transaction is associated with a permission.
Example Requests:
GET https://DomainName/api/v1/permissions
[
{
"grouping": "authorisation",
"code": "READ_PERMISSION",
"entityName": "PERMISSION",
"actionName": "READ",
"selected": true
},
....
{
"grouping": "transaction_loan",
"code": "WRITEOFF_LOAN",
"entityName": "LOAN",
"actionName": "WRITEOFF",
"selected": true
}
]
Enable/Disable Permissions for Maker Checker
PUT https://DomainName/api/v1/permissions
PUT permissions
Content-Type: application/json
Request Body:
{
"permissions":{
"CREATE_GUARANTOR":true,
"CREATE_CLIENT":true
}
}
Password preferences
This API enables management of password policy for user administration.
There is no Apache Fineract functionality for creating a validation policy. The validation policies come pre-installed.
Validation policies may be updated
List Application Password validation policies
Arguments
Example Requests:
GET https://DomainName/api/v1/passwordpreferences/template
[
{
"id": 1,
"description": "Password must be at least 1 character and not more that 50 characters long",
"active": true,
"key" : "simple"
},
{
"id": 2,
"description": "Password must be at least 6 characters, no more than 50 characters long, must include at least one upper case letter, one lower case letter, one numeric digit and no space",
"active": false,
"key" : "secure"
}
]
GET https://DomainName/api/v1/passwordpreferences/
{
"id": 1,
"description": "Password most be at least 1 character and not more that 50 characters long",
"active": true,
"key" : "simple"
}
Update password preferences
PUT https://DomainName/api/v1/passwordpreferences/
PUT passwordpreferences
Content-Type: application/json
Request Body:
{
"validationPolicyId" : 1,
}
General Ledger Account
Ledger accounts represent an Individual account within an Organizations Chart
Of Accounts(COA) and are assigned a name and unique number by which they can
be identified.
All transactions relating to a company's assets, liabilities, owners' equity,
revenue and expenses are recorded against these accounts
Field Descriptions |
name |
The name of the account |
glCode |
The ledger code associated with the
Account These codes are mandatory and should be unique within an organization |
disabled |
A boolean flag that indicates whether an account is currently in use |
type |
Classifies the account into one of the following Types
Asset: represent the different types of economic resources owned or controlled by business, common examples of Asset accounts are cash, cash in bank, building, inventory, prepaid rent, goodwill, accounts receivable Liability: represent the different types of economic obligations by a business, such as accounts payable, bank loan, bonds payable Income: represent the company's gross earnings and common examples include Interest Income, Sales and Service revenue Expense: represent the company's expenditures to enable itself to operate. Common examples are electricity and water, rentals, depreciation, doubtful accounts, insurance. Equity: represent the residual equity of a business (after deducting from Assets all the liabilities) including Retained Earnings and Appropriations The options are fully listed in Retrieve General Ledger Accounts Template. |
usage |
Determines how the account shall be used "Header" accounts specify the title of a group of accounts. They are used only for grouping together detail accounts that have a similar purpose; that is, detail accounts are assigned to specific header accounts "Detail" accounts may have transactions logged against them The options are fully listed in Retrieve General Ledger Accounts Template. |
manualEntriesAllowed |
Specifies if manual entries can be made against this account using the Create Journal Entries API |
description |
Human understandable description for the Ledger Account |
parentId |
To assign a parent for this GLAccount |
tagId |
Used for tagging the Account Heads, based on GLAccount types. |
List General Ledger Accounts
Arguments
- type
- Integer optional
- manualEntriesAllowed
- boolean optional
- usage
- Integer optional
- disabled
- boolean optional
- parentId
- Long optional
- tagId
- Long optional
Example Requests:
GET https://DomainName/api/v1/glaccounts
[
{
"id": 16,
"name": "Cash",
"parentId": 1,
"glCode": "100001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc",
"nameDecorated": "....Cash",
"tagId": {
"id": 10,
"name": "asset tag"
},
"organizationRunningBalance": 118437,
},
{
"id": 15,
"name": "Fund Source For Loan",
"glCode": "100002",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc",
"organizationRunningBalance": 118437,
}
]
Retrieve GL Accounts Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
type is optional and integer value from 1 to 5.
1.Assets
2.Liabilities
3.Equity
4.Income
5.Expenses
GET https://DomainName/api/v1/glaccounts/template
GET https://DomainName/api/v1/glaccounts/template?type=1
{
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"accountTypeOptions": [
{
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
{
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
{
"id": 3,
"code": "accountType.equity",
"value": "EQUITY"
},
{
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
{
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
}
],
"usageOptions": [
{
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
{
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
}
],
"assetHeaderAccountOptions": [
{
"id": 1,
"name": "Two wheeler loan",
"glCode": "10001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
},
"nameDecorated": "Two wheeler loan",
"tagId": {
"id": 10,
"name": "asset tag"
}
},
{
"id": 2,
"name": "VEHICLE LOAN",
"parentId": 1,
"glCode": "10002",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
},
"nameDecorated": "....VEHICLE LOAN",
"tagId": {
"id": 10,
"name": "asset tag"
}
}
],
"liabilityHeaderAccountOptions": [
{
"id": 15,
"name": "liabilitieschild",
"glCode": "ltchild",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"usage": {
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
},
"nameDecorated": "liabilitieschild",
"tagId": {
"id": 11,
"name": "liability tag"
}
}
],
"equityHeaderAccountOptions": [
{
"id": 13,
"name": "testajax",
"glCode": "12345678",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 3,
"code": "accountType.equity",
"value": "EQUITY"
},
"usage": {
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
},
"nameDecorated": "testajax",
"tagId": {
"id": 12,
"name": "Equity tag"
}
}
],
"expenseHeaderAccountOptions": [
{
"id": 8,
"name": "Salary",
"glCode": "450098",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 5,
"code": "accountType.expense",
"value": "EXPENSE"
},
"usage": {
"id": 2,
"code": "accountUsage.header",
"value": "HEADER"
},
"nameDecorated": "Salary",
"tagId": {
"id": 14,
"name": "Expenses Tag"
}
}
],
"allowedAssetsTagOptions": [
{
"id": 10,
"name": "asset tag",
"position": 0
}
],
"allowedLiabilitiesTagOptions": [
{
"id": 11,
"name": "liability tag",
"position": 0
}
],
"allowedEquityTagOptions": [
{
"id": 12,
"name": "Equity tag",
"position": 0
}
],
"allowedIncomeTagOptions": [
{
"id": 13,
"name": "Income Tag",
"position": 0
}
],
"allowedExpensesTagOptions": [
{
"id": 14,
"name": "Expenses Tag",
"position": 0
}
]
}
Retrieve a General Ledger Account
Example Requests:
GET https://DomainName/api/v1/glaccounts/{glaccountsId}
{
"id": 1,
"name": "Cash",
"glCode": "100001",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset1",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Desc",
"organizationRunningBalance": 118437,
}
Create a General Ledger Account
Note: You may optionally
create Hierarchical Chart of Accounts by using the "parentId"
property of an Account
Mandatory Fields |
name, glCode, type, usage and manualEntriesAllowed |
POST https://DomainName/api/v1/glaccounts
POST glaccounts
Content-Type: application/json
Request Body:
{
"name": "Cash at Bangalore",
"glCode": "100017",
"manualEntriesAllowed": true,
"type": 1,
"tagId": "10",
"parentId": "18",
"usage": 1,
"description": "Cash at Bangalore Branch"
}
{
"resourceId": 22
}
Update a General Ledger Account
PUT https://DomainName/api/v1/glaccounts/{glaccountId}
PUT glaccounts/22
Content-Type: application/json
Request Body:
{
"name": "Cash at Bangalore rural"
}
{
"resourceId": 22,
"changes": {
"name": "Cash at Bangalore rural"
}
}
PUT glaccounts/1
Content-Type: application/json
Request Body:
{
"disabled": true
}
{
"resourceId": 1,
"changes": {
"disabled": true
}
}
Delete a General Ledger Account
Note: Only Ledger Accounts against which no transactions have been logged (either manually or by the loan or Savings portfolio) can be deleted.
DELETE https://DomainName/api/v1/glaccounts/{glaccountId}
DELETE glaccounts/1
Content-Type: application/json
No Request Body:
{
"resourceId": 1,
"changes": {}
}
Accounting Closure
An accounting closure indicates that no more journal entries may be logged (or reversed) in the system, either manually or via the portfolio with an entry date prior to the defined closure date
Field Descriptions |
closingDate |
The date for which the accounting closure is defined |
officeId |
The identifer of the branch for which accounting has been closed |
comments |
Description associated with an Accounting closure |
List Accounting closures
Example Requests:
GET https://DomainName/api/v1/glclosures
[
{
"id": 7,
"officeId": 1,
"officeName": "Head Office",
"closingDate": [
2013,
1,
2
],
"deleted": false,
"createdDate": [
2013,
1,
3
],
"lastUpdatedDate": [
2013,
1,
3
],
"createdByUserId": 1,
"createdByUsername": "mifos",
"lastUpdatedByUserId": 1,
"lastUpdatedByUsername": "mifos",
"comments": "closed",
},
{
"id": 6,
"officeId": 1,
"officeName": "Head Office",
"closingDate": [
2012,
12,
13
],
"deleted": false,
"createdDate": [
2012,
12,
14
],
"lastUpdatedDate": [
2012,
12,
14
],
"createdByUserId": 1,
"createdByUsername": "mifos",
"lastUpdatedByUserId": 1,
"lastUpdatedByUsername": "mifos",
"comments": "hello",
}
]
Retrieve an Accounting Closure
Example Requests:
GET https://DomainName/api/v1/glclosures/{glclosureId}
{
"id": 7,
"officeId": 1,
"officeName": "Head Office",
"closingDate": [
2013,
1,
2
],
"deleted": false,
"createdDate": [
2013,
1,
3
],
"lastUpdatedDate": [
2013,
1,
3
],
"createdByUserId": 1,
"createdByUsername": "mifos",
"lastUpdatedByUserId": 1,
"lastUpdatedByUsername": "mifos",
"comments": "closed",
}
Create an Accounting Closure
Mandatory Fields |
officeId,closingDate |
POST https://DomainName/api/v1/glclosures
POST glclosures
Content-Type: application/json
Request Body:
{
"officeId": 1,
"closingDate": "06 December 2012",
"comments": "The accountants are heading for a carribean vacation",
"locale": "en" ,
"dateFormat": "dd MMMM yyyy"
}
{
"officeId": 1,
"resourceId": 9
}
Update an Accounting closure
Once an accounting closure is created, only the comments associated with it may be edited
PUT https://DomainName/api/v1/glclosures/{glclosureId}
PUT glclosures/1
Content-Type: application/json
Request Body:
{
"comments": "All transactions verified by Johnny Cash"
}
{
"officeId": 1,
"resourceId": 1,
"changes": {
"comments": "All transactions verified by Johnny Cash"
}
}
Delete an accounting closure
Note: Only the latest accounting closure associated with a branch may be deleted.
DELETE https://DomainName/api/v1/glclosures/{glclosureId}
DELETE glclosures/1
Content-Type: application/json
No Request Body:
{
"officeId": 1,
"resourceId": 1
}
Journal Entries
A journal entry refers to the logging of
transactions against general ledger accounts. A journal
entry may consist of several line items, each of which is either a "debit" or a "credit". The total amount of the
debits must equal the total amount of the credits or the
journal entry is said to be "unbalanced"
A journal entry directly changes the account balances on
the general ledger
Field Descriptions |
officeId |
The identifier of the office ( cost center) at which the financial activity occured |
currencyCode |
A three letter ISO code of currency. |
glAccountId |
The identifier of the account ( Ledger Account) against which this journal entry was made |
transactionDate |
The target date for which this entry was recorded |
amount |
The Monetary amount associated with this entry |
comments |
A description associated with this entry |
entryType |
Either a Credit(1) or a Debit(2) |
transactionId |
A unique Identifier for a set
of related Credit and Debit entries that make up
a "balanced" jounral Entry. For a manual entry,
this feild is a unique string. For a system generated entry, the combination of transactionId and entityId is unique |
manualEntry |
Flag determines if an entry is generated by the portfolio (posted automatically by the system during the lifecycle of loan or saving products) or manually created by using the Create (Balanced) Journal Entries API |
reversed |
Flag determines if this manual
journal entry has been reversed using the Reverse a Journal Entry
API. Note: A journal entry is reversed by logging debits for all credits that make up the Journal entry and vice-versa |
referenceNumber |
An additional field that is used to store additional information about the entry (Ex: chequeNo) |
accountingRule |
Denotes the accounting rule id for posting journal entries. |
officeRunningBalance |
Describes office balance after the journal entry for the Ledger Account. |
organizationRunningBalance |
Describes complete organization balances after the journal entry for the Ledger Account. |
runningBalanceComputed |
Describes whether account balances computed for the journal entry. |
transactionDetails |
Additional details of transaction like payment details and notes . |
paymentTypeId |
Maps to a Code value of a system defined Code with the name "PaymentType". This is used to optionally identify the mode of payment (Ex: checks, Cash etc) associated with a Journal Entry |
accountNumber, checkNumber, routingCode, receiptNumber, bankNumber |
Various properties associated with a payment type |
List Journal Entries
The list capability of journal entries can support pagination and sorting.
Optional Arguments
- offset
- Integer optional, defaults to 0
- Indicates from what result to start from.
- limit
- Integer optional, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- orderBy
- String optional, one of displayName, accountNo, officeId, officeName
- Orders the results by the field indicated.
- sortBy
- String optional, one of ASC, DESC
- Indicates what way to order results if orderBy is used.
- officeId
- Integer optional
- Provides ability to restrict list of centers returned based on the office there associated with.
- glAccountId
- Integer optional
- manualEntriesOnly
- Boolean optional
- Flag determines if only manually created journal entries
are to be returned( journal entries created by
the system during lifecycle of loan or saving
products etc shall be excluded)
Set to "false" by default if not passed in explicity - fromDate
- Dateoptional
- Filters for Journal entries whose entry Date is greater than or equal to the passed in Date
- toDate
- Date optional
- Filters for Journal entries whose entry Date is lesser than or equal to the passed in Date
- transactionId
- String optional
- transactionDetails
- Boolean optional
- Flag determines if additional transactional details to be returned(like payment details and notes).
- runningBalance
- Boolean optional
- Flag determines whether running balances to be returned
- loanId
- Integer optional
- Provides ability to restrict journal entries based on the loan they are associated with
- savingsId
- Integer optional
- Provides ability to restrict journal entries based on the savings account they are associated with
Example Requests:
GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
{
"totalFilteredRecords": 24,
"pageItems": [
{
"id": 1,
"officeId": 1,
"officeName": "Head Office",
"glAccountName": "ACCOUNT_NAME_WTYRB",
"glAccountId": 98,
"glAccountCode": "ASSET_C01367768735188",
"glAccountType": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"transactionDate": [
2011,
3,
4
],
"entryType": {
"id": 2,
"code": "journalEntrytType.debit",
"value": "DEBIT"
},
"amount": 10000,
"transactionId": "33",
"manualEntry": false,
"entityType": {
"id": 1,
"code": "productType.loan",
"value": "LOAN"
},
"entityId": 7,
"createdByUserId": 1,
"createdDate": [
2013,
5,
5
],
"createdByUserName": "mifos",
"reversed": false,
},
{
"id": 2,
"officeId": 1,
"officeName": "Head Office",
"glAccountName": "ACCOUNT_NAME_WTYRB",
"glAccountId": 98,
"glAccountCode": "ASSET_C01367768735188",
"glAccountType": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"transactionDate": [
2011,
3,
4
],
"entryType": {
"id": 1,
"code": "journalEntryType.credit",
"value": "CREDIT"
},
"amount": 10000,
"transactionId": "33",
"manualEntry": false,
"entityType": {
"id": 1,
"code": "productType.loan",
"value": "LOAN"
},
"entityId": 7,
"createdByUserId": 1,
"createdDate": [
2013,
5,
5
],
"createdByUserName": "mifos",
"reversed": false,
}
]
}
Create "Balanced" Journal Entries
Note: A Balanced (simple) Journal entry would
have atleast one "Debit" and one "Credit" entry whose
amounts are equal
Compound Journal entries may have "n" debits and "m"
credits where both "m" and "n" are greater than 0
and the net sum or all debits and credits are equal
Mandatory Fields |
officeId, transactionDate |
credits |
Details of the credits contained
in the journal entry. Each credit entry contains
the following items glAccountId: Identifier of the general ledger account against which the credit entry shall be made amount: Amount of money credited comments: Optional description associated with a credit entry . |
debits |
Details of the debits contained
in the journal entry. Each debit entry contains the
following items glAccountId: Identifier of the general ledger account against which the debit entry shall be made amount: Amount of money debited comments: Optional description associated with a debit entry . |
Optional Fields |
paymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber |
POST https://DomainName/api/v1/journalentries
POST journalentries
Content-Type: application/json
Request Body:
{
"officeId": 1,
"transactionDate": "06 December 2012",
"comments": "Gifts for staff",
"locale": "en" ,
"currencyCode": "USD",
"dateFormat": "dd MMMM yyyy",
"credits":[{"glAccountId":1,
"amount":5000},
{"glAccountId":2,
"amount":5000}
],
"debits":[{"glAccountId":3,
"amount":5000},
{"glAccountId":4,
"amount":5000}
],
"paymentTypeId": "12",
"accountNumber": "accno123",
"checkNumber": "chec123",
"routingCode": "rou123",
"receiptNumber": "rec123",
"bankNumber": "ban123"
}
{
"officeId": 1,
"transactionId": "DNEEMS2LPD0NJ9O"
}
POST https://DomainName/api/v1/journalentries
POST journalentries
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"officeId": "1",
"transactionDate": "23 May 2013",
"referenceNumber": "547",
"currencyCode": "USD",
"comments": "asdf",
"accountingRule": "2",
"amount": "547"
}
{
"officeId":1,
"transactionId":"RS9MCISID4WK1ZM"
}
POST https://DomainName/api/v1/journalentries
POST journalentries
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"officeId": "1",
"transactionDate": "23 May 2013",
"referenceNumber": "547",
"comments": "asdf",
"accountingRule": "2",
"credits":[{"glAccountId":1,
"amount":5000},
{"glAccountId":2,
"amount":5000}
],
"debits":[{"glAccountId":3,
"amount":5000},
{"glAccountId":4,
"amount":5000}
]
}
{
"officeId":1,
"transactionId":"RS9MCISID4WK1ZM"
}
POST https://DomainName/api/v1/journalentries
POST journalentries
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"officeId": "1",
"transactionDate": "23 May 2013",
"referenceNumber": "547",
"comments": "asdf",
"accountingRule": "3",
"credits":[{"glAccountId":1,
"amount":5000},
{"glAccountId":2,
"amount":5000}
],
"amount": "10000"
}
{
"officeId":1,
"transactionId":"RS9MCISID4WK1ZM"
}
Update Running balances for Journal Entries
This API calculates the running balances for office. If office ID not provided this API calculates running balances for all offices.
Mandatory Fields |
officeId |
POST https://DomainName/api/v1/journalentries?command=updateRunningBalance
POST journalentries?command=updateRunningBalance
Content-Type: application/json
Request Body:
{
"officeId": 1,
}
{
"officeId": 1,
}
Retrieve a single Entry
Example Requests:
GET https://DomainName/api/v1/journalentries/{entryId}
{
"id": 1,
"officeId": 2,
"officeName": "sub branch 1",
"glAccountName": "Income from interest",
"glAccountId": 14,
"glAccountCode": "400001",
"glAccountType": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"transactionDate": [
2012,
11,
2
],
"entryType": {
"id": 1,
"code": "journalEntryType.credit",
"value": "CREDIT"
},
"amount": 900,
"transactionId": "13",
"manualEntry": true,
"createdByUserId": 1,
"createdDate": [
2012,
11,
2
],
"createdByUserName": "mifos",
"reversed": false,
}
Reverse a Journal Entry
Note: A journal entry is reversed by logging debits for all credits that constitute the Journal entry and vice-versa. The transactionId of the "reversal Entry" is returned as the methods response
Arguments
- command
- String Mandatory, case-insensitive
- 'reverse' : Reverse the Journal Entry
Optional Arguments
- comments
- String optional
- Optional string to be applied as a comment for the created reversal entry, default comment is used if this field is not supplied
GET https://DomainName/api/v1/journalentries/{transactionId}?command=reverse
POST journalentries/C1MAE935K0IAEYA?command=reverse
Content-Type: application/json
{
"transactionId": "YFDYMPBVVI9TRJP"
}
Mapping Financial Activities to Accounts
Organization Level Financial Activities like Asset and Liability Transfer can be mapped to GL Account. Integrated accounting takes these accounts into consideration when an Account transfer is made between a savings to loan/savings account and vice-versa
Field Descriptions |
financialActivityId |
The identifier of the Financial Activity |
glAccountId |
The identifier of a GL Account ( Ledger Account) which shall be used as the default account for the selected Financial Activity |
List Financial Activities to Accounts Mappings
Example Requests:
GET https://DomainName/api/v1/financialactivityaccounts
[
{
"id": 1,
"financialActivityData": {
"id": 200,
"name": "liabilityTransfer",
"mappedGLAccountType": "LIABILITY"
},
"glAccountData": {
"id": 55,
"name": "Liability Transfer (Temp)",
"glCode": "220004-Temp"
}
},
{
"id": 2,
"financialActivityData": {
"id": 100,
"name": "assetTransfer",
"mappedGLAccountType": "ASSET"
},
"glAccountData": {
"id": 33,
"name": "Petty Cash",
"glCode": "20302"
}
}
]
Create a new Financial Activity to Accounts Mapping
Mandatory Fields |
financialActivityId, glAccountId |
POST https://DomainName/api/v1/financialactivityaccounts
POST financialactivityaccounts
Content-Type: application/json
Request Body:
{
"financialActivityId": 200,
"glAccountId":2
}
{
"resourceId": 1
}
Update a Financial Activity to Account Mapping
the API updates the Ledger account linked to a Financial Activity
PUT https://DomainName/api/v1/financialactivityaccounts/{financialactivityaccountId}
PUT financialactivityaccounts
Content-Type: application/json
Request Body:
{
"financialActivityId": 200,
"glAccountId":3
}
{
"resourceId": 2,
"changes": {
"glAccountId": 3
}
}
Retrieve a Financial Activity to Account Mapping
Example Requests:
GET https://DomainName/api/v1/financialactivityaccounts/{financialactivityaccountId}
{
"id": 1,
"financialActivityData": {
"id": 200,
"name": "liabilityTransfer",
"mappedGLAccountType": "LIABILITY"
},
"glAccountData": {
"id": 55,
"name": "Liability Transfer (Temp)",
"glCode": "220004-Temp"
}
}
Delete a Financial Activity to Account Mapping
DELETE https://DomainName/api/v1/financialactivityaccounts/{financialactivityaccountId}
DELETE financialactivityaccounts/1?
Content-Type: application/json
{
"resourceId": "2"
}
Periodic Accrual Accounting
Periodic Accrual is to accrue the loan income till the specific date or till batch job scheduled time.
Field Descriptions |
tillDate |
which specifies periodic accruals should happen till the given Date |
Executes Periodic Accrual Accounting
Mandatory Fields |
tillDate |
POST https://DomainName/api/v1/runaccruals
POST financialactivityaccounts
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"tillDate":"04 June 2014"
}
Provisioning Entries
This defines the Provisioning Entries for all active loan products
Field Descriptions |
date |
Date on which day provisioning entries should be created |
createjournalentries |
Boolean variable whether to add journal entries for generated provisioning entries |
Create new Provisioning Entries
Creates a new Provisioning Entries
Mandatory Fields |
date |
dateFormat |
locale |
Optional Fields |
createjournalentries |
POST https://DomainName/api/v1/provisioningentries
POST provisioningentries
Content-Type: application/json
Request Body:
{
"date":"16 October 2015",
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"createjournalentries":true
}
{
"resourceId": 1
}
List all Provisioning Entries
List all Provisioning Entries
GET https://DomainName/api/v1/provisioningentries
GET provisioningentries
Content-Type: application/json
Request Body:
{
}
{[
{"id":1, "journalEntry":true, "createdUser":"mifos", "createdDate":"16 October 2014"},
{"id":2, "journalEntry":true, "createdUser":"mifos", "createdDate":"16 October 2015"}
]
}
Retrieves a Provisioning Entry
Returns the details of a generated Provisioning Entry.
GET https://DomainName/api/v1/provisioningentries/{privisioningEntryId}
GET provisioningentries
Content-Type: application/json
Request Body:
{
}
{
"id":1,
"journalEntry":true,
"createdUser":"mifos",
"createdDate":"16 October 2014",
"provisioningEntries":[
{"historyId":1,
"officeId:":1
"officeName:":"Head Office",
"currencyCode:":"USD",
"productId:":12,
"productName:":"Loan Product Name1",
"categoryId":4,
"categoryName":"LOSS",
"amountReserved":63098.29,
"liabilityAccount":4,
"liabilityCode":"Liability Account Name",
"expenseAccount":6,
"expenseCode":"Expense Account Name"
},
{"id":2,
"journalEntry":true,
"createdUser":"mifos",
"createdDate":"16 October 2014",
"provisioningEntries":[
{"historyId":1,
"officeId:":2
"officeName:":"Branch Office",
"currencyCode:":"USD",
"productId:":12,
"productName:":"Loan Product Name1",
"categoryId":2,
"categoryName":"SUB-STANDARD",
"amountReserved":63098.29,
"liabilityAccount":1,
"liabilityCode":"Liability Account Name",
"expenseAccount":2,
"expenseCode":"Expense Account Name"
}
]
}
Recreates Provisioning Entry
Recreates Provisioning Entry.
POST https://DomainName/api/v1/provisioningentries/{privisioningEntryId}?command=recreateprovisioningentry
POST provisioningentries
Content-Type: application/json
Request Body:
{
"command":"recreateprovisioningentry"
}
{
"resourceId": 1
}
Retrieves a Provisioning Entry
Returns the details of a generated Provisioning Entry.
POST https://DomainName/api/v1/provisioningentries/{privisioningEntryId}?command=createjournalentry
POST provisioningentries
Content-Type: application/json
Request Body:
{
"command":"createjournalentry"
}
{
"resourceId": 1
}
Search
Search API allows to search scoped resources clients, loans and groups on specified fields.
Scoped Resources |
Scoped fields |
Client | Display Name |
Account Number | |
External Id | |
Loan | Account Number |
Client Identifiers | Document Key |
Group | Name |
Account Number | |
External Id |
Search Resources
Example Requests:
Parameters |
Description |
query
(mandatory) |
String which is searched on scoped resources |
resource
(non-mandatory) |
Scoped resources on which search can be performed. If there is no resource parameter passed then search will be performed on all scoped resources. |
exactMatch
(non-mandatory) |
Scoped resources on which search can be performed. If there is no exactMatch parameter passed then search will be performed for all partial matches scoped resources. |
Order of Search results |
List exact match results in following order
|
List partial match results in following order
|
GET https://DomainName/api/v1/search?query=000000111
[
{
"entityId": 111,
"entityAccountNo": "000000111",
"entityName": "12-A Flat Loan",
"entityType": "LOAN",
"parentId": 65,
"parentName": "aaaa aaaaa",
"parentType": "client"
}
]
GET https://DomainName/api/v1/search?query=000000001&exactMatch=true
[{
"entityId": 1,
"entityAccountNo": "000000001",
"entityExternalId": "ID_JKZGEXF",
"entityName": "Group_Name_HVCU5",
"entityType": "GROUP",
"parentId": 1,
"parentName": "Head Office",
"entityStatus": {
"id": 300,
"code": "groupingStatusType.active",
"value": "Active"
}
},
{
"entityId": 1,
"entityAccountNo": "000000001",
"entityExternalId": "ID_UOZAGPZ",
"entityName": "Client_FirstName_KJ5B6 Client_LastName_KDGX",
"entityType": "CLIENT",
"parentId": 1,
"parentName": "Head Office",
"entityStatus": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
}
}]
Advance Search
AdHoc Query search supported parameters and field descriptions
Field Descriptions |
entities |
Entities to be included for search.(presently support added only for loans) |
loanStatus |
Loan status values to be included for search. Supported loan status:["all","active","overpaid","closed","writeoff"] |
loanProducts |
Array of loanproduct ids. |
offices |
Array of office ids. |
loanDateOption |
Date condition name for search query. Supported values "approvalDate" or "createdDate" or "disbursalDate". |
loanFromDate |
Start date for 'loanDateOption' in 'yyyy-MM-dd' format. |
loanToDate |
End date for 'loanDateOption' in 'yyyy-MM-dd' format. |
includeOutStandingAmountPercentage |
It is a Boolean value, allows to search percentage of loan outstanding amount with in a given range |
outStandingAmountPercentageCondition |
Condition type for outstanding amount percentage.
Supported values: between or <= or >= or < or > or = When 'outStandingAmountPercentageCondition' is between required fields minOutStandingAmountPercentage and maxOutStandingAmountPercentage |
minOutStandingAmountPercentage |
Minimum percentage of outstanding amount. Mandatory when 'outStandingAmountPercentageCondition' type is 'between' |
maxOutStandingAmountPercentage |
Maximum percentage of outstanding amount. Mandatory when 'outStandingAmountPercentageCondition' type is 'between' |
outStandingAmountPercentage |
Percentage of outstanding amount for search. Mandatory when 'outStandingAmountPercentageCondition' type is otherthan 'between' |
includeOutstandingAmount |
Boolean value, allows user to search loan outstanding amount with in a given range |
outstandingAmountCondition |
Condition type to search outstanding amount.
Supported values: between or <= or >= or < or > or = When 'outstandingAmountCondition' is between required fields minOutStandingAmount and maxOutStandingAmount |
minOutStandingAmount |
Minimum value of outstanding amount for outstandingAmountCondition type between. Mandatory when 'outstandingAmountCondition' type is 'between' |
maxOutStandingAmount |
Maximum value of outstanding amount for outstandingAmountCondition type between. Mandatory when 'outstandingAmountCondition' type is 'between' |
outStandingAmount |
Default value of outstanding amount for search. Mandatory when 'outstandingAmountCondition' type is otherthan 'between' |
AdHoc Query Search
AdHocQuery search has more search options, it is a POST request, it uses request body to send search parameters
Mandatory Fields |
entities |
Optional Fields |
loanStatus, loanProducts, offices, loanDateOption, loanFromDate, loanToDate, includeOutStandingAmountPercentage, outStandingAmountPercentageCondition, minOutStandingAmountPercentage and maxOutStandingAmountPercentage OR outStandingAmountPercentage, includeOutstandingAmount, outstandingAmountCondition, minOutstandingAmount and maxOutstandingAmount OR outstandingAmount |
POST https://DomainName/api/v1/search/advance
POST search/advance
Content-Type: application/json Request Body:
{
"locale": "en",
"dateFormat": "yyyy-MM-dd",
"entities": ["loans"],
"loanStatus": ["all","active","overpaid"],
"loanProducts": ["65","97","73","82"],
"offices": ["1","10","100"],
"loanDateOption": "approvalDate",
"loanFromDate": "2013-01-01",
"loanToDate": "2014-01-27",
"includeOutStandingAmountPercentage": true,
"outStandingAmountPercentageCondition": "<=",
"outStandingAmountPercentage": "80",
"includeOutstandingAmount": true,
"outstandingAmountCondition": "between",
"minOutstandingAmount": "100",
"maxOutstandingAmount": "10000"
}
[{
"officeName": "HFC",
"loanProductName": "01 BC3M",
"count": 86,
"loanOutStanding": 5692.41,
"percentage": 76.4
},
{
"officeName": "keithoffice",
"loanProductName": "IGL",
"count": 3,
"loanOutStanding": 4168.23,
"percentage": 56.9
},
{
"officeName": "Rio",
"loanProductName": "IGL",
"count": 1,
"loanOutStanding": 1681.12,
"percentage": 55.56
}]
Interest Rate Chart
This defines an interest rate scheme that can be associated to a term deposit product. This will have a slab (band or range) of deposit periods and the associated interest rates applicable along with incentives for each band.
Field Descriptions |
name |
Name of the interest rate chart. |
description |
Description of Interest rate chart. |
fromDate |
Date from when the chart is valid. The fromDate is mandatory and used to find out applicable interest rate chart for Accounts creation (FD & RD accounts). There should not be any overlapping of fromDate and endDate of charts for a product. |
endDate |
Validity end date of the chart. This is optional, if not provided means it is the current chart applicable. |
Create a Chart
Creats a new chart which can be attached to a term deposit products (FD or RD).
Mandatory Fields |
fromDate |
Optional Fields |
name, description and endDate |
POST https://DomainName/api/v1/interestratecharts
POST interestratecharts
Content-Type: application/json
Request Body:
{
"name": "Chart - 2014",
"description": "This chart is applicable for year 2014",
"type": "Document",
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"fromDate": "01 Jan 2014"
}
{
"resourceId": 1
}
Retrieve all Charts
Retrieve list of charts associated with a term deposit product(FD or RD).
Arguments
- productId
- Integer mandatory
- Retrieves Interest rate charts to a deposit product.
Example Requests:
GET https://DomainName/api/v1/interestratecharts?productId={productId)
[
{
"id": 1,
"fromDate": [
2014,
1,
1
],
"savingsProductId": 1,
"savingsProductName": "Fixed Deposit Product 001",
"chartSlabs": [
{
"id": 1,
"periodType": {
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
"fromPeriod": 1,
"annualInterestRate": 6,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
]
}
]
Retrieve a Chart
Example Requests:
GET https://DomainName/api/v1/interestratecharts/{chartId}
{
"id": 1,
"fromDate": [
2014,
1,
1
],
"savingsProductId": 1,
"savingsProductName": "Fixed Deposit Product 001",
"chartSlabs": [
{
"id": 1,
"periodType": {
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
"fromPeriod": 1,
"annualInterestRate": 6,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
]
}
Update a Chart
PUT https://DomainName/api/v1/interestratecharts/{chartId}
PUT interestratecharts/1
Content-Type: application/json
Request Body:
{
"name": "Interest rate chart for 2014",
"description": "Interest rate chart for 2014",
}
{
"resourceId": 1
}
Delete a Chart
DELETE https://DomainName/api/v1/interestratecharts/{chartId}
DELETE interestratecharts/1
Content-Type: application/json
No Request Body:
{
"resourceId": 1
}
Retrieve Chart Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for creating a chart. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Example Request:
GET https://DomainName/api/v1/interestratecharts/template
{
"periodTypes": [
{
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
{
"id": 1,
"code": "interestChartPeriodType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "interestChartPeriodType.months",
"value": "Months"
},
{
"id": 3,
"code": "interestChartPeriodType.years",
"value": "Years"
}
]
}
Interest Rate Slab (A.K.A interest bands)
The slabs a.k.a interest bands are associated with Interest Rate Chart. These bands allow to define different interest rates for different deposit term periods.
Field Descriptions |
periodType |
The period type is used to define the different deposit term intervals. 0=Daily, 1=Weekly, 2=Monthly, 3=Yearly |
fromPeriod |
Start of the period for defining deposit term interval.
e.g. for 1 day to 180 days applicable interest rate is 5% then startPeriod=1, endPeriod=180 and periodType=0 |
toPeriod |
End of the period for defining deposit term interval.
e.g. for 1 day to 180 days applicable interest rate is 5% |
annualInterestRate |
The applicable annual interest rate for defined term interval |
description |
provide a description about the slab. |
incentives |
Represents incentives on interest for a perticular period. |
Create a Slab
Creats a new interest rate slab for an interest rate chart.
Mandatory Fields |
periodType, fromPeriod, annualInterestRate |
Optional Fields |
toPeriod and description |
Example Requests:
POST https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs
POST interestratecharts/{chartId}/chartslabs
Content-Type: application/json
Request Body:
{
"periodType": "0",
"fromPeriod": "1",
"toPeriod": "180",
"annualInterestRate": "5",
"description": "5% interest from 1 day till 180 days of deposit",
"locale":"en",
"incentives":[{
"entityType":"2",
"attributeName":2,
"conditionType":2,
"attributeValue":11,
"incentiveType":3,
"amount":"-1"
}]
}
{
"resourceId": 1
}
Retrieve all Slabs
Retrieve list of slabs associated with a chart
Example Requests:
GET https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs
[
{
"id": 1,
"description": "5% interest from 1 day till 180 days of deposit",
"periodType": {
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
"fromPeriod": 1,
"toPeriod": 180,
"annualInterestRate": 5,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"incentives":[{
"id":1,
"entityType":{"id":2,"code":"InterestIncentiveEntityType.customer","value":"Customer"},
"attributeName":{"id":2,"code":"InterestIncentiveAttributeName.gender","value":"Gender"}, "conditionType":{"id":2,"code":"incentiveConditionType.equal","value":"equal"},
"attributeValue":"11","attributeValueDesc":"FEMALE",
"incentiveType":{"id":3,"code":"InterestIncentiveType.incentive","value":"Incentive"},
"amount":-1.000000
}]
}
]
Retrieve a Slab
Retrieve a slab associated with an Interest rate chart
Example Requests:
GET https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId}
{
"id": 1,
"description": "changed to 6% interest ",
"periodType": {
"id": 0,
"code": "interestChartPeriodType.days",
"value": "Days"
},
"fromPeriod": 1,
"toPeriod": 180,
"annualInterestRate": 6,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"incentives":[{
"id":1,
"entityType":{"id":2,"code":"InterestIncentiveEntityType.customer","value":"Customer"},
"attributeName":{"id":2,"code":"InterestIncentiveAttributeName.gender","value":"Gender"}, "conditionType":{"id":2,"code":"incentiveConditionType.equal","value":"equal"},
"attributeValue":"11","attributeValueDesc":"FEMALE",
"incentiveType":{"id":3,"code":"InterestIncentiveType.incentive","value":"Incentive"},
"amount":-1.000000
}]
}
Update a Slab
PUT https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId}
PUT interestratecharts/1/chartslabs/1
Content-Type: application/json
Request Body:
{
"annualInterestRate": "6",
"description": "Interest rate changed to 6%",
}
{
"resourceId": 1,
"changes": {
"description": "Interest rate changed to 6%",
"annualInterestRate": 6
}
}
Delete a Slab
Delete a Slab from a chart
DELETE https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId}
DELETE interestratecharts/1/chartslabs/1
Content-Type: application/json
No Request Body:
{
"resourceId": 1
}
Teller Cash Management
Teller cash management which will allow an organization to manage their cash transactions at branches or head office more effectively.
List all tellers
Retrieves list tellers.
GET https://DomainName/api/v1/tellers
[
{
"id": 3,
"officeId": 1,
"debitAccountId": 0,
"creditAccountId": 0,
"name": "Teller3",
"description": "cash handling",
"startDate": [
2015,
2,
1
],
"status": "ACTIVE",
"officeName": "Head Office"
},
{
"id": 2,
"officeId": 1,
"debitAccountId": 0,
"creditAccountId": 0,
"name": "Teller2",
"description": "abcc",
"startDate": [
2015,
2,
19
],
"endDate": [
2015,
3,
30
],
"status": "ACTIVE",
"officeName": "Head Office"
},
{
"id": 1,
"officeId": 1,
"debitAccountId": 0,
"creditAccountId": 0,
"name": "Teller1",
"description": "abc",
"startDate": [
2015,
2,
20
],
"status": "ACTIVE",
"officeName": "Head Office"
},
{
"id": 4,
"officeId": 2,
"debitAccountId": 0,
"creditAccountId": 0,
"name": "Teller4",
"description": "cash handling",
"startDate": [
2015,
2,
1
],
"status": "ACTIVE",
"officeName": "Office1"
}
]
Create teller
Mandatory Fields |
Teller name, OfficeId, Description, Start Date, Status |
Optional Fields |
End Date |
POST https://DomainName/api/v1/tellers
POST tellers
Content-Type: application/json
Request Body:
{
"officeId":2,
"name":"Teller4",
"description":"cash handling",
"status":300,
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"startDate":"01 February 2015"
}
{
"officeId": 2,
"resourceId": 5
}
Retrieve tellers
GET https://DomainName/api/v1/tellers/5
{
"id": 5,
"officeId": 2,
"debitAccountId": 0,
"creditAccountId": 0,
"name": "Teller5",
"description": "cash handling",
"startDate": [
2015,
2,
1
],
"status": "ACTIVE",
"officeName": "Office1"
}
Update teller
PUT https://DomainName/api/v1/tellers/{tellerId}
PUT tellers/5
Content-Type: application/json
Request Body:
{
"name":"Teller5",
"officeId":2,
"description":"teller cash handling",
"status":300,
"endDate":"28 February 2015",
"startDate":"01 February 2015",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
{
"officeId":2,
"resourceId":5,
"changes":{
"description":"teller cash handling",
"endDate":"28 February 2015",
"dateFormat":"dd MMMM yyyy",
"locale":"en"
}
}
List Cashiers
GET https://DomainName/api/v1/tellers/{tellerId}/cashiers
{
"tellerId": 1,
"tellerName": "Teller1",
"officeId": 1,
"officeName": "Head Office",
"cashiers": [
{
"id": 1,
"tellerId": 1,
"staffId": 1,
"description": "",
"startDate": "Feb 20, 2015 12:00:00 AM",
"endDate": "Feb 27, 2015 12:00:00 AM",
"isFullDay": true,
"startTime": "",
"endTime": "",
"tellerName": "Teller1",
"staffName": "Staff1, Test"
}
]
}
Create Cashiers
Mandatory Fields |
Cashier/staff, Fromm Date, To Date, Full Day or From time and To time |
Optional Fields |
Description/Notes |
POST https://DomainName/api/v1/tellers/{tellerId}/cashiers
POST tellers/1/cashiers
{
"endDate":"28 February 2015",
"description":"Cashier created",
"isFullDay":true,
"staffId":3,
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"startDate":"01 February 2015"
}
{
"resourceId":1,
"subResourceId":2
}
Retrieve a cashier
GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}
{
"id": 1,
"tellerId": 1,
"staffId": 1,
"description": "",
"startDate": "Feb 20, 2015 12:00:00 AM",
"endDate": "Feb 27, 2015 12:00:00 AM",
"isFullDay": true,
"startTime": "",
"endTime": "",
"tellerName": "Teller1",
"staffName": "Staff1, Test"
}
Update Cashier
PUT https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}
PUT tellers/1/cashiers/1
{
"endDate":"25 February 2015",
"description":"Cashier updated.",
"isFullDay":true,
"staffId":4,
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"startDate":"01 February 2015"
}
{
"resourceId": 1,
"subResourceId": 1,
"changes": {
"description": "Cashier updated.",
"endDate": "25 February 2015",
"dateFormat": "dd MMMM yyyy",
"locale": "en"
}
}
Delete Cashier
DELETE tellers/{tellerId}/cashiers/{cashierId}
DELETE tellers/1/cashiers/3
Content-Type: application/json
Request Body:
{
}
{
"resourceId": 3
}
Find Cashiers
GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/template
{
"tellerId":1,
"officeId":1,
"officeName":"Head Office",
"tellerName":"Teller1",
"staffOptions":[
{
"id":1,
"displayName":"Staff1, Test"
},
{
"id":2,
"displayName":"Staff, 2"
},
{
"id":3,
"displayName":"Staff, 3"
}
]
}
Retrieve Cashier Transaction
GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/transactions
[
{
"id": 8,
"cashierId": 15,
"txnType": {
"id": 104,
"value": "Cash Out"
},
"txnAmount": 10000,
"txnDate": "Feb 25, 2015 12:00:00 AM",
"entityId": 2,
"entityType": "loans",
"txnNote": "Disbursement, Loan:2-000000002,Client:1-Test 1",
"createdDate": "Feb 25, 2015 12:00:00 AM",
"officeId": 1,
"officeName": "Head Office",
"tellerId": 0,
"cashierName": "B, Ramesh"
},
{
"id": 10,
"cashierId": 15,
"txnType": {
"id": 104,
"value": "Cash Out"
},
"txnAmount": 8500,
"txnDate": "Feb 25, 2015 12:00:00 AM",
"entityId": 3,
"entityType": "loans",
"txnNote": "Disbursement, Loan:3-000000003,Client:3-Client 1",
"createdDate": "Feb 25, 2015 12:00:00 AM",
"officeId": 1,
"officeName": "Head Office",
"tellerId": 0,
"cashierName": "B, Ramesh"
},
{
"id": 12,
"cashierId": 15,
"txnType": {
"id": 104,
"value": "Cash Out"
},
"txnAmount": 10000,
"txnDate": "Feb 1, 2015 12:00:00 AM",
"entityId": 4,
"entityType": "loans",
"txnNote": "Disbursement, Loan:4-000000004,Client:4-Client 2",
"createdDate": "Feb 25, 2015 12:00:00 AM",
"officeId": 1,
"officeName": "Head Office",
"tellerId": 0,
"cashierName": "B, Ramesh"
},
{
"id": 14,
"cashierId": 15,
"txnType": {
"id": 103,
"value": "Cash In"
},
"txnAmount": 1266.52,
"txnDate": "Feb 1, 2015 12:00:00 AM",
"entityId": 4,
"entityType": "loans",
"txnNote": "Repayment, Loan:4-000000004,Client:4-Client 2",
"createdDate": "Feb 25, 2015 12:00:00 AM",
"officeId": 1,
"officeName": "Head Office",
"tellerId": 0,
"cashierName": "B, Ramesh"
},
{
"id": 13,
"cashierId": 15,
"txnType": {
"id": 101,
"value": "Allocate Cash"
},
"txnAmount": 50000,
"txnDate": "Feb 1, 2015 12:00:00 AM",
"entityId": 0,
"entityType": "",
"txnNote": "cash allocated on 1st Feb 2015",
"createdDate": "Feb 25, 2015 12:00:00 AM",
"officeId": 1,
"officeName": "Head Office",
"tellerId": 10,
"tellerName": "Ramesh(Teller/Cashier)",
"cashierName": "B, Ramesh"
},
{
"id": 15,
"cashierId": 15,
"txnType": {
"id": 104,
"value": "Cash Out"
},
"txnAmount": 10000,
"txnDate": "Feb 1, 2015 12:00:00 AM",
"entityId": 5,
"entityType": "loans",
"txnNote": "Disbursement, Loan:5-000000005,Client:5-Suresh D",
"createdDate": "Feb 25, 2015 12:00:00 AM",
"officeId": 1,
"officeName": "Head Office",
"tellerId": 0,
"cashierName": "B, Ramesh"
},
{
"id": 17,
"cashierId": 15,
"txnType": {
"id": 103,
"value": "Cash In"
},
"txnAmount": 1266.52,
"txnDate": "Feb 1, 2015 12:00:00 AM",
"entityId": 5,
"entityType": "loans",
"txnNote": "Repayment, Loan:5-000000005,Client:5-Suresh D",
"createdDate": "Feb 25, 2015 12:00:00 AM",
"officeId": 1,
"officeName": "Head Office",
"tellerId": 0,
"cashierName": "B, Ramesh"
},
{
"id": 14,
"cashierId": 15,
"txnType": {
"id": 102,
"value": "Settle Cash"
},
"txnAmount": 10000,
"txnDate": "Feb 1, 2015 12:00:00 AM",
"entityId": 0,
"entityType": "",
"txnNote": "cash settlement on 1 feb with 10k",
"createdDate": "Feb 25, 2015 12:00:00 AM",
"officeId": 1,
"officeName": "Head Office",
"tellerId": 10,
"tellerName": "Ramesh(Teller/Cashier)",
"cashierName": "B, Ramesh"
}
]
Allocate Cash To Cashier
Mandatory Fields |
Date, Amount, Currency, Notes/Comments |
POST https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/allocate
POST tellers/1/cashiers/1/allocate?command=allocate
{
"currencyCode":"USD",
"txnAmount":"5000",
"txnNote":"allocating cash",
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"txnDate":"01 February 2015"
}
{
"resourceId":1,
"subResourceId":4
}
Settle Cash From Cashier
Mandatory Fields |
Date, Amount, Currency, Notes/Comments |
POST https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/settle
POST tellers/1/cashiers/1/settle?command=settle
{
"currencyCode":"USD",
"txnAmount":"2000",
"txnNote":"cash settlement",
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"txnDate":"20 February 2015"
}
{
"resourceId":1,
"subResourceId":5
}
Transactions Wtih Summary For Cashier
GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/summaryandtransactions
{
"sumCashAllocation":7000.000000,
"sumInwardCash":0,
"sumOutwardCash":0,
"sumCashSettlement":50.000000,
"netCash":6950.000000,
"officeName":"Head Office",
"tellerId":1,
"tellerName":"Teller1",
"cashierId":1,
"cashierName":"Staff1, Test",
"cashierTransactions":[
{
"id":2,
"cashierId":1,
"txnType":{
"id":101,
"value":"Allocate Cash"
},
"txnAmount":2000.000000,
"txnDate":"Feb 20, 2015 12:00:00 AM",
"entityId":0,
"entityType":"",
"txnNote":"aaaa",
"createdDate":"Feb 20, 2015 12:00:00 AM",
"officeId":1,
"officeName":"Head Office",
"tellerId":1,
"tellerName":"Teller1",
"cashierName":"Staff1, Test"
},
{
"id":3,
"cashierId":1,
"txnType":{
"id":102,
"value":"Settle Cash"
},
"txnAmount":50.000000,
"txnDate":"Feb 20, 2015 12:00:00 AM",
"entityId":0,
"entityType":"",
"txnNote":"bbbbbb",
"createdDate":"Feb 20, 2015 12:00:00 AM",
"officeId":1,
"officeName":"Head Office",
"tellerId":1,
"tellerName":"Teller1",
"cashierName":"Staff1, Test"
},
{
"id":4,
"cashierId":1,
"txnType":{
"id":101,
"value":"Allocate Cash"
},
"txnAmount":5000.000000,
"txnDate":"Feb 1, 2015 12:00:00 AM",
"entityId":0,
"entityType":"",
"txnNote":"allocating cash",
"createdDate":"Feb 23, 2015 12:00:00 AM",
"officeId":1,
"officeName":"Head Office",
"tellerId":1,
"tellerName":"Teller1",
"cashierName":"Staff1, Test"
}
]
}
Retrieve Cashier Transaction Template
GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/transactions/template
{
"cashierId":1,
"officeName":"Head Office",
"tellerId":1,
"tellerName":"Teller1",
"cashierName":"Staff1, Test",
"cashierData":{
"id":1,
"tellerId":1,
"staffId":1,
"description":"",
"startDate":"Feb 20, 2015 12:00:00 AM",
"endDate":"Feb 27, 2015 12:00:00 AM",
"isFullDay":true,
"startTime":"",
"endTime":"",
"tellerName":"Teller1",
"staffName":"Staff1, Test"
},
"startDate":"Feb 20, 2015 12:00:00 AM",
"endDate":"Feb 27, 2015 12:00:00 AM",
"currencyOptions":[
{
"code":"USD",
"name":"US Dollar",
"decimalPlaces":2,
"displaySymbol":"$",
"nameCode":"currency.USD",
"displayLabel":"US Dollar ($)"
}
]
}
Payment Type
This defines the payment type
Field Descriptions |
name |
Name the payment type |
description |
Description of payment type |
isCashPayment |
Determines weather the payment type is cash or not. |
position |
Can set the order in which the payment type should be displayed. |
Create a Payment Type
Creates a new Payment type
Mandatory Fields |
name |
Optional Fields |
Description, isCashPayment,Position |
POST https://DomainName/api/v1/paymenttypes
POST paymenttype
Content-Type: application/json
Request Body:
{
"name":"cash",
"description":"cash payment type",
"isCashPayment":true,
"position":1
}
{
"resourceId": 1
}
Retrieve all Payment Types
Retrieve list of payment types
GET https://DomainName/api/v1/paymenttypes
[
{
"id": 24,
"name": "PTC",
"description": "Cash",
"isCashPayment": true,
"position": 0
},
{
"id": 25,
"name": "mPay",
"description": "not chash payment",
"isCashPayment": false,
"position": 0
},
{
"id": 26,
"name": "mPesa",
"description": "non cash payment",
"isCashPayment": false,
"position": 0
},
{
"id": 27,
"name": "Mobile Money",
"description": "money transferred through mobile",
"isCashPayment": false,
"position": 0
},
{
"id": 13,
"name": "cash",
"description": "cash Payment",
"isCashPayment": true,
"position": 1
}
]
Retrieve a Payment Type
Retrieves a payment type
GET https://DomainName/api/v1/paymenttypes/{paymentTypeId}
{
"id": 13,
"name": "cash",
"description": "cash Payment",
"isCashPayment": true,
"position": 1
}
Update a Payment Type
PUT https://DomainName/api/v1/paymenttypes/{paymnetTypeId}
PUT /paymenttypes/13
{
"name":"mPay",
"description":"not a cash payment type",
"isCashPayment":false,
"position":3
}
{
"resourceId": 13
}
Delete a Payment Type
Deletes payment type
DELETE https://DomainName/api/v1/paymenttypes/{paymentTypeId}
DELETE paymnettypes/13
Content-Type: application/json
No Request Body:
{
"resourceId": 13
}
Provisioning Criteria
This defines the Provisioning Criteria
Field Descriptions |
Provisioning Criteria Name |
Name the Provisioning Criteria |
Loan Products |
Select all loan products for which provisioning criteria to be associated |
Provisioning Categories |
Define minimum, maximum, percentage, liability account, expense account for all provisioning categories |
Create a new Provisioning Criteria
Creates a new Provisioning Criteria
Mandatory Fields |
criteriaName |
provisioningcriteria |
Optional Fields |
loanProducts |
POST https://DomainName/api/v1/provisioningcriteria
POST provisioningcriteria
Content-Type: application/json
Request Body:
{
"criteriaName":"High Risk Products Criteria",
"loanProducts": [
{"id": 1,
"name": "LOAN_PRODUCT_3ODPK1",
"includeInBorrowerCycle": false},
{"id": 2,
"name": "LOAN_PRODUCT_BXW8NC",
includeInBorrowerCycle": false}
],
"provisioningcriteria": [
{"categoryId": 1,
"categoryName": "STANDARD",
"minAge": 0,
"maxAge": 3,
"provisioningPercentage": 1,
"liabilityAccount": 8,
"expenseAccount": 14},
{"categoryId": 2,
"categoryName": "SUB-STANDARD",
"minAge": 1,
"maxAge": 5,
"provisioningPercentage": 2,
"liabilityAccount": 13,
"expenseAccount": 13},
{"categoryId": 3,
"categoryName": "DOUBTFUL",
"minAge": 2,
"maxAge": 6,
"provisioningPercentage": 3,
"liabilityAccount": 9,
"expenseAccount": 10},
{"categoryId": 4,
"categoryName": "LOSS",
"minAge": 3,
"maxAge": 7,
"provisioningPercentage": 4,
"liabilityAccount": 10,
"expenseAccount": 9}]
}
{
"resourceId": 1
}
Retrieves all created Provisioning Criterias
Retrieves all created Provisioning Criterias
GET https://DomainName/api/v1/provisioningcriteria
GET provisioningcriteria
Content-Type: application/json
Request Body:
{
}
{
[
{"criteriaId":1,
"criteriaName":"High Risk Products Criteria",
"createdBy":"mifos"},
{"criteriaId":2,
"criteriaName":"Low Risk Products Criteria",
"createdBy":"mifos"}
]
}
Retrieves a Provisioning Criteria
Retrieves a Provisioning Criteria
GET https://DomainName/api/v1/provisioningcriteria/{criteriaId}
GET provisioningcriteria/{criteriaId}
Content-Type: application/json
Request Body:
{
}
{
"criteriaId":1
"criteriaName":"High Risk Products Criteria",
"loanProducts": [
{"id": 1,
"name": "LOAN_PRODUCT_3ODPK1",
"includeInBorrowerCycle": false},
{"id": 2,
"name": "LOAN_PRODUCT_BXW8NC",
includeInBorrowerCycle": false}
],
"provisioningcriteria": [
{"categoryId": 1,
"categoryName": "STANDARD",
"minAge": 0,
"maxAge": 3,
"provisioningPercentage": 1,
"liabilityAccount": 8,
"expenseAccount": 14},
{"categoryId": 2,
"categoryName": "SUB-STANDARD",
"minAge": 1,
"maxAge": 5,
"provisioningPercentage": 2,
"liabilityAccount": 13,
"expenseAccount": 13},
{"categoryId": 3,
"categoryName": "DOUBTFUL",
"minAge": 2,
"maxAge": 6,
"provisioningPercentage": 3,
"liabilityAccount": 9,
"expenseAccount": 10},
{"categoryId": 4,
"categoryName": "LOSS",
"minAge": 3,
"maxAge": 7,
"provisioningPercentage": 4,
"liabilityAccount": 10,
"expenseAccount": 9}]
}
Updates a new Provisioning Criteria
Updates a new Provisioning Criteria
Optional Fields |
criteriaName, loanProducts, provisioningcriteria |
PUT https://DomainName/api/v1/provisioningcriteria/{criteriaId}
PUT provisioningcriteria/{criteriaId}
Content-Type: application/json
Request Body:
{
"criteriaName":"High Risk Products Criteria1",
"loanProducts": [
{"id": 1,
"name": "LOAN_PRODUCT_3ODPK1",
"includeInBorrowerCycle": false},
{"id": 2,
"name": "LOAN_PRODUCT_BXW8NC",
includeInBorrowerCycle": false}
],
"provisioningcriteria": [
{"categoryId": 1,
"categoryName": "STANDARD",
"minAge": 0,
"maxAge": 3,
"provisioningPercentage": 1,
"liabilityAccount": 8,
"expenseAccount": 14},
{"categoryId": 2,
"categoryName": "SUB-STANDARD",
"minAge": 1,
"maxAge": 5,
"provisioningPercentage": 2,
"liabilityAccount": 13,
"expenseAccount": 13},
{"categoryId": 3,
"categoryName": "DOUBTFUL",
"minAge": 2,
"maxAge": 6,
"provisioningPercentage": 3,
"liabilityAccount": 9,
"expenseAccount": 10},
{"categoryId": 4,
"categoryName": "LOSS",
"minAge": 3,
"maxAge": 7,
"provisioningPercentage": 4,
"liabilityAccount": 10,
"expenseAccount": 9}]
}
{
"resourceId": 1,
"changes": {
"criteriaName": "High Risk Products Criteria1"
}
}
Deletes Provisioning Criteria
Deletes Provisioning Criteria
DELETE https://DomainName/api/v1/provisioningcriteria/{criteriaId}
DELETE provisioningcriteria/{criteriaId}
Content-Type: application/json
Request Body:
{
}
{
"resourceId": 1,
}
Floating Rates
This defines the Floating Rates
Field Descriptions |
name |
Name of the Floating Rate, must be unique |
isBaseLendingRate |
Identifies the Floating Rate scheme to be Base Lending Rate. Only one scheme can be Base Lending Rate at any given point of time. default is false. |
isActive |
Identify if Floating Rate scheme is active or not. default is true. |
ratePeriods |
Array of ratePeriod JSON objects as defined in below section. |
This defines the Floating Rates Periods
Field Descriptions for ratePeriods |
fromDate |
Start date from which this rate has to be considered. Should be a future date. |
interestRate |
Interest Rate applicable. |
isDifferentialToBaseLendingRate |
If false, interestRate field is considered absolute. If true, interestRate field is considered differential to Base Lending Rate as of the startDate. Cannot be used if there is no scheme defined as Base Lending Rate. |
Create a new Floating Rate
Creates a new Floating Rate
Mandatory Fields |
name |
Optional Fields |
isBaseLendingRate |
isActive |
ratePeriods |
POST https://DomainName/api/v1/floatingrates
POST floatingrates
Content-Type: application/json
Request Body:
{
"name":"Floating Rate 1",
"isBaseLendingRate":true,
"isActive":true,
"ratePeriods":[
{
"fromDate":"19 November 2015",
"interestRate":10,
"locale":"en",
"dateFormat":"dd MMMM yyyy"
},
{
"fromDate":"15 December 2015",
"interestRate":11,
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
]
}
{
"resourceId": 1
}
List Floating Rates
List Floating Rates
GET https://DomainName/api/v1/floatingrates
GET floatingrates
Content-Type: application/json
{
[
{
"id": 1,
"name": "Floating Rate 1",
"isBaseLendingRate": true,
"isActive": true,
"createdBy": "mifos",
"createdOn": "Nov 18, 2015",
"modifiedBy": "mifos",
"modifiedOn": "Nov 18, 2015"
},
{
"id": 2,
"name": "Floating Rate 2",
"isBaseLendingRate": false,
"isActive": true,
"createdBy": "mifos",
"createdOn": "Nov 18, 2015",
"modifiedBy": "mifos",
"modifiedOn": "Nov 18, 2015"
}
]
}
Retrieve Floating Rate
Retrieve Floating Rate
GET https://DomainName/api/v1/floatingrates/1
GET floatingrates
Content-Type: application/json
{
"id": 1,
"name": "Floating Rate 1",
"isBaseLendingRate": true,
"isActive": true,
"createdBy": "mifos",
"createdOn": "Nov 18, 2015",
"modifiedBy": "mifos",
"modifiedOn": "Nov 18, 2015",
"ratePeriods":
[
{
"id": 1,
"fromDate": "Dec 15, 2015",
"interestRate": 11,
"isDifferentialToBaseLendingRate": false,
"isActive": true,
"createdBy": "mifos",
"createdOn": "Nov 18, 2015",
"modifiedBy": "mifos",
"modifiedOn": "Nov 18, 2015"
},
{
"id": 2,
"fromDate": "Nov 19, 2015",
"interestRate": 10,
"isDifferentialToBaseLendingRate": false,
"isActive": true,
"createdBy": "mifos",
"createdOn": "Nov 18, 2015",
"modifiedBy": "mifos",
"modifiedOn": "Nov 18, 2015"
}
]
}
Update Floating Rate
Updates new Floating Rate. Rate Periods in the past cannot be modified. All the future rateperiods would be replaced with the new ratePeriods data sent.
PUT https://DomainName/api/v1/floatingrates/1
PUT floatingrates
Content-Type: application/json
Request Body:
{
"name":"Floating Rate 1",
"isBaseLendingRate":true,
"isActive":true,
"ratePeriods":[
{
"fromDate":"19 November 2015",
"interestRate":10,
"locale":"en",
"dateFormat":"dd MMMM yyyy"
},
{
"fromDate":"15 December 2015",
"interestRate":11,
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
]
}
{
"resourceId": 1,
"changes":
{
"ratePeriods": "[
{
"fromDate":"19 November 2015",
"interestRate":10,
"locale":"en",
"dateFormat":"dd MMMM yyyy"
},
{
"fromDate":"15 December 2015",
"interestRate":11,
"locale":"en",
"dateFormat":"dd MMMM yyyy"
}
]"
}
}
Tax Components
This defines the Tax Components
Field Descriptions |
name |
Name of the Tax component |
percentage |
Percentage that should be applied on a amount as tax. |
debitAccountType |
Debit Account type that should be applicable only for particular cases depending on requirement ex with hold tax doesn't require debit account for the accounting operation. . |
debitAcountId |
GL Account that should debited when tax applied. used only for particular cases depending on requirement ex with hold tax doesn't require debit account for the accounting operation. . |
Credit Account type that should be applicable only for particular cases depending on requirement ex with hold tax require credit account for the accounting operation. . |
debitAcountId |
GL Account that should credited when tax applied. used only for particular cases depending on requirement ex with hold tax require only credit account for the accounting operation. . |
startDate |
Start date from which this tax component is applicable. |
Create a new Tax Component
Creates a new Tax Component
Mandatory Fields |
name |
percentage |
Optional Fields |
debitAccountType |
debitAcountId |
creditAccountType |
creditAcountId |
startDate |
POST https://DomainName/api/v1/taxes/component
POST taxes/component
Content-Type: application/json
Request Body:
{
"name": "tax component 1",
"percentage": "10",
"creditAccountType": 2,
"creditAcountId": 4,
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"startDate": "11 April 2016"
}
{
"resourceId": 1
}
List Tax Components
List Tax Components/p>
GET https://DomainName/api/v1/taxes/component
GET taxes/component
Content-Type: application/json
[{
"id": 1,
"name": "tax component 1",
"percentage": 10.000000,
"creditAccountType": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"creditAccount": {
"id": 4,
"name": "ACCOUNT_NAME_7BR9C",
"glCode": "LIABILITY_PA1460364665046"
},
"startDate": [2016,
4,
11],
"taxComponentHistories": [{
}]
},
{
"id": 2,
"name": "tax component 2",
"percentage": 10.000000,
"creditAccountType": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"creditAccount": {
"id": 4,
"name": "ACCOUNT_NAME_7BR9C",
"glCode": "LIABILITY_PA1460364665046"
},
"startDate": [2016,
4,
11],
"taxComponentHistories": [{
}]
}]
Retrieve Tax Component
Retrieve Tax Component
GET https://DomainName/api/v1/taxes/component/1
GET taxes/component/1
Content-Type: application/json
{
"id": 1,
"name": "tax component 1",
"percentage": 10.000000,
"creditAccountType": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"creditAccount": {
"id": 4,
"name": "ACCOUNT_NAME_7BR9C",
"glCode": "LIABILITY_PA1460364665046"
},
"startDate": [2016,
4,
11],
"taxComponentHistories": [{
}]
}
Update Tax Component
Updates Tax component. Debit and credit account details cannot be modified. All the future tax components would be replaced with the new percentage.
PUT https://DomainName/api/v1/taxes/component/1
PUT taxes/component/1
Content-Type: application/json
Request Body:
{
"name": "tax component 2",
"percentage": "15",
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"startDate": "15 April 2016"
}
{
"resourceId": 1,
"changes": {
"percentage": 15,
"name": "tax component 2",
"startDate": [2016,
4,
15]
}
}
Tax Group
This defines the Tax Group
Field Descriptions |
name |
Name of the Tax Group |
taxComponents |
Array of tax components to be added part of tax group. |
id |
Tax group and tax component mapping id. |
taxComponentId |
Tax component id. |
startDate |
Start date from which this tax component is applicable. |
endDate |
End date from which this tax component is applicable. |
Create a new Tax Group
Creates a new Tax Group
Mandatory Fields |
name |
taxComponents |
Mandatory Fields in taxComponents |
taxComponentId |
Optional Fields in taxComponents |
id |
startDate |
endDate |
POST https://DomainName/api/v1/taxes/group
POST taxes/component
Content-Type: application/json
Request Body:
{
"name": "tax group 1",
"locale": "en",
"taxComponents": [{
"taxComponentId": 7,
"startDate": "11 April 2016"
}],
"dateFormat": "dd MMMM yyyy"
}
{
"resourceId": 1
}
List Tax Group
List Tax Group/p>
GET https://DomainName/api/v1/taxes/group
GET taxes/group
Content-Type: application/json
[{
"id": 6,
"name": "Tax_component_Name_PAX65",
"taxAssociations": [{
"id": 6,
"taxComponent": {
"id": 6,
"name": "Tax_component_Name_FPNXE"
},
"startDate": [2013,
1,
1]
}]
},
{
"id": 7,
"name": "tax group 1",
"taxAssociations": [{
"id": 7,
"taxComponent": {
"id": 7,
"name": "tax component 2"
},
"startDate": [2016,
4,
11]
}]
}]
Retrieve Tax Group
Retrieve Tax Group
GET https://DomainName/api/v1/taxes/group/1
GET taxes/group/1
Content-Type: application/json
{
"id": 7,
"name": "tax group 1",
"taxAssociations": [{
"id": 7,
"taxComponent": {
"id": 7,
"name": "tax component 2"
},
"startDate": [2016,
4,
11]
}]
}
Update Tax Group
Updates Tax Group. Only end date can be up-datable and can insert new tax components.
PUT https://DomainName/api/v1/taxes/group/1
PUT taxes/group/1
Content-Type: application/json
Request Body:
{
"name": "tax group 2",
"locale": "en",
"taxComponents": [{
"id": 7,
"taxComponentId": 7,
"endDate": "22 April 2016"
},
{
"taxComponentId": 6,
"startDate": "14 April 2016"
}],
"dateFormat": "dd MMMM yyyy"
}
{
"resourceId": 7,
"changes": {
"addComponents": [6],
"modifiedComponents": [{
"endDate": "Apr 22, 2016 12:00:00 AM",
"taxComponentId": 7
}],
"name": "tax group 2"
}
}
User Generated Documents
User Generated Documents(alternatively, Templates) are used for end-user features such as custom user defined document generation (AKA UGD). They are based on {{ moustache }} templates. Think of them as a sort of built-in "mail merge" functionality.
User Generated Documents (and other types of templates) can aggregate data from several Apache Fineract back-end API calls via mappers. Mappers can even access non-Apache Fineract REST services from other servers. UGDs can render such data in tables, show images, etc. TBD: Please have a look at some of the Example UGDs included in Apache Fineract (or the Wiki page, for now.).
UGDs can be assigned to an entity like client or loan and be of a type like Document or SMS. The entity and type of a UGD is only there for the convenience of user agents (UIs), in order to know where to show UGDs for the user (i.e. which tab). The Template Engine back-end runner does not actually need this metadata.
Field Descriptions |
name |
Describes the document which will be created. It must be unique and appears listed in a tab at the assigned entity. |
type |
For now only the types Document and SMS are supported. In a next version, UGDs may be created for e-mails as well. |
entity |
Indicates the primary resource reference. UGDs may be filtered by entity and type so the relevant UGDs may be listed at the belonging position. |
text |
The actual UGD which may be any html-text containing mustache tags. |
mappers |
By default one mapper is assigned to the UGD depending on the entity. Mappers are used to create requests and get tags wich may be used in the UGD. Also mappery are in order and may depend on the previous mappers. For now mappers expect a response in JSON or plain/text. JSON contains the keys and the values. If the response is plain/text it can be accessed by {{$mapperskey.src}} |
Retrieve UGD Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for UGDs. The UGD data returned consists of any or all of:
Arguments
- name
- String
- entity
- String
- type
- String
- text
- String optional
- mappers
- Mapper optional
Example Request:
GET https://DomainName/api/v1/templates/template
{
"id": 1,
"name": "Test",
"entity": 1,
"type": 0,
"text": "This is a loan for {{loan.clientName}}",
"mappers": [
{
"mappersorder": 0,
"mapperskey": "loan",
"mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
"id": 1
}
]
}
Add a UGD
Adds a new UGD.
Mandatory Fields |
name |
Example Requests:
POST https://DomainName/api/v1/templates
POST templates
Content-Type: application/json
Request Body:
{
"id": 1,
"name": "Test",
"entity": 1,
"type": 0,
"text": "This is a loan for {{loan.clientName}}",
"mappers": [
{
"mappersorder": 0,
"mapperskey": "loan",
"mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
"id": 1
}
]
}
{
"resourceId": 1
}
Retrieve all UGDs
Example Requests:
It is also possible to get specific UGDs by entity and type:
Entity |
Id | Type |
Id |
client | 0 | Document | 0 |
loan | 1 | E-Mail (not yet) | 1 |
SMS | 2 |
GET https://DomainName/api/v1/templates
[
{
"id": 1,
"name": "Test",
"entity": 1,
"type": 0,
"text": "This is a loan for {{loan.clientName}}",
"mappers": [
{
"mappersorder": 0,
"mapperskey": "loan",
"mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
"id": 1
}
]
}
]
Retrieve a UGD
Example Requests:
GET https://DomainName/api/v1/templates/{Id}
{
"id": 1,
"name": "Test",
"entity": 1,
"type": 0,
"text": "This is a loan for {{loan.clientName}}",
"mappers": [
{
"mappersorder": 0,
"mapperskey": "loan",
"mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
"id": 1
}
]
}
Update a UGD
PUT https://DomainName/api/v1/templates/{templateId}
PUT templates/1
Content-Type: application/json
Request Body:
{
"id": 1,
"name": "Test",
"entity": 1,
"type": 0,
"text": "This is a loan for {{loan.clientName}}",
"mappers": [
{
"mappersorder": 0,
"mapperskey": "loan",
"mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
"id": 1
}
]
}
{
"resourceId": 1
}
Client Charges
It is typical for MFI's to directly associate charges with an implicit Client account. These can be either fees or penalties
Client Charges are client specific instances of Charges. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Client account) are described here
Field Descriptions |
amountPaid |
The total amount which has been paid for this Charge |
amountWaived |
The total amount that has been waived for this Charge |
amountOutstanding |
The Total outstanding amount for this Charge |
dueDate |
it specifies the due date |
Client Transaction
Client Transactions refer to transactions made directly againt a Client's internal account. Currently, these transactions are only created as a result of charge payments/waivers. You are allowed to undo a transaction, however you cannot explicitly create one.
Field Descriptions |
id |
This ia an unique Id associate with a Transaction. |
officeId |
Identifier of the office in which the transaction was made |
reversed |
Boolean Flag that indicates if this transaction is reversed. |
amount |
Transaction amount. |
currency |
Details of the currency involved with the Transaction. Currently defaults to the currency of the Client Charge this transaction pays |
date |
Effective date of the transaction |
List Client Transactions
The list capability of client transaction can support pagination.
Mandatory Arguments
- offset
- Integer Mandatory, defaults to 0
- Indicates the result from which pagination starts
- limit
- Integer Mandatory, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
Example Requests:
GET https://DomainName/api/v1/clients/{clientId}/transactions?limit=5&offset=0
GET clients/226/transactions?limit=5&offset=0
Content-Type: application/json
No Request Body:
{
"totalFilteredRecords": 20,
"pageItems": [
{
"id": 226,
"officeId": 1,
"officeName": "Head Office",
"type": {
"id": 1,
"code": "clientTransactionType.payCharge",
"value": "PAY_CHARGE"
},
"date": [
2015,
9,
2
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 22,
"submittedOnDate": [
2015,
9,
2
],
"reversed": false
}
]
}
Retrieve a Client Transaction
Example Requests:
GET https://DomainName/api/v1/clients/{clientId}/transaction/{transactionId}
{
"id": 1,
"officeId": 1,
"officeName": "Head Office",
"type": {
"id": 1,
"code": "clientTransactionType.payCharge",
"value": "PAY_CHARGE"
},
"date": [
2015,
8,
17
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 60.000000,
"submittedOnDate": [
2015,
8,
19
],
"reversed": true
}
Add Client Charge
This API associates a Client charge with an implicit Client account
Mandatory Fields |
chargeId and dueDate |
Optional Fields |
amount |
POST https://DomainName/api/v1/clients/{clientId}/charges
POST clients/226/charges
Content-Type: application/json
Request Body:
{
"amount" : "100",
"chargeId" : "226",
"dateFormat" : "dd MMMM yyyy",
"dueDate" : "01 September 2015",
"locale" : "en"
}
{
"officeId": 1,
"clientId": 189,
"resourceId":164
}
List Client Charges
The list capability of client charges supports pagination.
Optional Arguments
- offset
- Integer Mandatory, defaults to 0
- Indicates the result from which pagination starts
- limit
- Integer Mandatory, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- pendingPayment
- String optional
- Filters charges that are pending payment (neither paid or waived).
Example Requests:
GET https://DomainName/api/v1/clients/{clientId}/charges?limit=5&offset=0
GET clients/1/charges?limit=5&offset=0
Content-Type: application/json
No Request Body
{
"totalFilteredRecords": 4,
"pageItems": [
{
"id": 5,
"clientId": 1,
"chargeId": 6,
"name": "Client Fees 2",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2015,
9,
1
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 550.000000,
"amountPaid": 0.000000,
"amountWaived": 0.000000,
"amountWrittenOff": 0,
"amountOutstanding": 550.000000,
"penalty": false,
"isActive": true,
"isPaid": false,
"isWaived": false
},
{
"id": 4,
"clientId": 1,
"chargeId": 5,
"name": "Client Fee 1",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2015,
8,
31
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 120.000000,
"amountPaid": 0.000000,
"amountWaived": 120.000000,
"amountWrittenOff": 0,
"amountOutstanding": 120.000000,
"penalty": true,
"isActive": true,
"isPaid": false,
"isWaived": true
},
{
"id": 3,
"clientId": 1,
"chargeId": 5,
"name": "Client Fee 1",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2015,
8,
17
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100.000000,
"amountPaid": 0.000000,
"amountWaived": 100.000000,
"amountWrittenOff": 0,
"amountOutstanding": 0.000000,
"penalty": true,
"isActive": true,
"isPaid": false,
"isWaived": true
},
{
"id": 2,
"clientId": 1,
"chargeId": 2,
"name": "Recurring savings Charge",
"chargeTimeType": {
"id": 7,
"code": "chargeTimeType.monthlyFee",
"value": "Monthly Fee"
},
"dueDate": [
2015,
8,
17
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100.000000,
"amountPaid": 0,
"amountWaived": 100.000000,
"amountWrittenOff": 0,
"amountOutstanding": 0.000000,
"penalty": false,
"isActive": true,
"isPaid": false,
"isWaived": true
}
]
}
Retrieve a Client Charge
Arguments
- associations
- optional, Either 'all' or a comma separated list of loan 'associations' (itemised below).
-
Associations are just extra pieces of data that you might or might not want to retrieve.
- 'all': Gets all association data.
- 'transactions': Retrieves all transactions made on this client charge.
Example Requests:
GET https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId}
{
"id": 3,
"clientId": 1,
"chargeId": 5,
"name": "Client Fee 1",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2015,
8,
17
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100.000000,
"amountPaid": 0.000000,
"amountWaived": 100.000000,
"amountWrittenOff": 0,
"amountOutstanding": 0.000000,
"penalty": true,
"isActive": true,
"isPaid": false,
"isWaived": true
}
Delete a Client Charge
Deletes a Client Charge on which no transactions have taken place (either payments or waivers).
DELETE https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId}
POST clients/189/charges/164
Content-Type: application/json
No Request Body
{
"officeId": 1,
"clientId": 189,
"resourceId":164
}
Pay a Client Charge
Pay either a part of or the entire due amount for a charge.
Mandatory Fields |
transactionDate and amount |
POST https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId}?command=paycharge
POST clients/189/charges/157?command=payCharge
Content-Type: application/json
Request Body:
{
"amount":200,
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"transactionDate":"01 September 2015"
}
{
"officeId":1,
"clientId":189,
"resourceId":157,
"transactionId":"221"
}
Waive a Client Charge
This API provides the facility of waiving off the remaining amount on a client charge
POST https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId}?command=waive
POST clients/189/charges/157?command=waive
Content-Type: application/json
No Request Body
{
"clientId":"189",
"resourceId":157
}
Undo a Client Transaction
POST https://DomainName/api/v1/clients/{clientId}/transactions/{transactionId}?command=undo
POST clients/189/transactions/222?command=undo
Content-Type: application/json
No Request Body
{
"officeId":1,
"clientId":189,
"resourceId":222
}
Delete a UGD
DELETE https://DomainName/api/v1/templates/{templateId}
DELETE templates/1
Content-Type: application/json
No Request Body:
{
"resourceId": 1
}
SPM API
The Apache Fineract SPM API provides the ability to create custom surveys to collect social performance measurentment data or any additional questionnaire a financial institute want to collect.
Create a Survey
Adds a new survey to collect client related data.
Mandatory Fields |
countryCode, key, name, questions, responses, sequenceNo, text, value |
POST https://DomainName/api/v1/surveys
POST surveys
Content-Type: application/json
Request Body:
{
"key":"ppi-kenya-2010",
"name":"PPI Survey for Kenya, version 2010",
"description":null,
"countryCode":"KE",
"validFrom":null,
"validTo":null,
"componentDatas":
[
{
"key":"Household",
"text":"Information about the household.",
"description":null,
"sequenceNo":1
}
],
"questionDatas":
[
{
"componentKey":"Household",
"key":"Familiy members",
"text":"How many persons live in the household?",
"description":null,
"sequenceNo":1,
"responseDatas":
[
{
"text":"1 to 3",
"value":1,
"sequenceNo":1
},
{
"text":"3 to 7",
"value":5,
"sequenceNo":2
},
{
"text":"more than 7",
"value":13,
"sequenceNo":3
}
]
}
]
}
200 OK
List all Surveys
GET https://DomainName/api/v1/surveys
GET surveys
Content-Type: application/json
No Request Body
[
{
"id": 1,
"componentDatas": [
{
"id": 1,
"key": "Household",
"text": "Information about the household.",
"description": null,
"sequenceNo": 1
}
],
"questionDatas": [
{
"id": 1,
"responseDatas": [
{
"id": 1,
"text": "1 to 3",
"value": 1,
"sequenceNo": 1
},
{
"id": 2,
"text": "3 to 7",
"value": 5,
"sequenceNo": 2
},
{
"id": 3,
"text": "more than 7",
"value": 13,
"sequenceNo": 3
}
],
"componentKey": "Household",
"key": "Familiy members",
"text": "How many persons live in the household?",
"description": null,
"sequenceNo": 1
}
],
"key": "ppi-kenya-2010",
"name": "PPI Survey for Kenya, version 2010",
"description": null,
"countryCode": "KE",
"validFrom": 1450047600000,
"validTo": 4607276399000
}
]
Retrieve a Survey
GET https://DomainName/api/v1/surveys/1
GET surveys/1
Content-Type: application/json
No Request Body
{
"id": 1,
"componentDatas": [
{
"id": 1,
"key": "Household",
"text": "Information about the household.",
"description": null,
"sequenceNo": 1
}
],
"questionDatas": [
{
"id": 1,
"responseDatas": [
{
"id": 1,
"text": "1 to 3",
"value": 1,
"sequenceNo": 1
},
{
"id": 2,
"text": "3 to 7",
"value": 5,
"sequenceNo": 2
},
{
"id": 3,
"text": "more than 7",
"value": 13,
"sequenceNo": 3
}
],
"componentKey": "Household",
"key": "Familiy members",
"text": "How many persons live in the household?",
"description": null,
"sequenceNo": 1
}
],
"key": "ppi-kenya-2010",
"name": "PPI Survey for Kenya, version 2010",
"description": null,
"countryCode": "KE",
"validFrom": 1450047600000,
"validTo": 4607276399000
}
Deactivate Survey
DELETE https://DomainName/api/v1/surveys/1
DELETE surveys/1
Content-Type: application/json
No Request Body
200 OK
Create a Lookup Table entry
Add a new netry to a survey.
Mandatory Fields |
key, score, validFrom, validTo |
POST https://DomainName/api/v1/surveys/1/lookuptables
POST surveys/1/lookuptables
Content-Type: application/json
Request Body:
{
"key": "test-table",
"description": null,
"entries": [
{
"valueFrom": 0,
"valueTo": 25,
"score": 100
},
{
"valueFrom": 26,
"valueTo": 50,
"score": 50
},
{
"valueFrom": 51,
"valueTo": 75,
"score": 25
},
{
"valueFrom": 76,
"valueTo": 100,
"score": 0
}
]
}
200 OK
List all Lookup Table entries
List all Lookup Table entries for a survey.
GET https://DomainName/api/v1/surveys/1/lookuptables
GET surveys/1/lookuptables
Content-Type: application/json
No Request Body
[
{
"key": "test-table",
"description": null,
"entries": [
{
"valueFrom": 0,
"valueTo": 25,
"score": 100
},
{
"valueFrom": 26,
"valueTo": 50,
"score": 50
},
{
"valueFrom": 51,
"valueTo": 75,
"score": 25
},
{
"valueFrom": 76,
"valueTo": 100,
"score": 0
}
]
}
]
Retrieve a Lookup Table entry
Retrieve a Lookup Table entry for a survey.
GET https://DomainName/api/v1/surveys/1/lookuptables/1
GET surveys/1/lookuptables/test-table
Content-Type: application/json
No Request Body
{
"key": "test-table",
"description": null,
"entries": [
{
"valueFrom": 0,
"valueTo": 25,
"score": 100
},
{
"valueFrom": 26,
"valueTo": 50,
"score": 50
},
{
"valueFrom": 51,
"valueTo": 75,
"score": 25
},
{
"valueFrom": 76,
"valueTo": 100,
"score": 0
}
]
}
Create a Scorecard entry
Add a new netry to a survey.
Mandatory Fields |
clientId, createdOn, questionId, responseId, staffId |
POST https://DomainName/api/v1/surveys/1/scorecards
POST surveys/1/scorecards
Content-Type: application/json
Request Body:
{
"userId": 1,
"clientId": 1,
"createdOn": 1451905784553,
"scorecardValues":
[
{
"questionId": 1,
"responseId": 1,
"value": 0
},
{
"questionId": 2,
"responseId": 8,
"value": 0
},
{
"questionId": 3,
"responseId": 12,
"value": 7
},
{
"questionId": 4,
"responseId": 16,
"value": 4
},
{
"questionId": 5,
"responseId": 21,
"value": 2
},
{
"questionId": 6,
"responseId": 25,
"value": 2
},
{
"questionId": 7,
"responseId": 28,
"value": 3
},
{
"questionId": 8,
"responseId": 30,
"value": 6
},
{
"questionId": 9,
"responseId": 33,
"value": 4
},
{
"questionId": 10,
"responseId": 37,
"value": 7
}
]
}
200 OK
List all Scorecard entries
List all Scorecard entries for a survey.
GET https://DomainName/api/v1/surveys/1/scorecards
GET surveys/1/scorecards
Content-Type: application/json
No Request Body
[
{
"userId": 1,
"clientId": 1,
"createdOn": 1451905784553,
"scorecardValues":
[
{
"questionId": 1,
"responseId": 1,
"value": 0
},
{
"questionId": 2,
"responseId": 8,
"value": 0
},
{
"questionId": 3,
"responseId": 12,
"value": 7
},
{
"questionId": 4,
"responseId": 16,
"value": 4
},
{
"questionId": 5,
"responseId": 21,
"value": 2
},
{
"questionId": 6,
"responseId": 25,
"value": 2
},
{
"questionId": 7,
"responseId": 28,
"value": 3
},
{
"questionId": 8,
"responseId": 30,
"value": 6
},
{
"questionId": 9,
"responseId": 33,
"value": 4
},
{
"questionId": 10,
"responseId": 37,
"value": 7
}
]
}
]
Self Service APIs
Verify authentication
Authenticates the credentials provided and returns the set roles and permissions allowed.
POST https://DomainName/api/v1/self/authentication?username={username}&password={password}
POST self/authentication?username=mifos&password=password
Content-Type: application/json
No Request Body
Example response of autentication for user
{
"username": "mifos",
"userId": 1,
"base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=",
"authenticated": true,
"officeId": 1,
"officeName": "Head Office",
"staffId": 1,
"staffDisplayName": "Director, Program",
"organisationalRole": {
"id": 100,
"code": "staffOrganisationalRoleType.programDirector",
"value": "Program Director"
},
"roles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
],
"permissions": [
"ALL_FUNCTIONS"
],
"isSelfServiceUser": true,
"clients": [1,2,3]
}
POST self/authentication?username=mifos&password=fail
Content-Type: application/json
No Request Body
{
"developerMessage": "Invalid authentication details were passed in api request.",
"developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes",
"httpStatusCode": "401",
"defaultUserMessage": "Unauthenticated. Please login.",
"userMessageGlobalisationCode": "error.msg.not.authenticated",
"errors": []
}
Fetch authenticated user details
checks the Authentication and returns the set roles and permissions allowed.
POST https://DomainName/api/v1/self/userdetails?access_token={access_token}
POST self/userdetails?access_token=bWlmb3M6cGFzc3dvcmQ=
Content-Type: application/json
No Request Body
Example response of authenticated user.
{
"username": "mifos",
"userId": 1,
"base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=",
"authenticated": true,
"officeId": 1,
"officeName": "Head Office",
"staffId": 1,
"staffDisplayName": "Director, Program",
"organisationalRole": {
"id": 100,
"code": "staffOrganisationalRoleType.programDirector",
"value": "Program Director"
},
"roles": [
{
"id": 1,
"name": "Super user",
"description": "This role provides all application permissions."
}
],
"permissions": [
"ALL_FUNCTIONS"
],
"isSelfServiceUser": true,
"clients": [1,2,3]
}
POST api/oauth/token?username=mifos&password=password&client_id=community-app&grant_type=password&client_secret=123
Content-Type: application/json
No Request Body
{
"developerMessage": "Invalid authentication details were passed in api request.",
"developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes",
"httpStatusCode": "401",
"defaultUserMessage": "Unauthenticated. Please login.",
"userMessageGlobalisationCode": "error.msg.not.authenticated",
"errors": []
}
Update User
This API can be used by Self Service user to update their own user information. Currently, "password" and "repeatPassword" are the only parameters accepted.
PUT https://DomainName/api/v1/self/user
PUT self/user
Content-Type: application/json
{
"password":"Abcd1234",
"repeatPassword":"Abcd1234"
}
Example response
{
"officeId": 1,
"resourceId": 6,
"changes": {
"passwordEncoded": "6a72a630795be86fe926ce540fc45b6b922fe5ba130f185fe806a26b5e5efcdd"
}
}
List Clients associated to the user
The list capability of clients can support pagination and sorting.
Optional Arguments
- offset
- Integer optional, defaults to 0
- Indicates the result from which pagination starts
- limit
- Integer optional, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- orderBy
- String optional, one of displayName, accountNo, officeId, officeName
- Orders results by the indicated field.
- sortBy
- String optional, one of ASC, DESC
- Indicates what way to order results if orderBy is used.
- displayName
- String optional
- Use displayName of clients to restrict results.
- firstName
- String optional
- Use firstName of clients to restrict results.
- lastName
- String optional
- Use lastName of clients to restrict results.
Example Requests:
GET https://DomainName/api/v1/self/clients
{
"totalFilteredRecords": 2,
"pageItems": [
{
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2013,
3,
1
],
"fullname": "Small shop",
"displayName": "Small shop",
"officeId": 1,
"officeName": "Head Office"
},
{
"id": 2,
"accountNo": "000000002",
"status": {
"id": 100,
"code": "clientStatusType.pending",
"value": "Pending"
},
"active": false,
"fullname": "Home Farm Produce",
"displayName": "Home Farm Produce",
"officeId": 1,
"officeName": "Head Office"
}
]
}
Retrieve a Client
Example Requests:
GET https://DomainName/api/v1/self/clients/{clientId}
{
"id": 27,
"accountNo": "000000027",
"status": {
"id": 300,
"code": "clientStatusType.active",
"value": "Active"
},
"active": true,
"activationDate": [
2013,
1,
1
],
"firstname": "savings",
"lastname": "test",
"displayName": "savings test",
"officeId": 1,
"officeName": "Head Office",
"timeline": {
"submittedOnDate": [
2013,
1,
1
],
"submittedByUsername": "mifos",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"activatedOnDate": [
2013,
1,
1
],
"activatedByUsername": "mifos",
"activatedByFirstname": "App",
"activatedByLastname": "Administrator"
},
"savingsProductId": 4,
"savingsProductName": "account overdraft",
"groups": []
}
Retrieve client accounts overview
An example of how a loan portfolio summary can be provided. This
is requested in a specific use case of the community application.
It is quite reasonable to add resources like this to simplify User Interface development.
Example Requests:
GET https://DomainName/api/v1/self/clients/{clientId}/accounts
{
"loanAccounts": [
{
"id": 1,
"accountNo": "000000001",
"externalId": "456",
"productId": 1,
"productName": "TestOne",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"loanType": {
"id": 1,
"code": "loanType.individual",
"value": "Individual"
},
"loanCycle": 1
}
],
"savingsAccounts": [
{
"id": 7,
"accountNo": "000000007",
"productId": 2,
"productName": "Other product",
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
},
{
"id": 6,
"accountNo": "000000006",
"productId": 1,
"productName": "Passbook Savings",
"status": {
"id": 300,
"code": "savingsAccountStatusType.active",
"value": "Active",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": true,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 1828.03
},
{
"id": 5,
"accountNo": "000000005",
"productId": 1,
"productName": "Passbook Savings",
"status": {
"id": 400,
"code": "savingsAccountStatusType.withdrawn.by.applicant",
"value": "Withdrawn by applicant",
"submittedAndPendingApproval": false,
"approved": false,
"rejected": false,
"withdrawnByApplicant": true,
"active": false,
"closed": true
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
}
]
}
Retrieve Client Image
Optional arguments are identical to those of Get Image associated with an Entity (Binary file)
Example Requests:
GET https://DomainName/api/v1/self/clients/{clientId}/images
Accept: text/plain
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
bWFnZVJlYWR5ccllPAAAAJ1JREFUeNpi+P//PwMIA4E9EG8E4idQDGLbw+WhiiqA+D8OXAFVAzbp
DxBvB2JLIGaGYkuoGEjOhhFIHAbij0BdPgxYACMj42ogJQpifwBiXSDeC8JIbt4LxSC5DyxQjTeB
+BeaYb+Q5EBOAVutCzMJHUNNPADzzDokiYdAfAmJvwLkGeTgWQfyKZICS6hYBTwc0QL8ORSjBDhA
gAEAOg13B6R/SAgAAAAASUVORK5CYII=
List Client Charges
The list capability of client charges supports pagination.
Optional Arguments
- offset
- Integer Mandatory, defaults to 0
- Indicates the result from which pagination starts
- limit
- Integer Mandatory, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- pendingPayment
- String optional
- Filters charges that are pending payment (neither paid or waived).
- chargeStatus
- String optional
- Filters charges according to the status.
Example Requests:
GET https://DomainName/api/v1/self/clients/{clientId}/charges?limit=5&offset=0
GET self/clients/1/charges?limit=5&offset=0
Content-Type: application/json
No Request Body
{
"totalFilteredRecords": 4,
"pageItems": [
{
"id": 5,
"clientId": 1,
"chargeId": 6,
"name": "Client Fees 2",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2015,
9,
1
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 550.000000,
"amountPaid": 0.000000,
"amountWaived": 0.000000,
"amountWrittenOff": 0,
"amountOutstanding": 550.000000,
"penalty": false,
"isActive": true,
"isPaid": false,
"isWaived": false
},
{
"id": 4,
"clientId": 1,
"chargeId": 5,
"name": "Client Fee 1",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2015,
8,
31
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 120.000000,
"amountPaid": 0.000000,
"amountWaived": 120.000000,
"amountWrittenOff": 0,
"amountOutstanding": 120.000000,
"penalty": true,
"isActive": true,
"isPaid": false,
"isWaived": true
},
{
"id": 3,
"clientId": 1,
"chargeId": 5,
"name": "Client Fee 1",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2015,
8,
17
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100.000000,
"amountPaid": 0.000000,
"amountWaived": 100.000000,
"amountWrittenOff": 0,
"amountOutstanding": 0.000000,
"penalty": true,
"isActive": true,
"isPaid": false,
"isWaived": true
},
{
"id": 2,
"clientId": 1,
"chargeId": 2,
"name": "Recurring savings Charge",
"chargeTimeType": {
"id": 7,
"code": "chargeTimeType.monthlyFee",
"value": "Monthly Fee"
},
"dueDate": [
2015,
8,
17
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100.000000,
"amountPaid": 0,
"amountWaived": 100.000000,
"amountWrittenOff": 0,
"amountOutstanding": 0.000000,
"penalty": false,
"isActive": true,
"isPaid": false,
"isWaived": true
}
]
}
Retrieve a Client Charge
Arguments
- associations
- optional, a comma separated list of 'associations' (itemised below).
-
Associations are just extra pieces of data that you might or might not want to retrieve.
- 'transactions': Retrieves all transactions made on this client charge.
Example Requests:
GET https://DomainName/api/v1/self/clients/{clientId}/charges/{clientChargeId}
{
"id": 3,
"clientId": 1,
"chargeId": 5,
"name": "Client Fee 1",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2015,
8,
17
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100.000000,
"amountPaid": 0.000000,
"amountWaived": 100.000000,
"amountWrittenOff": 0,
"amountOutstanding": 0.000000,
"penalty": true,
"isActive": true,
"isPaid": false,
"isWaived": true
}
List Client Transactions
The list capability of client transaction can support pagination.
Mandatory Arguments
- offset
- Integer Mandatory, defaults to 0
- Indicates the result from which pagination starts
- limit
- Integer Mandatory, defaults to 200
- Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
Example Requests:
GET https://DomainName/api/v1/self/clients/{clientId}/transactions?limit=5&offset=0
GET self/clients/226/transactions?limit=5&offset=0
Content-Type: application/json
No Request Body:
{
"totalFilteredRecords": 20,
"pageItems": [
{
"id": 226,
"officeId": 1,
"officeName": "Head Office",
"type": {
"id": 1,
"code": "clientTransactionType.payCharge",
"value": "PAY_CHARGE"
},
"date": [
2015,
9,
2
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 22,
"submittedOnDate": [
2015,
9,
2
],
"reversed": false
}
]
}
Retrieve a Client Transaction
Example Requests:
GET https://DomainName/api/v1/self/clients/{clientId}/transaction/{transactionId}
{
"id": 1,
"officeId": 1,
"officeName": "Head Office",
"type": {
"id": 1,
"code": "clientTransactionType.payCharge",
"value": "PAY_CHARGE"
},
"date": [
2015,
8,
17
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 60.000000,
"submittedOnDate": [
2015,
8,
19
],
"reversed": true
}
Retrieve Loan Details Template
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- Field Defaults
- Allowed Value Lists
Arguments
- templateType
- String mandatory, only allowed value is individual
-
templateType value decides the required template data for creating a new loan application. -
'individual': Loan template data for creating individual loans. - clientId
- Integer mandatory
Optional Arguments
- productId
- Integer optional
- If entered, productId, productName and selectedProduct fields are returned.
Example Requests:
GET https://DomainName/api/v1/self/loans/template?templateType=individual&clientId=1
{
"clientId": 1,
"clientName": "Kampala first Client",
"clientOfficeId": 2,
"timeline": {
"expectedDisbursementDate": [
2013,
3,
8
]
},
"productOptions": [
{
"id": 1,
"name": "Kampala Product (with cash accounting)"
}
]
}
GET https://DomainName/api/v1/self/loans/template?templateType=individual&clientId=1&productId=1
{
"clientId": 1,
"clientName": "Kampala first Client",
"clientOfficeId": 2,
"loanProductId": 1,
"loanProductName": "Kampala Product (with cash accounting)",
"loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.",
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"principal": 1000000,
"termFrequency": 12,
"termPeriodFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRatePerPeriod": 24,
"interestRateFrequencyType": {
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
},
"annualInterestRate": 24,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"timeline": {
"expectedDisbursementDate": [
2013,
3,
8
]
},
"daysInMonthType": {
"id": 30,
"code": "DaysInMonthType.days360",
"value": "30 Days"
},
"daysInYearType": {
"id": 360,
"code": "DaysInYearType.days360",
"value": "360 Days"
},
"isInterestRecalculationEnabled": true,
"interestRecalculationData": {
"interestRecalculationCompoundingType": {
"id": 2,
"code": "interestRecalculationCompoundingMethod.fee",
"value": "Fee"
},
"recalculationCompoundingFrequencyType": {
"id":1,
"code":"interestRecalculationFrequencyType.same.as.repayment.period",
"value":"Same as repayment period"
},
"rescheduleStrategyType": {
"id": 2,
"code": "loanRescheduleStrategyMethod.reduce.number.of.installments",
"value": "Reduce number of installments"
},
"recalculationRestFrequencyType": {
"id":1,
"code":"interestRecalculationFrequencyType.same.as.repayment.period",
"value":"Same as repayment period"
}
}
"charges": [],
"productOptions": [
{
"id": 1,
"name": "Kampala Product (with cash accounting)"
}
],
"loanOfficerOptions": [
{
"id": 2,
"firstname": "Kampala",
"lastname": "LoanOfficer",
"displayName": "LoanOfficer, Kampala",
"officeId": 2,
"officeName": "Uganda (Kampala)",
"isLoanOfficer": true
}
],
"loanPurposeOptions": [
{
"id": 20,
"name": "option.Agriculture",
"position": 1
},
{
"id": 21,
"name": "option.Manufacturing",
"position": 20
},
{
"id": 22,
"name": "option.HousingImprovement",
"position": 21
}
],
"termFrequencyTypeOptions": [
{
"id": 0,
"code": "loanTermFrequency.periodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "loanTermFrequency.periodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "loanTermFrequency.periodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "loanTermFrequency.periodFrequencyType.years",
"value": "Years"
}
],
"repaymentFrequencyTypeOptions": [
{
"id": 0,
"code": "repaymentFrequency.periodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "repaymentFrequency.periodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
}
],
"interestRateFrequencyTypeOptions": [
{
"id": 2,
"code": "interestRateFrequency.periodFrequencyType.months",
"value": "Per month"
},
{
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
}
],
"amortizationTypeOptions": [
{
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
{
"id": 0,
"code": "amortizationType.equal.principal",
"value": "Equal principle payments"
}
],
"interestTypeOptions": [
{
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
{
"id": 0,
"code": "interestType.declining.balance",
"value": "Declining Balance"
}
],
"interestCalculationPeriodTypeOptions": [
{
"id": 0,
"code": "interestCalculationPeriodType.daily",
"value": "Daily"
},
{
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
}
],
"transactionProcessingStrategyOptions": [
{
"id": 2,
"code": "heavensfamily-strategy",
"name": "Heavensfamily"
}
],
"chargeOptions": [
{
"id": 1,
"name": "Bank Fee (per installment)",
"active": true,
"penalty": false,
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"amount": 1500,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
}
],
"loanCollateralOptions": [
{
"id": 17,
"name": "option.House",
"position": 1
},
{
"id": 18,
"name": "option.Television",
"position": 17
},
{
"id": 19,
"name": "option.Gold",
"position": 18
}
],
"accountLinkingOptions":[
{
"id":1,
"accountNo":"000000001",
"clientId":1,
"clientName":"pramod nuthakki",
"productId":1,
"productName":"pramod sav",
"fieldOfficerId":0,
"currency":{"code":"USD","name":"US Dollar","decimalPlaces":2,"displaySymbol":"$","nameCode":"currency.USD","displayLabel":"US Dollar ($)"}
}
]
}
Calculate Loan Repayment Schedule
Mandatory Fields |
productId, principal, loanTermFrequency, loanTermFrequencyType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, expectedDisbursementDate, transactionProcessingStrategyId |
POST https://DomainName/api/v1/self/loans?command=calculateLoanSchedule
POST self/loans?command=calculateLoanSchedule
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en_GB",
"productId": 1,
"principal": "100,000.00",
"loanTermFrequency": 12,
"loanTermFrequencyType": 2,
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": 2,
"interestRatePerPeriod": 2,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"expectedDisbursementDate": "20 September 2011",
"transactionProcessingStrategyId": 2
}
{
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"loanTermInDays": 366,
"totalPrincipalDisbursed": 100000,
"totalPrincipalExpected": 100000,
"totalPrincipalPaid": 0,
"totalInterestCharged": 13471.52,
"totalFeeChargesCharged": 0,
"totalPenaltyChargesCharged": 0,
"totalWaived": 0,
"totalWrittenOff": 0,
"totalRepaymentExpected": 113471.52,
"totalRepayment": 0,
"totalOutstanding": 0,
"periods": [
{
"period": 0,
"dueDate": [
2011,
9,
20
],
"principalDisbursed": 100000,
"principalLoanBalanceOutstanding": 100000,
"feeChargesDue": 0,
"feeChargesOutstanding": 0,
"totalOriginalDueForPeriod": 0,
"totalDueForPeriod": 0,
"totalOutstandingForPeriod": 0,
"totalOverdue": 0,
"totalActualCostOfLoanForPeriod": 0
},
{
"period": 1,
"fromDate": [
2011,
9,
20
],
"dueDate": [
2011,
10,
20
],
"daysInPeriod": 30,
"principalOriginalDue": 7455.96,
"principalDue": 7455.96,
"principalOutstanding": 7455.96,
"principalLoanBalanceOutstanding": 92544.04,
"interestOriginalDue": 2000,
"interestDue": 2000,
"interestOutstanding": 2000,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 9455.96,
"totalDueForPeriod": 9455.96,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 9455.96,
"totalOverdue": 9455.96,
"totalActualCostOfLoanForPeriod": 2000
},
...
...
{
"period": 12,
"fromDate": [
2012,
8,
20
],
"dueDate": [
2012,
9,
20
],
"daysInPeriod": 31,
"principalOriginalDue": 9270.56,
"principalDue": 9270.56,
"principalOutstanding": 9270.56,
"principalLoanBalanceOutstanding": 0,
"interestOriginalDue": 185.4,
"interestDue": 185.4,
"interestOutstanding": 185.4,
"feeChargesDue": 0,
"penaltyChargesDue": 0,
"totalOriginalDueForPeriod": 9455.96,
"totalDueForPeriod": 9455.96,
"totalPaidForPeriod": 0,
"totalOutstandingForPeriod": 9455.96,
"totalOverdue": 9455.96,
"totalActualCostOfLoanForPeriod": 185.4
}
]
}
Submit a new Loan Application
Only individual loanType can be used by Self Service User
Mandatory Fields |
clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, expectedDisbursementDate, submittedOnDate, loanType |
Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period |
recalculationRestFrequencyDate |
Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period |
recalculationCompoundingFrequencyDate |
Optional Fields |
graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) |
POST https://DomainName/api/v1/self/loans
POST self/loans
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en_GB",
"clientId": 1,
"productId": 1,
"principal": "10,000.00",
"loanTermFrequency": 12,
"loanTermFrequencyType": 2,
"loanType": "individual",
"numberOfRepayments": 10,
"repaymentEvery": 1,
"repaymentFrequencyType": 2,
"interestRatePerPeriod": 10,
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"transactionProcessingStrategyId": 1,
"expectedDisbursementDate": "10 Jun 2013",
"submittedOnDate": "10 Jun 2013",
"linkAccountId" : "1",
"fixedEmiAmount":1100,
"maxOutstandingLoanBalance":"35000",
"disbursementData":[{"expectedDisbursementDate":"01 November 2013",
"principal":22000,"approvedPrincipal":22000}]
}
{
"officeId": 1,
"clientId": 1,
"loanId": 1,
"resourceId": 1
}
Retrieve a Loan
Arguments
- associations
- optional, a comma separated list of loan 'associations' (itemised below).
-
Associations are just extra pieces of data that you might or might not want to retrieve.
- 'repaymentSchedule': Loan schedule data.
- 'originalSchedule': Loan schedule data without interest recalculations.
- 'futureSchedule': Loan schedule data from today date(will be displayed only for interest first repayment strategy processors)
- 'transactions': Loan transactions data.
- 'charges': Loan charges data.
- 'guarantors': Loan guarantors data.
- 'collateral': Loan collateral data.
- 'linkedAccount': Account linked to loan.
- 'multiDisburseDetails': Loan multi-disbursement details.
Example Requests:
GET https://DomainName/api/v1/self/loans/{loanId}
{
"id": 1,
"accountNo": "000000001",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": true,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"clientId": 1,
"clientName": "Kampala first Client",
"clientOfficeId": 2,
"loanProductId": 1,
"loanProductName": "Kampala Product (with cash accounting)",
"loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.",
"loanPurposeId": 22,
"loanPurposeName": "option.HousingImprovement",
"loanOfficerId": 2,
"loanOfficerName": "LoanOfficer, Kampala",
"loanType": {
"id": 1,
"code": "loanType.individual",
"value": "Individual"
},
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"principal": 1000000,
"termFrequency": 12,
"termPeriodFrequencyType": {
"id": 2,
"code": "termFrequency.periodFrequencyType.months",
"value": "Months"
},
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": {
"id": 2,
"code": "repaymentFrequency.periodFrequencyType.months",
"value": "Months"
},
"interestRatePerPeriod": 24,
"interestRateFrequencyType": {
"id": 3,
"code": "interestRateFrequency.periodFrequencyType.years",
"value": "Per year"
},
"annualInterestRate": 24,
"amortizationType": {
"id": 1,
"code": "amortizationType.equal.installments",
"value": "Equal installments"
},
"interestType": {
"id": 1,
"code": "interestType.flat",
"value": "Flat"
},
"interestCalculationPeriodType": {
"id": 1,
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"timeline": {
"submittedOnDate": [
2012,
4,
3
],
"submittedByUsername": "admin",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedOnDate": [
2012,
4,
3
],
"approvedByUsername": "admin",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"expectedDisbursementDate": [
2012,
4,
10
],
"actualDisbursementDate": [
2012,
4,
10
],
"disbursedByUsername": "admin",
"disbursedByFirstname": "App",
"disbursedByLastname": "Administrator",
"expectedMaturityDate": [
2013,
4,
10
]
},
"summary": {
"currency": {
"code": "UGX",
"name": "Uganda Shilling",
"decimalPlaces": 2,
"displaySymbol": "USh",
"nameCode": "currency.UGX",
"displayLabel": "Uganda Shilling (USh)"
},
"principalDisbursed": 1000000,
"principalPaid": 0,
"principalWrittenOff": 0,
"principalOutstanding": 1000000,
"principalOverdue": 833333.3,
"interestCharged": 240000,
"interestPaid": 0,
"interestWaived": 0,
"interestWrittenOff": 0,
"interestOutstanding": 240000,
"interestOverdue": 200000,
"feeChargesCharged": 18000,
"feeChargesDueAtDisbursementCharged": 0,
"feeChargesPaid": 0,
"feeChargesWaived": 0,
"feeChargesWrittenOff": 0,
"feeChargesOutstanding": 18000,
"feeChargesOverdue": 15000,
"penaltyChargesCharged": 0,
"penaltyChargesPaid": 0,
"penaltyChargesWaived": 0,
"penaltyChargesWrittenOff": 0,
"penaltyChargesOutstanding": 0,
"penaltyChargesOverdue": 0,
"totalExpectedRepayment": 1258000,
"totalRepayment": 0,
"totalExpectedCostOfLoan": 258000,
"totalCostOfLoan": 0,
"totalWaived": 0,
"totalWrittenOff": 0,
"totalOutstanding": 1258000,
"totalOverdue": 1048333.3,
"overdueSinceDate": [
2012,
5,
10
],
"linkedAccount":{
"id":1,
"accountNo":"000000001"
},
"disbursementDetails":[{"id":71,"expectedDisbursementDate":[2013,11,1],"principal":22000.000000,"approvedPrincipal":22000.000000}],
"fixedEmiAmount":1100.000000,
"maxOutstandingLoanBalance":35000,
"canDisburse":false,
"emiAmountVariations": [],
"inArrears": true,
"isNPA":false,
"overdueCharges": [
{
"id": 20,
"name": "overdraft penality",
"active": true,
"penalty": true,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 3.000000,
"chargeTimeType": {
"id": 9,
"code": "chargeTimeType.overdueInstallment",
"value": "overdue fees"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
"chargeCalculationType": {
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
},
"feeInterval": 2,
"feeFrequency": {
"id": 1,
"code": "feeFrequencyperiodFrequencyType.weeks",
"value": "Weeks"
}
}
]
}
}
Update a Loan Application
Loan application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method.
PUT https://Domain Name/api/v1/self/loans/{loanId}
PUT self/loans/1
Content-Type: application/json
No Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"productId": 1,
"principal": "5000",
"loanTermFrequency": 10,
"loanTermFrequencyType": 0,
"numberOfRepayments": 10,
"repaymentEvery": 1,
"repaymentFrequencyType": 0,
"interestRatePerPeriod": 2,
"interestType": 0,
"interestCalculationPeriodType": 0,
"amortizationType": 1,
"expectedDisbursementDate": "04 March 2014",
"transactionProcessingStrategyId": 1
}
{
"officeId": 2,
"clientId": 1,
"loanId": 1,
"resourceId": 1,
"changes": {
"principal": 5000,
"locale": "en"
}
}
Applicant Withdraws from Loan Application
Mandatory Fields |
withdrawnOnDate |
POST https://DomainName/api/v1/self/loans/{loanId}?command=withdrawnByApplicant
POST self/loans/1?command=withdrawnByApplicant
Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "20 September 2011",
"note": "Reason loan applicant withdrew from application."
}
{
"officeId": 1,
"clientId": 1,
"loanId": 2,
"resourceId": 2,
"changes": {
"status": {
"id": 400,
"code": "loanStatusType.withdrawn.by.client",
"value": "Withdrawn by applicant",
"pendingApproval": false,
"waitingForDisbursal": false,
"active": false,
"closedObligationsMet": false,
"closedWrittenOff": false,
"closedRescheduled": false,
"closed": false,
"overpaid": false
},
"locale": "en",
"dateFormat": "dd MMMM yyyy",
"withdrawnOnDate": "20 September 2011",
"closedOnDate": "20 September 2011"
}
}
Retrieve a Loan Transaction Details
Example Request:
GET https://DomainName/api/v1/self/loans/{loanId}/transactions/{transactionId}
{
"id": 3,
"type": {
"id": 2,
"code": "loanTransactionType.repayment",
"value": "Repayment",
"disbursement": false,
"repaymentAtDisbursement": false,
"repayment": true,
"contra": false,
"waiveInterest": false,
"waiveCharges": false,
"writeOff": false,
"recoveryRepayment": false
},
"date": [
2012,
5,
14
],
"manuallyReversed": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 559.88,
"interestPortion": 559.88
}
List Loan Charges
Example Requests:
GET https://DomainName/api/v1/self/loans/{loanId}/charges
[
{
"id": 1,
"chargeId": 1,
"name": "Loan Processing fee",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
},
{
"id": 7,
"chargeId": 2,
"name": "Collection Fee",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2013,
3,
29
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
}
]
Retrieve a Loan Charge
Example Requests:
GET https://DomainName/api/v1/self/loans/{loanId}/charges/{chargeId}
{
"id": 1,
"chargeId": 1,
"name": "Loan Processing fee",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.disbursement",
"value": "Disbursement"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
}
Retrieve a savings account:
Arguments
- associations
- optional, a comma separated list of savings 'associations' (itemized below).
Associations are just extra pieces of data that you might or might not want to retrieve.- 'transactions': Gets data related to transactions on the account e.g. ?associations=transactions
- 'charges':Savings Account charges data.
Example Requests :
GET https://DomainName/api/v1/self/savingsaccounts/{accountId}
{
"id": 1,
"accountNo": "000000001",
"clientId": 1,
"clientName": "small business",
"savingsProductId": 1,
"savingsProductName": "Passbook Savings",
"fieldOfficerId": 0,
"status": {
"id": 100,
"code": "savingsAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"withdrawnByApplicant": false,
"active": false,
"closed": false
},
"timeline": {
"submittedOnDate": [
2013,
3,
1
]
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"nominalAnnualInterestRate": 5,
"interestCompoundingPeriodType": {
"id": 1,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
"value": "Daily"
},
"interestPostingPeriodType": {
"id": 4,
"code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
"value": "Monthly"
},
"interestCalculationType": {
"id": 1,
"code": "savingsInterestCalculationType.dailybalance",
"value": "Daily Balance"
},
"interestCalculationDaysInYearType": {
"id": 365,
"code": "savingsInterestCalculationDaysInYearType.days365",
"value": "365 Days"
},
"summary": {
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"accountBalance": 0
}
}
Retrieve Savings Account Transaction:
Example Requests:
GET https://DomainName/api/v1/self/savingsaccounts/{accountId}/transactions/{transactionId}
{
"id": 1,
"transactionType": {
"id": 2,
"code": "savingsAccountTransactionType.withdrawal",
"value": "Withdrawal",
"deposit": false,
"withdrawal": true,
"interestPosting": false,
"feeDeduction": false
},
"accountId": 1,
"accountNo": "000000001",
"date": [
2013,
8,
7
],
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 0,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"paymentDetailData": {
"id": 62,
"paymentType": {
"id": 11,
"name": "cash"
},
"accountNumber": "",
"checkNumber": "",
"routingCode": "",
"receiptNumber": "",
"bankNumber": ""
},
"amount": 5000,
"runningBalance": 0,
"reversed": true
}
List Savings Charges
Example Requests:
GET https://DomainName/api/v1/self/savingsaccounts/{accountId}/charges
[
{
"id": 1,
"chargeId": 3,
"accountId": 57,
"name": "Savings account maintenance fee",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
},
{
"id": 2,
"chargeId": 4,
"accountId": 57,
"name": "Pass book Fee",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2013,
3,
29
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
},
{
"id": 9,
"chargeId": 4,
"accountId": 57,
"name": "Withdrawal fee percentage",
"chargeTimeType": {
"id": 5,
"code": "chargeTimeType.withdrawalFee",
"value": "Withdrawal Fee"
},
"chargeCalculationType": {
"id": 2,
"code": "chargeCalculationType.percent.of.amount",
"value": "% Amount"
},
"percentage": 0.25,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 0,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 0,
"amountOrPercentage": 0.25,
"penalty": false
},
{
"id": 10,
"chargeId": 6,
"accountId": 57,
"name": "Annual fee - INR",
"chargeTimeType": {
"id": 6,
"code": "chargeTimeType.annualFee",
"value": "Annual Fee"
},
"feeOnMonthDay": [
10,
9
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 50,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 50,
"amountOrPercentage": 50,
"penalty": false
}
]
Retrieve a Savings account Charge
Example Requests:
GET https://DomainName/api/v1/self/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}
{
"id": 1,
"chargeId": 1,
"name": "Passbook fee",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
}
Retrieve Account Transfer Template
Returns list of loan/savings accounts that can be used for account transfer
Example Requests:
GET https://DomainName/api/v1/self/accounttransfers/template
{
"fromAccountOptions": [
{
"accountId": 1,
"accountNo": "00000001",
"accountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"clientId": 1,
"clientName": "ABC",
"officeId": 1,
"officeName": "HEAD OFFICE"
},
{
"accountId": 5,
"accountNo": "00000005",
"accountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"clientId": 2,
"clientName": "XYZ",
"officeId": 3,
"officeName": "REGIONAL OFFICE"
}
],
"toAccountOptions": [
{
"accountId": 1,
"accountNo": "00000001",
"accountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"clientId": 1,
"clientName": "ABC",
"officeId": 1,
"officeName": "HEAD OFFICE"
},
{
"accountId": 5,
"accountNo": "00000005",
"accountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"clientId": 2,
"clientName": "XYZ",
"officeId": 3,
"officeName": "REGIONAL OFFICE"
}
]
}
Create new Transfer
Ability to create new transfer of monetary funds from one account to another.
POST https://DomainName/api/v1/self/accounttransfers
POST self/accounttransfers/
Content-Type: application/json
No Request Body:
{
"fromOfficeId": 1,
"fromClientId": 1,
"fromAccountType": 2,
"fromAccountId": 1,
"toOfficeId": 1,
"toClientId": 1,
"toAccountType": 2,
"toAccountId": 2,
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transferDate": "01 August 2011",
"transferAmount": "112.45",
"transferDescription": "A description of the transfer"
}
{
"savingsId": 1,
"resourceId": 1
}
Beneficiary Third Party Transfer Template
Returns Account Type enumerations. Self User is expected to know office name and account number to be able to add beneficiary.
Example Requests:
GET https://DomainName/api/v1/self/beneficiaries/tpt/template
{
"accountTypeOptions":
[
{
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
{
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
}
]
}
Add TPT Beneficiary
Api to add third party beneficiary linked to current user.
Parameter Definitions
name : Nick name for beneficiary, should be unique for an self service user
officeName : Office Name of beneficiary(not id)
accountNumber : Account Number of beneficiary(not id)
transferLimit : Each transfer initiated to this account will not exceed this amount
Example Requests:
Mandatory Fields |
name, officeName, accountNumber, accountType |
Optional Fields |
transferLimit |
POST https://DomainName/api/v1/self/beneficiaries/tpt
POST self/beneficiaries/tpt
Content-Type: application/json
Request Body:
{
"locale": "en_GB",
"name": "beneficiary nick name",
"officeName": "HEAD OFFICE",
"accountNumber": "0000001",
"accountType": 1,
"transferLimit": 1000
}
{
"resourceId": 5
}
Get All TPT Beneficiary
Api to get all third party beneficiary linked to current user.
Example Requests:
GET https://DomainName/api/v1/self/beneficiaries/tpt
GET self/beneficiaries/tpt
Content-Type: application/json
{
[
{
"id": 1,
"name": "Client2Savings",
"officeName": "Test Office",
"clientName": "FN2 LN2",
"accountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"accountNumber": "000000002",
"transferLimit": 0
},
{
"id": 4,
"name": "Client2Loan",
"officeName": "Test Office",
"clientName": "FN2 LN2",
"accountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"accountNumber": "000000002",
"transferLimit": 1000
}]
}
Update TPT Beneficiary
Api to update third party beneficiary linked to current user.
Example Requests:
Optional Fields |
name, transferLimit |
PUT https://DomainName/api/v1/self/beneficiaries/tpt/{beneficiaryId}
PUT self/beneficiaries/tpt/5
Content-Type: application/json
Request Body:
{
"name": "beneficiary nick name",
"transferLimit": 1000
}
{
"resourceId": 5,
"changes": {
"transferLimit": 1000,
"name": "Client22"
}
}
Delete TPT Beneficiary
Api to delete third party beneficiary linked to current user.
Example Requests:
DELETE https://DomainName/api/v1/self/beneficiaries/tpt/{beneficiaryId}
DELETE self/beneficiaries/tpt/5
Content-Type: application/json
{
"resourceId": 5
}
Third Party Account Transfer Template
Returns list of loan/savings accounts that can be used for third party account transfer
Example Requests:
GET https://DomainName/api/v1/self/accounttransfers/template?type="tpt"
{
"fromAccountOptions": [
{
"accountId": 1,
"accountNo": "00000001",
"accountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"clientId": 1,
"clientName": "ABC",
"officeId": 1,
"officeName": "HEAD OFFICE"
},
{
"accountId": 5,
"accountNo": "00000005",
"accountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"clientId": 2,
"clientName": "XYZ",
"officeId": 3,
"officeName": "REGIONAL OFFICE"
}
],
"toAccountOptions": [
{
"accountId": 2,
"accountNo": "00000002",
"accountType": {
"id": 2,
"code": "accountType.savings",
"value": "Savings Account"
},
"clientId": 2,
"clientName": "ABC",
"officeId": 1,
"officeName": "HEAD OFFICE"
},
{
"accountId": 6,
"accountNo": "00000006",
"accountType": {
"id": 1,
"code": "accountType.loan",
"value": "Loan Account"
},
"clientId": 3,
"clientName": "XYZ",
"officeId": 4,
"officeName": "REGIONAL OFFICE"
}
]
}
Third Party Account Transfer
Ability to create new third party transfer of monetary funds from one account to another.
POST https://DomainName/api/v1/self/accounttransfers?type="tpt"
POST self/accounttransfers?type="tpt"
Content-Type: application/json
No Request Body:
{
"fromOfficeId": 1,
"fromClientId": 1,
"fromAccountType": 2,
"fromAccountId": 1,
"toOfficeId": 1,
"toClientId": 2,
"toAccountType": 2,
"toAccountId": 2,
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transferDate": "01 August 2011",
"transferAmount": "112.45",
"transferDescription": "A description of the transfer"
}
{
"savingsId": 1,
"resourceId": 1
}