diff --git a/APIFolder/api.htm b/APIFolder/api.htm index f4d583800..836c3e55f 100644 --- a/APIFolder/api.htm +++ b/APIFolder/api.htm @@ -393,30 +393,7 @@
Clients ...
-Clients are people and businesses that have applied (or may apply) to an MFI for loans.
Example Request: - https://localhost:8443/mifosng-provider/api/v1/clients -
+Example Request:
+ https://localhost:8443/mifosng-provider/api/v1/clients?pretty=true +GET https://thedomainname/api/v1/clients
-{
- "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
- }
- ]
-}
+[ {
+ "officeId" : 1,
+ "officeName" : "change super user",
+ "id" : 2,
+ "firstname" : "Dennis",
+ "lastname" : "O'Meara",
+ "displayName" : "Dennis O'Meara",
+ "externalId" : null,
+ "joinedDate" : [ 2009, 1, 4 ],
+ "maxJoinedOnOffsetFromToday" : -1241
+}, {
+ "officeId" : 1,
+ "officeName" : "change super user",
+ "id" : 4,
+ "firstname" : "Jimmy",
+ "lastname" : "O'Meara",
+ "displayName" : "Jimmy O'Meara",
+ "externalId" : null,
+ "joinedDate" : [ 2009, 1, 11 ],
+ "maxJoinedOnOffsetFromToday" : -1234
+}...]
Example Request: - https://localhost:8443/mifosng-provider/api/v1/clients/template -
+Example Request:
+ https://localhost:8443/mifosng-provider/api/v1/clients/template?pretty=trueGET https://thedomainname/api/v1/clients/template
{
- "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
+ "joinedDate" : [ 2012, 5, 29 ],
+ "allowedOffices" : [ {
+ "id" : 1,
+ "name" : "change super user"
+ } ]
}
Returns client fields. It also returns allowed value lists which help build a maintenance User Interface. -
-Example Request: - https://localhost:8443/mifosng-provider/api/v1/clients/1 -
+Example Request:
+ https://localhost:8443/mifosng-provider/api/v1/clients/1?pretty=true +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
+ "officeId" : 1,
+ "officeName" : "change super user",
+ "id" : 1,
+ "firstname" : "Patrick",
+ "lastname" : "O'Meara",
+ "displayName" : "Patrick O'Meara",
+ "externalId" : null,
+ "joinedDate" : [ 2009, 1, 4 ],
+ "maxJoinedOnOffsetFromToday" : -1241
}
POST https://thedomainname/api/v1/loanproducts
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
+Request Body:{
+"name": "Newish kind of Loan",
+"description": "A description not exceeding 500 characters.",
+"externalId": "1077",
+"locale": "en-us",
+"currencyCode": "XOF",
+"digitsAfterDecimal": 0,
+"principalFormatted": "100,000",
+"inArrearsToleranceAmountFormatted": "1,000",
+ "repaymentEvery": 1,
+ "repaymentFrequency": 2,
+"numberOfRepayments": 1,
+"interestRatePerPeriodFormatted": "1.75",
+"interestRateFrequencyMethod": 2,
+"amortizationMethod": 1,
+"interestMethod": 0 ,
+"interestCalculationPeriodMethod": 1
+}
+
+{
+ "entityId": 9
}
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
+{
+"name": "Loan name - updated"
+}
+
+{
+ "entityId": 1
}
@@ -3050,7 +2980,7 @@ No Request Body
Adds new application user.
PUT https://thedomainname/api/v1/users/{userId)
diff --git a/APIFolder/docUpdateComments.txt b/APIFolder/docUpdateComments.txt
index dcfa3cb01..806138ff7 100644
--- a/APIFolder/docUpdateComments.txt
+++ b/APIFolder/docUpdateComments.txt
@@ -27,4 +27,10 @@ update: give hardtofigureout error msg when using equivalent to create parameter
delete: does delete (I delete super1), no 200 ok returned, "org.springframework.dao.InvalidDataAccessApiUsageException: attempt to create merge event with null entity; " if delete a non-existant user
Loan Product
-List - interestRateCalculatedInPeriod is it usefult to show this field...also enums questionsor show only a few cos on loan template
\ No newline at end of file
+List - interestRateCalculatedInPeriod is it usefult to show this field...also enums questionsor show only a few cos on loan template
+Create - get NullPointerException when creating using values in api doc (? about using principal or principal formatted or the right locale values)
+Update - tried to update name (using api docs data) and got a NullPointerException
+
+Clients
+List - can't get client other than from office 1
+template - only get office 1 in allowed offices
\ No newline at end of file