diff --git a/APIFolder/api.htm b/APIFolder/api.htm index 33dbfb721..41327979b 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -526,7 +526,7 @@ JSON examples:
Example Request:
+Example Requests:
https://localhost:8443/mifosng-provider/api/v1/clients?pretty=trueExample Request:
+Example Requests:
https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=trueExample Request:
+Example Requests:
https://localhost:8443/mifosng-provider/api/v1/clients/1/loans?pretty=trueNote: Notes are returned in descending createOn order.
-Example Request:
+Example Requests:
https://localhost:8443/mifosng-provider/api/v1/clients/2/notes?pretty=trueExample Request:
+Example Requests:
https://localhost:8443/mifosng-provider/api/v1/clients/2/notes/20?pretty=trueExample Request: - https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1 -
+Example Requests:
+ https://localhost:8443/mifosng-provider/api/v1/loans/template?clientId=1&productId=1&pretty=true +GET https://thedomainname/api/v1/loans/template
@@ -2558,13 +2558,16 @@ Request Body:{
In Mifos X, any number of "Sets" of "Additional Fields" can be configured for a Mifos X database table ("Type").
For example, portfolio_client is the database table that holds client data. Typically, MFI's want more client related fields than is provided by Mifos X out-of-the-box. - The MFI might add a Set called "Additional Info" containing some fields that are typically input when creating a client. They might then add another Set called "Highly Improbable Info" containing some fields that are only input in exceptional circumstances. + The MFI might add a Set called "Additional Info" containing some fields that are typically input when creating a client. + They might then add another Set called "Highly Improbable Info" containing some fields that are only input in exceptional + circumstances.
The additional fields resource allows you to retrieve and update any Additional Fields data that has been configured in Mifos X.
- The Mifos X Individual Lending client application uses a JQuery plugin called stretchydata which, itself, uses this additional fields resource to provide a pretty flexible additional fields User Interface (UI). Put a link to an example here. + The Mifos X Individual Lending client application uses a JQuery plugin called stretchydata which, itself, uses this + additional fields resource to provide a pretty flexible additional fields User Interface (UI).
Example Request: - https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client -
+Example Requests:
+ https://localhost:8443/mifosng-provider/api/v1/additionalfields?type=portfolio_client&pretty=true +GET https://thedomainname/api/v1/additionalfields
- {
- "additionalFieldsSets": [
- {
- "id": 1,
- "name": "Additional Information",
- "type": "portfolio_client"
- },
- {
- "id": 9,
- "name": "Highly Improbable Info",
- "type": "portfolio_client"
- }
- ]
- }
+ [ {
+ "id" : 1,
+ "name" : "Additional Information",
+ "type" : "portfolio_client"
+}, {
+ "id" : 8,
+ "name" : "Additional Information",
+ "type" : "portfolio_loan"
+}, {
+ "id" : 9,
+ "name" : "Highly Improbable Info",
+ "type" : "portfolio_client"
+} ]
Example Request: - https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2 + https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2?pretty=true
GET https://thedomainname/api/v1/additionalfields/{type}/{set}/{id}
{
- "columnHeaders": [
- {
- "columnName": "Ethnic Group",
- "columnType": "String",
- "columnLength": 50,
- "columnDisplayType": "List",
- "columnValues": [
- "Bedouin",
- "Berber",
- "Italian",
- "Miknasa",
- "Mrazig",
- "Other",
- "Unknown"
- ]
- },
- {
- "columnName": "Ethnic Group Other",
- "columnType": "String",
- "columnLength": 50,
- "columnDisplayType": null,
- "columnValues": []
- },
- {
- "columnName": "Household Location",
- "columnType": "String",
- "columnLength": 50,
- "columnDisplayType": "List",
- "columnValues": [
- "East Sikkim",
- "North Sikkim",
- "South Sikkim",
- "West Sikkim",
- "Other"
- ]
- },
- {
- "columnName": "Household Location Other",
- "columnType": "String",
- "columnLength": 50,
- "columnDisplayType": null,
- "columnValues": []
- },
- {
- "columnName": "Religion",
- "columnType": "String",
- "columnLength": 50,
- "columnDisplayType": "List",
- "columnValues": [
- "Protestant",
- "Catholic",
- "Muslim",
- "Animist",
- "Atheist",
- "Other",
- "Unknown"
- ]
- },
- {
- "columnName": "Religion Other",
- "columnType": "String",
- "columnLength": 50,
- "columnDisplayType": null,
- "columnValues": []
- },
- {
- "columnName": "Knowledge of Person",
- "columnType": "String",
- "columnLength": 50,
- "columnDisplayType": "List",
- "columnValues": [
- "Staff member",
- "Spouse of staff member",
- "Son/daughter of staff member",
- "Friend of staff member",
- "Not known by any staff member",
- "Other"
- ]
- },
- {
- "columnName": "Gender",
- "columnType": "String",
- "columnLength": 10,
- "columnDisplayType": "List",
- "columnValues": [
- "Female",
- "Male"
- ]
- },
- {
- "columnName": "Whois",
- "columnType": "Text",
- "columnLength": 0,
- "columnDisplayType": null,
- "columnValues": []
- }
- ],
- "data": [
- {
- "row": [
- "Berber",
- null,
- "East Sikkim",
- null,
- "Animist",
- "jjjjjjj",
- "Son/daughter of staff member",
- "Female",
- "its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all"
- ]
- }
- ]
- }
+ "columnHeaders" : [ {
+ "columnName" : "Ethnic Group",
+ "columnType" : "String",
+ "columnLength" : 50,
+ "columnDisplayType" : "List",
+ "columnValues" : [ "Bedouin", "Berber", "Italian", "Miknasa", "Mrazig", "Other", "Unknown" ]
+ }, {
+ "columnName" : "Ethnic Group Other",
+ "columnType" : "String",
+ "columnLength" : 50,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "Household Location",
+ "columnType" : "String",
+ "columnLength" : 50,
+ "columnDisplayType" : "List",
+ "columnValues" : [ "East Sikkim", "North Sikkim", "South Sikkim", "West Sikkim", "Other" ]
+ }, {
+ "columnName" : "Household Location Other",
+ "columnType" : "String",
+ "columnLength" : 50,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "Religion",
+ "columnType" : "String",
+ "columnLength" : 50,
+ "columnDisplayType" : "List",
+ "columnValues" : [ "Protestant", "Catholic", "Muslim", "Animist", "Atheist", "Other", "Unknown" ]
+ }, {
+ "columnName" : "Religion Other",
+ "columnType" : "String",
+ "columnLength" : 50,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "Knowledge of Person",
+ "columnType" : "String",
+ "columnLength" : 50,
+ "columnDisplayType" : "List",
+ "columnValues" : [ "Staff member", "Spouse of staff member", "Son/daughter of staff member", "Friend of staff member", "Not known by any staff member", "Other" ]
+ }, {
+ "columnName" : "Gender",
+ "columnType" : "String",
+ "columnLength" : 10,
+ "columnDisplayType" : "List",
+ "columnValues" : [ "Female", "Male" ]
+ }, {
+ "columnName" : "Whois",
+ "columnType" : "Text",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ } ],
+ "data" : [ {
+ "row" : [ "Bedouin", null, "East Sikkim", null, "Animist", "Agnostic", "Friend of staff member", "Female", "A person of honesty & clear thought" ]
+ } ]
+}
POST https://thedomainname/api/v1/additionalfields/{type}/{set}/{id}
- https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2
-
-
- Content-Type: application/json
- Request Body:
- {
- "Ethnic_Group":"Berber",
- "Ethnic_Group_Other":"",
- "Household_Location":"East Sikkim",
- "Household_Location_Other":"",
- "Religion":"Animist",
- "Religion_Other":"jjjjjjj",
- "Knowledge_of_Person":"Son/daughter of staff member",
- "Gender":"Female",
- "Whois":"its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all"
- }
-
+ POST https://localhost:8443/mifosng-provider/api/v1/additionalfields/portfolio_client/Additional Information/2
+Content-Type: application/json
+Request Body:
+{
+ "Ethnic_Group":"Berber",
+ "Ethnic_Group_Other":"",
+ "Household_Location":"East Sikkim",
+ "Household_Location_Other":"",
+ "Religion":"Animist",
+ "Religion_Other":"jjjjjjj",
+ "Knowledge_of_Person":"Son/daughter of staff member",
+ "Gender":"Female",
+ "Whois":"its\r\nme of\r\ncourse\r\nyes\r\nend and the end of it all"
+}
+
{
- "entityId": 2
- }
+ "entityId": 2
+}
- The reports resource allows you to run and receive output from pre-defined Mifos X reports. The default output is a JSON formatted "Generic Resultset". The Generic Resultset contains Column Heading as well as Data information. However, you can export to CSV format by simply adding "&exportCSV=true" to the end of your URI. + The reports resource allows you to run and receive output from pre-defined Mifos X reports. + The default output is a JSON formatted "Generic Resultset". + The Generic Resultset contains Column Heading as well as Data information. + However, you can export to CSV format by simply adding "&exportCSV=true" to the end of your URL.
If Pentaho reports have been pre-defined, they can also be run through this resource. Pentaho reports can return HTML, PDF or CSV formats.
- -Add examples showing links to client listing report producing json, then csv, then a pentaho report producing html, pdf, csv
-- The Mifos X Individual Lending client application uses a JQuery plugin called stretchyreporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI). Put a link to an example here. +
+ The Mifos X Individual Lending client application uses a JQuery plugin called stretchyreporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI).
Example Request: - https://localhost:8443/mifosng-provider/api/v1/reports -
+Example Requests:
+ https://localhost:8443/mifosng-provider/api/v1/reports?pretty=true +GET https://thedomainname/api/v1/reports
{
- "columnHeaders": [
- {
- "columnName": "report_id",
- "columnType": "INT",
- "columnLength": null,
- "columnDisplayType": null,
- "columnValues": []
- },
- {
- "columnName": "report_name",
- "columnType": "VARCHAR",
- "columnLength": null,
- "columnDisplayType": null,
- "columnValues": []
- },
- {
- "columnName": "report_type",
- "columnType": "VARCHAR",
- "columnLength": null,
- "columnDisplayType": null,
- "columnValues": []
- },
- ... more "columnHeaders" entries
- ],
- "data": [
- {
- "row": [
- "29",
- "Client Listing",
- "Table",
- null,
- null,
- "5",
- null,
- "selectOfficeId"
- ]
- },
- {
- "row": [
- "42",
- "Client Listing - Additional and Unlikely",
- "Table",
- null,
- null,
- "5",
- null,
- "selectOfficeId"
- ]
- },
- {
- "row": [
- "30",
- "Client Loans Listing",
- "Table",
- null,
- null,
- "5",
- null,
- "selectOfficeId"
- ]
- },
- ... more "Row" entries
- ]
- }
+ "columnHeaders" : [ {
+ "columnName" : "report_id",
+ "columnType" : "INT",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "report_name",
+ "columnType" : "VARCHAR",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "report_type",
+ "columnType" : "VARCHAR",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "report_subtype",
+ "columnType" : "VARCHAR",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "report_category",
+ "columnType" : "VARCHAR",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "parameter_id",
+ "columnType" : "INT",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "report_parameter_name",
+ "columnType" : "VARCHAR",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "parameter_name",
+ "columnType" : "VARCHAR",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ } ],
+ "data" : [ {
+ "row" : [ "29", "Client Listing", "Table", null, null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "42", "Client Listing - Additional and Unlikely", "Table", null, null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "30", "Client Loans Listing", "Table", null, null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "43", "Client Loans Listing - Additional", "Table", null, null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "41", "Clients by Surname (a bit silly)", "Chart", "Pie", null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "39", "Loan Disbursals in Previous Year", "Chart", "Bar", null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "39", "Loan Disbursals in Previous Year", "Chart", "Bar", null, "7", null, "currencyIdSelectOne" ]
+ }, {
+ "row" : [ "40", "Loan Repayments in Previous Year", "Chart", "Bar", null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "40", "Loan Repayments in Previous Year", "Chart", "Bar", null, "7", null, "currencyIdSelectOne" ]
+ }, {
+ "row" : [ "34", "Loans - Active Loans Portfolio Status", "Table", null, null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "34", "Loans - Active Loans Portfolio Status", "Table", null, null, "6", null, "currencyIdSelectAll" ]
+ }, {
+ "row" : [ "31", "Loans Awaiting Disbursal", "Table", null, null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "35", "Portfolio at Risk", "Table", null, null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "35", "Portfolio at Risk", "Table", null, null, "6", null, "currencyIdSelectAll" ]
+ }, {
+ "row" : [ "32", "Upcoming Repayments", "Table", null, null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "32", "Upcoming Repayments", "Table", null, null, "6", null, "currencyIdSelectAll" ]
+ }, {
+ "row" : [ "38", "Upcoming Repayments Summary By Month, Currency and Loan Risk", "Table", null, null, "5", null, "selectOfficeId" ]
+ }, {
+ "row" : [ "38", "Upcoming Repayments Summary By Month, Currency and Loan Risk", "Table", null, null, "6", null, "currencyIdSelectAll" ]
+ } ]
+}
+
Runs a report and returns the report output.
++ Note: Pentaho details yet to be provided +
Example Request: - https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1 -
+Example Requests:
+ https://localhost:8443/mifosng-provider/api/v1/reports/Client%20Listing?R_officeId=1&pretty=true +GET https://thedomainname/api/v1/reports/{reportName}
{
- "columnHeaders": [
- {
- "columnName": "Office/Branch",
- "columnType": "VARCHAR",
- "columnLength": null,
- "columnDisplayType": null,
- "columnValues": []
- },
- {
- "columnName": "Name",
- "columnType": "VARCHAR",
- "columnLength": null,
- "columnDisplayType": null,
- "columnValues": []
- },
- {
- "columnName": "Joining Date",
- "columnType": "DATE",
- "columnLength": null,
- "columnDisplayType": null,
- "columnValues": []
- }
- ],
- "data": [
- {
- "row": [
- "Demo MFI Head Office",
- "O'Meara, Patrick",
- "2009-01-04"
- ]
- },
- {
- "row": [
- "Demo MFI Head Office",
- "O'Meara, Dennis",
- "2009-01-04"
- ]
- },
- {
- "row": [
- "Demo MFI Head Office",
- "Smith, John",
- "2009-01-11"
- ]
- },
- ... more "row" entries
- ]
- }
+ "columnHeaders" : [ {
+ "columnName" : "Office/Branch",
+ "columnType" : "VARCHAR",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "Name",
+ "columnType" : "VARCHAR",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ }, {
+ "columnName" : "Joining Date",
+ "columnType" : "DATE",
+ "columnLength" : null,
+ "columnDisplayType" : null,
+ "columnValues" : [ ]
+ } ],
+ "data" : [ {
+ "row" : [ "Demo MFI Head Office", "O'Meara, Patrick", "2009-01-04" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "O'Meara, Dennis", "2009-01-04" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Smith, John", "2009-01-11" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "O'Meara, Jimmy", "2009-01-11" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Sunnyville vegetable growers Ltd", "2009-01-24" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Traoré, Kalilou", "2009-02-04" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Koné, Sidi", "2009-02-11" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Yattabaré, Moustapha", "2009-02-18" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Mali fruit sales ltd.", "2009-02-18" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Djenne co-op group", "2009-02-25" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "test, test", "2012-04-19" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Ziffle, Fred", "2012-04-21" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "omara, safik", "2012-04-24" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "HF Test", "2012-04-24" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "HF Test 2", "2012-04-24" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Kumar, Shiva", "2011-10-01" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Yton, Petra", "2006-06-09" ]
+ }, {
+ "row" : [ "Demo MFI Head Office", "Yton, Petra", "2006-06-09" ]
+ }, {
+ "row" : [ "sub branch 1", "Lee, Jacques", "2012-04-03" ]
+ }, {
+ "row" : [ "sub branch 1", "Asare-Frimpong, Patrick", "2012-04-18" ]
+ }, {
+ "row" : [ "sub branch 2", "t, test", "2012-04-18" ]
+ }, {
+ "row" : [ "Majmoua", "client, firstMajmoua", "2011-12-01" ]
+ }, {
+ "row" : [ "Intrasoft Technologies", "Said, Zayyad", "2012-04-02" ]
+ }, {
+ "row" : [ "Hugo technologies", "typical individual lending client", "2010-06-02" ]
+ } ]
+}
+