From 9327f1eef0e54539d85ed994d88b4b712e01df0b Mon Sep 17 00:00:00 2001 From: Madhukar Date: Wed, 30 Apr 2014 17:09:35 +0530 Subject: [PATCH] Update API docs Update collection sheet api-doc --- api-docs/apiLive.htm | 841 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 808 insertions(+), 33 deletions(-) diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index 2948cc98a..936b6173c 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -1116,6 +1116,70 @@ + + + groups/{groupId}?command=generateCollectionSheet + Generate Collection Sheet + + + + + + + groups/{groupId}?command=saveCollectionSheet + Save Collection Sheet + + + + + + + groups/{groupId}?command=unassignStaff + Unassign Staff + + + + + + + groups/{groupId}?command=assignStaff + Assign Staff + + + + + + + groups/{groupId}?command=close + Close Group + + + + + + + groups/{groupId}?command=assignRole + Assign Role + + + + + + + groups/{groupId}?command=unassignRole + Unassign Role + + + + + + + groups/{groupId}?command=updateRole + Update Role + + + + Center centers @@ -1147,6 +1211,38 @@ + + + + centers/{centerId}?command=close + Close Center + + + + + + + centers/{centerId}/accounts + + Retrive Center accounts summary + + + + + + centers/{centerId}?command=generateCollectionSheet + Generate Collection Sheet + + + + + + + centers/{centerId}?command=saveCollectionSheet + Save Collection Sheet + + + @@ -4168,6 +4264,248 @@ Request Body: +   +
+
+

Close a Center

+

Centers can be closed if they don't have any non-closed groups/savings.

+

If the group have any corresponding active groups/savingsAccount this API will result in an error.

+
+
+ POST https://Domain Name/api/v1/centers/{centerId}?command=close + POST centers/1?command=close +Content-Type: application/json +Request Body: +{ + "closureReasonId": 32, + "closureDate": "05 May 2014", + "locale": "en", + "dateFormat": "dd MMMM yyyy" +} + + +{ + "resourceId": 1 +} + +
+
+ +   +
+
+

Retrieve Center accounts overview

+

+ An example of how a savings summary can be provided. This + is requested in a specific use case of the reference application.
It is quite reasonable to add resources like this to simplify User Interface development. +

+

Example Requests:

+
centers/9/accounts
+
+
+ +GET https://DomainName/api/v1/centers/{centerId}/accounts + + +{ + "savingsAccounts": [{ + "id": 16, + "accountNo": "000000016", + "productId": 1, + "productName": "Voluntary savings", + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountType": { + "id": 2, + "code": "accountType.group", + "value": "Group" + }, + "timeline": { + "submittedOnDate": [2014,5,1], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator" + }, + "depositType": { + "id": 100, + "code": "depositAccountType.savingsDeposit", + "value": "Savings" + } + }] +} + +
+
+ +   +
+
+

Generate Collection Sheet

+

This api retrieves repayment details of all jlg loans under a center on a specified meeting date.

+
+
+ POST https://Domain Name/api/v1/centers/{centerId}?command=generateCollectionSheet + POST centers/10?command=generateCollectionSheet +Content-Type: application/json +Request Body: +{ + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "calendarId":6, + "transactionDate":"04 May 2014" +} + + +{ + "dueDate": [2014,5,4], + "loanProducts": [{ + "id": 1, + "name": "IGL", + "includeInBorrowerCycle": false, + "useBorrowerCycle": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principalVariationsForBorrowerCycle": [], + "interestRateVariationsForBorrowerCycle": [], + "numberOfRepaymentVariationsForBorrowerCycle": [] + }], + "groups": [{ + "groupId": 1, + "groupName": "Group 1", + "staffId": 1, + "staffName": "A, Aliya", + "levelId": 2, + "levelName": "Group", + "clients": [{ + "clientId": 10, + "clientName": "saving acc", + "loans": [{ + "loanId": 10, + "accountId": "000000010", + "accountStatusId": 300, + "productShortName": "IGL", + "productId": 1, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principalDue": 1200.000000, + "principalPaid": 0.000000, + "interestDue": 21.360000, + "interestPaid": 0.000000, + "totalDue": 1221.360000 + }], + "attendanceType": { + "id": 0, + "code": "attendanceType.invalid", + "value": "Invalid" + } + }] + }], + "attendanceTypeOptions": [{ + "id": 1, + "code": "attendanceType.present", + "value": "Present" + }, + { + "id": 2, + "code": "attendanceType.absent", + "value": "Absent" + }, + { + "id": 3, + "code": "attendanceType.approved", + "value": "Approved" + }, + { + "id": 4, + "code": "attendanceType.leave", + "value": "Leave" + }, + { + "id": 5, + "code": "attendanceType.late", + "value": "Late" + }] +} + +
+
+ +   +
+
+

