|
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.
@@ -7221,12 +7221,12 @@ An enumeration that indicates the type of transaction processing strategy to be
If entered, productId, productName and selectedProduct
fields are returned.
-
+
staffInSelectedOfficeOnly
Boolean optional
- Defaults to false if not provided. If staffInSelectedOfficeOnly=true only loan officers
+ Defaults to false if not provided. If staffInSelectedOfficeOnly=true only loan officers
who are associated with the selected branch are returned.
activeOnly
@@ -7584,7 +7584,7 @@ GET https://DomainName/api/v1/loans/template?templateType=individual&clientId=1&
'originalSchedule': Loan schedule data without interest recalculations.
- 'futureSchedule': Loan schedule data from today date(will be displayed only for interest first repayment strategy processors)
+ 'futureSchedule': Loan schedule data from today date(will be displayed only for interest first repayment strategy processors)
'transactions': Loan transactions data.
@@ -7848,7 +7848,7 @@ GET https://DomainName/api/v1/loans/{loanId}
Integer optional, defaults to 0
Indicates from what result to start from.
-
+
limit
Integer optional, defaults to 200
@@ -7869,10 +7869,10 @@ GET https://DomainName/api/v1/loans/{loanId}
officeId
- Integer optional
+ Integer optional
Provides ability to restrict list of loans returned based on the office there associated with.
-
+
underHierarchy
String optional
@@ -7895,7 +7895,7 @@ GET https://DomainName/api/v1/loans/{loanId}
String optional
- Use an sql fragment valid for the underlying loan schema to filter results. e.g. display_name like %K%
+ Use an sql fragment valid for the underlying loan schema to filter results. e.g. display_name like %K%
Example Requests:
loans
@@ -8091,7 +8091,7 @@ GET https://DomainName/mifosng-provider/api/v1/loans
PUT https://Domain Name/api/v1/loans/{loanId}
- PUT loans/1
+ PUT loans/1
Content-Type: application/json
No Request Body:
{
@@ -8151,7 +8151,7 @@ POST https://DomainName/api/v1/loans?command=calculateLoanSchedule
POST loans?command=calculateLoanSchedule
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
@@ -8321,7 +8321,7 @@ POST https://DomainName/api/v1/loans
POST loans
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
@@ -8388,7 +8388,7 @@ POST https://DomainName/api/v1/loans/{loanId}?command=approve
POST loans/1?command=approve
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en",
@@ -8427,7 +8427,7 @@ Request Body:
-
+
@@ -8439,12 +8439,12 @@ POST https://DomainName/api/v1/loans/{loanId}?command=recoverGuarantees
POST loans/1?command=approve
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
{
-
+
"loanId": 1
}
@@ -8524,7 +8524,7 @@ Request Body:
-
+
@@ -8540,7 +8540,7 @@ Request Body:
"unassignedDate":"15 September 2014",
"locale":"en",
"dateFormat":"dd MMMM yyyy"
-}
+}
{
@@ -8572,7 +8572,7 @@ POST https://DomainName/api/v1/loans/{loanId}?command=reject
POST loans/1?command=reject
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en",
@@ -8630,7 +8630,7 @@ POST https://DomainName/api/v1/loans/{loanId}?command=withdrawnByApplicant
POST loans/1?command=withdrawnByApplicant
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en",
@@ -8697,7 +8697,7 @@ POST https://DomainName/api/v1/loans/{loanId}?command=disburse
POST loans/1?command=disburse
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
@@ -8777,7 +8777,7 @@ POST https://DomainName/api/v1/loans/{loanId}?command=disburseToSavings
POST loans/1?command=disburse
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
@@ -8875,7 +8875,7 @@ DELETE https://DomainName/api/v1/loans/{loanId}
DELETE loans/1
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -8947,7 +8947,7 @@ No Request Body:
loan's inArrearsTolerance
- 'refundbycash' "date" is set to the current date
+ 'refundbycash' "date" is set to the current date
"total" "amount" is set
to the total amount paid in advance.
@@ -9037,7 +9037,7 @@ Request Body:
-
+
@@ -9221,9 +9221,9 @@ Request Body:
-
+
-
+
@@ -9240,7 +9240,7 @@ Request Body:
{ }
-
+
{
"officeId": 1,
"clientId": 1,
@@ -9297,7 +9297,7 @@ GET https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId}
-
+
@@ -9318,7 +9318,7 @@ POST https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId}
POST loans/1/transactions/2
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en_GB",
@@ -9329,13 +9329,13 @@ Request Body:
}
-{
+{
"resourceId": 16
}
-
+
@@ -9343,7 +9343,7 @@ Request Body:
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.
+ if he or she should default on a loan obligation. A guarantor acts as a co-signor of sorts.
@@ -9404,7 +9404,7 @@ Request Body:
| savingsId |
- | Guarantors Savings Account on which Amount will be blocked
+ | Guarantors Savings Account on which Amount will be blocked
|
@@ -9620,7 +9620,7 @@ POST https://DomainName/api/v1//loans/{loanId}}/guarantors
POST /loans/1/guarantors
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
guarantorTypeId:3,
@@ -9637,7 +9637,7 @@ Request Body:
POST /loans/1/guarantors
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
guarantorTypeId:1,
@@ -9666,8 +9666,8 @@ PUT https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}
PUT loans/1/guarantors/1
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
entityId:1
}
@@ -9701,7 +9701,7 @@ DELETE https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}?guarant
DELETE loans/1/guarantors/1
DELETE loans/1/guarantors/1?guarantorFundingId=1
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -9718,12 +9718,12 @@ No Request Body:
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
+ 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
+ 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
@@ -9734,8 +9734,8 @@ No Request Body:
Identifies the type of a collateral
- Ex: Gold, property etc (permitted types can be configured using
- Code Values for
+ Ex: Gold, property etc (permitted types can be configured using
+ Code Values for
the Code LoanCollateral)
Refer Retrieve
Collateral Details Template for complete
@@ -9762,8 +9762,8 @@ No Request Body:
|
| 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
+ The currency defaults to the currency of the
+ Loan for which this Collateral serves as a
guarantee
|
@@ -9915,7 +9915,7 @@ POST https://DomainName/api/v1//loans/{loanId}/collaterals
POST /loans/1/collaterals
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
collateralTypeId:9,
@@ -9929,7 +9929,7 @@ Request Body:
POST /loans/1/collaterals
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"collateralTypeId":"8",
@@ -9960,9 +9960,9 @@ PUT https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId}
PUT loans/1/collaterals/12
-Content-Type: application/json
-Request Body:
-{
+Content-Type: application/json
+Request Body:
+{
"description": "22 Carat Gold chain weighing 12 grams"
}
@@ -9992,7 +9992,7 @@ DELETE https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId}
DELETE loans/1/collaterals/13
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -10011,10 +10011,10 @@ No Request Body:
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
+ 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
+ specific to the context of a Charge being associated with a Loan) are
described here
@@ -10338,7 +10338,7 @@ POST https://DomainName/api/v1/loans/{loanId}/charges
POST /loans/1/charges
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"chargeId": "2",
@@ -10364,7 +10364,7 @@ Request Body:
Update a Loan Charge
- Currently Loan Charges may be updated only if the Loan
+ Currently Loan Charges may be updated only if the Loan
is not yet approved
@@ -10374,8 +10374,8 @@ PUT https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}
PUT loans/1/charges/12
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
@@ -10414,8 +10414,8 @@ POST https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}?command=pay
POST loans/1/charges/12?command=pay
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
@@ -10451,7 +10451,7 @@ DELETE https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}
DELETE loans/1/charges/2
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -10464,7 +10464,7 @@ No Request Body:
-
+
@@ -10544,7 +10544,7 @@ No Request Body:
-
+
@@ -10576,19 +10576,19 @@ POST https://DomainName/api/v1/rescheduleloans
POST rescheduleloans
Content-Type: application/json Request Body:
-{
- "loanId": 1,
- "graceOnPrincipal": 2,
- "graceOnInterest": 3,
+{
+ "loanId": 1,
+ "graceOnPrincipal": 2,
+ "graceOnInterest": 3,
"extraTerms": 2,
- "rescheduleFromDate": "04 December 2014",
- "dateFormat": "dd MMMM yyyy",
- "locale": "en",
+ "rescheduleFromDate": "04 December 2014",
+ "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
"recalculateInterest": true,
"submittedOnDate": "04 September 2014",
"newInterestRate" : 28,
"rescheduleReasonId": 1
-}
+}
{
@@ -10601,17 +10601,17 @@ Content-Type: application/json Request Body:
POST rescheduleloans
Content-Type: application/json Request Body:
-{
- "loanId": 1,
- "graceOnPrincipal": 2,
- "rescheduleFromDate": "04 December 2014",
+{
+ "loanId": 1,
+ "graceOnPrincipal": 2,
+ "rescheduleFromDate": "04 December 2014",
"adjustedDueDate": "20 December 2014",
- "dateFormat": "dd MMMM yyyy",
- "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
"submittedOnDate": "04 September 2014",
"rescheduleReasonComment" : "Client has gone AWOL",
"rescheduleReasonId": 1
-}
+}
{
@@ -10694,7 +10694,7 @@ GET https://DomainName/api/v1/rescheduleloans/{requestId}
GET https://DomainName/api/v1/rescheduleloans/{requestId}?command=previewLoanReschedule
-
+
"currency": {
"code": "KES",
"name": "Kenyan Shilling",
@@ -11012,8 +11012,8 @@ POST https://DomainName/api/v1/offices
POST offices
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"name": "Example New Branch",
"dateFormat": "dd MMMM yyyy",
@@ -11043,10 +11043,10 @@ PUT https://DomainName/api/v1/offices/{officeId}
PUT offices/1
-Content-Type: application/json
-Request Body:
-{
- "name": "Name is updated"
+Content-Type: application/json
+Request Body:
+{
+ "name": "Name is updated"
}
@@ -11233,7 +11233,7 @@ Request Body:
-
+
@@ -11242,7 +11242,7 @@ Request Body:
|
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.
@@ -12566,13 +12566,13 @@ GET https://DomainName/api/v1/loanproducts/{productId}
Create a Loan Product
- Depending of the Accounting Rule (accountingRule) selected,
- additional fields with details of the appropriate Ledger Account
+ Depending of the Accounting Rule (accountingRule) selected,
+ additional fields with details of the appropriate Ledger Account
identifiers would need to be passed in.
Refer
- MifosX Accounting Specs Draft for more details regarding the
+ MifosX Accounting Specs Draft for more details regarding the
significance of the selected accounting rule
@@ -12582,7 +12582,7 @@ GET https://DomainName/api/v1/loanproducts/{productId}
|
| name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal,
- numberOfRepayments, repaymentEvery, repaymentFrequencyType,
+ numberOfRepayments, repaymentEvery, repaymentFrequencyType,
interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType,
interestCalculationPeriodType, transactionProcessingStrategyId,
accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType |
@@ -12607,8 +12607,8 @@ GET https://DomainName/api/v1/loanproducts/{productId}
Additional Mandatory Fields for Cash(2) based accounting |
- | fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId,
- incomeFromFeeAccountId, incomeFromPenaltyAccountId,
+ | fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId,
+ incomeFromFeeAccountId, incomeFromPenaltyAccountId,
writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId |
@@ -12617,13 +12617,13 @@ GET https://DomainName/api/v1/loanproducts/{productId}
Additional Mandatory Fields for periodic (3) and upfront (4)accrual accounting |
- | fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId,
- incomeFromFeeAccountId, incomeFromPenaltyAccountId,
+ | fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId,
+ incomeFromFeeAccountId, incomeFromPenaltyAccountId,
writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId,
receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId |
-
+
Additional Mandatory Fields if interest recalculation is enabled(true) |
@@ -12631,7 +12631,7 @@ GET https://DomainName/api/v1/loanproducts/{productId}
interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType |
-
+
Additional Optional Fields if interest recalculation is enabled(true) and recalculationRestFrequencyType is not same as repayment period |
@@ -12639,7 +12639,7 @@ GET https://DomainName/api/v1/loanproducts/{productId}
recalculationRestFrequencyInterval, recalculationRestFrequencyDate |
-
+
Additional Mandatory Fields if Hold Guarantee funds is enabled(true) |
@@ -12647,7 +12647,7 @@ GET https://DomainName/api/v1/loanproducts/{productId}
mandatoryGuarantee |
-
+
Additional Optional Fields if Hold Guarantee funds is enabled(true) |
@@ -12662,7 +12662,7 @@ POST https://DomainName/api/v1/loanproducts
POST loanproducts
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{"currencyCode":"USD",
"includeInBorrowerCycle":"true",
@@ -12722,13 +12722,13 @@ Request Body:
}
-{
- "resourceId": 1
+{
+ "resourceId": 1
}
POST loanproducts
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"name": "LP Cash Accounting",
@@ -12784,17 +12784,17 @@ Request Body:
"incomeAccountId": "9"
}
]
-
+
}
-{
- "resourceId": 2
+{
+ "resourceId": 2
}
POST loanproducts
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"name": "LP Accrual Accounting",
@@ -12830,11 +12830,11 @@ Request Body:
}
-{
- "resourceId": 3
+{
+ "resourceId": 3
}
-
+
@@ -12850,8 +12850,8 @@ PUT https://DomainName/api/v1/loanproducts/{loanId}
PUT loanproducts/1
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"locale": "en_GB",
"principal": "70,000.00"
@@ -12868,8 +12868,8 @@ Request Body:
PUT loanproducts/3
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"locale": "en",
"isInterestRecalculationEnabled":"true",
@@ -13172,19 +13172,19 @@ POST https://DomainName/api/v1/loanproducts/5/productmix
POST loanproducts/{productId}/productmix
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{"restrictedProducts":["1"]}
-{
+{
"changes":{
"restrictedProductsForMix":[1],
"removedProductsForMix":[]
},
"productId":5
}
-
+
@@ -13200,8 +13200,8 @@ PUT https://DomainName/api/v1/loanproducts/{productId}/productmix
PUT loanproducts/5/productmix
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"restrictedProducts":["3"]
}
@@ -13240,7 +13240,7 @@ DELETE loanproducts/5/productmix
}
-
+
@@ -13361,8 +13361,8 @@ POST https://DomainName/api/v1/holidays
POST holidays
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"name": "Good Friday",
"description": "Good Friday",
@@ -13398,8 +13398,8 @@ POST https://DomainName/api/v1/holidays/{holidayId}?command=activate
POST holidays
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
}
@@ -13465,8 +13465,8 @@ PUT https://DomainName/api/v1/holidays/{holidayId}
PUT holidays/1
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
name:"Independence day",
description: "Holiday for Independence day celebration"
@@ -13496,8 +13496,8 @@ DELETE https://DomainName/api/v1/holidays/{holidayId}
DELETE holidays/1
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
}
@@ -13518,10 +13518,10 @@ Request Body:
The days of the week that are workdays.
- Rescheduling of repayments when it falls on a non-working is turned on /off by enable/disable reschedule-future-repayments parameter in Global configurations.
+ Rescheduling of repayments when it falls on a non-working is turned on /off by enable/disable reschedule-future-repayments parameter in Global configurations.
- Allow transactions on non-working days is configurable by enabling/disbaling the allow-transactions-on-non_workingday parameter in Global configurations.
+ Allow transactions on non-working days is configurable by enabling/disbaling the allow-transactions-on-non_workingday parameter in Global configurations.
@@ -13559,7 +13559,7 @@ Request Body:
-
+
@@ -13641,8 +13641,8 @@ PUT https://DomainName/api/v1/currencies
PUT currencies
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"currencies": [
"KES",
@@ -13792,7 +13792,7 @@ PUT https://DomainName/api/v1/configurations/9
PUT configurations
-Content-Type: application/json
+Content-Type: application/json
Request Body: {
"enabled":"true",
"value":2
@@ -13866,7 +13866,7 @@ GET https://DomainName/api/v1/caches
-
@@ -13879,8 +13879,8 @@ PUT https://DomainName/api/v1/caches
PUT caches
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"cacheType": 2
}
@@ -13913,13 +13913,14 @@ Request Body:
Create a Hook
- The following parameters can be passed for the creation of a hook :-
+ The following parameters can be passed for the creation of a hook :-
- name - string - Required. The name of the template that is being called. (See /hooks/template for the list of valid hook names.)
- isActive - boolean - Determines whether the hook is actually triggered.
- events - array - Determines what events the hook is triggered for.
- config - hash - Required. Key/value pairs to provide settings for this hook. These settings vary between the templates.
+ - templateId - Optional. The UGD template ID associated with the same entity (client or loan).
@@ -13927,13 +13928,14 @@ Request Body:
POST https://DomainName/api/v1/hooks
-POST hooks
-Content-Type: application/json
-Request Body:
+POST hooks
+Content-Type: application/json
+Request Body:
{
"name": "Web",
"isActive": true,
"displayName": "Kremlin",
+ "templateId": 1,
"events": [
{
"actionName": "DISBURSE",
@@ -13951,8 +13953,8 @@ Request Body:
}
-{
- "resourceId": 4
+{
+ "resourceId": 4
}
@@ -13980,6 +13982,8 @@ GET https://DomainName/api/v1/hooks
"isActive": true,
"createdAt": [2014, 9, 16],
"updatedAt": [2014, 9, 16],
+ "templateId": 1,
+ "templateName": "My UGD",
"events": [
{
"actionName": "DISBURSE",
@@ -14027,6 +14031,8 @@ GET https://DomainName/api/v1/hooks/{hookId}
"isActive": true,
"createdAt": [2014, 9, 16],
"updatedAt": [2014, 9, 16],
+ "templateId": 1,
+ "templateName": "My UGD",
"events": [
{
"actionName": "DISBURSE",
@@ -14065,8 +14071,8 @@ PUT https://DomainName/api/v1/hooks/{hookId}
PUT hooks/4
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"name": "Web",
"isActive": true,
@@ -14116,12 +14122,12 @@ Request Body:
DELETE https://DomainName/api/v1/hooks/{hookId}
-DELETE hooks/4
+DELETE hooks/4
Content-Type: application/json
-{
- "resourceId": 4
+{
+ "resourceId": 4
}
@@ -14217,16 +14223,16 @@ GET https://DomainName/api/v1/hooks/template
POST https://DomainName/api/v1/codes
-POST codes
-Content-Type: application/json
-Request Body:
+POST codes
+Content-Type: application/json
+Request Body:
{
"name": "MyNewCode"
}
-{
- "resourceId": 4
+{
+ "resourceId": 4
}
@@ -14303,9 +14309,9 @@ PUT https://DomainName/api/v1/codes/{codeId}
PUT codes/4
-Content-Type: application/json
-Request Body:
-{
+Content-Type: application/json
+Request Body:
+{
"name": "MyNewCode(changed)"
}
@@ -14332,12 +14338,12 @@ Request Body:
DELETE https://DomainName/api/v1/codes/{codeId}
-DELETE codes/4
+DELETE codes/4
Content-Type: application/json
-{
- "resourceId": 4
+{
+ "resourceId": 4
}
@@ -14370,9 +14376,9 @@ Content-Type: application/json
POST https://DomainName/api/v1/codes/1/codevalues
-POST codes/1/codevalues
-Content-Type: application/json
-Request Body:
+POST codes/1/codevalues
+Content-Type: application/json
+Request Body:
{
"name":"Ration Card",
"description: "Ration card information",
@@ -14380,8 +14386,8 @@ Request Body:
}
-{
- "resourceId": 4
+{
+ "resourceId": 4
}
@@ -14474,9 +14480,9 @@ PUT https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId}
PUT codes/1/codevalues/1
-Content-Type: application/json
-Request Body:
-{
+Content-Type: application/json
+Request Body:
+{
"name": "Indian Passport",
"description": "Indian Passport information",
"position":2
@@ -14485,7 +14491,7 @@ Request Body:
{
"resourceId": 1,
- "changes":
+ "changes":
{
"name": "Indian Passport",
"description": "Indian Passport information",
@@ -14508,11 +14514,11 @@ Request Body:
DELETE https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId}
-DELETE codes/1/codevalues/5
+DELETE codes/1/codevalues/5
Content-Type: application/json
-{
+{
"resourceId": 5
}
@@ -14527,14 +14533,14 @@ Content-Type: application/json
Audits
Every non-read Mifos API request is audited. A fully processed request can
not be changed or deleted. See maker checker api for situations where an audit is not
- fully processed.
-
+ fully processed.
+
Permissions: To search and look at audit entries a user needs to be attached to a role
that has one of the ALL_FUNCTIONS, ALL_FUNCTIONS_READ or READ_AUDIT permissions.
-
+
Data Scope: A user can only see audits that are within their data scope. However,
'head office' users can see all audits including those that aren't office/branch related
- e.g. Loan Product changes.
+ e.g. Loan Product changes.
@@ -14551,50 +14557,50 @@ Content-Type: application/json
actionName
optional
Examples: CREATE, UPDATE, DISBURSE
-
+
entityName
optional
Examples: CLIENT, LOAN, FUND
-
+
resourceId
optional,
The id value of the entityName
-
+
makerId
optional,
The id value of the application user creating the entry
-
+
makerDateTimeFrom
optional,
Get entries created on or after this
Example: 2013-04-10 08:00:00
-
+
makerDateTimeTo
optional,
Get entries created on or before this
Example: 2013-05-10 08:00:00
-
+
checkerId
optional,
The id value of the application user that checked (approved) the entry
-
+
checkerDateTimeFrom
optional,
Get entries checked on or after this
Example: 2013-04-10 08:00:00
-
+
checkerDateTimeTo
optional,
Get entries checked on or before this
Example: 2013-05-10 18:00:00
-
+
processingResult
optional,
The enum value of the processing status
@@ -14605,33 +14611,33 @@ Content-Type: application/json
2: awaiting.approval
3: rejected
-
+
officeId
optional,
The id value of the office/branch associated with the entry (if there is one)
-
+
groupId
optional,
The id value of the group associated with the entry (if there is one).
A group is a general idea and may be a Center, a Group, a Communal Bank or other.
-
+
clientId
optional,
The id value of the client associated with the entry (if there is one)
-
+
loanId
optional,
The id value of the loan associated with the entry (if there is one)
-
+
savingsAccountId
optional,
The id value of the savings account associated with the entry (if there is one)
-
+
includeJson
optional,
Values are true, false. Default is false.
@@ -14647,7 +14653,7 @@ Content-Type: application/json
Integer optional, defaults to 0
Indicates from what result to start from.
-
+
limit
Integer optional, defaults to 200
@@ -14665,7 +14671,7 @@ Content-Type: application/json
String optional, one of ASC, DESC
Indicates what way to order results if orderBy is used.
-
+
Example Requests:
audits
@@ -14762,7 +14768,7 @@ GET https://DomainName/api/v1/audits
GET https://DomainName/api/v1/audits?paged=true&limit=5
-{
+{
"totalFilteredRecords": 30,
"pageItems": [
{
@@ -14963,7 +14969,7 @@ GET https://DomainName/api/v1/audits
Account number format
- Account number preferences are used to describe custom formats for account numbers associated with Customer, Loan and Savings accounts.
+ Account number preferences are used to describe custom formats for account numbers associated with Customer, Loan and Savings accounts.
@@ -14990,7 +14996,7 @@ GET https://DomainName/api/v1/audits
details
-
+
@@ -15202,7 +15208,7 @@ POST https://DomainName/api/v1/accountnumberformats
POST /accountnumberformats
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
accountType :1,
@@ -15217,7 +15223,7 @@ Request Body:
POST /accountnumberformats
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
accountType :2,
@@ -15244,8 +15250,8 @@ PUT https://DomainName/api/v1/accountnumberformats/{accountnumberformatId}
PUT accountnumberformats/2
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
prefixType:1
}
@@ -15277,7 +15283,7 @@ DELETE https://DomainName/api/v1/accountnumberformats/{accountnumberformatId}
DELETE accountnumberformats/2
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -15299,18 +15305,18 @@ No Request Body:
Then, another user that has "Checker" rights for that transaction, can inspect
and approve the data.
-
+
By default, Maker Checker functionality is disabled.
See Update Global Configuration to enable/disable
Maker Checker functionality at a global level.
-
+
Additionally, Maker Checker functionality for each transaction (permission) is disabled by default.
see Enable/Disable Permissions for Maker Checker to enable/disable
Maker Checker functionality at a transaction (permission) level.
-
+
Finally, to give checking rights to a user (via a role associated with the user) see
Update a Role's Permissions
@@ -15333,13 +15339,13 @@ No Request Body:
When a user "makes" an entry that is enabled for Maker Checker, it is audited and the audit status
is set to a value of 2 (awaiting.approval).
-
+
Checkers can only Check and approve entries that they have been permitted to check.
-
+
Checkers can only Check and approve entries that are within their data scope. However,
- 'head office' Checkers can Check and approve all entries
+ 'head office' Checkers can Check and approve all entries
including those that aren't office/branch related (as long as they have the Checker permissions)
- e.g. Loan Product changes.
+ e.g. Loan Product changes.
@@ -15355,64 +15361,64 @@ No Request Body:
actionName
optional
Examples: CREATE, UPDATE, DISBURSE
-
+
entityName
optional
Examples: CLIENT, LOAN, FUND
-
+
resourceId
optional,
The id value of the entityName
-
+
makerId
optional,
The id value of the application user creating the entry
-
+
makerDateTimeFrom
optional,
Get entries created on or after this
Example: 2013-04-10 08:00:00
-
+
makerDateTimeTo
optional,
Get entries created on or before this
Example: 2013-05-10 08:00:00
-
+
officeId
optional,
The id value of the office/branch associated with the entry (if there is one)
-
+
groupId
optional,
The id value of the group associated with the entry (if there is one).
A group is a general idea and may be a Center, a Group, a Communal Bank or other.
-
+
clientId
optional,
The id value of the client associated with the entry (if there is one)
-
+
loanId
optional,
The id value of the loan associated with the entry (if there is one)
-
+
savingsAccountId
optional,
The id value of the savings account associated with the entry (if there is one)
-
+
includeJson
optional,
Values are true, false. Default is false.
-
+
Example Requests:
makercheckers
@@ -15550,7 +15556,7 @@ Content-Type: application/json
{ "auditId": 1 }
-
+
@@ -15567,7 +15573,7 @@ Content-Type: application/json
{ "auditId": 1 }
-
+
@@ -15575,14 +15581,14 @@ Content-Type: application/json
MIFOSX-BATCH JOBS
Batch jobs (also known as cron jobs on Unix-based systems) are a series of back-end jobs executed on a computer at a particular time defined in job's cron expression.
-
+
At any point, you can view the list of batch jobs scheduled to run along with other details specific to each job. Manually you can execute the jobs at any point of time.
The scheduler status can be either "Active" or "Standby". If the scheduler status is Active, it indicates that all batch jobs are running/ will run as per the specified schedule.If the scheduler status is Standby, it will ensure all scheduled batch runs are suspended.
-
+
@@ -15677,7 +15683,7 @@ GET https://DomainName/api/v1/jobs
-
+
@@ -15711,7 +15717,7 @@ https://localhost:8443/mifosng-provider/api/v1/jobs/5
-
+
@@ -15725,7 +15731,7 @@ PUT https://DomainName/api/v1/jobs/{jobId}
PUT jobs/1
-Content-Type: application/json
+Content-Type: application/json
{
"displayName":"Update loan Summary",
"cronExpression":"0 0 22 1/1 * ? *",
@@ -15733,7 +15739,7 @@ Content-Type: application/json
}
-
+
@@ -15750,7 +15756,7 @@ POST jobs/1?command=executeJob
-
+
@@ -15828,7 +15834,7 @@ GET https://DomainName/api/v1/jobs/{jobid}/runhistory?offset=0&limit=200
-
+
@@ -15850,7 +15856,7 @@ https://localhost:8443/mifosng-provider/api/v1/scheduler
-
+
@@ -15867,7 +15873,7 @@ POST scheduler?command=start
-
+
@@ -15891,7 +15897,7 @@ POST scheduler?command=stop
Funds
-
+
@@ -15904,16 +15910,16 @@ POST https://DomainName/api/v1/funds
POST funds
-Content-Type: application/json
-Request Body:
-{
+Content-Type: application/json
+Request Body:
+{
"name": "EU Agri Fund"
}
-{
- "resourceId": 1
-}
+{
+ "resourceId": 1
+}
@@ -15954,9 +15960,9 @@ GET https://DomainName/api/v1/funds
GET https://DomainName/api/v1/funds/{fundId}
-{
- "id": 1,
- "name": "EU Agri Fund"
+{
+ "id": 1,
+ "name": "EU Agri Fund"
}
@@ -15974,10 +15980,10 @@ PUT https://DomainName/api/v1/funds/{fundId}
PUT funds/1
-Content-Type: application/json
-Request Body:
-{
- "name": "EU Agri Fund (2010-2020)"
+Content-Type: application/json
+Request Body:
+{
+ "name": "EU Agri Fund (2010-2020)"
}
@@ -16026,14 +16032,14 @@ Request Body:
| mobileNo |
- | Mobile number of an Employee.
+ | Mobile number of an Employee.
|
| isLoanOfficer |
- | Indicates whether the employee account is to be created as Loan Officer. If isLoanOfficer=true, then the employee is Loan Officer. If isLoanOfficer=false, then the employee is
+ | Indicates whether the employee account is to be created as Loan Officer. If isLoanOfficer=true, then the employee is Loan Officer. If isLoanOfficer=false, then the employee is
not Loan Officer.
|
@@ -16076,9 +16082,9 @@ Request Body:
POST https://DomainName/api/v1/staff
-POST staff
-Content-Type: application/json
-Request Body:
+POST staff
+Content-Type: application/json
+Request Body:
{
"officeId": 1,
"firstname": "John",
@@ -16201,9 +16207,9 @@ PUT https://DomainName/api/v1/staff/{staffId}
PUT staff/1
-Content-Type: application/json
-Request Body:
-{
+Content-Type: application/json
+Request Body:
+{
"isLoanOfficer": "false",
"externalId": "17Hbb"
}
@@ -16290,24 +16296,24 @@ Request Body:
| 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.
-
+
|
@@ -16334,13 +16340,13 @@ Request Body:
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
+ This field is mandatory if chargeTimeType is of type Monthly Fee
|
@@ -16356,7 +16362,7 @@ Request Body:
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.
|
-
+
@@ -16615,7 +16621,7 @@ POST https://DomainName/api/v1/charges
POST charges
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"name": "Loan service fee",
@@ -16636,7 +16642,7 @@ Request Body:
POST charges
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en",
@@ -16661,7 +16667,7 @@ Request Body:
POST charges
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en",
@@ -16683,7 +16689,7 @@ Request Body:
POST charges
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en",
@@ -16707,7 +16713,7 @@ Request Body:
POST charges
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"chargeAppliesTo":1,
@@ -16914,11 +16920,11 @@ GET https://DomainName/api/v1/charges/{chargeId}
PUT https://DomainName/api/v1/charges/{chargeId}
-PUT charges/1
-Content-Type: application/json
-Request Body:
-{
- "name": "Loan service fee(changed)"
+PUT charges/1
+Content-Type: application/json
+Request Body:
+{
+ "name": "Loan service fee(changed)"
}
@@ -16961,16 +16967,16 @@ Content-Type: application/json
working day. The branch office users might not understand enough of accounting to figure out which
account needs to get credited and which account needs to be debited to represent this transaction.
- Enter accounting rules, an abstraction on top of manual Journal entires for enabling
+ Enter accounting rules, an abstraction on top of manual Journal entires for enabling
simpler data entry.
- An accounting rule can define any of the following abstractions
+ An accounting rule can define any of the following abstractions
- A Simple journal entry where both the credit and debit account have been preselected
- A Simple journal entry where either credit or debit accounts have been limited to a
pre-selected list of accounts (Ex: Debit account should be one of "Bank of America" of "JP Morgan"
and credit account should be "Cash")
- - A Compound journal entry where multiple debits and / or multiple credits may be made
+
- A Compound journal entry where multiple debits and / or multiple credits may be made
amongst a set of preselected list of accounts (Ex: Credit account should be either "Bank Of America"
or "Cash" and debit account can be "Employee Salary" and/or "Miscellenous Expenses")
@@ -17018,14 +17024,14 @@ Content-Type: application/json
debitTags |
- | A list of accounting Tags. Any Ledger account with this tag can serve as the
+ | A list of accounting Tags. Any Ledger account with this tag can serve as the
account to be debited. This parameter is optional, if accountToDebit present in the request params |
| creditTags |
- | A list of accounting Tags. Any Ledger account with this tag can serve as the
+ | A list of accounting Tags. Any Ledger account with this tag can serve as the
account to be credited. This parameter is optional, if accountToCredit present in the request params |
@@ -17161,7 +17167,7 @@ POST https://DomainName/api/v1/accountingrules
POST accountingrules
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"name": "test",
@@ -17179,7 +17185,7 @@ Request Body:
POST accountingrules
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"name": "fordocs",
@@ -17199,7 +17205,7 @@ Request Body:
POST accountingrules
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"name": "test123",
@@ -17218,7 +17224,7 @@ Request Body:
POST accountingrules
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"name": "fordocstest",
@@ -17350,11 +17356,11 @@ GET https://DomainName/api/v1/accountingrules/{accountingruleId}
PUT https://DomainName/api/v1/accountingrules/{accountingruleId}
-PUT accountingrules/1
-Content-Type: application/json
-Request Body:
-{
- "name": "Employee Salary posting rule"
+PUT accountingrules/1
+Content-Type: application/json
+Request Body:
+{
+ "name": "Employee Salary posting rule"
}
@@ -17395,7 +17401,7 @@ Content-Type: application/json
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. |
@@ -17429,7 +17435,7 @@ Content-Type: application/json
| 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 |
+ | 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 |
@@ -17461,7 +17467,7 @@ Content-Type: application/json
| 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
+ | | Optional: If set to true, validates that the account balance does not
fall below minRequiredBalance |
| minRequiredBalance |
@@ -17477,8 +17483,8 @@ Content-Type: application/json
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
+ - Field Defaults
+ - Allowed Value Lists
Example Request:
@@ -18055,7 +18061,7 @@ Request Body:
"inMultiplesOf": 0,
"locale": "en",
"nominalAnnualInterestRate": "5.0",
- "interestCompoundingPeriodType": 1,
+ "interestCompoundingPeriodType": 1,
"interestPostingPeriodType":4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": "365",
@@ -18259,11 +18265,11 @@ Request Body:
}
],
"charges": []
-}
+}
-
+
@@ -18292,7 +18298,7 @@ Request Body:
-
+
@@ -18313,12 +18319,12 @@ Content-Type: application/json
-
+
List Savings Products
- Example Requests:
+ Example Requests:
savingsproducts
savingsproducts?fields=name
@@ -18383,7 +18389,7 @@ Content-Type: application/json
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. |
@@ -18414,7 +18420,7 @@ Content-Type: application/json
| 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 |
+ | 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 |
@@ -18450,8 +18456,8 @@ Content-Type: application/json
| 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.
+ | 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.
|
@@ -18488,7 +18494,7 @@ Content-Type: application/json
Mandatory Fields |
- | name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf,
+ | name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf,
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, accountingRule |
@@ -18518,7 +18524,7 @@ Request Body:
"digitsAfterDecimal": 2,
"inMultiplesOf": 0,
"locale": "en",
- "interestCompoundingPeriodType": 1,
+ "interestCompoundingPeriodType": 1,
"interestPostingPeriodType":4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": "365",
@@ -18739,7 +18745,7 @@ Request Body:
}
]
}
-}
+}
@@ -18766,7 +18772,7 @@ Request Body:
"resourceId": 1,
"changes": {
"description": "Fixed deposit product new offerings",
- "minDepositTerm": 5
+ "minDepositTerm": 5
}
}
@@ -18798,7 +18804,7 @@ Content-Type: application/json
List Fixed Deposit Products
- Example Requests:
+ Example Requests:
fixeddepositproducts
fixeddepositproducts?fields=name
@@ -18833,7 +18839,7 @@ Content-Type: application/json
"id": 3,
"code": "deposit.term.savingsPeriodFrequencyType.years",
"value": "Years"
- },
+ },
"nominalAnnualInterestRate": 0,
"interestCompoundingPeriodType": {
"id": 4,
@@ -18876,7 +18882,7 @@ Content-Type: application/json
When creating recurring deposit accounts, the details from the recurring deposit product are used to auto fill details of the recurring deposit account application process.
Field Descriptions |
-
+
| name |
| The name of the product offering. |
@@ -18907,7 +18913,7 @@ Content-Type: application/json
| 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 |
+ | The setting for number of days in year to use: 360=360 Days, 365=365 Days |
| lockinPeriodFrequency |
| Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the recurring deposit account is 'locked in' and premature closure is not allowed. e.g. 2 Months |
@@ -18953,8 +18959,8 @@ Content-Type: application/json
| 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.
+ | 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.
|
@@ -18991,7 +18997,7 @@ Content-Type: application/json
Mandatory Fields |
- | name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf,
+ | name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf,
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, recurringDepositFrequency, recurringDepositFrequencyTypeId, accountingRule, depositAmount |
@@ -19021,7 +19027,7 @@ Request Body:
"digitsAfterDecimal": 2,
"inMultiplesOf": 0,
"locale": "en",
- "interestCompoundingPeriodType": 1,
+ "interestCompoundingPeriodType": 1,
"interestPostingPeriodType":4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": "365",
@@ -19256,7 +19262,7 @@ Request Body:
}
]
}
-}
+}
@@ -19283,7 +19289,7 @@ Request Body:
"resourceId": 1,
"changes": {
"description": "Recurring deposit product new offerings",
- "minDepositTerm": 5
+ "minDepositTerm": 5
}
}
@@ -19315,7 +19321,7 @@ Content-Type: application/json
List Recuring Deposit Products
- Example Requests:
+ Example Requests:
recurringdepositproducts
recurringdepositproducts?fields=name
@@ -19356,7 +19362,7 @@ Content-Type: application/json
"id": 3,
"code": "deposit.term.savingsPeriodFrequencyType.years",
"value": "Years"
- },
+ },
"interestCompoundingPeriodType": {
"id": 4,
"code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
@@ -19471,7 +19477,7 @@ Content-Type: application/json
| 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 |
+ | 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 |
@@ -19502,8 +19508,8 @@ Content-Type: application/json
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
+ - Field Defaults
+ - Allowed Value Lists
Arguments
@@ -19868,8 +19874,8 @@ Request Body:
{
"clientId": 1,
"productId": 1,
- "locale": "en",
- "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2011"
}
@@ -19880,8 +19886,8 @@ Request Body:
{
"clientId": 1,
"productId": 1,
- "locale": "en",
- "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2011",
"accountNo": "SA000023",
"externalId": "SYS-23"
@@ -19895,20 +19901,20 @@ Request Body:
"clientId": 1,
"productId": 1,
"fieldOfficerId": 1,
- "locale": "en",
- "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2013",
"accountNo": "SA000023",
"externalId": "SYS-23",
- "nominalAnnualInterestRate": "5.65",
+ "nominalAnnualInterestRate": "5.65",
"interestCompoundingPeriodType": 1,
"interestPostingPeriodType": 4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": 365,
- "minRequiredOpeningBalance": "1,000",
+ "minRequiredOpeningBalance": "1,000",
"lockinPeriodFrequency": 6,
"lockinPeriodFrequencyType": 2,
- "allowOverdraft":true,
+ "allowOverdraft":true,
"overdraftLimit":5000,
"charges":[{"id":"1"}]
}
@@ -20036,7 +20042,7 @@ Request Body:
-
+
@@ -20052,7 +20058,7 @@ Request Body:
dateFormat : "dd MMMM yyyy",
locale : "en",
unassignedDate : "05 September 2014"
-}
+}
{
@@ -20369,7 +20375,7 @@ Request Body:
List savings applications/accounts
- Example Requests:
+ Example Requests:
savingsaccounts
savingsaccounts?fields=name
@@ -20452,14 +20458,14 @@ Request Body:
-
+
Retrieve a savings application/account:
Arguments
- - associations
+ - 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.
@@ -20553,11 +20559,11 @@ Request Body:
PUT https://Domain Name/api/v1/savingsaccounts/{accountsId}
- PUT savingsaccounts/1
+ PUT savingsaccounts/1
Content-Type: application/json
No Request Body:
{
- "locale": "en",
+ "locale": "en",
"nominalAnnualInterestRate": "5.9999999999"
}
@@ -20584,7 +20590,7 @@ No Request Body:
DELETE https://Domain Name/api/v1/savingsaccounts/{accountsId}
- DELETE savingsaccounts/1
+ DELETE savingsaccounts/1
Content-Type: application/json
No Request Body:
@@ -20597,7 +20603,7 @@ No Request Body:
-
+
@@ -20621,8 +20627,8 @@ No Request Body:
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
+ - Field Defaults
+ - Allowed Value Lists
Example Requests:
@@ -20672,8 +20678,8 @@ No Request Body:
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
+ - Field Defaults
+ - Allowed Value Lists
Example Requests:
@@ -20738,7 +20744,7 @@ No Request Body:
POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions?command=deposit
- POST savingsaccounts/1/transactions?command=deposit
+ POST savingsaccounts/1/transactions?command=deposit
Content-Type: application/json
No Request Body:
{
@@ -20779,7 +20785,7 @@ No Request Body:
POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions?command=withdrawal
- POST savingsaccounts/1/transactions?command=withdrawal
+ POST savingsaccounts/1/transactions?command=withdrawal
Content-Type: application/json
No Request Body:
{
@@ -20821,7 +20827,7 @@ No Request Body:
POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions/{transactionId}?command=modify
- POST savingsaccounts/1/transactions/1?command=modify
+ POST savingsaccounts/1/transactions/1?command=modify
Content-Type: application/json
No Request Body:
{
@@ -20864,7 +20870,7 @@ No Request Body:
POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions/{transactionId}?command=undo
- POST savingsaccounts/1/transactions/1?command=undo
+ POST savingsaccounts/1/transactions/1?command=undo
Content-Type: application/json
No Request Body:
{
@@ -20879,7 +20885,7 @@ No Request Body:
}
-
+
@@ -20889,10 +20895,10 @@ No Request Body:
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
+ 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
+ specific to the context of a Charge being associated with a Savings account) are
described here
@@ -21312,7 +21318,7 @@ POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges
POST /savingsaccounts/1/charges
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"chargeId": "2",
@@ -21332,7 +21338,7 @@ Request Body:
POST /savingsaccounts/1/charges
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"chargeId": "2",
@@ -21348,7 +21354,7 @@ Request Body:
"clientId": 1,
"savingsId": 1,
"resourceId": 7
-}
+}
@@ -21358,7 +21364,7 @@ Request Body:
Update a Savings account Charge
- Currently Savings account Charges may be updated only if the Savings account
+ Currently Savings account Charges may be updated only if the Savings account
is not yet approved.
@@ -21368,8 +21374,8 @@ PUT https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccoun
PUT savingsaccounts/1/charges/6
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
@@ -21409,7 +21415,7 @@ DELETE https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAcc
DELETE savingsaccounts/1/charges/2
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -21437,8 +21443,8 @@ POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccou
POST savingsaccounts/1/charges/2?command=paycharge
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
@@ -21471,8 +21477,8 @@ POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccou
POST savingsaccounts/1/charges/2?command=waive
-Content-Type: application/json
-No Request Body:
+Content-Type: application/json
+No Request Body:
{
@@ -21499,7 +21505,7 @@ POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccou
POST savingsaccounts/1/charges/2?command=inactivate
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -21513,7 +21519,7 @@ No Request Body:
-
+
@@ -21595,7 +21601,7 @@ No Request Body:
| 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 |
+ | 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 |
@@ -21644,8 +21650,8 @@ No Request Body:
| 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.
+ | 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.
|
@@ -21674,8 +21680,8 @@ No Request Body:
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
+ - Field Defaults
+ - Allowed Value Lists
Arguments
@@ -22040,8 +22046,8 @@ Request Body:
{
"clientId": 1,
"productId": 1,
- "locale": "en",
- "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2014",
"depositAmount":"5000",
"depositPeriod":"6",
@@ -22055,8 +22061,8 @@ Request Body:
{
"clientId": 1,
"productId": 1,
- "locale": "en",
- "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2014",
"depositAmount":"5000",
"depositPeriod":"6",
@@ -22073,8 +22079,8 @@ Request Body:
"clientId": 1,
"productId": 1,
"fieldOfficerId": 1,
- "locale": "en",
- "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
"submittedOnDate": "01 March 2014",
"accountNo": "FD000024",
"externalId": "FD-24",
@@ -22580,7 +22586,7 @@ Request Body:
List Fixed deposit applications/accounts
- Example Requests:
+ Example Requests:
fixeddepositaccounts
fixeddepositaccounts?fields=name
@@ -22702,7 +22708,7 @@ Request Body:
Retrieve a fixed deposit application/account:
Arguments
- - associations
+ - 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.
@@ -22921,11 +22927,11 @@ Request Body:
PUT https://Domain Name/api/v1/fixeddepositaccounts/{accountId}
- PUT fixeddepositaccounts/1
+ PUT fixeddepositaccounts/1
Content-Type: application/json
No Request Body:
{
- "locale": "en",
+ "locale": "en",
"depositAmount": 6000
}
@@ -22952,7 +22958,7 @@ No Request Body:
DELETE https://Domain Name/api/v1/fixeddepositaccounts/{accountsId}
- DELETE fixeddepositaccounts/1
+ DELETE fixeddepositaccounts/1
Content-Type: application/json
No Request Body:
@@ -23048,7 +23054,7 @@ No Request Body:
| 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 |
+ | The setting for number of days in year to use: 360=360 Days, 365=365 Days |
| lockinPeriodFrequency |
| Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the recurring deposit account is 'locked in' and withdrawals are not allowed. e.g. 6 Months |
@@ -23107,8 +23113,8 @@ No Request Body:
| 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.
+ | 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.
|
@@ -23137,8 +23143,8 @@ No Request Body:
Retrieve recurring Deposit Account Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for recurring deposit applications. The template data returned consists of any or all of:
- - Field Defaults
- - Allowed Value Lists
+ - Field Defaults
+ - Allowed Value Lists
Arguments
@@ -23503,8 +23509,8 @@ Request Body:
{
"clientId": 1,
"productId": 1,
- "locale": "en",
- "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
"submittedOnDate": "02 June 2014",
"depositPeriod":"20",
"depositPeriodFrequencyId":"1",
@@ -23522,8 +23528,8 @@ Request Body:
{
"clientId": 1,
"productId": 1,
- "locale": "en",
- "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
"submittedOnDate": "02 June 2014",
"depositPeriod":"20",
"depositPeriodFrequencyId":"1",
@@ -23538,7 +23544,7 @@ Request Body:
"allowWithdrawal":false,
"adjustAdvanceTowardsFuturePayments":false,
"isMandatoryDeposit":false
-
+
}
Full request: accountNo provided (must be unique), remaining details override details from recurring deposit product (except currency).
@@ -23549,8 +23555,8 @@ Request Body:
"clientId": 1,
"productId": 1,
"fieldOfficerId": 1,
- "locale": "en",
- "dateFormat": "dd MMMM yyyy",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
"submittedOnDate": "02 June 2014",
"depositPeriod":"20",
"depositPeriodFrequencyId":"1",
@@ -24185,7 +24191,7 @@ Request Body:
List Fixed deposit applications/accounts
- Example Requests:
+ Example Requests:
recurringdepositaccounts
recurringdepositaccounts?fields=name
@@ -24320,7 +24326,7 @@ Request Body:
Retrieve a recurring deposit application/account:
Arguments
- - associations
+ - associations
- optional, Either 'all' or a comma separated list of recurring deposit 'associations' (itemized below).
Associations are just extra pieces of data that you might or might not want to retrieve.
- 'all': Gets data related to all associations e.g. ?associations=all.
@@ -24413,7 +24419,7 @@ Request Body:
"recurringDepositAmount": 100,
"recurringDepositFrequency": 1,
"expectedFirstDepositOnDate": [
- 2014,
+ 2014,
4,
2
],
@@ -24543,11 +24549,11 @@ Request Body:
PUT https://Domain Name/api/v1/recurringdepositaccounts/{accountId}
- PUT recurringdepositaccounts/1
+ PUT recurringdepositaccounts/1
Content-Type: application/json
No Request Body:
{
- "locale": "en",
+ "locale": "en",
"depositAmount": 6000
}
@@ -24574,7 +24580,7 @@ No Request Body:
DELETE https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}
- DELETE recurringdepositaccounts/1
+ DELETE recurringdepositaccounts/1
Content-Type: application/json
No Request Body:
@@ -24610,8 +24616,8 @@ No Request Body:
Retrieve Recurring Deposit Account Transaction Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- - Field Defaults
- - Allowed Value Lists
+ - Field Defaults
+ - Allowed Value Lists
Example Requests:
@@ -24731,7 +24737,7 @@ No Request Body:
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions?command=deposit
- POST recurringdepositaccounts/1/transactions?command=deposit
+ POST recurringdepositaccounts/1/transactions?command=deposit
Content-Type: application/json
No Request Body:
{
@@ -24814,7 +24820,7 @@ No Request Body:
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions/{transactionId}?command=modify
- POST recurringdepositaccounts/1/transactions/1?command=modify
+ POST recurringdepositaccounts/1/transactions/1?command=modify
Content-Type: application/json
No Request Body:
{
@@ -24856,7 +24862,7 @@ No Request Body:
POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions/{transactionId}?command=undo
- POST recurringdepositaccounts/1/transactions/1?command=undo
+ POST recurringdepositaccounts/1/transactions/1?command=undo
Content-Type: application/json
No Request Body:
{
@@ -24926,8 +24932,8 @@ No Request Body:
Retrieve Account Transfer Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- - Field Defaults
- - Allowed Value Lists
+ - Field Defaults
+ - Allowed Value Lists
Example Requests:
@@ -24937,7 +24943,7 @@ No Request Body:
accounttransfers/template?fromClientId=1&fromAccountType=2&fromAccountId=1
-
+
GET https://Domain Name/api/v1/accounttransfers/template?fromAccountType=2&fromOfficeId=1
@@ -25354,7 +25360,7 @@ No Request Body:
POST https://Domain Name/api/v1/accounttransfers
- POST accounttransfers/
+ POST accounttransfers/
Content-Type: application/json
No Request Body:
{
@@ -25366,7 +25372,7 @@ No Request Body:
"toClientId": 1,
"toAccountType": 2,
"toAccountId": 2,
-"dateFormat": "dd MMMM yyyy",
+"dateFormat": "dd MMMM yyyy",
"locale": "en",
"transferDate": "01 August 2011",
"transferAmount": "112.45",
@@ -25386,7 +25392,7 @@ No Request Body:
List account transfers
- Example Requests:
+ Example Requests:
accounttransfers
@@ -25629,7 +25635,7 @@ No Request Body:
-
+
@@ -25701,7 +25707,7 @@ No Request Body:
-
+
@@ -25942,8 +25948,8 @@ No Request Body:
-
-
+
+
@@ -25952,7 +25958,7 @@ No Request Body:
POST https://Domain Name/api/v1/accounttransfers
- POST refundByTransfer/
+ POST refundByTransfer/
Content-Type: application/json
No Request Body:
{
@@ -26068,8 +26074,8 @@ No Request Body:
Retrieve Standing Instruction Template:
This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
- - Field Defaults
- - Allowed Value Lists
+ - Field Defaults
+ - Allowed Value Lists
Example Requests:
@@ -26079,7 +26085,7 @@ No Request Body:
standinginstructions/template?fromClientId=1&fromAccountType=2&fromAccountId=1&transferType=1
-
+
GET https://Domain Name/api/v1/standinginstructions/template?fromAccountType=2&fromOfficeId=1
@@ -26915,7 +26921,7 @@ No Request Body:
POST https://Domain Name/api/v1/standinginstructions
- POST standinginstructions/
+ POST standinginstructions/
Content-Type: application/json
No Request Body:
{
@@ -26945,7 +26951,7 @@ No Request Body:
{
-
+
"clientId":1,
"resourceId":65
}
@@ -26961,7 +26967,7 @@ No Request Body:
PUT https://Domain Name/api/v1/standinginstructions/1?command=update
- PUT standinginstructions/1?command=update
+ PUT standinginstructions/1?command=update
Content-Type: application/json
No Request Body:
{
@@ -26987,11 +26993,11 @@ No Request Body:
PUT https://Domain Name/api/v1/standinginstructions/1?command=delete
- PUT standinginstructions/1?command=delete
+ PUT standinginstructions/1?command=delete
Content-Type: application/json
No Request Body:
{
-
+
}
@@ -27009,7 +27015,7 @@ No Request Body:
List Standing Instructions
- Example Requests:
+ Example Requests:
standinginstructions
@@ -27199,7 +27205,7 @@ No Request Body:
}
-
+
@@ -27302,7 +27308,7 @@ No Request Body:
-
+
@@ -27512,7 +27518,7 @@ No Request Body:
-
+
@@ -27674,7 +27680,7 @@ Request Body:
{
"resourceIdentifier": "extra_client_details"
-}
+}
POST https://DomainName/api/v1/datatables
@@ -28043,7 +28049,7 @@ Request Body:
{
"resourceIdentifier": "extra_client_details"
-}
+}
@@ -28069,7 +28075,7 @@ No Request Body
{
"resourceIdentifier": "extra_client_details"
-}
+}
@@ -28091,16 +28097,16 @@ No Request Body
POST https://DomainName/api/v1/datatables/register/{datatable}/{apptable}
-POST datatables/register/extra_client_details/m_client
+POST datatables/register/extra_client_details/m_client
-Content-Type: application/json
-Request Body:
-{}
+Content-Type: application/json
+Request Body:
+{}
{
"resourceIdentifier": "extra_client_details"
-}
+}
@@ -28118,11 +28124,11 @@ Request Body:
POST https://DomainName/api/v1/datatables/deregister/{datatable}
-POST datatables/deregister/extra_client_details
+POST datatables/deregister/extra_client_details
-Content-Type: application/json
-Request Body:
-{}
+Content-Type: application/json
+Request Body:
+{}
{
@@ -28150,26 +28156,26 @@ Request Body:
POST https://DomainName/api/v1/datatables/{datatable}/{apptableId}
-POST datatables/extra_client_details/1
+POST datatables/extra_client_details/1
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
- "Business Description": "Livestock sales",
- "Comment": "First comment made",
- "Education_cv": "Primary",
- "Gender_cd": "6",
- "Highest Rate Paid": "8.5",
- "Next Visit": "01 October 2012",
- "Years in Business": "5",
- "dateFormat": "dd MMMM yyyy",
- "locale": "en"
+ "Business Description": "Livestock sales",
+ "Comment": "First comment made",
+ "Education_cv": "Primary",
+ "Gender_cd": "6",
+ "Highest Rate Paid": "8.5",
+ "Next Visit": "01 October 2012",
+ "Years in Business": "5",
+ "dateFormat": "dd MMMM yyyy",
+ "locale": "en"
}
{
"resourceId": 1
-}
+}
@@ -28345,9 +28351,9 @@ GET https://DomainName/api/v1/datatables/{datatable}/{apptableId}?genericResultS
PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId}
-PUT datatables/extra_client_details/1
+PUT datatables/extra_client_details/1
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"Business Description": "Livestock sales updated",
@@ -28376,19 +28382,19 @@ Request Body:
PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId}
-PUT datatables/Extra Family Details Data/1/2
+PUT datatables/Extra Family Details Data/1/2
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
- "Date of Birth": "01 June 1982",
- Education_cdHighest: "5",
- Name: "June",
- "Other Notes": "More\nnotes",
+ "Date of Birth": "01 June 1982",
+ Education_cdHighest: "5",
+ Name: "June",
+ "Other Notes": "More\nnotes",
"Points Score": "20",
- dateFormat: "dd MMMM yyyy",
- locale: "en"
-}
+ dateFormat: "dd MMMM yyyy",
+ locale: "en"
+}
{ "resourceId": 1 }
@@ -28408,14 +28414,14 @@ Request Body:
DELETE https://DomainName/api/v1/datatables/{datatable}/{apptableId}
-DELETE datatables/extra_client_details/1
+DELETE datatables/extra_client_details/1
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{}
-{
+{
"resourceId": 1
}
@@ -28435,10 +28441,10 @@ Request Body:
DELETE https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId}
-DELETE datatables/extra_family_details/1/2
+DELETE datatables/extra_family_details/1/2
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{}
@@ -28451,7 +28457,7 @@ Request Body:
-
+
@@ -28466,7 +28472,7 @@ Request Body:
GET survey/
-
+
Content-Type: application/json
Request Body:
{}
@@ -28519,7 +28525,7 @@ Request Body:
"value": "Six",
"score": 8
},
-
+
],
"columnCode": "ppi_household_members"
},
@@ -28572,7 +28578,7 @@ Request Body:
"value": "four or More",
"score": 0
},
-
+
],
"columnCode": "ppi_youngerthan17"
},
@@ -28587,8 +28593,8 @@ Request Body:
-
-
+
+
@@ -28603,7 +28609,7 @@ Request Body:
GET survey/{surveyName}
-
+
Content-Type: application/json
Request Body:
{}
@@ -28655,14 +28661,14 @@ Request Body:
-
+
Create an entry in the survey table
Insert and entry in a survey table (full fill the survey).
-
+
@@ -28671,11 +28677,11 @@ Request Body:
POST survey/{surveyName}/{clientId}
-
+
Content-Type: application/json
Request Body:
{
-
+
ppi_household_members_cd_q1_householdmembers : 167,
ppi_highestschool_cd_q2_highestschool : 174 ,
ppi_businessoccupation_cd_q3_businessoccupation : 180,
@@ -28689,7 +28695,7 @@ Request Body:
date:"2014-12-02 20:30:00",
dateFormat:"Y-m-d H:i:s",
locale:"en_GB"
-
+
}
@@ -28701,10 +28707,10 @@ Request Body:
-
-
+
+
-
+
@@ -28742,8 +28748,8 @@ Request Body:
-
-
+
+
@@ -28770,11 +28776,11 @@ POST https://DomainName/api/v1/{resource}/{resourceId}/notes
POST clients/1/notes
-Content-Type: application/json
-Request Body:
-{
+Content-Type: application/json
+Request Body:
+{
"note": "a note about the client"
-}
+}
{
@@ -28785,7 +28791,7 @@ Request Body:
-
+
@@ -28826,7 +28832,7 @@ GET https://DomainName/api/v1/{resource}/{resourceId}/notes
-
+
@@ -28881,10 +28887,10 @@ 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."
+Content-Type: application/json
+Request Body:
+{
+ "note": "and here the note is updated nicely."
}
@@ -28912,7 +28918,7 @@ DELETE https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId}
DELETE clients/1/notes/76
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -28922,7 +28928,7 @@ No Request Body:
-
+
@@ -28931,7 +28937,7 @@ No Request Body:
Documents
Multiple Documents (a combination of a name, description
- and a file) may be attached to different Entities
+ and a file) may be attached to different Entities
like Clients, Groups, Staff, Loans, Savings and Client
Identifiers in the system
@@ -28963,7 +28969,7 @@ No Request Body:
| The ID of the entity (client,
- loan etc) with which this document is
+ loan etc) with which this document is
associated |
@@ -29103,7 +29109,7 @@ GET https://DomainName/api/v1/documents/{clientId}
| The file to be uploaded
- |
+
@@ -29122,7 +29128,7 @@ POST https://DomainName/api/v1/{entityType}/{entityId}/documents
POST clients/1/documents
-Content-Type: multipart/form-data
+Content-Type: multipart/form-data
Request Body:
Not Shown (multi-part form data)
@@ -29165,7 +29171,7 @@ Request Body:
| The file to be uploaded
- |
+
@@ -29175,8 +29181,8 @@ Request Body:
PUT https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}
-PUT clients/1/documents/1
-Content-Type: multipart/form-data
+PUT clients/1/documents/1
+Content-Type: multipart/form-data
Request Body:
Not Shown (multi-part form data)
@@ -29223,7 +29229,7 @@ DELETE https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}
DELETE clients/1/documents/1
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -29240,7 +29246,7 @@ DELETE https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}
DELETE loans/1/documents/1
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -29283,7 +29289,7 @@ No Request Body:
Note:
The reports api allows parameters (not just placeholders in reportSql) to be associated with reports.
These associated parameters are only required to allow the reference UI reporting functionality implement
- user-friendly parameter input.
+ user-friendly parameter input.
@@ -29377,8 +29383,8 @@ POST https://DomainName/api/v1/reports
POST reports
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"reportName":"Completely New Report",
"reportType":"Table",
@@ -29391,9 +29397,9 @@ Request Body:
}
-{
+{
"resourceId": 132
-}
+}
@@ -29524,8 +29530,8 @@ PUT https://DomainName/api/v1/reports/{id}
PUT reports/129
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"reportName": "New rpt name",
"reportParameters": [
@@ -29564,8 +29570,8 @@ DELETE https://DomainName/api/v1/reports/{id}
DELETE reports/100
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{}
@@ -29784,7 +29790,7 @@ POST https://DomainName/api/v1/authentication?username={username}&password={pass
POST authentication?username=mifos&password=password
-Content-Type: application/json
+Content-Type: application/json
No Request Body
Example response of autentication for user that is not linked with any staff.
@@ -29836,14 +29842,14 @@ No Request Body
]
}
-
-
-
-
-
+
+
+
+
+
-POST authentication?username=mifos&password=fail
-Content-Type: application/json
+POST authentication?username=mifos&password=fail
+Content-Type: application/json
No Request Body
@@ -30042,7 +30048,7 @@ POST https://DomainName/api/v1/users
POST users
-Content-Type: application/json
+Content-Type: application/json
Request body:
{
"username": "newuser",
@@ -30063,7 +30069,7 @@ Request body:
POST users
-Content-Type: application/json
+Content-Type: application/json
Request body:
{
"username": "newuser",
@@ -30101,8 +30107,8 @@ Request body:
PUT https://DomainName/api/v1/users/{userId)
-PUT users/3
-Content-Type: application/json
+PUT users/3
+Content-Type: application/json
Request body:
{
"firstname": "Test",
@@ -30110,7 +30116,7 @@ Request body:
"repeatPassword": "window75"
}
-
+
{
"officeId": 1,
"resourceId": 3,
@@ -30135,7 +30141,7 @@ DELETE https://DomainName/api/v1/users/{userId}
DELETE users/20
-Content-Type: application/json
+Content-Type: application/json
No Request Body
@@ -30226,8 +30232,8 @@ GET https://DomainName/api/v1/roles/{roleId}
POST https://DomainName/api/v1/roles
-POST roles
-Content-Type: application/json
+POST roles
+Content-Type: application/json
Request body:
{
"name": "Another Role Name",
@@ -30249,19 +30255,19 @@ PUT https://DomainName/api/v1/roles/{roleId}
PUT roles/1
-Content-Type: application/json
-Request body:
-{
- "description": "some description(changed)"
+Content-Type: application/json
+Request body:
+{
+ "description": "some description(changed)"
}
-{
- "resourceId": 1,
- "changes": {
- "description": "some description(changed)"
- }
-}
+{
+ "resourceId": 1,
+ "changes": {
+ "description": "some description(changed)"
+ }
+}
@@ -30316,8 +30322,8 @@ GET https://DomainName/api/v1/roles/{roleId}/permissions
PUT https://DomainName/api/v1/roles/{roleId}/permissions
-PUT roles/8
-Content-Type: application/json
+PUT roles/8
+Content-Type: application/json
Request body:
{
"permissions": {
@@ -30412,8 +30418,8 @@ GET https://DomainName/api/v1/permissions
PUT https://DomainName/api/v1/permissions
-PUT permissions
-Content-Type: application/json
+PUT permissions
+Content-Type: application/json
Request Body:
{
"permissions":{
@@ -30431,10 +30437,10 @@ Request Body:
General Ledger Account
- Ledger accounts represent an Individual account within an Organizations Chart
- Of Accounts(COA) and are assigned a name and unique number by which they can
+ Ledger accounts represent an Individual account within an Organizations Chart
+ Of Accounts(COA) and are assigned a name and unique number by which they can
be identified.
- All transactions relating to a company's assets, liabilities, owners' equity,
+ All transactions relating to a company's assets, liabilities, owners' equity,
revenue and expenses are recorded against these accounts
@@ -30451,7 +30457,7 @@ Request Body:
| glCode |
- | The ledger code associated with the
+ | The ledger code associated with the
Account These codes are mandatory and should be unique within
an organization |
@@ -30468,17 +30474,17 @@ Request Body:
Classifies the account into one of the following Types
Asset: represent the different types of economic resources
- owned or controlled by business, common examples of Asset accounts are cash,
+ owned or controlled by business, common examples of Asset accounts are cash,
cash in bank, building, inventory, prepaid rent, goodwill, accounts receivable
Liability: represent the different types of economic obligations
by a business, such as accounts payable, bank loan, bonds payable
- Income: represent the company's gross earnings and common examples
+ Income: represent the company's gross earnings and common examples
include Interest Income, Sales and Service revenue
- Expense: represent the company's expenditures to enable itself to
- operate. Common examples are electricity and water, rentals, depreciation,
+ Expense: represent the company's expenditures to enable itself to
+ operate. Common examples are electricity and water, rentals, depreciation,
doubtful accounts, insurance.
- Equity: represent the residual equity of a business (after
- deducting from Assets all the liabilities) including Retained Earnings
+ Equity: represent the residual equity of a business (after
+ deducting from Assets all the liabilities) including Retained Earnings
and Appropriations
The options are fully listed in Retrieve
General Ledger Accounts Template.
@@ -30488,7 +30494,7 @@ Request Body:
| usage |
- Determines how the account shall be used
+ | Determines how the account shall be used
"Header" accounts specify the title of a group of accounts. They are used
only for grouping together detail accounts that have a similar purpose; that is, detail accounts
are assigned to specific header accounts
@@ -30937,7 +30943,7 @@ POST https://DomainName/api/v1/glaccounts
POST glaccounts
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"name": "Cash at Bangalore",
@@ -30968,8 +30974,8 @@ Request Body:
PUT https://DomainName/api/v1/glaccounts/{glaccountId}
-PUT glaccounts/22
-Content-Type: application/json
+PUT glaccounts/22
+Content-Type: application/json
Request Body:
{
"name": "Cash at Bangalore rural"
@@ -30986,8 +30992,8 @@ Request Body:
-PUT glaccounts/1
-Content-Type: application/json
+PUT glaccounts/1
+Content-Type: application/json
Request Body:
{
"disabled": true
@@ -31019,7 +31025,7 @@ DELETE https://DomainName/api/v1/glaccounts/{glaccountId}
DELETE glaccounts/1
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -31036,7 +31042,7 @@ No Request Body:
Accounting Closure
An accounting closure indicates that no more journal
- entries may be logged (or reversed) in the system,
+ entries may be logged (or reversed) in the system,
either manually or via the portfolio with an entry date
prior to the defined closure date
@@ -31207,7 +31213,7 @@ POST https://DomainName/api/v1/glclosures
POST glclosures
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"officeId": 1,
@@ -31238,8 +31244,8 @@ Request Body:
PUT https://DomainName/api/v1/glclosures/{glclosureId}
-PUT glclosures/1
-Content-Type: application/json
+PUT glclosures/1
+Content-Type: application/json
Request Body:
{
"comments": "All transactions verified by Johnny Cash"
@@ -31272,7 +31278,7 @@ DELETE https://DomainName/api/v1/glclosures/{glclosureId}
DELETE glclosures/1
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -31288,7 +31294,7 @@ No Request Body:
Journal Entries
- A journal entry refers to the logging of
+ A journal entry refers to the logging of
transactions against general ledger accounts. A journal
entry may consist of several line items, each of which is either a "debit" or a "credit". The total amount of the
debits must equal the total amount of the credits or the
@@ -31334,7 +31340,7 @@ No Request Body:
amount |
|
- | The Monetary amount associated
+ | The Monetary amount associated
with this entry
|
@@ -31355,8 +31361,8 @@ No Request Body:
transactionId |
- | A unique Identifier for a set
- of related Credit and Debit entries that make up
+ | A unique Identifier for a set
+ of related Credit and Debit entries that make up
a "balanced" jounral Entry. For a manual entry,
this feild is a unique string.
For a system generated entry, the combination
@@ -31367,11 +31373,11 @@ No Request Body:
| manualEntry |
- | Flag determines if an entry is
- generated by the portfolio (posted automatically by
+ | Flag determines if an entry is
+ generated by the portfolio (posted automatically by
the system during the lifecycle of loan or saving
products) or manually created by using the Create (Balanced) Journal
+ journalentries_create">Create (Balanced) Journal
Entries API
|
@@ -31381,7 +31387,7 @@ No Request Body:
Flag determines if this manual
journal entry has been reversed using the Reverse a Journal Entry
+ journalentries_reverse">Reverse a Journal Entry
API.
Note: A journal entry is reversed by logging debits
for all credits that make up the Journal entry and
@@ -31461,7 +31467,7 @@ No Request Body:
Integer optional, defaults to 0
- Indicates from what result to start from.
-
+
- limit
-
Integer optional, defaults to 200
@@ -31482,10 +31488,10 @@ No Request Body:
- officeId
-
- Integer optional
+ Integer optional
- Provides ability to restrict list of centers returned based on the office there associated with.
-
+
- glAccountId
-
Integer optional
@@ -31495,9 +31501,9 @@ No Request Body:
Boolean optional
- Flag determines if only manually created journal entries
- are to be returned( journal entries created by
- the system during lifecycle of loan or saving
- products etc shall be excluded)
+ are to be returned( journal entries created by
+ the system during lifecycle of loan or saving
+ products etc shall be excluded)
Set to "false" by default if not passed in explicity
@@ -31505,14 +31511,14 @@ No Request Body:
-
Dateoptional
- - Filters for Journal entries whose entry Date
+
- Filters for Journal entries whose entry Date
is greater than or equal to the passed in Date
- toDate
-
Date optional
- - Filters for Journal entries whose entry Date
+
- Filters for Journal entries whose entry Date
is lesser than or equal to the passed in Date
- transactionId
@@ -31523,16 +31529,16 @@ No Request Body:
-
Boolean optional
- - Flag determines if additional transactional details
+
- Flag determines if additional transactional details
to be returned(like payment details and notes).
- runningBalance
-
Boolean optional
- - Flag determines whether running balances
- to be returned
-
+ - Flag determines whether running balances
+ to be returned
+
Example Requests:
journalentries
@@ -31664,7 +31670,7 @@ GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
| Mandatory Fields |
- | officeId, transactionDate
+ | officeId, transactionDate
|
@@ -31678,7 +31684,7 @@ GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
in the journal entry. Each credit entry contains
the following items
glAccountId: Identifier of the general ledger
- account against which the credit entry shall be
+ account against which the credit entry shall be
made
amount: Amount of money credited
@@ -31692,9 +31698,9 @@ GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S
Details of the debits contained
- in the journal entry. Each debit entry contains the
+ in the journal entry. Each debit entry contains the
following items
- glAccountId: Identifier of the general ledger account
+ glAccountId: Identifier of the general ledger account
against which the debit entry shall be
made
amount: Amount of money debited
@@ -31721,7 +31727,7 @@ POST https://DomainName/api/v1/journalentries
POST journalentries
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"officeId": 1,
@@ -31759,7 +31765,7 @@ POST https://DomainName/api/v1/journalentries
POST journalentries
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en",
@@ -31784,7 +31790,7 @@ POST https://DomainName/api/v1/journalentries
POST journalentries
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en",
@@ -31817,7 +31823,7 @@ POST https://DomainName/api/v1/journalentries
POST journalentries
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en",
@@ -31857,7 +31863,7 @@ Request Body:
Mandatory Fields |
|
- | officeId
+ | officeId
|
@@ -31868,7 +31874,7 @@ POST https://DomainName/api/v1/journalentries?command=updateRunningBalance
POST journalentries?command=updateRunningBalance
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"officeId": 1,
@@ -31879,11 +31885,11 @@ Request Body:
"officeId": 1,
}
-
+
-
+
@@ -31952,7 +31958,7 @@ GET https://DomainName/api/v1/journalentries/{entryId}
Note: A journal entry is reversed by logging debits
for all credits that constitute the Journal entry and
vice-versa. The transactionId of the "reversal Entry" is returned
- as the methods response
+ as the methods response
Arguments
@@ -31978,7 +31984,7 @@ GET https://DomainName/api/v1/journalentries/{transactionId}?command=reverse
POST journalentries/C1MAE935K0IAEYA?command=reverse
-Content-Type: application/json
+Content-Type: application/json
{
@@ -31987,7 +31993,7 @@ Content-Type: application/json
-
+
@@ -32074,13 +32080,13 @@ GET https://DomainName/api/v1/financialactivityaccounts
Mandatory Fields |
- | financialActivityId, glAccountId
+ | financialActivityId, glAccountId
|
-
+
-
+
@@ -32088,7 +32094,7 @@ POST https://DomainName/api/v1/financialactivityaccounts
POST financialactivityaccounts
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"financialActivityId": 200,
@@ -32111,7 +32117,7 @@ Request Body:
the API updates the Ledger account linked to a Financial Activity
-
+
@@ -32119,7 +32125,7 @@ PUT https://DomainName/api/v1/financialactivityaccounts/{financialactivityaccoun
PUT financialactivityaccounts
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"financialActivityId": 200,
@@ -32134,11 +32140,11 @@ Request Body:
}
}
-
+
-
+
@@ -32182,7 +32188,7 @@ DELETE https://DomainName/api/v1/financialactivityaccounts/{financialactivityacc
DELETE financialactivityaccounts/1?
-Content-Type: application/json
+Content-Type: application/json
{
@@ -32194,7 +32200,7 @@ Content-Type: application/json
-
+
@@ -32210,16 +32216,16 @@ Content-Type: application/json
tillDate |
- | which specifies periodic accruals should happen till the given Date
+ | which specifies periodic accruals should happen till the given Date
|
-
+
-
+
@@ -32229,13 +32235,13 @@ Content-Type: application/json
Mandatory Fields |
- | tillDate
+ | tillDate
|
-
+
-
+
@@ -32243,12 +32249,12 @@ POST https://DomainName/api/v1/runaccruals
POST financialactivityaccounts
-Content-Type: application/json
+Content-Type: application/json
Request Body:
{
"locale": "en",
"dateFormat": "dd MMMM yyyy",
- "tillDate":"04 June 2014"
+ "tillDate":"04 June 2014"
}
@@ -32257,7 +32263,7 @@ Request Body:
-
+
@@ -32273,7 +32279,7 @@ Request Body:
| Client |
Display Name |
-
+
| Account Number |
@@ -32527,8 +32533,8 @@ GET https://DomainName/api/v1/search?query=000000111
- loanStatus, loanProducts, offices, loanDateOption, loanFromDate, loanToDate, includeOutStandingAmountPercentage, outStandingAmountPercentageCondition,
- minOutStandingAmountPercentage and maxOutStandingAmountPercentage OR outStandingAmountPercentage, includeOutstandingAmount, outstandingAmountCondition,
+ loanStatus, loanProducts, offices, loanDateOption, loanFromDate, loanToDate, includeOutStandingAmountPercentage, outStandingAmountPercentageCondition,
+ minOutStandingAmountPercentage and maxOutStandingAmountPercentage OR outStandingAmountPercentage, includeOutstandingAmount, outstandingAmountCondition,
minOutstandingAmount and maxOutstandingAmount OR outstandingAmount |
@@ -32557,7 +32563,7 @@ Content-Type: application/json Request Body:
"outstandingAmountCondition": "between",
"minOutstandingAmount": "100",
"maxOutstandingAmount": "10000"
-}
+}
[{
@@ -32585,14 +32591,14 @@ Content-Type: application/json Request Body:
-
+
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 |
@@ -32601,7 +32607,7 @@ Content-Type: application/json Request Body:
name |
- | Name of the interest rate chart.
+ | Name of the interest rate chart.
|
@@ -32654,7 +32660,7 @@ Content-Type: application/json Request Body:
| name, description and endDate |
-
+
@@ -32662,8 +32668,8 @@ POST https://DomainName/api/v1/interestratecharts
POST interestratecharts
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"name": "Chart - 2014",
"description": "This chart is applicable for year 2014",
@@ -32801,8 +32807,8 @@ PUT https://DomainName/api/v1/interestratecharts/{chartId}
PUT interestratecharts/1
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"name": "Interest rate chart for 2014",
"description": "Interest rate chart for 2014",
@@ -32828,7 +32834,7 @@ DELETE https://DomainName/api/v1/interestratecharts/{chartId}
DELETE interestratecharts/1
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -32844,7 +32850,7 @@ No Request Body:
Retrieve Chart Details Template
This is a convenience resource. It can be useful when
- building maintenance user interface screens for creating a chart.
+ building maintenance user interface screens for creating a chart.
The template data returned consists of any or all
of:
@@ -32852,7 +32858,7 @@ No Request Body:
- Allowed Value Lists
-
+
Example Request:
interestratecharts/template
@@ -32897,7 +32903,7 @@ GET https://DomainName/api/v1/interestratecharts/template
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 |
@@ -32906,15 +32912,15 @@ GET https://DomainName/api/v1/interestratecharts/template
periodType |
- | The period type is used to define the different deposit term intervals. 0=Daily, 1=Weekly, 2=Monthly, 3=Yearly
+ | 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%
+ | 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
|
@@ -32922,7 +32928,7 @@ GET https://DomainName/api/v1/interestratecharts/template
toPeriod |
- | End of the period for defining deposit term interval.
+ | End of the period for defining deposit term interval.
e.g. for 1 day to 180 days applicable interest rate is 5%
|
@@ -32984,8 +32990,8 @@ POST https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs
POST interestratecharts/{chartId}/chartslabs
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"periodType": "0",
"fromPeriod": "1",
@@ -33017,7 +33023,7 @@ Request Body:
Retrieve all Slabs
Retrieve list of slabs associated with a chart
-
+
Example Requests:
interestratecharts/1/chartslabs
@@ -33048,10 +33054,10 @@ GET https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs
"displayLabel": "US Dollar ($)"
},
"incentives":[{
- "id":1,
- "entityType":{"id":2,"code":"InterestIncentiveEntityType.customer","value":"Customer"},
+ "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",
+ "attributeValue":"11","attributeValueDesc":"FEMALE",
"incentiveType":{"id":3,"code":"InterestIncentiveType.incentive","value":"Incentive"},
"amount":-1.000000
}]
@@ -33096,10 +33102,10 @@ GET https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId}
"displayLabel": "US Dollar ($)"
},
"incentives":[{
- "id":1,
- "entityType":{"id":2,"code":"InterestIncentiveEntityType.customer","value":"Customer"},
+ "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",
+ "attributeValue":"11","attributeValueDesc":"FEMALE",
"incentiveType":{"id":3,"code":"InterestIncentiveType.incentive","value":"Incentive"},
"amount":-1.000000
}]
@@ -33120,8 +33126,8 @@ PUT https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId}
PUT interestratecharts/1/chartslabs/1
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"annualInterestRate": "6",
"description": "Interest rate changed to 6%",
@@ -33152,7 +33158,7 @@ DELETE https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId
DELETE interestratecharts/1/chartslabs/1
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -33164,7 +33170,7 @@ No Request Body:
-
+
@@ -33174,7 +33180,7 @@ No Request Body:
User Generated Documents (and other types of templates) can aggregate data from several Mifos X back-end API calls via mappers. Mappers can even access non-Mifos X REST services from other servers. UGDs can render such data in tables, show images, etc. TBD: Please have a look at some of the Example UGDs included in Mifos X (or the Wiki page, for now.).
- UGDs can be assigned to an entity like client or loan and be of a typ like document. The entity and type of a UGD is only there for the convenience of user agents (UIs), in order to know where to show UGDs for the user (i.e. which tab). The Template Engine back-end runner does not actually need this metadata.
+ UGDs can be assigned to an entity like client or loan and be of a type like Document or SMS. The entity and type of a UGD is only there for the convenience of user agents (UIs), in order to know where to show UGDs for the user (i.e. which tab). The Template Engine back-end runner does not actually need this metadata.
Field Descriptions |
@@ -33183,7 +33189,7 @@ No Request Body:
name |
- | Describes the document which will be created.
+ | Describes the document which will be created.
It must be unique and appears listed in a tab at the assigned entity. |
@@ -33191,8 +33197,8 @@ No Request Body:
|
- For now only the type document is supported.
- In a next version UGDs may be created for e-mails oder SMS.
+ For now only the types Document and SMS are supported.
+ In a next version, UGDs may be created for e-mails as well.
|
@@ -33220,15 +33226,15 @@ No Request Body:
By default one mapper is assigned to the UGD depending on the entity.
Mappers are used to create requests and get tags wich may be used in the UGD.
Also mappery are in order and may depend on the previous mappers.
- For now mappers expect a response in JSON or plain/text.
- JSON contains the keys and the values.
+ For now mappers expect a response in JSON or plain/text.
+ JSON contains the keys and the values.
If the response is plain/text it can be accessed by {{$mapperskey.src}}
-
+
@@ -33271,22 +33277,22 @@ GET https://DomainName/api/v1/templates/template
{
"id": 1,
"name": "Test",
- "entity": "loan",
- "type": "Document",
+ "entity": 1,
+ "type": 0,
"text": "This is a loan for {{loan.clientName}}",
"mappers": [
{
- "mapperorder": 0,
- "mapperkey": "loan",
- "mappervalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
- "id": 1
+ "mappersorder": 0,
+ "mapperskey": "loan",
+ "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
+ "id": 1
}
]
}
-
+
@@ -33310,20 +33316,20 @@ POST https://DomainName/api/v1/templates
POST templates
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"id": 1,
"name": "Test",
- "entity": "loan",
- "type": "Document",
+ "entity": 1,
+ "type": 0,
"text": "This is a loan for {{loan.clientName}}",
"mappers": [
{
- "mapperorder": 0,
- "mapperkey": "loan",
- "mappervalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
- "id": 1
+ "mappersorder": 0,
+ "mapperskey": "loan",
+ "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
+ "id": 1
}
]
}
@@ -33335,7 +33341,7 @@ Request Body:
-
+
@@ -33347,7 +33353,7 @@ Request Body:
It is also possible to get specific UGDs by entity and type:
-
+
templates?type=0&entity=0
@@ -33372,7 +33378,7 @@ Request Body:
|
|
- SMS (not yet) |
+ SMS |
2 |
@@ -33386,15 +33392,15 @@ GET https://DomainName/api/v1/templates
{
"id": 1,
"name": "Test",
- "entity": "loan",
- "type": "Document",
+ "entity": 1,
+ "type": 0,
"text": "This is a loan for {{loan.clientName}}",
"mappers": [
{
- "mapperorder": 0,
- "mapperkey": "loan",
- "mappervalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
- "id": 1
+ "mappersorder": 0,
+ "mapperskey": "loan",
+ "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
+ "id": 1
}
]
}
@@ -33402,7 +33408,7 @@ GET https://DomainName/api/v1/templates
-
+
@@ -33419,14 +33425,14 @@ GET https://DomainName/api/v1/templates/{Id}
{
"id": 1,
"name": "Test",
- "entity": "loan",
- "type": "Document",
+ "entity": 1,
+ "type": 0,
"text": "This is a loan for {{loan.clientName}}",
"mappers": [
{
- "mapperorder": 0,
- "mapperkey": "loan",
- "mappervalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
+ "mappersorder": 0,
+ "mapperskey": "loan",
+ "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
"id": 1
}
]
@@ -33447,19 +33453,19 @@ PUT https://DomainName/api/v1/templates/{templateId}
PUT templates/1
-Content-Type: application/json
-Request Body:
+Content-Type: application/json
+Request Body:
{
"id": 1,
"name": "Test",
- "entity": "loan",
- "type": "Document",
+ "entity": 1,
+ "type": 0,
"text": "This is a loan for {{loan.clientName}}",
"mappers": [
{
- "mapperorder": 0,
- "mapperkey": "loan",
- "mappervalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
+ "mappersorder": 0,
+ "mapperskey": "loan",
+ "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}",
"id": 1
}
]
@@ -33485,7 +33491,7 @@ DELETE https://DomainName/api/v1/templates/{templateId}
DELETE templates/1
-Content-Type: application/json
+Content-Type: application/json
No Request Body:
@@ -33495,16 +33501,16 @@ No Request Body:
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -34533,8 +34539,8 @@ No Request Body:
|
{entityType}/{entityId}/documents/{documentId}/attachment |
|
- Retrieve
- binary file associated with a
+ | Retrieve
+ binary file associated with a
Document
|
|
@@ -34862,7 +34868,7 @@ No Request Body:
|
|
|
-
+
|
savingsaccounts/{accountId}?command=assignSavingsOfficer |
@@ -35014,7 +35020,7 @@ No Request Body:
|
|
|
-
+
| Fixed Deposit Product |
fixeddepositproducts |
@@ -35238,7 +35244,7 @@ No Request Body:
|
|
|
-
+
| Recurring Deposit Transactions |
recurringdepositaccounts/{accountId}/transactions?command=deposit |
@@ -35351,12 +35357,12 @@ No Request Body:
-
Payment Application Logic / Transaction Processing Strategy
-
+
The way payments (transactions) are handled and the effect they have on the loan is an area that can differ widely from MFI to MFI. Mifos allows for transaction processing strategies to be developed that are associated with a loan product. Several approaches are provided out-of-the-box. If these approaches dont meet exactly your needs a custom approach can be developed and released with the platform.
In general the the following areas are handled by any given transaction processing strategy:
@@ -35401,7 +35407,7 @@ No Request Body:
On time payment: Any payment that pays off an installment that occurs exactly on the due date of the installment.
Late payment: Any payment that pays off an installment that occurs after the due date of the installment. There is no penalization for late payment. The total cost of the loan does not automatically increase, no penalties are automatically applied to the loan.
-
+
Interest Principal Penalties Fees Order
The key aspect of this strategy is the payment order.
@@ -35456,8 +35462,8 @@ No Request Body:
Late payment: Any payment that pays off an installment that occurs after the due date of the installment. There is no penalization for late payment. The total cost of the loan does not automatically increase, no penalties are automatically applied to the loan.
-
-
+
+
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/api/HookApiConstants.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/api/HookApiConstants.java
index 6350d71f8..d19f62a90 100644
--- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/api/HookApiConstants.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/api/HookApiConstants.java
@@ -11,46 +11,52 @@ import java.util.Set;
public class HookApiConstants {
- public static final String HOOK_RESOURCE_NAME = "HOOK";
+ public static final String HOOK_RESOURCE_NAME = "HOOK";
- public static final String nameParamName = "name";
+ public static final String nameParamName = "name";
- public static final String displayNameParamName = "displayName";
+ public static final String displayNameParamName = "displayName";
- public static final String isActiveParamName = "isActive";
+ public static final String isActiveParamName = "isActive";
- public static final String webTemplateName = "Web";
+ public static final String webTemplateName = "Web";
- public static final String smsTemplateName = "SMS Bridge";
+ public static final String smsTemplateName = "SMS Bridge";
- public static final String payloadURLName = "Payload URL";
+ public static final String payloadURLName = "Payload URL";
- public static final String contentTypeName = "Content Type";
+ public static final String contentTypeName = "Content Type";
- public static final String smsProviderName = "SMS Provider";
+ public static final String smsProviderName = "SMS Provider";
- public static final String smsProviderAccountIdName = "SMS Provider Account Id";
+ public static final String smsProviderAccountIdName = "SMS Provider Account Id";
- public static final String smsProviderTokenIdName = "SMS Provider Token";
+ public static final String smsProviderTokenIdName = "SMS Provider Token";
- public static final String phoneNumberName = "Phone Number";
-
- public static final String apiKeyName = "Api Key";
+ public static final String phoneNumberName = "Phone Number";
- public static final String configParamName = "config";
+ public static final String apiKeyName = "Api Key";
- public static final String eventsParamName = "events";
+ public static final String configParamName = "config";
- public static final String entityNameParamName = "entityName";
+ public static final String eventsParamName = "events";
- public static final String actionNameParamName = "actionName";
+ public static final String entityNameParamName = "entityName";
- public static final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(
- Arrays.asList(nameParamName, displayNameParamName,
- isActiveParamName, configParamName, eventsParamName));
+ public static final String actionNameParamName = "actionName";
- public static final Set UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
- Arrays.asList(nameParamName, displayNameParamName,
- isActiveParamName, configParamName, eventsParamName));
+ public static final String templateIdParamName = "templateId";
+
+ public static final String templateNameParamName = "templateName";
+
+ public static final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(
+ Arrays.asList(nameParamName, displayNameParamName,
+ templateIdParamName, isActiveParamName, configParamName,
+ eventsParamName, templateNameParamName));
+
+ public static final Set UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
+ Arrays.asList(nameParamName, displayNameParamName,
+ templateIdParamName, isActiveParamName, configParamName,
+ eventsParamName, templateNameParamName));
}
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/data/HookData.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/data/HookData.java
index d13e544b1..d49a16199 100644
--- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/data/HookData.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/data/HookData.java
@@ -5,87 +5,95 @@
*/
package org.mifosplatform.infrastructure.hooks.data;
+import org.joda.time.LocalDate;
+
import java.io.Serializable;
import java.util.List;
-import org.joda.time.LocalDate;
-
public class HookData implements Serializable {
- private final Long id;
- private final String name;
- private final String displayName;
- private final Boolean isActive;
- private final LocalDate createdAt;
- private final LocalDate updatedAt;
+ private final Long id;
+ private final String name;
+ private final String displayName;
+ private final Boolean isActive;
+ private final LocalDate createdAt;
+ private final LocalDate updatedAt;
+ private final Long templateId;
+ private final String templateName;
- // associations
- private final List events;
- private final List config;
+ // associations
+ private final List events;
+ private final List config;
- // template data
- private final List templates;
- private final List groupings;
+ // template data
+ private final List templates;
+ private final List groupings;
- public static HookData instance(final Long id, final String name,
- final String displayName, final boolean isActive,
- final LocalDate createdAt, final LocalDate updatedAt,
- final List registeredEvents, final List config) {
- return new HookData(id, name, displayName, isActive, createdAt,
- updatedAt, registeredEvents, config, null, null);
- }
+ public static HookData instance(final Long id, final String name,
+ final String displayName, final boolean isActive,
+ final LocalDate createdAt, final LocalDate updatedAt,
+ final Long templateId, final List registeredEvents,
+ final List config, final String templateName) {
+ return new HookData(id, name, displayName, isActive, createdAt,
+ updatedAt, templateId, registeredEvents, config, templateName,
+ null, null);
+ }
- public static HookData template(final List templates,
- final List groupings) {
- return new HookData(null, null, null, null, null, null, null, null,
- templates, groupings);
- }
+ public static HookData template(final List templates,
+ final List groupings) {
+ return new HookData(null, null, null, null, null, null, null, null,
+ null, null, templates, groupings);
+ }
- public static HookData templateExisting(final HookData hookData,
- final List templates,
- final List groupings) {
- return new HookData(hookData.id, hookData.name, hookData.displayName,
- hookData.isActive, hookData.createdAt, hookData.updatedAt,
- hookData.events, hookData.config, templates, groupings);
- }
+ public static HookData templateExisting(final HookData hookData,
+ final List templates,
+ final List groupings) {
+ return new HookData(hookData.id, hookData.name, hookData.displayName,
+ hookData.isActive, hookData.createdAt, hookData.updatedAt,
+ hookData.templateId, hookData.events, hookData.config,
+ hookData.templateName, templates, groupings);
+ }
- private HookData(final Long id, final String name,
- final String displayName, final Boolean isActive,
- final LocalDate createdAt, final LocalDate updatedAt,
- final List events, final List config,
- final List templates,
- final List groupings) {
- this.id = id;
- this.name = name;
- this.displayName = displayName;
- this.isActive = isActive;
- this.createdAt = createdAt;
- this.updatedAt = updatedAt;
+ private HookData(final Long id, final String name,
+ final String displayName, final Boolean isActive,
+ final LocalDate createdAt, final LocalDate updatedAt,
+ final Long templateId, final List events,
+ final List config, final String templateName,
+ final List templates,
+ final List groupings) {
+ this.id = id;
+ this.name = name;
+ this.displayName = displayName;
+ this.isActive = isActive;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ this.templateId = templateId;
+ this.templateName = templateName;
- // associations
- this.events = events;
- this.config = config;
+ // associations
+ this.events = events;
+ this.config = config;
- // template
- this.templates = templates;
- this.groupings = groupings;
+ // template
+ this.templates = templates;
+ this.groupings = groupings;
- }
+ }
- public Long getHookId() {
- return this.id;
- }
+ public Long getHookId() {
+ return this.id;
+ }
- public List getTemplates() {
- return this.templates;
- }
+ public List getTemplates() {
+ return this.templates;
+ }
- public List getGroupings() {
- return this.groupings;
- }
+ public List getGroupings() {
+ return this.groupings;
+ }
- public String getTemplateName() {
- return this.name;
- }
+ public String getTemplateName() {
+ return this.name;
+ }
}
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/domain/Hook.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/domain/Hook.java
index 6b0e16692..595138000 100644
--- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/domain/Hook.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/domain/Hook.java
@@ -5,183 +5,198 @@
*/
package org.mifosplatform.infrastructure.hooks.domain;
-import static org.mifosplatform.infrastructure.hooks.api.HookApiConstants.configParamName;
-import static org.mifosplatform.infrastructure.hooks.api.HookApiConstants.displayNameParamName;
-import static org.mifosplatform.infrastructure.hooks.api.HookApiConstants.eventsParamName;
-import static org.mifosplatform.infrastructure.hooks.api.HookApiConstants.isActiveParamName;
-
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
import org.apache.commons.lang.StringUtils;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;
import org.mifosplatform.infrastructure.core.api.JsonCommand;
import org.mifosplatform.infrastructure.core.domain.AbstractAuditableCustom;
+import org.mifosplatform.template.domain.Template;
import org.mifosplatform.useradministration.domain.AppUser;
import org.springframework.util.CollectionUtils;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
+import javax.persistence.*;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+
+import static org.mifosplatform.infrastructure.hooks.api.HookApiConstants.*;
@Entity
@Table(name = "m_hook")
public class Hook extends AbstractAuditableCustom {
- @Column(name = "name", nullable = false, length = 100)
- private String name;
+ @Column(name = "name", nullable = false, length = 100)
+ private String name;
- @Column(name = "is_active", nullable = false)
- private Boolean isActive;
+ @Column(name = "is_active", nullable = false)
+ private Boolean isActive;
- @LazyCollection(LazyCollectionOption.FALSE)
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "hook", orphanRemoval = true)
- private Set events = new HashSet<>();
+ @LazyCollection(LazyCollectionOption.FALSE)
+ @OneToMany(cascade = CascadeType.ALL, mappedBy = "hook", orphanRemoval = true)
+ private Set events = new HashSet<>();
- @LazyCollection(LazyCollectionOption.FALSE)
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "hook", orphanRemoval = true)
- private Set config = new HashSet<>();
+ @LazyCollection(LazyCollectionOption.FALSE)
+ @OneToMany(cascade = CascadeType.ALL, mappedBy = "hook", orphanRemoval = true)
+ private Set config = new HashSet<>();
- @ManyToOne(optional = true)
- @JoinColumn(name = "template_id", referencedColumnName = "id", nullable = false)
- private HookTemplate template;
+ @ManyToOne(optional = true)
+ @JoinColumn(name = "template_id", referencedColumnName = "id", nullable = false)
+ private HookTemplate template;
- protected Hook() {
- //
- }
+ @ManyToOne(optional = true)
+ @JoinColumn(name = "ugd_template_id", referencedColumnName = "id", nullable = false)
+ private Template ugdTemplate;
- public static Hook fromJson(final JsonCommand command,
- final HookTemplate template, final Set config,
- final Set events) {
- final String displayName = command
- .stringValueOfParameterNamed(displayNameParamName);
- Boolean isActive = command
- .booleanObjectValueOfParameterNamed(isActiveParamName);
- if(isActive == null)
+ protected Hook() {
+ //
+ }
+
+ public static Hook fromJson(final JsonCommand command,
+ final HookTemplate template, final Set config,
+ final Set events, final Template ugdTemplate) {
+ final String displayName = command
+ .stringValueOfParameterNamed(displayNameParamName);
+ Boolean isActive = command
+ .booleanObjectValueOfParameterNamed(isActiveParamName);
+ if (isActive == null)
isActive = false;
- return new Hook(template, displayName, isActive, config, events);
- }
+ return new Hook(template, displayName, isActive, config, events,
+ ugdTemplate);
+ }
- private Hook(final HookTemplate template, final String displayName,
- final Boolean isActive, final Set config,
- final Set events) {
+ private Hook(final HookTemplate template, final String displayName,
+ final Boolean isActive, final Set config,
+ final Set events, final Template ugdTemplate) {
- this.template = template;
+ this.template = template;
- if (StringUtils.isNotBlank(displayName)) {
- this.name = displayName.trim();
- } else {
- this.name = template.getName();
- }
- this.isActive = isActive;
- if (!CollectionUtils.isEmpty(config)) {
- this.config = associateConfigWithThisHook(config);
- }
- if (!CollectionUtils.isEmpty(events)) {
- this.events = associateEventsWithThisHook(events);
- }
+ if (StringUtils.isNotBlank(displayName)) {
+ this.name = displayName.trim();
+ } else {
+ this.name = template.getName();
+ }
+ this.isActive = isActive;
+ if (!CollectionUtils.isEmpty(config)) {
+ this.config = associateConfigWithThisHook(config);
+ }
+ if (!CollectionUtils.isEmpty(events)) {
+ this.events = associateEventsWithThisHook(events);
+ }
- }
+ this.ugdTemplate = ugdTemplate;
+ }
- private Set associateConfigWithThisHook(
- final Set config) {
- for (final HookConfiguration hookConfiguration : config) {
- hookConfiguration.update(this);
- }
- return config;
- }
+ private Set associateConfigWithThisHook(
+ final Set config) {
+ for (final HookConfiguration hookConfiguration : config) {
+ hookConfiguration.update(this);
+ }
+ return config;
+ }
- private Set associateEventsWithThisHook(
- final Set events) {
- for (final HookResource hookResource : events) {
- hookResource.update(this);
- }
- return events;
- }
+ private Set associateEventsWithThisHook(
+ final Set events) {
+ for (final HookResource hookResource : events) {
+ hookResource.update(this);
+ }
+ return events;
+ }
- public HookTemplate getHookTemplate() {
- return this.template;
- }
+ public HookTemplate getHookTemplate() {
+ return this.template;
+ }
- public Set getHookConfig() {
- return this.config;
- }
+ public Template getUgdTemplate() {
+ return this.ugdTemplate;
+ }
- public Map update(final JsonCommand command) {
+ public Long getUgdTemplateId() {
+ return this.ugdTemplate.getId();
+ }
- final Map actualChanges = new LinkedHashMap<>(4);
+ public Set getHookConfig() {
+ return this.config;
+ }
- if (command.isChangeInStringParameterNamed(displayNameParamName,
- this.name)) {
- final String newValue = command
- .stringValueOfParameterNamed(displayNameParamName);
- actualChanges.put(displayNameParamName, newValue);
- this.name = newValue;
- }
+ public Map update(final JsonCommand command) {
- if (command.isChangeInBooleanParameterNamed(isActiveParamName,
- this.isActive)) {
- final Boolean newValue = command
- .booleanObjectValueOfParameterNamed(isActiveParamName);
- actualChanges.put(isActiveParamName, newValue);
- this.isActive = newValue;
- }
+ final Map actualChanges = new LinkedHashMap<>(5);
- // events
- if (command.hasParameter(eventsParamName)) {
- final JsonArray jsonArray = command
- .arrayOfParameterNamed(eventsParamName);
- if (jsonArray != null) {
- actualChanges.put(eventsParamName, jsonArray);
- }
- }
+ if (command.isChangeInStringParameterNamed(displayNameParamName,
+ this.name)) {
+ final String newValue = command
+ .stringValueOfParameterNamed(displayNameParamName);
+ actualChanges.put(displayNameParamName, newValue);
+ this.name = newValue;
+ }
- // config
- if (command.hasParameter(configParamName)) {
- final JsonElement element = command.parsedJson().getAsJsonObject()
- .get(configParamName);
- if (element != null) {
- actualChanges.put(configParamName, element);
- }
- }
+ if (command.isChangeInBooleanParameterNamed(isActiveParamName,
+ this.isActive)) {
+ final Boolean newValue = command
+ .booleanObjectValueOfParameterNamed(isActiveParamName);
+ actualChanges.put(isActiveParamName, newValue);
+ this.isActive = newValue;
+ }
- return actualChanges;
- }
+ if (command.isChangeInLongParameterNamed(templateIdParamName,
+ getUgdTemplateId())) {
+ final Long newValue = command
+ .longValueOfParameterNamed(templateIdParamName);
+ actualChanges.put(templateIdParamName, newValue);
+ }
- public boolean updateEvents(final Set newHookEvents) {
- if (newHookEvents == null) {
- return false;
- }
+ // events
+ if (command.hasParameter(eventsParamName)) {
+ final JsonArray jsonArray = command
+ .arrayOfParameterNamed(eventsParamName);
+ if (jsonArray != null) {
+ actualChanges.put(eventsParamName, jsonArray);
+ }
+ }
- if (this.events == null) {
- this.events = new HashSet<>();
- }
- this.events.clear();
- this.events.addAll(associateEventsWithThisHook(newHookEvents));
- return true;
- }
+ // config
+ if (command.hasParameter(configParamName)) {
+ final JsonElement element = command.parsedJson().getAsJsonObject()
+ .get(configParamName);
+ if (element != null) {
+ actualChanges.put(configParamName, element);
+ }
+ }
- public boolean updateConfig(final Set newHookConfig) {
- if (newHookConfig == null) {
- return false;
- }
+ return actualChanges;
+ }
- if (this.config == null) {
- this.config = new HashSet<>();
- }
- this.config.clear();
- this.config.addAll(associateConfigWithThisHook(newHookConfig));
- return true;
- }
+ public boolean updateEvents(final Set newHookEvents) {
+ if (newHookEvents == null) {
+ return false;
+ }
+
+ if (this.events == null) {
+ this.events = new HashSet<>();
+ }
+ this.events.clear();
+ this.events.addAll(associateEventsWithThisHook(newHookEvents));
+ return true;
+ }
+
+ public boolean updateConfig(final Set newHookConfig) {
+ if (newHookConfig == null) {
+ return false;
+ }
+
+ if (this.config == null) {
+ this.config = new HashSet<>();
+ }
+ this.config.clear();
+ this.config.addAll(associateConfigWithThisHook(newHookConfig));
+ return true;
+ }
+
+ public void updateUgdTemplate(final Template ugdTemplate) {
+ this.ugdTemplate = ugdTemplate;
+ }
}
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/listener/MifosHookListener.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/listener/MifosHookListener.java
index e2831c953..ca051cae3 100644
--- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/listener/MifosHookListener.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/listener/MifosHookListener.java
@@ -5,8 +5,6 @@
*/
package org.mifosplatform.infrastructure.hooks.listener;
-import java.util.List;
-
import org.mifosplatform.infrastructure.core.domain.MifosPlatformTenant;
import org.mifosplatform.infrastructure.core.service.ThreadLocalContextUtil;
import org.mifosplatform.infrastructure.hooks.domain.Hook;
@@ -20,48 +18,50 @@ import org.mifosplatform.useradministration.domain.AppUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.List;
+
@Service
public class MifosHookListener implements HookListener {
- private final HookProcessorProvider hookProcessorProvider;
- private final HookReadPlatformService hookReadPlatformService;
- private final TenantDetailsService tenantDetailsService;
+ private final HookProcessorProvider hookProcessorProvider;
+ private final HookReadPlatformService hookReadPlatformService;
+ private final TenantDetailsService tenantDetailsService;
- @Autowired
- public MifosHookListener(final HookProcessorProvider hookProcessorProvider,
- final HookReadPlatformService hookReadPlatformService,
- final TenantDetailsService tenantDetailsService) {
- this.hookReadPlatformService = hookReadPlatformService;
- this.hookProcessorProvider = hookProcessorProvider;
- this.tenantDetailsService = tenantDetailsService;
- }
+ @Autowired
+ public MifosHookListener(final HookProcessorProvider hookProcessorProvider,
+ final HookReadPlatformService hookReadPlatformService,
+ final TenantDetailsService tenantDetailsService) {
+ this.hookReadPlatformService = hookReadPlatformService;
+ this.hookProcessorProvider = hookProcessorProvider;
+ this.tenantDetailsService = tenantDetailsService;
+ }
- @Override
- public void onApplicationEvent(final HookEvent event) {
+ @Override
+ public void onApplicationEvent(final HookEvent event) {
- final String tenantIdentifier = event.getTenantIdentifier();
- final MifosPlatformTenant tenant = this.tenantDetailsService
- .loadTenantById(tenantIdentifier);
- ThreadLocalContextUtil.setTenant(tenant);
+ final String tenantIdentifier = event.getTenantIdentifier();
+ final MifosPlatformTenant tenant = this.tenantDetailsService
+ .loadTenantById(tenantIdentifier);
+ ThreadLocalContextUtil.setTenant(tenant);
- final AppUser appUser = event.getAppUser();
- final String authToken = event.getAuthToken();
+ final AppUser appUser = event.getAppUser();
+ final String authToken = event.getAuthToken();
- final HookEventSource hookEventSource = event.getSource();
- final String entityName = hookEventSource.getEntityName();
- final String actionName = hookEventSource.getActionName();
- final String payload = event.getPayload();
-
- final List hooks = this.hookReadPlatformService
- .retrieveHooksByEvent(hookEventSource.getEntityName(),
- hookEventSource.getActionName());
+ final HookEventSource hookEventSource = event.getSource();
+ final String entityName = hookEventSource.getEntityName();
+ final String actionName = hookEventSource.getActionName();
+ final String payload = event.getPayload();
- for (final Hook hook : hooks) {
- final HookProcessor processor = this.hookProcessorProvider
- .getProcessor(hook);
- processor.process(hook, appUser, payload, entityName, actionName,
- tenantIdentifier, authToken);
- }
- }
+ final List hooks = this.hookReadPlatformService
+ .retrieveHooksByEvent(hookEventSource.getEntityName(),
+ hookEventSource.getActionName());
+
+ for (final Hook hook : hooks) {
+ final HookProcessor processor = this.hookProcessorProvider
+ .getProcessor(hook);
+ processor.process(hook, appUser, payload, entityName, actionName,
+ tenantIdentifier, authToken);
+ }
+ }
}
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/processor/TwilioHookProcessor.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/processor/TwilioHookProcessor.java
index 667bd7388..a5e6048a3 100644
--- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/processor/TwilioHookProcessor.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/processor/TwilioHookProcessor.java
@@ -5,79 +5,131 @@
*/
package org.mifosplatform.infrastructure.hooks.processor;
-import static org.mifosplatform.infrastructure.hooks.api.HookApiConstants.apiKeyName;
-
+import com.google.gson.Gson;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import org.codehaus.jackson.map.ObjectMapper;
import org.mifosplatform.infrastructure.hooks.domain.Hook;
import org.mifosplatform.infrastructure.hooks.domain.HookConfiguration;
import org.mifosplatform.infrastructure.hooks.domain.HookConfigurationRepository;
import org.mifosplatform.infrastructure.hooks.processor.data.SmsProviderData;
+import org.mifosplatform.portfolio.client.domain.Client;
+import org.mifosplatform.portfolio.client.domain.ClientRepository;
+import org.mifosplatform.template.service.TemplateMergeService;
import org.mifosplatform.useradministration.domain.AppUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-
import retrofit.Callback;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.mifosplatform.infrastructure.hooks.api.HookApiConstants.apiKeyName;
@Service
public class TwilioHookProcessor implements HookProcessor {
- private final HookConfigurationRepository hookConfigurationRepository;
+ private final HookConfigurationRepository hookConfigurationRepository;
+ private final TemplateMergeService templateMergeService;
+ private final ClientRepository clientRepository;
- @Autowired
- public TwilioHookProcessor(
- final HookConfigurationRepository hookConfigurationRepository) {
- this.hookConfigurationRepository = hookConfigurationRepository;
- }
+ @Autowired
+ public TwilioHookProcessor(
+ final HookConfigurationRepository hookConfigurationRepository,
+ final TemplateMergeService templateMergeService,
+ final ClientRepository clientRepository) {
+ this.hookConfigurationRepository = hookConfigurationRepository;
+ this.templateMergeService = templateMergeService;
+ this.clientRepository = clientRepository;
+ }
- @Override
- public void process(final Hook hook,
- @SuppressWarnings("unused") final AppUser appUser,
- final String payload, final String entityName,
- final String actionName, final String tenantIdentifier,
- final String authToken) {
+ @Override
+ public void process(final Hook hook,
+ @SuppressWarnings("unused") final AppUser appUser,
+ final String payload, final String entityName,
+ final String actionName, final String tenantIdentifier,
+ final String authToken) {
- final SmsProviderData smsProviderData = new SmsProviderData(
- hook.getHookConfig());
+ final SmsProviderData smsProviderData = new SmsProviderData(
+ hook.getHookConfig());
- sendRequest(smsProviderData, payload, entityName, actionName,
- tenantIdentifier, authToken, hook);
- }
+ sendRequest(smsProviderData, payload, entityName, actionName,
+ tenantIdentifier, authToken, hook);
+ }
- @SuppressWarnings("unchecked")
- private void sendRequest(final SmsProviderData smsProviderData,
- final String payload, final String entityName,
- final String actionName, final String tenantIdentifier,
- final String authToken, final Hook hook) {
+ @SuppressWarnings("unchecked")
+ private void sendRequest(final SmsProviderData smsProviderData,
+ final String payload, String entityName, String actionName,
+ final String tenantIdentifier, final String authToken,
+ final Hook hook) {
- final WebHookService service = ProcessorHelper
- .createWebHookService(smsProviderData.getUrl());
+ final WebHookService service = ProcessorHelper
+ .createWebHookService(smsProviderData.getUrl());
- @SuppressWarnings("rawtypes")
- final Callback callback = ProcessorHelper
- .createCallback(smsProviderData.getUrl());
+ @SuppressWarnings("rawtypes")
+ final Callback callback = ProcessorHelper
+ .createCallback(smsProviderData.getUrl());
- String apiKey = this.hookConfigurationRepository
- .findOneByHookIdAndFieldName(hook.getId(), apiKeyName);
- if (apiKey == null) {
- smsProviderData.setUrl(null);
- smsProviderData.setEndpoint(System.getProperty("baseUrl"));
- smsProviderData.setTenantId(tenantIdentifier);
- smsProviderData.setMifosToken(authToken);
- apiKey = service.sendSmsBridgeConfigRequest(smsProviderData);
- final HookConfiguration apiKeyEntry = HookConfiguration.createNew(
- hook, "string", apiKeyName, apiKey);
- this.hookConfigurationRepository.save(apiKeyEntry);
- }
+ String apiKey = this.hookConfigurationRepository
+ .findOneByHookIdAndFieldName(hook.getId(), apiKeyName);
+ if (apiKey == null) {
+ smsProviderData.setUrl(null);
+ smsProviderData.setEndpoint(System.getProperty("baseUrl"));
+ smsProviderData.setTenantId(tenantIdentifier);
+ smsProviderData.setMifosToken(authToken);
+ apiKey = service.sendSmsBridgeConfigRequest(smsProviderData);
+ final HookConfiguration apiKeyEntry = HookConfiguration.createNew(
+ hook, "string", apiKeyName, apiKey);
+ this.hookConfigurationRepository.save(apiKeyEntry);
+ }
- if (apiKey != null && !apiKey.equals("")) {
- final JsonObject json = new JsonParser().parse(payload)
- .getAsJsonObject();
- service.sendSmsBridgeRequest(entityName, actionName,
- tenantIdentifier, apiKey, json, callback);
- }
+ if (apiKey != null && !apiKey.equals("")) {
+ JsonObject json = null;
+ if (hook.getUgdTemplate() != null) {
+ entityName = "sms";
+ actionName = "send";
+ json = processUgdTemplate(payload, hook, authToken);
+ if (json == null) {
+ return;
+ }
+ } else {
+ json = new JsonParser().parse(payload).getAsJsonObject();
+ }
+ service.sendSmsBridgeRequest(entityName, actionName,
+ tenantIdentifier, apiKey, json, callback);
+ }
- }
+ }
+
+ private JsonObject processUgdTemplate(final String payload,
+ final Hook hook, final String authToken) {
+ JsonObject json = null;
+ try {
+ @SuppressWarnings("unchecked")
+ final HashMap map = new ObjectMapper().readValue(
+ payload, HashMap.class);
+ map.put("BASE_URI", System.getProperty("baseUrl"));
+ if (map.containsKey("clientId")) {
+ final Long clientId = new Long(Integer.toString((int) map
+ .get("clientId")));
+ final Client client = this.clientRepository.findOne(clientId);
+ final String mobileNo = client.mobileNo();
+ if (mobileNo != null && !mobileNo.isEmpty()) {
+ this.templateMergeService.setAuthToken(authToken);
+ final String compiledMessage = this.templateMergeService
+ .compile(hook.getUgdTemplate(), map)
+ .replace("", "").replace(" ", "");
+ final Map jsonMap = new HashMap<>();
+ jsonMap.put("mobileNo", mobileNo);
+ jsonMap.put("message", compiledMessage);
+ final String jsonString = new Gson().toJson(jsonMap);
+ json = new JsonParser().parse(jsonString).getAsJsonObject();
+ }
+ }
+ } catch (IOException e) {
+ }
+ return json;
+ }
}
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/serialization/HookCommandFromApiJsonDeserializer.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/serialization/HookCommandFromApiJsonDeserializer.java
index 575270c05..551489784 100644
--- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/serialization/HookCommandFromApiJsonDeserializer.java
+++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/hooks/serialization/HookCommandFromApiJsonDeserializer.java
@@ -5,98 +5,112 @@
*/
package org.mifosplatform.infrastructure.hooks.serialization;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
+import com.google.gson.JsonElement;
+import com.google.gson.reflect.TypeToken;
import org.apache.commons.lang.StringUtils;
import org.mifosplatform.infrastructure.core.data.ApiParameterError;
import org.mifosplatform.infrastructure.core.data.DataValidatorBuilder;
import org.mifosplatform.infrastructure.core.exception.InvalidJsonException;
import org.mifosplatform.infrastructure.core.exception.PlatformApiDataValidationException;
import org.mifosplatform.infrastructure.core.serialization.FromJsonHelper;
+import org.mifosplatform.infrastructure.hooks.api.HookApiConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import com.google.gson.JsonElement;
-import com.google.gson.reflect.TypeToken;
+import java.lang.reflect.Type;
+import java.util.*;
@Component
public class HookCommandFromApiJsonDeserializer {
- /**
- * The parameters supported for this command.
- */
- private final Set supportedParameters = new HashSet<>(
- Arrays.asList("name", "displayName", "isActive", "events", "config"));
- private final FromJsonHelper fromApiJsonHelper;
+ /**
+ * The parameters supported for this command.
+ */
+ private final Set supportedParameters = new HashSet<>(
+ Arrays.asList("name", "displayName", "isActive", "events",
+ "config", "templateId"));
+ private final FromJsonHelper fromApiJsonHelper;
- @Autowired
- public HookCommandFromApiJsonDeserializer(
- final FromJsonHelper fromApiJsonHelper) {
- this.fromApiJsonHelper = fromApiJsonHelper;
- }
+ @Autowired
+ public HookCommandFromApiJsonDeserializer(
+ final FromJsonHelper fromApiJsonHelper) {
+ this.fromApiJsonHelper = fromApiJsonHelper;
+ }
- public void validateForCreate(final String json) {
- if (StringUtils.isBlank(json)) {
- throw new InvalidJsonException();
- }
+ public void validateForCreate(final String json) {
+ if (StringUtils.isBlank(json)) {
+ throw new InvalidJsonException();
+ }
- final Type typeOfMap = new TypeToken |