diff --git a/APIFolder/api.htm b/APIFolder/api.htm index ae6c04a5f..e0a4cf5f7 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -115,7 +115,7 @@ - +
The Office and Branch hierarchy. -
+Offices are used to model an MFIs structure. A hierarchial representation of offices is supported. + There will always be at least one office (which represents the MFI or an MFIs head office). + All subsequent offices added must have a parent office.
Example Request: - http://localhost:8080/mifosng-provider/api/v1/offices + https://localhost:8443/mifosng-provider/api/v1/offices
GET https://thedomainname/api/v1/offices
- to be done
-
+
+{
+ "offices": [
+ {
+ "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": []
+ },
+ {
+ "id": 3,
+ "name": "sub branch 2",
+ "externalId": "3",
+ "openingDate": "2012-03-01",
+ "hierarchy": ".3.",
+ "parentName": "Demo MFI Head Office",
+ "parentId": 1,
+ "allowedParents": []
+ }
+ ]
+}
+
Returns a template that contains the office fields and allowed value lists. This helps build a maintenance User Interface. +
Returns a template that contains the office fields and allowed value lists. This is a convienence when building user intereface screens for client applications.
Example Request: - http://localhost:8080/mifosng-provider/api/v1/offices/template + + https://localhost:8443/mifosng-provider/api/v1/offices/template +
GET https://thedomainname/api/v1/offices/template
- to be done
-
+
+{
+ "id": null,
+ "name": null,
+ "externalId": null,
+ "openingDate": "2012-05-21",
+ "hierarchy": null,
+ "parentName": null,
+ "parentId": null,
+ "allowedParents": [
+ {
+ "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": []
+ },
+ {
+ "id": 3,
+ "name": "sub branch 2",
+ "externalId": "3",
+ "openingDate": "2012-03-01",
+ "hierarchy": ".3.",
+ "parentName": "Demo MFI Head Office",
+ "parentId": 1,
+ "allowedParents": []
+ },
+ {
+ "id": 4,
+ "name": "sub branch 3",
+ "externalId": null,
+ "openingDate": "2012-04-17",
+ "hierarchy": ".4.",
+ "parentName": "Demo MFI Head Office",
+ "parentId": 1,
+ "allowedParents": []
+ }
+ ]
+}
+
Returns office fields. It also returns allowed value lists which help build a maintenance User Interface. -
+Returns an office details if it exists.
Example Request: - http://localhost:8080/mifosng-provider/api/v1/offices/1 + + https://localhost:8443/mifosng-provider/api/v1/offices/1 +
GET https://thedomainname/api/v1/offices/{officeId}
-
-
+ GET https://thedomainname/api/v1/offices/1
+
+{
+ "id": 1,
+ "name": "Demo MFI Head Office",
+ "externalId": "1",
+ "openingDate": "2009-01-01",
+ "hierarchy": ".",
+ "parentName": null,
+ "parentId": 0,
+ "allowedParents": []
+}
+
Create an office.
+Example Request: + + https://localhost:8443/mifosng-provider/api/v1/offices + +
POST https://thedomainname/api/v1/office
- http://localhost:8080/mifosng-provider/api/v1/office
-
-
- Content-Type: application/json
- Request Body:
- new json here
-
- { "entityId": 2 }
-
+ POST https://thedomainname/api/v1/offices
+POST https://localhost:8443/mifosng-provider/api/v1/offices
+Content-Type: application/json
+Request Body:
+{
+ "name": "Demo branch 9",
+ "externalId": "9",
+ "dateFormat": "dd MMMM yyyy",
+ "openingDateFormatted": "01 September 2011",
+ "parentId": 1
+}
+
+
+{
+ "entityId": 9
+}
+
Update office details.
+Example Request: + + https://localhost:8443/mifosng-provider/api/v1/offices/1 + +
PUT https://thedomainname/api/v1/office/{officeId}
- http://localhost:8080/mifosng-provider/api/v1/office/1
-
-
- Content-Type: application/json
- Request Body:
- new json here
-
- { "entityId": 2 }
-
+ PUT https://thedomainname/api/v1/offices/1
+PUT https://localhost:8443/mifosng-provider/api/v1/offices/1
+Content-Type: application/json
+Request Body:
+{
+ "name": "Demo branch 9 changed",
+ "externalId": "11",
+ "dateFormat": "dd MMMM yyyy",
+ "openingDateFormatted": "05 September 2011",
+ "parentId": 1
+}
+
+
+{
+ "entityId": 9
+}
+
Example Request: - http://localhost:8080/mifosng-provider/api/v1/loanproducts + https://localhost:8443/mifosng-provider/api/v1/loanproducts
Returns a template that contains the loan product fields and allowed value lists. This helps build a maintenance User Interface.
Example Request: - http://localhost:8080/mifosng-provider/api/v1/loanproducts/template + https://localhost:8443/mifosng-provider/api/v1/loanproducts/template
GET https://thedomainname/api/v1/loanproducts/template
- {
- "id": null,
- "name": null,
- "description": null,
- "principalMoney": {
- "currencyCode": "XOF",
- "currencyDigitsAfterDecimal": 0,
- "amount": 0,
- "defaultName": "CFA Franc BCEAO",
- "nameCode": "currency.XOF",
- "displaySymbol": "CFA",
- "zero": true,
- "greaterThanZero": false,
- "displaySymbolValue": "0 CFA"
- },
- "interestRatePerPeriod": 0,
- "interestRatePeriod": 2,
- "annualInterestRate": 0,
- "interestMethod": 0,
- "interestRateCalculatedInPeriod": 1,
- "numberOfInterestFreePeriods": 0,
- "repaidEvery": 1,
- "repaymentPeriodFrequency": 2,
- "numberOfRepayments": 0,
- "amortizationMethod": 1,
- "inArrearsTolerance": {
- "currencyCode": "XOF",
- "currencyDigitsAfterDecimal": 0,
- "amount": 0,
- "defaultName": "CFA Franc BCEAO",
- "nameCode": "currency.XOF",
- "displaySymbol": "CFA",
- "zero": true,
- "greaterThanZero": false,
- "displaySymbolValue": "0 CFA"
- },
- "createdOn": null,
- "lastModifedOn": null,
- "possibleCurrencies": [
- {
- "code": "XOF",
- "name": "CFA Franc BCEAO",
- "decimalPlaces": 0,
- "displaySymbol": "CFA",
- "nameCode": "currency.XOF",
- "displayLabel": "CFA Franc BCEAO (CFA)"
- },
- {
- "code": "ETB",
- "name": "Ethiopian Birr",
- "decimalPlaces": 2,
- "displaySymbol": null,
- "nameCode": "currency.ETB",
- "displayLabel": "Ethiopian Birr [ETB]"
- }
- ],
- "possibleAmortizationOptions": [
- {
- "id": 1,
- "value": "Equal installments"
- },
- {
- "id": 0,
- "value": "Equal principle payments"
- }
- ],
- "possibleInterestOptions": [
- {
- "id": 0,
- "value": "Declining Balance"
- },
- {
- "id": 1,
- "value": "Flat"
- }
- ],
- "possibleInterestRateCalculatedInPeriodOptions": [
- {
- "id": 0,
- "value": "Daily"
- },
- {
- "id": 1,
- "value": "Same as repayment period"
- }
- ],
- "repaymentFrequencyOptions": [
- {
- "id": 0,
- "value": "Days"
- },
- {
- "id": 1,
- "value": "Weeks"
- },
- {
- "id": 2,
- "value": "Months"
- }
- ],
- "interestFrequencyOptions": [
- {
- "id": 2,
- "value": "Per month"
- },
- {
- "id": 3,
- "value": "Per year"
- }
- ],
- "interestRebateAllowed": false,
- "flexible": false
- }
-
+{
+"id": null,
+"name": null,
+"description": null,
+"principalMoney": {
+"currencyCode": "XOF",
+"currencyDigitsAfterDecimal": 0,
+"amount": 0,
+"defaultName": "CFA Franc BCEAO",
+"nameCode": "currency.XOF",
+"displaySymbol": "CFA",
+"zero": true,
+"greaterThanZero": false,
+"displaySymbolValue": "0 CFA"
+},
+"interestRatePerPeriod": 0,
+"interestRatePeriod": 2,
+"annualInterestRate": 0,
+"interestMethod": 0,
+"interestRateCalculatedInPeriod": 1,
+"numberOfInterestFreePeriods": 0,
+"repaidEvery": 1,
+"repaymentPeriodFrequency": 2,
+"numberOfRepayments": 0,
+"amortizationMethod": 1,
+"inArrearsTolerance": {
+"currencyCode": "XOF",
+"currencyDigitsAfterDecimal": 0,
+"amount": 0,
+"defaultName": "CFA Franc BCEAO",
+"nameCode": "currency.XOF",
+"displaySymbol": "CFA",
+"zero": true,
+"greaterThanZero": false,
+"displaySymbolValue": "0 CFA"
+},
+"createdOn": null,
+"lastModifedOn": null,
+"possibleCurrencies": [
+{
+"code": "XOF",
+"name": "CFA Franc BCEAO",
+"decimalPlaces": 0,
+"displaySymbol": "CFA",
+"nameCode": "currency.XOF",
+"displayLabel": "CFA Franc BCEAO (CFA)"
+},
+{
+"code": "ETB",
+"name": "Ethiopian Birr",
+"decimalPlaces": 2,
+"displaySymbol": null,
+"nameCode": "currency.ETB",
+"displayLabel": "Ethiopian Birr [ETB]"
+}
+],
+"possibleAmortizationOptions": [
+{
+"id": 1,
+"value": "Equal installments"
+},
+{
+"id": 0,
+"value": "Equal principle payments"
+}
+],
+"possibleInterestOptions": [
+{
+"id": 0,
+"value": "Declining Balance"
+},
+{
+"id": 1,
+"value": "Flat"
+}
+],
+"possibleInterestRateCalculatedInPeriodOptions": [
+{
+"id": 0,
+"value": "Daily"
+},
+{
+"id": 1,
+"value": "Same as repayment period"
+}
+],
+"repaymentFrequencyOptions": [
+{
+"id": 0,
+"value": "Days"
+},
+{
+"id": 1,
+"value": "Weeks"
+},
+{
+"id": 2,
+"value": "Months"
+}
+],
+"interestFrequencyOptions": [
+{
+"id": 2,
+"value": "Per month"
+},
+{
+"id": 3,
+"value": "Per year"
+}
+],
+"interestRebateAllowed": false,
+"flexible": false
+}
+
Example Request: - http://localhost:8080/mifosng-provider/api/v1/loanproducts/1 + https://localhost:8443/mifosng-provider/api/v1/loanproducts/1
GET https://thedomainname/api/v1/loanproducts/{productId}
- {
- "id": 1,
- "name": "Agricultural Loan",
- "description": "An agricultural loan given to farmers to help buy crop, stock and machinery. With an arrears tolerance setting of 1,000 CFA, loans are not marked as 'in arrears' or 'in bad standing' if the amount outstanding is less than this. Interest rate is described using monthly percentage rate (MPR) even though the loan typically lasts a year and requires one repayment (typically at time when farmer sells crop)",
- "principalMoney": {
- "currencyCode": "XOF",
- "currencyDigitsAfterDecimal": 0,
- "amount": 100000,
- "defaultName": "CFA Franc BCEAO",
- "nameCode": "currency.XOF",
- "displaySymbol": "CFA",
- "zero": false,
- "greaterThanZero": true,
- "displaySymbolValue": "100000 CFA"
- },
- "interestRatePerPeriod": 1.75,
- "interestRatePeriod": 2,
- "annualInterestRate": 21,
- "interestMethod": 0,
- "interestRateCalculatedInPeriod": 0,
- "numberOfInterestFreePeriods": 0,
- "repaidEvery": 12,
- "repaymentPeriodFrequency": 2,
- "numberOfRepayments": 1,
- "amortizationMethod": 1,
- "inArrearsTolerance": {
- "currencyCode": "XOF",
- "currencyDigitsAfterDecimal": 0,
- "amount": 1000,
- "defaultName": "CFA Franc BCEAO",
- "nameCode": "currency.XOF",
- "displaySymbol": "CFA",
- "zero": false,
- "greaterThanZero": true,
- "displaySymbolValue": "1000 CFA"
- },
- "createdOn": "2012-04-12T00:00:00.000+10:00",
- "lastModifedOn": "2012-04-12T00:00:00.000+10:00",
- "possibleCurrencies": [
- {
- "code": "XOF",
- "name": "CFA Franc BCEAO",
- "decimalPlaces": 0,
- "displaySymbol": "CFA",
- "nameCode": "currency.XOF",
- "displayLabel": "CFA Franc BCEAO (CFA)"
- },
- {
- "code": "ETB",
- "name": "Ethiopian Birr",
- "decimalPlaces": 2,
- "displaySymbol": null,
- "nameCode": "currency.ETB",
- "displayLabel": "Ethiopian Birr [ETB]"
- }
- ],
- "possibleAmortizationOptions": [
- {
- "id": 1,
- "value": "Equal installments"
- },
- {
- "id": 0,
- "value": "Equal principle payments"
- }
- ],
- "possibleInterestOptions": [
- {
- "id": 0,
- "value": "Declining Balance"
- },
- {
- "id": 1,
- "value": "Flat"
- }
- ],
- "possibleInterestRateCalculatedInPeriodOptions": [
- {
- "id": 0,
- "value": "Daily"
- },
- {
- "id": 1,
- "value": "Same as repayment period"
- }
- ],
- "repaymentFrequencyOptions": [
- {
- "id": 0,
- "value": "Days"
- },
- {
- "id": 1,
- "value": "Weeks"
- },
- {
- "id": 2,
- "value": "Months"
- }
- ],
- "interestFrequencyOptions": [
- {
- "id": 2,
- "value": "Per month"
- },
- {
- "id": 3,
- "value": "Per year"
- }
- ],
- "interestRebateAllowed": false,
- "flexible": false
- }
-
+{
+"id": 1,
+"name": "Agricultural Loan",
+"description": "An agricultural loan given to farmers to help buy crop, stock and machinery. With an arrears tolerance setting of 1,000 CFA, loans are not marked as 'in arrears' or 'in bad standing' if the amount outstanding is less than this. Interest rate is described using monthly percentage rate (MPR) even though the loan typically lasts a year and requires one repayment (typically at time when farmer sells crop)",
+"principalMoney": {
+"currencyCode": "XOF",
+"currencyDigitsAfterDecimal": 0,
+"amount": 100000,
+"defaultName": "CFA Franc BCEAO",
+"nameCode": "currency.XOF",
+"displaySymbol": "CFA",
+"zero": false,
+"greaterThanZero": true,
+"displaySymbolValue": "100000 CFA"
+},
+"interestRatePerPeriod": 1.75,
+"interestRatePeriod": 2,
+"annualInterestRate": 21,
+"interestMethod": 0,
+"interestRateCalculatedInPeriod": 0,
+"numberOfInterestFreePeriods": 0,
+"repaidEvery": 12,
+"repaymentPeriodFrequency": 2,
+"numberOfRepayments": 1,
+"amortizationMethod": 1,
+"inArrearsTolerance": {
+"currencyCode": "XOF",
+"currencyDigitsAfterDecimal": 0,
+"amount": 1000,
+"defaultName": "CFA Franc BCEAO",
+"nameCode": "currency.XOF",
+"displaySymbol": "CFA",
+"zero": false,
+"greaterThanZero": true,
+"displaySymbolValue": "1000 CFA"
+},
+"createdOn": "2012-04-12T00:00:00.000+10:00",
+"lastModifedOn": "2012-04-12T00:00:00.000+10:00",
+"possibleCurrencies": [
+{
+"code": "XOF",
+"name": "CFA Franc BCEAO",
+"decimalPlaces": 0,
+"displaySymbol": "CFA",
+"nameCode": "currency.XOF",
+"displayLabel": "CFA Franc BCEAO (CFA)"
+},
+{
+"code": "ETB",
+"name": "Ethiopian Birr",
+"decimalPlaces": 2,
+"displaySymbol": null,
+"nameCode": "currency.ETB",
+"displayLabel": "Ethiopian Birr [ETB]"
+}
+],
+"possibleAmortizationOptions": [
+{
+"id": 1,
+"value": "Equal installments"
+},
+{
+"id": 0,
+"value": "Equal principle payments"
+}
+],
+"possibleInterestOptions": [
+{
+"id": 0,
+"value": "Declining Balance"
+},
+{
+"id": 1,
+"value": "Flat"
+}
+],
+"possibleInterestRateCalculatedInPeriodOptions": [
+{
+"id": 0,
+"value": "Daily"
+},
+{
+"id": 1,
+"value": "Same as repayment period"
+}
+],
+"repaymentFrequencyOptions": [
+{
+"id": 0,
+"value": "Days"
+},
+{
+"id": 1,
+"value": "Weeks"
+},
+{
+"id": 2,
+"value": "Months"
+}
+],
+"interestFrequencyOptions": [
+{
+"id": 2,
+"value": "Per month"
+},
+{
+"id": 3,
+"value": "Per year"
+}
+],
+"interestRebateAllowed": false,
+"flexible": false
+}
+
POST https://thedomainname/api/v1/loanproducts
- http://localhost:8080/mifosng-provider/api/v1/loanproducts
-
-
- Content-Type: application/json
- Request Body:
- new loan product json here
-
+https://localhost:8443/mifosng-provider/api/v1/loanproducts
+Content-Type: application/json
+Request Body:
+{
+ "name": "New kind of Loan",
+ "description": "A description not exceeding 500 characters.",
+ "currencyCode": "XOF",
+ "digitsAfterDecimal": 0,
+ "principal": 100000,
+ "inArrearsToleranceAmount": 1000,
+ "numberOfRepayments": 1,
+ "repaymentEvery": 1,
+ "repaymentFrequency": 2,
+ "amortizationMethod": 1,
+ "interestRatePerPeriod": 1.75,
+ "interestRateFrequencyMethod": 2,
+ "interestCalculationPeriodMethod": 1,
+ "interestMethod": 0
+}
+
POST https://thedomainname/api/v1/loanproducts/{loanId}
- http://localhost:8080/mifosng-provider/api/v1/loanproducts/1
-
-
- Content-Type: application/json
- Request Body:
- update loan product json here
-
+https://localhost:8443/mifosng-provider/api/v1/loanproducts/1
+Content-Type: application/json
+Request Body:
+{
+ "name": "New kind of Loan updated",
+ "description": "An updated description not exceeding 500 characters.",
+ "currencyCode": "XOF",
+ "digitsAfterDecimal": 0,
+ "principal": 100000,
+ "inArrearsToleranceAmount": 1000,
+ "numberOfRepayments": 1,
+ "repaymentEvery": 1,
+ "repaymentFrequency": 2,
+ "amortizationMethod": 1,
+ "interestRatePerPeriod": 1.75,
+ "interestRateFrequencyMethod": 2,
+ "interestCalculationPeriodMethod": 1,
+ "interestMethod": 0
+}
+
Application related configuration like being able to select what currencies are permitted for use within the MFI.
+Returns the list of selectedCurrencies that are allowed within the MFI and the list of currencies that are currently not selected.
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/configurations/currency +
+GET https://thedomainname/api/v1/configurations/currency
+
+{
+ "selectedCurrencyOptions": [
+ {
+ "code": "KES",
+ "name": "Kenyan Shilling",
+ "decimalPlaces": 2,
+ "displaySymbol": "KSh",
+ "nameCode": "currency.KES",
+ "displayLabel": "Kenyan Shilling (KSh)"
+ },
+ {
+ "code": "BND",
+ "name": "Brunei Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "BND",
+ "nameCode": "currency.BND",
+ "displayLabel": "Brunei Dollar (BND)"
+ },
+ {
+ "code": "LBP",
+ "name": "Lebanese Pound",
+ "decimalPlaces": 2,
+ "displaySymbol": "L£",
+ "nameCode": "currency.LBP",
+ "displayLabel": "Lebanese Pound (L£)"
+ },
+ {
+ "code": "GHC",
+ "name": "Ghana Cedi",
+ "decimalPlaces": 2,
+ "displaySymbol": "GHC",
+ "nameCode": "currency.GHC",
+ "displayLabel": "Ghana Cedi (GHC)"
+ },
+ {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ {
+ "code": "XOF",
+ "name": "CFA Franc BCEAO",
+ "decimalPlaces": 0,
+ "displaySymbol": "CFA",
+ "nameCode": "currency.XOF",
+ "displayLabel": "CFA Franc BCEAO (CFA)"
+ }
+ ],
+ "currencyOptions": [
+ {
+ "code": "AED",
+ "name": "UAE Dirham",
+ "decimalPlaces": 2,
+ "displaySymbol": null,
+ "nameCode": "currency.AED",
+ "displayLabel": "UAE Dirham [AED]"
+ },
+ {
+ "code": "AFN",
+ "name": "Afghanistan Afghani",
+ "decimalPlaces": 2,
+ "displaySymbol": null,
+ "nameCode": "currency.AFN",
+ "displayLabel": "Afghanistan Afghani [AFN]"
+ },
+ ...
+ ...
+ {
+ "code": "ZMK",
+ "name": "Zambian Kwacha",
+ "decimalPlaces": 2,
+ "displaySymbol": null,
+ "nameCode": "currency.ZMK",
+ "displayLabel": "Zambian Kwacha [ZMK]"
+ },
+ {
+ "code": "ZWD",
+ "name": "Zimbabwe Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": null,
+ "nameCode": "currency.ZWD",
+ "displayLabel": "Zimbabwe Dollar [ZWD]"
+ }
+ ]
+}
+
+ Update list of selectedCurrencies that are allowed within the MFI and the list of currencies that are currently not selected.
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/configurations/currency +
+PUT https://thedomainname/api/v1/configurations/currency
+
+{
+"selectedItems": ["USD", "GBP"]
+}
+
+ An API capability to allowed client applications verify authentication details.
+Verifies that the credentials provided successfully authenticate and returns the set of permissions allowed by that user.
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/authentication?username=super1&password=demo +
+POST https://thedomainname/api/v1/authentication?username=super1&password=demo
+POST https://localhost:8443/mifosng-provider/api/v1/authentication?username=super1&password=demo
+Content-Type: application/xml
+
+
+
+ An API capability to allowed client applications expose functionality for users to update their account details and password.
+Will return user account details.
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/useraccounts/current +
+GET https://thedomainname/api/v1/useraccounts/current
+GET https://localhost:8443/mifosng-provider/api/v1/useraccounts/current
+
+{
+ "id": 1,
+ "orgId": 1,
+ "officeId": 1,
+ "officeName": "Demo MFI Head Office",
+ "username": "mifos",
+ "firstname": "App hello",
+ "lastname": "Administrator",
+ "email": "demomfi@mifos.org",
+ "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": []
+ }
+ ],
+ "availableRoles": [
+ {
+ "id": 2,
+ "orgId": 1,
+ "name": "Field officer",
+ "description": "A field officer role allows the user to add client and loans and view reports but nothing else.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ },
+ {
+ "id": 3,
+ "orgId": 1,
+ "name": "Data Entry (Portfolio only)",
+ "description": "This role allows a user full permissions around client and loan functionality but nothing else.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ },
+ {
+ "id": 4,
+ "orgId": 1,
+ "name": "Credit Committe Member",
+ "description": "This role allows a user to approve reject or withdraw loans (with reporting).",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ },
+ {
+ "id": 5,
+ "orgId": 1,
+ "name": "Manager",
+ "description": "This role allows a manager to do anything related to portfolio management and also view all reports.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ }
+ ],
+ "selectedRoles": [
+ {
+ "id": 1,
+ "orgId": 1,
+ "name": "Super user",
+ "description": "This role provides all application permissions.",
+ "availablePermissions": [],
+ "selectedPermissions": [
+ {
+ "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": 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": 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": 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
+ }
+ ]
+ }
+ ]
+}
+
+ Will update user account details.
+PUT https://thedomainname/api/v1/useraccounts/current
+PUT https://localhost:8443/mifosng-provider/api/v1/useraccounts/current
+Content-Type: application/json
+Request body:
+{
+ "officeId": 1,
+ "username": "mifos",
+ "firstname": "App hello",
+ "lastname": "Administrator",
+ "email": "demomfi@mifos.org",
+ "selectedItems": ["1"]
+}
+
+
+{
+ "entityId": 1
+}
+
+ Will details for change of password screen.
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/useraccounts/current/password/template +
+GET https://thedomainname/api/v1/useraccounts/current/password/template
+GET https://localhost:8443/mifosng-provider/api/v1/useraccounts/current/password/template
+
+{
+ "password": null,
+ "passwordrepeat": null
+}
+
+ Will update users password.
+PUT https://thedomainname/api/v1/useraccounts/current/password
+PUT https://localhost:8443/mifosng-provider/api/v1/useraccounts/current/password
+Content-Type: application/json
+Request body:
+{
+ "password": "demo",
+ "passwordrepeat": "demo"
+}
+
+
+{
+ "entityId": 1
+}
+
+ An API capability to support user administration.
+Returns all users.
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/users +
+GET https://thedomainname/api/v1/users
+GET https://localhost:8443/mifosng-provider/api/v1/users
+
+{
+ "users": [
+ {
+ "id": 1,
+ "orgId": 1,
+ "officeId": 1,
+ "officeName": "Demo MFI Head Office",
+ "username": "mifos",
+ "firstname": "App hello",
+ "lastname": "Administrator",
+ "email": "demomfi@mifos.org",
+ "allowedOffices": [],
+ "availableRoles": [],
+ "selectedRoles": []
+ },
+ {
+ "id": 2,
+ "orgId": 1,
+ "officeId": 1,
+ "officeName": "Demo MFI Head Office",
+ "username": "super1",
+ "firstname": "super",
+ "lastname": "user",
+ "email": "fake@email.com",
+ "allowedOffices": [],
+ "availableRoles": [],
+ "selectedRoles": []
+ }
+ ]
+}
+
+ Returns details for new user screen
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/users/template +
+GET https://thedomainname/api/v1/users/template
+GET https://localhost:8443/mifosng-provider/api/v1/users/template
+
+{
+ "id": null,
+ "orgId": null,
+ "officeId": null,
+ "officeName": null,
+ "username": null,
+ "firstname": null,
+ "lastname": null,
+ "email": null,
+ "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": []
+ }
+ ],
+ "availableRoles": [
+ {
+ "id": 1,
+ "orgId": 1,
+ "name": "Super user",
+ "description": "This role provides all application permissions.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ },
+ {
+ "id": 2,
+ "orgId": 1,
+ "name": "Field officer",
+ "description": "A field officer role allows the user to add client and loans and view reports but nothing else.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ }
+ ],
+ "selectedRoles": []
+}
+
+ Returns details for existing application user
+Example Request: + https://localhost:8443/mifosng-provider/api/v1/users/1 +
+GET https://thedomainname/api/v1/users/1
+GET https://localhost:8443/mifosng-provider/api/v1/users/1
+
+{
+ "id": 1,
+ "orgId": 1,
+ "officeId": 1,
+ "officeName": "Demo MFI Head Office",
+ "username": "mifos",
+ "firstname": "App hello",
+ "lastname": "Administrator",
+ "email": "demomfi@mifos.org",
+ "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": []
+ }
+ ],
+ "availableRoles": [
+ {
+ "id": 2,
+ "orgId": 1,
+ "name": "Field officer",
+ "description": "A field officer role allows the user to add client and loans and view reports but nothing else.",
+ "availablePermissions": [],
+ "selectedPermissions": []
+ }
+ ],
+ "selectedRoles": [
+ {
+ "id": 1,
+ "orgId": 1,
+ "name": "Super user",
+ "description": "This role provides all application permissions.",
+ "availablePermissions": [],
+ "selectedPermissions": [
+ {
+ "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": 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": 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": 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
+ }
+ ]
+ }
+ ]
+}
+
+