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 @@
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
+}
+
+
+ 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:
+
+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"
+ }
+ }]
+}
+
+ 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"
+ }]
+}
+
+ 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]
+ }
+ }
+}
+
+ 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"
+ }]
+}
+
+ 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]
+ }
+ }
+}
+
+ 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": {}
+}
+
+ 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}
+}
+
+ 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
+}
+
+ 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
+}
+
+ 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
+}
+
+ 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}
+}
+
+ 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
+ }
+
+