Save Collection Sheet

+

This api allows the loan officer to perform bulk repayments of JLG loans for a center on its meeting date.

+
+
+ POST https://Domain Name/api/v1/centers/{centerId}?command=saveCollectionSheet + POST centers/10?command=saveCollectionSheet +{ + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "calendarId": 6, + "transactionDate": "04 May 2014", + "actualDisbursementDate": "04 May 2014", + "clientsAttendance": [], + "bulkDisbursementTransactions": [], + "bulkRepaymentTransactions": [{ + "loanId": 10, + "transactionAmount": 1221.36 + }] +} + + +{ + "groupId": 10, + "resourceId": 10, + "changes": { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "bulkTransations": { + "loanId": 10, + "transactionAmount": 1221.36, + "transactionDate": [2014,5,4] + } + } +} + +
+
+  
@@ -4843,7 +5181,340 @@ Request Body:
-   + +   +
+
+

Generate Collection Sheet

+

This api retrieves repayment details of all jlg loans of all members of a group on a specified meeting date.

+
+
+ POST https://Domain Name/api/v1/groups/{groupId}?command=generateCollectionSheet + POST groups/1?command=generateCollectionSheet +Content-Type: application/json +Request Body: +{ + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "calendarId":6, + "transactionDate":"04 May 2014" +} + + +{ + "dueDate": [2014,5,4], + "loanProducts": [{ + "id": 1, + "name": "IGL", + "includeInBorrowerCycle": false, + "useBorrowerCycle": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principalVariationsForBorrowerCycle": [], + "interestRateVariationsForBorrowerCycle": [], + "numberOfRepaymentVariationsForBorrowerCycle": [] + }], + "groups": [{ + "groupId": 1, + "groupName": "Group 1", + "staffId": 1, + "staffName": "A, Aliya", + "levelId": 2, + "levelName": "Group", + "clients": [{ + "clientId": 10, + "clientName": "saving acc", + "loans": [{ + "loanId": 10, + "accountId": "000000010", + "accountStatusId": 300, + "productShortName": "IGL", + "productId": 1, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principalDue": 1200.000000, + "principalPaid": 0.000000, + "interestDue": 21.360000, + "interestPaid": 0.000000, + "totalDue": 1221.360000 + }], + "attendanceType": { + "id": 0, + "code": "attendanceType.invalid", + "value": "Invalid" + } + }] + }], + "attendanceTypeOptions": [{ + "id": 1, + "code": "attendanceType.present", + "value": "Present" + }, + { + "id": 2, + "code": "attendanceType.absent", + "value": "Absent" + }, + { + "id": 3, + "code": "attendanceType.approved", + "value": "Approved" + }, + { + "id": 4, + "code": "attendanceType.leave", + "value": "Leave" + }, + { + "id": 5, + "code": "attendanceType.late", + "value": "Late" + }] +} + +
+
+ +   +
+
+

Save Collection Sheet

+

This api allows the loan officer to perform bulk repayments of JLG loans for a group on its meeting date.

+ +
+
+ POST https://Domain Name/api/v1/groups/{groupId}?command=saveCollectionSheet + POST groups/1?command=saveCollectionSheet +{ + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "calendarId": 6, + "transactionDate": "04 May 2014", + "actualDisbursementDate": "04 May 2014", + "clientsAttendance": [], + "bulkDisbursementTransactions": [], + "bulkRepaymentTransactions": [{ + "loanId": 10, + "transactionAmount": 1221.36 + }] +} + + +{ + "groupId": 1, + "resourceId": 1, + "changes": { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "bulkTransations": { + "loanId": 10, + "transactionAmount": 1221.36, + "transactionDate": [2014,5,4] + } + } +} + +
+
+ +   +
+
+

Unassign a Staff

+

Allows you to unassign the Staff.

+
+
+ POST https://Domain Name/api/v1/groups/{groupId}?command=unassignStaff + POST groups/1?command=unassignStaff +Content-Type: application/json +Request Body: +{ + "staffId":"1" +} + + +{ + "officeId": 1, + "groupId": 1, + "resourceId": 1, + "changes": {} +} + +
+
+ +   +
+
+

