diff --git a/APIFolder/api.htm b/APIFolder/api.htm index 5cd85c554..8c991688e 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -34,9 +34,10 @@ var jqxhr = $.ajax({ if (jqXHR.status === 400) { errJSON = eval("(" + jqXHR.responseText + ')'); - var mandFields = "" + var mandFields = ""; + if (resultDiv == 'loans_mandatory') mandFields = "clientId, productId, inArrearsTolerance, submittedOnDate, "; for ( var i in errJSON.errors) { - if (i == 0) mandFields = errJSON.errors[i].parameterName; + if (i == 0) mandFields += errJSON.errors[i].parameterName; else mandFields += ", " + errJSON.errors[i].parameterName; } $('#' + resultDiv).html(mandFields); @@ -1767,19 +1768,41 @@ Request Body:
POST https://thedomainname/api/v1/loans
- https://localhost:8443/mifosng-provider/api/v1/loans
-
-
- Content-Type: application/json
- Request Body:
- new json here
+ POST https://localhost:8443/mifosng-provider/api/v1/loans
+Content-Type: application/json
+Request Body:
+{
+ "clientId": 1,
+ "productId": 1,
+ "currencyCode": "USD",
+ "digitsAfterDecimal": "2",
+ "locale": "en_GB",
+ "principal": "100,000.00",
+ "inArrearsTolerance": "1,000.00",
+ "repaymentFrequencyType": 2,
+ "repaymentEvery": "1",
+ "numberOfRepayments": "12",
+ "interestRatePerPeriod": "1.75",
+ "interestRateFrequencyType": 2,
+ "amortizationType": 1,
+ "interestCalculationPeriodType": 1,
+ "interestType": 0,
+ "dateFormat": "dd MMMM yyyy",
+ "expectedDisbursementDate": "01 July 2007",
+ "submittedOnDate": "25 June 2007"
+}
- {"entityId": 2}
+ {
+ "entityId": 42
+}
{
- "entityId": 2
+"entityId": 1
}
@@ -1819,18 +1842,18 @@ Request Body:
+ Note: Only loans in "Submitted and awaiting approval" status can be deleted. +
DELETE https://thedomainname/api/v1/loans/{loanId}
- https://localhost:8443/mifosng-provider/api/v1/loans/1
-
-
- Content-Type: application/json
- Request Body:
- new json here
+ DELETE https://localhost:8443/mifosng-provider/api/v1/loans/1
+Content-Type: application/json
+No Request Body:
{
- "entityId": 2
+"entityId": 1
}