From aa6fac3eebc356bcc0cd8bfbde0c5279076abaf6 Mon Sep 17 00:00:00 2001 From: John Woodlock Date: Tue, 22 May 2012 22:28:05 +1000 Subject: [PATCH] api docs WIP --- APIFolder/api.htm | 206 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 205 insertions(+), 1 deletion(-) diff --git a/APIFolder/api.htm b/APIFolder/api.htm index 816a81c93..b5ecf9e81 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -10,7 +10,6 @@
-

API Navigation

@@ -617,6 +616,211 @@ +   +
+
+

Loans

+

Loan stuff. +

+
+
+ +
+
+
Attributes
+
+
+ id +
+
+ string jpw ipsum as an example of showing the (at least important) columns +
+
+ amount +
+
blah +
+
blah
+
+ card +
+
+
+
+   +
+
+

Retrieve Loan Details Template

+

Returns a template that contains client and loan product fields and allowed value lists. This helps build a maintenance User Interface. +

+
Arguments
+
+
clientId
+
Integer
+
The 'id' of the Client
+
productId
+
Integer
+
The 'id' of the Loan Product
+
+

Example Request: + http://localhost:8080/mifosng-provider/api/v1/loans/template?clientId=1&productId=1 +

+
+
+ GET https://thedomainname/api/v1/loans/template + to be done + +
+
+   +
+
+

Retrieve a Loan

+

Returns loan fields. +

+

Example Request: + http://localhost:8080/mifosng-provider/api/v1/loans/1 +

+
+
+ GET https://thedomainname/api/v1/loans/{loanId} + + +
+
+   +   +
+
+

Create a New Loan/Submit a Loan Application

+
Arguments
+
+
command
+
String Optional, case-insensitive
+
The default action is to Submit a New Loan Application. If the value is 'calculateLoanSchedule' then a new loan entry is created without entering the loan life cycle.
+
+
+
+ POST https://thedomainname/api/v1/loans + http://localhost:8080/mifosng-provider/api/v1/loans + + + Content-Type: application/json + Request Body: + new json here + + { + "entityId": 2 +} + +
+
+   +   +   +   +
+
+

Approve, Disburse, Reject a Loan or Withdraw a Loan Application

+
Arguments
+
+
command
+
String Mandatory? what happens if command wrong, , case-insensitive
+
'approve' : Approve Loan
+
'disburse' : Disburse Loan
+
'reject' : Reject Loan
+
'withdrewbyclient' : Client Withdrew Loan Application
+
+
+
+ POST https://thedomainname/api/v1/loans/{loanId} + http://localhost:8080/mifosng-provider/api/v1/loans/1?command=approve + + + Content-Type: application/json + Request Body: + new json here + + { + "entityId": 2 +} + +
+
+   +
+
+

Delete a Loan

+
+
+ DELETE https://thedomainname/api/v1/loans/{loanId} + http://localhost:8080/mifosng-provider/api/v1/loans/1 + + + Content-Type: application/json + Request Body: + new json here + + { + "entityId": 2 +} + +
+
+   +   +
+
+

Undo Loan Approval/ Undo Loan Disbursal

+
+
command
+
String Mandatory? what happens if command wrong, , case-insensitive
+
'undoapproval' : Undo Loan Approval
+
'undodisbursal' : Undo Loan Disbursal
+
+
+
+ POST https://thedomainname/api/v1/loans/{loanId}/undo + http://localhost:8080/mifosng-provider/api/v1/loans/1/undo + + + Content-Type: application/json + Request Body: + new json here + + { + "entityId": 2 +} + +
+
+ + +   +
+
+

Retrieve Loan Repayment Template

+

Returns a template that contains client and loan product fields and allowed value lists. This helps build a maintenance User Interface. +

+
Arguments
+
+
type
+
String
+
The 'id' of the Client
+
productId
+
Integer
+
The 'id' of the Loan Product
+
+

Example Request: + http://localhost:8080/mifosng-provider/api/v1/loans/template?clientId=1&productId=1 +

+
+
+ GET https://thedomainname/api/v1/loans/template + to be done + +
+