Assign a Staff

+

Allows you to assign Staff for existed Group.

+

The selected Staff member should be belongs to the group's office.

+
+
+ POST https://Domain Name/api/v1/groups/{groupId}?command=assignStaff + POST groups/1?command=assignStaff +Content-Type: application/json +Request Body: +{ + "staffId": "1" +} + + +{ + "officeId": 1, + "groupId": 1, + "resourceId": 1, + "changes": {"staffId":1} +} + +
+
+ +   +
+
+

Close a Group

+

Groups can be closed if they don't have any non-closed clients/loans/savingsAccounts and This API exists to close a group.

+

If the group have any corresponding active clients/loans/savingsAccount this API will result in an error.

+
+
+ POST https://Domain Name/api/v1/groups/{groupId}?command=close + POST groups/1?command=close +Content-Type: application/json +Request Body: +{ + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closureDate":"25 June 2013", + "closureReasonId":"30" +} + + +{ + "groupId": 1, + "resourceId": 1 +} + +
+
+ +   +
+
+

Assign a Role

+

Allows you to assign Role for existed member of group.

+

We can define member roles by adding code values to GROUPROLE code. Example:Group leader etc.

+
+
+ POST https://Domain Name/api/v1/groups/{groupId}?command=assignRole + POST groups/1?command=assignRole +Content-Type: application/json +Request Body: +{ + "clientId": "1", + "role":30 +} + + +{ + "clientId": 1, + "groupId": 1, + "resourceId": 1 +} + +
+
+ +   +
+
+

Unassign a Role

+

Allows you to unassign the member Role.

+
+
+ POST https://Domain Name/api/v1/groups/{groupId}?command=unassignRole&roleId=1 + POST groups/1?command=unassignRole&roleId=1 +Content-Type: application/json +Request Body: +{} + + +{ + "clientId": 1, + "groupId": 1, + "resourceId": 1 +} + +
+
+ +   +
+
+

Update a Role

+

Allows you to update the member Role.

+
+
+ POST https://Domain Name/api/v1/groups/{groupId}?command=updateRole&roleId=2 + POST groups/1?command=updateRole&roleId=2 +Content-Type: application/json +Request Body: +{ + "role":"31" +} + + +{ + "groupId": 1, + "resourceId": 2, + "changes":{"role":31} +} + +
+
+ +
+
+

Close a Client

+

Clients can be closed if they dont have any non-closed loans/savingsAccount. This API exists to close a client .

+

If the client have any corresponding active loans/savingsAccount this API will result in an error.

+
+
+ POST https://Domain Name/api/v1/clients/{clientId}?command=close + POST clients/1?command=close + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closureDate":"25 June 2013", + "closureReasonId":"11" + } + + + { + "clientId":15, + "resourceId":15 + } + +
+
+ +  

Retrieve a Group

@@ -29001,38 +29672,142 @@ No Request Body: - - Center - centers - Create a Center - List Centers - - - - - - centers/template - - Retrieve Center Template - - - - - - centers/{centerId} - - Retrieve a Center - Update a Center - Delete a Center - - - - centers/{centerId}?command=activate - Activate a Center - - - - + + + groups/{groupId}?command=transferClients + Bulk Transfer Clients across Groups + + + + + + + groups/{groupId}?command=generateCollectionSheet + Generate Collection Sheet + + + + + + + groups/{groupId}?command=saveCollectionSheet + Save Collection Sheet + + + + + + + groups/{groupId}?command=unassignStaff + Unassign Staff + + + + + + + groups/{groupId}?command=assignStaff + Assign Staff + + + + + + + groups/{groupId}?command=close + Close Group + + + + + + + groups/{groupId}?command=assignRole + Assign Role + + + + + + + groups/{groupId}?command=unassignRole + Unassign Role + + + + + + + groups/{groupId}?command=updateRole + Update Role + + + + + + Center + centers + Create a Center + List Centers + + + + + + centers/template + + Retrieve Center Template + + + + + + centers/{centerId} + + Retrieve a Center + Update a Center + Delete a Center + + + + centers/{centerId}?command=activate + Activate a Center + + + + + + + centers/{centerId}?command=close + Close Center + + + + + + + centers/{centerId}/accounts + + Retrive Center accounts summary + + + + + + centers/{centerId}?command=generateCollectionSheet + Generate Collection Sheet + + + + + + + centers/{centerId}?command=saveCollectionSheet + Save Collection Sheet + + + + Loan Product loanproducts