Musoni API Documentation
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-Fineract-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.
Batch API
The Musoni 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-Fineract-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 Musoni 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-Fineract-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-Fineract-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 Fineract 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": "",
"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": []
}
]
}
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 |
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"
}
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) |
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 ($)"}
}
]
}
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,
"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": "Musoni",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedOnDate": [
2012,
6,
1
],
"approvedByUsername": "Musoni",
"approvedByFirstname": "App",
"approvedByLastname": "Administrator",
"expectedDisbursementDate": [
2012,
6,
1
],
"actualDisbursementDate": [
2012,
6,
1
],
"disbursedByUsername": "Musoni",
"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,
"repaymentsStartingFromDate": "06 April 2014",
"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 |
Optional Fields |
graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true), repaymentsStartingFromDate |
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,
"repaymentsStartingFromDate": "12 Jul 2013",
"expectedDisbursementDate": "10 Jun 2013",
"submittedOnDate": "10 Jun 2013",
"linkAccountId" : "1",
"fixedEmiAmount":1100
}
{
"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"
}
{
"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 and only when they have no associated data. If a loan cannot be deleted revert to the options to reject or withdraw the loan.
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. -
'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"
}
}
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 LoanCollateral code) 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": "Musoni",
"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}]
}
}
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) |
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": "Musoni 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": "Musoni-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": "Musoni 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"
}
},
"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.
Mandatory Fields |
name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType |
Optional Fields |
graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, 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,
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
}
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
}
}
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
}
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@.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@.org"
"password" : "XXXX"
}
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 }
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
}
]
}
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"
}
}
]
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": "",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedDate": [2016,
4,
1],
"approvedByUsername": "",
"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": "",
"submittedByFirstname": "App",
"submittedByLastname": "Administrator",
"approvedDate": [2016,
4,
1],
"approvedByUsername": "",
"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 |
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
}
]
}
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 |
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"}]
}
{
"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": "",
"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": "",
"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
}
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": ""
}
]
}
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": "",
"createdOn": 1342498505000,
"updatedById": 1,
"updatedByUsername": "",
"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": "",
"createdOn": 1359463135000,
"updatedById": 1,
"updatedByUsername": "",
"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"
}
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 ($)"
}
]
}
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":""},
{"criteriaId":2,
"criteriaName":"Low Risk Products Criteria",
"createdBy":""}
]
}
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": "",
"createdOn": "Nov 18, 2015",
"modifiedBy": "",
"modifiedOn": "Nov 18, 2015"
},
{
"id": 2,
"name": "Floating Rate 2",
"isBaseLendingRate": false,
"isActive": true,
"createdBy": "",
"createdOn": "Nov 18, 2015",
"modifiedBy": "",
"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": "",
"createdOn": "Nov 18, 2015",
"modifiedBy": "",
"modifiedOn": "Nov 18, 2015",
"ratePeriods":
[
{
"id": 1,
"fromDate": "Dec 15, 2015",
"interestRate": 11,
"isDifferentialToBaseLendingRate": false,
"isActive": true,
"createdBy": "",
"createdOn": "Nov 18, 2015",
"modifiedBy": "",
"modifiedOn": "Nov 18, 2015"
},
{
"id": 2,
"fromDate": "Nov 19, 2015",
"interestRate": 10,
"isDifferentialToBaseLendingRate": false,
"isActive": true,
"createdBy": "",
"createdOn": "Nov 18, 2015",
"modifiedBy": "",
"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"
}
}