diff --git a/APIFolder/api.htm b/APIFolder/api.htm index 16a11f812..246512ac1 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -30,12 +30,12 @@
https://thedomainname/
+ https://thedomainname/api
| Resources | Verbs |
| /api/v1/clients | GET, POST |
| /api/v1/clients/template | GET |
| /api/v1/clients/{clientId} | GET |
| /api/v1/clients/{clientId}/loans | GET |
| /api/v1/clients/{clientId}/notes | GET, POST |
| /api/v1/clients/{clientId}/notes/{noteId} | GET, PUT |
| /v1/clients | GET, POST |
| /v1/clients/template | GET |
| /v1/clients/{clientId} | GET |
| /v1/clients/{clientId}/loans | GET |
| /v1/clients/{clientId}/notes | GET, POST |
| /v1/clients/{clientId}/notes/{noteId} | GET, PUT |
| /api/v1/loans | POST |
| /api/v1/loans/template | GET |
| /api/v1/loans/{loanId} | GET, POST, DELETE |
| /api/v1/loans/{loanId}/undo | POST |
| /api/v1/loans/{loanId}/transactions/template | GET |
| /api/v1/loans/{loanId}/transactions | POST |
| /api/v1/loans/{loanId}/transactions/{repaymentId} | GET, PUT |
| /v1/loans | POST |
| /v1/loans/template | GET |
| /v1/loans/{loanId} | GET, POST, DELETE |
| /v1/loans/{loanId}/undo | POST |
| /v1/loans/{loanId}/transactions/template | GET |
| /v1/loans/{loanId}/transactions | POST |
| /v1/loans/{loanId}/transactions/{repaymentId} | GET, PUT |
| /api/v1/offices | GET, POST |
| /api/v1/offices/template | GET |
| /api/v1/offices/{officeId} | GET, PUT |
| /v1/offices | GET, POST |
| /v1/offices/template | GET |
| /v1/offices/{officeId} | GET, PUT |
| /api/v1/loanproducts | GET, POST |
| /api/v1/loanproducts/template | GET |
| /api/v1/loanproducts/{productId} | GET, PUT |
| /v1/loanproducts | GET, POST |
| /v1/loanproducts/template | GET |
| /v1/loanproducts/{productId} | GET, PUT |
| /api/v1/configurations/currency | GET, PUT |
| /v1/configurations/currency | GET, PUT |
| /api/v1/additionalfields | GET |
| /api/v1/additionalfields/{Type}/{Set}/{id} | GET, POST |
| /v1/additionalfields | GET |
| /v1/additionalfields/{Type}/{Set}/{id} | GET, POST |
| /api/v1/reports | GET |
| /api/v1/reports/{reportName} | GET |
| /v1/reports | GET |
| /v1/reports/{reportName} | GET |
| /api/v1/authentication | POST |
| /v1/authentication | POST |
| /api/v1/useraccounts/current | GET, PUT |
| /api/v1/useraccounts/current/password | PUT |
| /api/v1/useraccounts/current/password/template | GET |
| /v1/useraccounts/current | GET, PUT |
| /v1/useraccounts/current/password | PUT |
| /v1/useraccounts/current/password/template | GET |
| /api/v1/users | GET, POST |
| /api/v1/users/template | GET |
| /api/v1/users/{userId} | GET, PUT, DELETE |
| /v1/users | GET, POST |
| /v1/users/template | GET |
| /v1/users/{userId} | GET, PUT, DELETE |
| /api/v1/roles | GET, POST |
| /api/v1/roles/template | GET |
| /api/v1/roles/{roleId} | GET, PUT |
| /v1/roles | GET, POST |
| /v1/roles/template | GET |
| /v1/roles/{roleId} | GET, PUT |
| /api/v1/permissions | GET |
| /v1/permissions | GET |
Clients words. -
+Clients ...
Example Request: - http://localhost:8080/mifosng-provider/api/v1/clients + https://localhost:8443/mifosng-provider/api/v1/clients
GET https://thedomainname/api/v1/clients
- to be done
-
+{
+ "clients": [
+ {
+ "organisationId": 1,
+ "organisationName": "Demo MFI",
+ "officeId": 2,
+ "officeName": "sub branch 1",
+ "id": 14,
+ "firstname": "Patrick",
+ "lastname": "Asare-Frimpong",
+ "displayName": "Patrick Asare-Frimpong",
+ "externalId": null,
+ "joinedDate": "2012-04-18",
+ "allowedOffices": [],
+ "maxJoinedOnOffsetFromToday": -34
+ },
+ ...
+ ...
+ {
+ "organisationId": 1,
+ "organisationName": "Demo MFI",
+ "officeId": 1,
+ "officeName": "Demo MFI Head Office",
+ "id": 17,
+ "firstname": "Fred",
+ "lastname": "Ziffle",
+ "displayName": "Fred Ziffle",
+ "externalId": null,
+ "joinedDate": "2012-04-21",
+ "allowedOffices": [],
+ "maxJoinedOnOffsetFromToday": -31
+ }
+ ]
+}
+
Returns a template that contains the client fields and allowed value lists. This helps build a maintenance User Interface. -
+Returns a template that contains the client fields and allowed value lists. This helps build a maintenance User Interface.
Example Request: - http://localhost:8080/mifosng-provider/api/v1/clients/template + https://localhost:8443/mifosng-provider/api/v1/clients/template
GET https://thedomainname/api/v1/clients/template
- to be done
-
+{
+ "organisationId": 1,
+ "organisationName": null,
+ "officeId": 1,
+ "officeName": null,
+ "id": -1,
+ "firstname": "",
+ "lastname": "",
+ "displayName": "",
+ "externalId": null,
+ "joinedDate": "2012-05-22",
+ "allowedOffices": [
+ {
+ "id": 1,
+ "name": "Demo MFI Head Office",
+ "externalId": "1",
+ "openingDate": "2009-01-01",
+ "hierarchy": ".",
+ "parentName": null,
+ "parentId": 0,
+ "allowedParents": []
+ },
+ {
+ "id": 2,
+ "name": "sub branch 1",
+ "externalId": "2",
+ "openingDate": "2012-01-02",
+ "hierarchy": ".2.",
+ "parentName": "Demo MFI Head Office",
+ "parentId": 1,
+ "allowedParents": []
+ }
+ ],
+ "maxJoinedOnOffsetFromToday": 0
+}
+
Returns client fields. It also returns allowed value lists which help build a maintenance User Interface. +
Returns client fields. It also returns allowed value lists which help build a maintenance User Interface.
Example Request: - http://localhost:8080/mifosng-provider/api/v1/clients/1 + https://localhost:8443/mifosng-provider/api/v1/clients/1
GET https://thedomainname/api/v1/clients/{clientId}
-
-
+{
+ "organisationId": 1,
+ "organisationName": "Demo MFI",
+ "officeId": 1,
+ "officeName": "Demo MFI Head Office",
+ "id": 1,
+ "firstname": "Patrick",
+ "lastname": "O'Meara",
+ "displayName": "Patrick O'Meara",
+ "externalId": null,
+ "joinedDate": "2009-01-04",
+ "allowedOffices": [],
+ "maxJoinedOnOffsetFromToday": -1234
+}
+
POST https://thedomainname/api/v1/clients
- http://localhost:8080/mifosng-provider/api/v1/clients
-
-
- Content-Type: application/json
- Request Body:
- new json here
-
- { "entityId": 2 }
-
- Example Request: - http://localhost:8080/mifosng-provider/api/v1/clients/1/loans -
-GET https://thedomainname/api/v1/clients/{clientId}/loans
-
-
- Example Request: - http://localhost:8080/mifosng-provider/api/v1/clients/1/notes -
-GET https://thedomainname/api/v1/clients/{clientId}/notes
-
-
- POST https://thedomainname/api/v1/clients/{clientId}/notes
- http://localhost:8080/mifosng-provider/api/v1/clients/1/notes
-
-
- Content-Type: application/json
- Request Body:
- new json here
-
- { "entityId": 2 }
-
- POST https://thedomainname/api/v1/clients
+https://localhost:8443/mifosng-provider/api/v1/clients
+Content-Type: application/json
+Request Body:
+{
+ "officeId": 1,
+ "firstname": "Firstname",
+ "lastname": "Surname",
+ "externalId": null,
+ "dateFormat": "dd MMMM yyyy",
+ "joiningDateFormatted": "04 March 2009"
+}
+
+{ "entityId": 2}
+ Example Request: - http://localhost:8080/mifosng-provider/api/v1/clients/1/notes/1 -
-GET https://thedomainname/api/v1/clients/{clientId}/notes/{noteId}
-
-
- PUT https://thedomainname/api/v1/clients/{clientId}/notes/{noteId}
- http://localhost:8080/mifosng-provider/api/v1/clients/1/notes/1
-
-
- Content-Type: application/json
- Request Body:
- new json here
-
- { "entityId": 2 }
-
- PUT https://thedomainname/api/v1/clients/1
+PUT https://localhost:8443/mifosng-provider/api/v1/clients/1
+Content-Type: application/json
+Request Body:
+{
+ "officeId": 1,
+ "firstname": "Firstname",
+ "lastname": "Surname",
+ "externalId": null,
+ "dateFormat": "dd MMMM yyyy",
+ "joiningDateFormatted": "04 March 2009"
+}
+
+{ "entityId": 2}
+ Example Request: + https://localhost:8443/mifosng-provider/api/v1/clients/1/loans +
+GET https://thedomainname/api/v1/clients/{clientId}/loans
+{
+ "pendingApprovalLoans": [],
+ "awaitingDisbursalLoans": [
+ {
+ "id": 17,
+ "externalId": null,
+ "loanProductId": 1,
+ "loanProductName": "Agricultural Loan",
+ "loanStatusId": 200,
+ "pendingApproval": false,
+ "waitingForDisbursal": true,
+ "open": false,
+ "closed": false,
+ "lifeCycleStatusText": "Approved",
+ "lifeCycleStatusDate": null
+ }
+ ],
+ "openLoans": [],
+ "closedLoans": [
+ {
+ "id": 1,
+ "externalId": null,
+ "loanProductId": 1,
+ "loanProductName": "Agricultural Loan",
+ "loanStatusId": 600,
+ "pendingApproval": false,
+ "waitingForDisbursal": false,
+ "open": false,
+ "closed": true,
+ "lifeCycleStatusText": "Closed",
+ "lifeCycleStatusDate": null
+ }
+ ],
+ "anyLoanCount": 2,
+ "pendingApprovalLoanCount": 0,
+ "awaitingDisbursalLoanCount": 1,
+ "activeLoanCount": 0,
+ "closedLoanCount": 1
+}
+
+ Example Request: + https://localhost:8443/mifosng-provider/api/v1/clients/2/notes +
+GET https://thedomainname/api/v1/clients/{clientId}/notes
+{
+ "notes": [
+ {
+ "id": 20,
+ "clientId": 2,
+ "loanId": 0,
+ "loanTransactionId": 0,
+ "noteTypeId": 100,
+ "note": "This is an extra note!",
+ "createdById": 2,
+ "createdByUsername": "super1",
+ "createdOn": "2012-04-22T13:50:25.000+01:00",
+ "updatedById": 2,
+ "updatedByUsername": "super1",
+ "updatedOn": "2012-04-22T13:50:25.000+01:00"
+ },
+ {
+ "id": 16,
+ "clientId": 2,
+ "loanId": 0,
+ "loanTransactionId": 0,
+ "noteTypeId": 100,
+ "note": "loan only 1/2 amount expected\r\nyes",
+ "createdById": 2,
+ "createdByUsername": "super1",
+ "createdOn": "2012-04-18T15:15:04.000+01:00",
+ "updatedById": 2,
+ "updatedByUsername": "super1",
+ "updatedOn": "2012-04-23T09:38:13.000+01:00"
+ }
+ ]
+}
+
+ POST https://thedomainname/api/v1/clients/{clientId}/notes
+ POST https://localhost:8443/mifosng-provider/api/v1/clients/1/notes
+Content-Type: application/json
+Request Body:
+{
+"note": "a note about the client"
+}
+
+{ "entityId": 40}
+ Example Request: + https://localhost:8443/mifosng-provider/api/v1/clients/1/notes/40 +
+GET https://thedomainname/api/v1/clients/{clientId}/notes/{noteId}
+ {
+ "id": 40,
+ "clientId": 2,
+ "loanId": 0,
+ "loanTransactionId": 0,
+ "noteTypeId": 100,
+ "note": "a note about the client",
+ "createdById": 1,
+ "createdByUsername": "mifos",
+ "createdOn": "2012-05-22T21:40:05.000+01:00",
+ "updatedById": 1,
+ "updatedByUsername": "mifos",
+ "updatedOn": "2012-05-22T21:40:05.000+01:00"
+}
+
+ PUT https://thedomainname/api/v1/clients/{clientId}/notes/{noteId}
+PUT https://localhost:8443/mifosng-provider/api/v1/clients/1/notes/40
+Content-Type: application/json
+Request Body:
+{
+"note": "an updated note about the client"
+}
+
+ {"entityId": 40}
+ Example Request: - http://localhost:8080/mifosng-provider/api/v1/loans/template?clientId=1&productId=1 + https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1
Returns loan fields.
Example Request: - http://localhost:8080/mifosng-provider/api/v1/loans/1 + https://localhost:8443/mifosng-provider/api/v1/loans/1
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
-}
-
- POST https://thedomainname/api/v1/loans
+ https://localhost:8443/mifosng-provider/api/v1/loans
+
+
+ Content-Type: application/json
+ Request Body:
+ new json here
+
+ {"entityId": 2}
+
+ POST https://thedomainname/api/v1/loans/{loanId}
- http://localhost:8080/mifosng-provider/api/v1/loans/1?command=approve
+ https://localhost:8443/mifosng-provider/api/v1/loans/1?command=approve
Content-Type: application/json
@@ -762,7 +947,7 @@
DELETE https://thedomainname/api/v1/loans/{loanId}
- http://localhost:8080/mifosng-provider/api/v1/loans/1
+ https://localhost:8443/mifosng-provider/api/v1/loans/1
Content-Type: application/json
@@ -789,7 +974,7 @@
POST https://thedomainname/api/v1/loans/{loanId}/undo
- http://localhost:8080/mifosng-provider/api/v1/loans/1/undo
+ https://localhost:8443/mifosng-provider/api/v1/loans/1/undo
Content-Type: application/json
@@ -818,7 +1003,7 @@
The default action is to return details for Repayment of a loan. If the value is 'waiver' then details relevant to Waiving a loan amount are returned.
Example Request:
- http://localhost:8080/mifosng-provider/api/v1/loans/1/transactions/template?type=waiver"
+ https://localhost:8443/mifosng-provider/api/v1/loans/1/transactions/template?type=waiver"
POST https://thedomainname/api/v1/loans/{loanId}/transactions
- http://localhost:8080/mifosng-provider/api/v1/loans/1/transactions
+ https://localhost:8443/mifosng-provider/api/v1/loans/1/transactions
Content-Type: application/json
@@ -859,7 +1044,7 @@
Retrieve a Repayment's Details
Example Request:
- http://localhost:8080/mifosng-provider/api/v1/loans/1/transactions/1
+ https://localhost:8443/mifosng-provider/api/v1/loans/1/transactions/1
@@ -876,7 +1061,7 @@
POST https://thedomainname/api/v1/loans/{loanId}/transactions/{repaymentId}
- http://localhost:8080/mifosng-provider/api/v1/loans/1/transactions/1
+ https://localhost:8443/mifosng-provider/api/v1/loans/1/transactions/1
Content-Type: application/json
@@ -1679,7 +1864,7 @@ Request Body:
The Additional Fields Type (Mifos X database table) to restrict the output to
Example Request:
- http://localhost:8080/mifosng-provider/api/v1/additionalfields?type=portfolio_client
+ https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client
@@ -1711,7 +1896,7 @@ Request Body:
Returns the Set of Additional Fields data for the ID provided. The ID is the id field of the Type table e.g. portfolio_client might have an id value of 4. The output is a JSON formatted "Generic Resultset". The Generic Resultset contains Column Heading as well as Data information. The Column Heading information may include allowed values (columnValues array).
Example Request:
- http://localhost:8080/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2
+ https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2
@@ -1843,7 +2028,7 @@ Request Body:
POST https://thedomainname/api/v1/additionalfields/{type}/{set}/{id}
- http://localhost:8080/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2
+ https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2
Content-Type: application/json
@@ -1908,7 +2093,7 @@ Request Body:
Output will be delivered as a CSV file instead of JSON.
Example Request:
- http://localhost:8080/mifosng-provider/api/v1/reports
+ https://localhost:8443/mifosng-provider/api/v1/reports
@@ -2004,7 +2189,7 @@ Request Body:
Output will be delivered as a CSV file instead of JSON. Doesn't apply to Pentaho reports.
Example Request:
- http://localhost:8080/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1
+ https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1
@@ -2834,7 +3019,7 @@ Request body:
An API capability to support management of application permissions for user administration.
+Returns all permissions.
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/permissions +
+GET https://thedomainname/api/v1/permissions
+GET https://localhost:8443/mifosng-provider/api/v1/permissions
+
+{
+ "permissions": [
+ {
+ "id": 1,
+ "orgId": 1,
+ "name": "User administration ALL",
+ "description": "An application user will have permission to execute all tasks related to user administration.",
+ "code": "USER_ADMINISTRATION_SUPER_USER_ROLE",
+ "groupType": 1
+ },
+ {
+ "id": 2,
+ "orgId": 1,
+ "name": "Organisation adminsitration ALL",
+ "description": "An application user will have permission to execute all tasks related to organisation administration.",
+ "code": "ORGANISATION_ADMINISTRATION_SUPER_USER_ROLE",
+ "groupType": 2
+ },
+ {
+ "id": 3,
+ "orgId": 1,
+ "name": "Portfolio management ALL",
+ "description": "An application user will have permission to execute all tasks related to portfolio management.",
+ "code": "PORTFOLIO_MANAGEMENT_SUPER_USER_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 4,
+ "orgId": 1,
+ "name": "Reporting ALL",
+ "description": "An application user will have permission to execute and view all reports.",
+ "code": "REPORTING_SUPER_USER_ROLE",
+ "groupType": 4
+ },
+ {
+ "id": 5,
+ "orgId": 1,
+ "name": "Can submit new loan application",
+ "description": "Allows an application user to sumit new loan application.",
+ "code": "CAN_SUBMIT_NEW_LOAN_APPLICATION_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 6,
+ "orgId": 1,
+ "name": "Can submit historic loan application",
+ "description": "Allows an application user to sumit new loan application where the submitted on date is in the past.",
+ "code": "CAN_SUBMIT_HISTORIC_LOAN_APPLICATION_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 7,
+ "orgId": 1,
+ "name": "Can approve loan application",
+ "description": "Allows an application user to approve a loan application.",
+ "code": "CAN_APPROVE_LOAN_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 8,
+ "orgId": 1,
+ "name": "Can approve loan application in the past",
+ "description": "Allows an application user to approve a loan application where the approval date is in the past.",
+ "code": "CAN_APPROVE_LOAN_IN_THE_PAST_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 9,
+ "orgId": 1,
+ "name": "Can reject loan application",
+ "description": "Allows an application user to reject a loan application.",
+ "code": "CAN_REJECT_LOAN_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 10,
+ "orgId": 1,
+ "name": "Can reject loan application in the past",
+ "description": "Allows an application user to reject a loan application where the rejected date is in the past.",
+ "code": "CAN_REJECT_LOAN_IN_THE_PAST_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 11,
+ "orgId": 1,
+ "name": "Can withdraw loan application",
+ "description": "Allows an application user to mark loan application as withdrawn by client.",
+ "code": "CAN_WITHDRAW_LOAN_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 12,
+ "orgId": 1,
+ "name": "Can withdraw loan application in the past",
+ "description": "Allows an application user to mark loan application as withdrawn by client where the withdran on date is in the past.",
+ "code": "CAN_WITHDRAW_LOAN_IN_THE_PAST_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 13,
+ "orgId": 1,
+ "name": "Can delete submitted loan application",
+ "description": "Allows an application user to complete delete the loan application if it is submitted but not approved.",
+ "code": "CAN_DELETE_LOAN_THAT_IS_SUBMITTED_AND_NOT_APPROVED",
+ "groupType": 3
+ },
+ {
+ "id": 14,
+ "orgId": 1,
+ "name": "Can undo loan approval",
+ "description": "Allows an application user to undo a loan approval.",
+ "code": "CAN_UNDO_LOAN_APPROVAL_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 15,
+ "orgId": 1,
+ "name": "Can disburse loan",
+ "description": "Allows an application user to disburse a loan application.",
+ "code": "CAN_DISBURSE_LOAN_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 16,
+ "orgId": 1,
+ "name": "Can disburse loan in the past",
+ "description": "Allows an application user to disburse a loan where the disbursement date is in the past.",
+ "code": "CAN_DISBURSE_LOAN_IN_THE_PAST_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 17,
+ "orgId": 1,
+ "name": "Can undo loan disbursal",
+ "description": "Allows an application user to undo a loan disbursal if not payments already made.",
+ "code": "CAN_UNDO_LOAN_DISBURSAL_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 18,
+ "orgId": 1,
+ "name": "Can enter a repayment against a loan",
+ "description": "Allows an application user to enter a repayment on the loan.",
+ "code": "CAN_MAKE_LOAN_REPAYMENT_LOAN_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 19,
+ "orgId": 1,
+ "name": "Can enter a repayment against a loan in the past",
+ "description": "Allows an application user to enter a repayment on the loan where the repayment date is in the past.",
+ "code": "CAN_MAKE_LOAN_REPAYMENT_IN_THE_PAST_ROLE",
+ "groupType": 3
+ },
+ {
+ "id": 20,
+ "orgId": 1,
+ "name": "Can add a new client.",
+ "description": "Allows an application user to add a new client.",
+ "code": "CAN_ENROLL_NEW_CLIENT_ROLE",
+ "groupType": 3
+ }
+ ]
+}
+
+