FINERACT:628 API support for self share accounts

This commit is contained in:
ShruthiRajaram
2018-07-31 19:01:04 +05:30
parent 2a3aaecf6a
commit 2d6a19a998
6 changed files with 1229 additions and 1 deletions
+907
View File
@@ -3697,6 +3697,30 @@
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#selfshareaccount_template">Share Accounts</a></td>
<td>self/shareaccounts/template?clientId=?productId=?</td>
<td></td>
<td><a href="#selfshareaccount_template">Share Accounts Template</a></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>self/shareaccounts</td>
<td><a href="#selfshareaccount_create">Submit New Share Application</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>self/shareaccounts/{accountId}</td>
<td></td>
<td><a href="#selfshareaccount_retrieve">Retrieve a Share Application/Account</a></td>
<td></td>
</tr>
<tr>
<td><a href="#selftransfertemplate">Own Account Transfers</a></td>
<td>self/accounttransfers/template</td>
@@ -47487,6 +47511,889 @@ No Request Body:
</code>
</div>
</div>
<a id="selfshareaccount_template" name="selfshareaccount_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve Share Account Template:</h2>
<p>This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:
<ul>
<li class=normalli>Field Defaults</li>
<li class=normalli>Allowed Value Lists</li>
</ul>
</p>
<h4>Arguments</h4>
<dl class="argument-list">
<dt>clientId</dt>
<dd>Integer <span>mandatory</span></dd>
<dt>productId</dt>
<dd>Integer <span>optional</span></dd>
<dd>If entered, productId, productName and selectedProduct fields are returned.</dd>
</dl>
<p>Example Requests: </p>
<div class=apiClick>self/shareaccounts/template?clientId=14</div>
<br><br>
<div class=apiClick>self/shareaccounts/template?clientId=14&productId=3</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/self/shareaccounts/template?clientId={clientId}</code>
<code class="method-response">
{
"clientId": 14,
"productOptions": [
{
"id": 3,
"name": "SP",
"shortName": "SP",
"totalShares": 1000
},
{
"id": 4,
"name": "Product1",
"shortName": "test",
"totalShares": 1000
}
],
"chargeOptions": [
{
"id": 2,
"name": "Activation fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 2,
"chargeTimeType": {
"id": 14,
"code": "chargeTimeType.sharespurchase",
"value": "Share Purchase"
},
"chargeAppliesTo": {
"id": 4,
"code": "chargeAppliesTo.shares",
"value": "Shares"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
}
]
}
</code>
</div>
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/self/shareaccounts/template?clientId={clientId}&productId={productId}</code>
<code class="method-response">
{
"clientId": 14,
"productOptions": [
{
"id": 3,
"name": "SP",
"shortName": "SP",
"description": "SP1",
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"totalShares": 1000,
"totalSharesIssued": 900,
"unitPrice": 1,
"shareCapital": 900,
"minimumShares": 8,
"nominalShares": 500,
"maximumShares": 500,
"marketPrice": [],
"charges": [],
"allowDividendCalculationForInactiveClients": false,
"lockinPeriod": 50,
"lockPeriodTypeEnum": {
"id": 0,
"code": "shares.lockin.sharePeriodFrequencyType.days",
"value": "Days"
},
"minimumActivePeriod": 10,
"minimumActivePeriodForDividendsTypeEnum": {
"id": 0,
"code": "shares.minimumactive.sharePeriodFrequencyType.days",
"value": "Days"
},
"accountingRule": {
"id": 2,
"code": "accountingRuleType.cash",
"value": "CASH BASED"
},
"accountingMappings": {
"shareReferenceId": {
"id": 32,
"name": "Cash In Hand",
"glCode": "20301"
},
"incomeFromFeeAccountId": {
"id": 40,
"name": "Other Operating Income",
"glCode": "30105"
},
"shareEquityId": {
"id": 56,
"name": "Share Equity",
"glCode": "00098"
},
"shareSuspenseId": {
"id": 2,
"name": "Overpayment Liability",
"glCode": "10200"
}
},
"currencyOptions": [
{
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
}
],
"chargeOptions": [
{
"id": 2,
"name": "Activation fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 2,
"chargeTimeType": {
"id": 14,
"code": "chargeTimeType.sharespurchase",
"value": "Share Purchase"
},
"chargeAppliesTo": {
"id": 4,
"code": "chargeAppliesTo.shares",
"value": "Shares"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
}
],
"minimumActivePeriodFrequencyTypeOptions": [
{
"id": 0,
"code": "shares.lockin.sharePeriodFrequencyType.days",
"value": "Days"
}
],
"lockinPeriodFrequencyTypeOptions": [
{
"id": 0,
"code": "shares.lockin.sharePeriodFrequencyType.days",
"value": "Days"
},
{
"id": 1,
"code": "shares.lockin.sharePeriodFrequencyType.weeks",
"value": "Weeks"
},
{
"id": 2,
"code": "shares.lockin.sharePeriodFrequencyType.months",
"value": "Months"
},
{
"id": 3,
"code": "shares.lockin.sharePeriodFrequencyType.years",
"value": "Years"
}
],
"accountingMappingOptions": {
"liabilityAccountOptions": [
{
"id": 30,
"name": "Recurring Deposits",
"parentId": 1,
"glCode": "10104",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Recurring Deposits",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 2,
"name": "Overpayment Liability",
"glCode": "10200",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Overpayment Liability",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 55,
"name": "Liability Transfer (Temp)",
"glCode": "220004-Temp",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 2,
"code": "accountType.liability",
"value": "LIABILITY"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Temporary Liability account to track Account Transfers",
"nameDecorated": "Liability Transfer (Temp)",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
}
],
"assetAccountOptions": [
{
"id": 31,
"name": "Furniture and Fixtures",
"parentId": 8,
"glCode": "20101",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Furniture and Fixtures",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 32,
"name": "Cash In Hand",
"parentId": 10,
"glCode": "20301",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Cash In Hand",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 33,
"name": "Petty Cash",
"parentId": 10,
"glCode": "20302",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Petty Cash",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 34,
"name": "Loans to Customers",
"parentId": 12,
"glCode": "20501",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Loans to Customers",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 35,
"name": "Current Account Overdrafts",
"parentId": 12,
"glCode": "20502",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Current Account Overdrafts",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 17,
"name": "Suspense Account",
"glCode": "9999",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 1,
"code": "accountType.asset",
"value": "ASSET"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "Suspense Account",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
}
],
"incomeAccountOptions": [
{
"id": 54,
"name": "Loan Recovery (Temp)",
"glCode": "220002-Temp",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"description": "Temporary account to track income from Loan recovery",
"nameDecorated": "Loan Recovery (Temp)",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 36,
"name": "Fees and Charges",
"parentId": 18,
"glCode": "30101",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Fees and Charges",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 37,
"name": "Penalties",
"parentId": 18,
"glCode": "30102",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Penalties",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 38,
"name": "Interest Received from Borrowers",
"parentId": 18,
"glCode": "30103",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Interest Received from Borrowers",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 39,
"name": "Insurance Charges",
"parentId": 18,
"glCode": "30104",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Insurance Charges",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
},
{
"id": 40,
"name": "Other Operating Income",
"parentId": 18,
"glCode": "30105",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 4,
"code": "accountType.income",
"value": "INCOME"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Other Operating Income",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
}
],
"equityAccountOptions": [
{
"id": 56,
"name": "Share Equity",
"parentId": 25,
"glCode": "00098",
"disabled": false,
"manualEntriesAllowed": true,
"type": {
"id": 3,
"code": "accountType.equity",
"value": "EQUITY"
},
"usage": {
"id": 1,
"code": "accountUsage.detail",
"value": "DETAIL"
},
"nameDecorated": "....Share Equity",
"tagId": {
"id": 0,
"active": false,
"mandatory": false
}
}
]
}
}
],
"chargeOptions": [
{
"id": 2,
"name": "Activation fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 2,
"chargeTimeType": {
"id": 14,
"code": "chargeTimeType.sharespurchase",
"value": "Share Purchase"
},
"chargeAppliesTo": {
"id": 4,
"code": "chargeAppliesTo.shares",
"value": "Shares"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "Regular"
}
}
]
}
</code>
</div>
</div>
<a id="selfshareaccount_create" name="selfshareaccount_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Submit new share application</h2>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="fineractHeading2">Mandatory Fields</div></td></tr>
<tr class=alt><td>clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate</td></tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="fineractHeading2">Optional Fields</div></td></tr>
<tr class=alt><td>accountNo, externalId</td></tr>
</table>
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="fineractHeading2">Inherited from Product (if not provided)</div></td></tr>
<tr class=alt><td> minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType</td>
</tr>
</table>
</div>
<div class="method-example">
<p>Minimal request: accountNo auto generated, remaining details inherited from Share product.</p>
<code class="method-declaration">POST https://Domain Name/api/v1/self/shareaccounts</code>
<code class="method-request">POST Share Account
Content-Type: application/json
Request Body:
{
"productId":3,
"unitPrice":1,
"requestedShares":500,
"submittedDate":"31 July 2018",
"savingsAccountId":2,
"applicationDate":"31 July 2018",
"locale":"en",
"dateFormat":"dd MMMM yyyy",
"charges":[
{
"chargeId":2,
"amount":2
}
],
"clientId":"14"
}
</code>
<code class="method-response">
{
"resourceId": 12
}
</code>
</div>
</div>
<a id="selfshareaccount_retrieve" name="selfshareaccount_retrieve" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h2>Retrieve a share application/account:</h2>
<p>Example Requests : </p>
<div class=apiClick>self/shareaccounts/12</div>
</div>
<div class="method-example">
<code class="method-declaration">GET https://DomainName/api/v1/self/shareaccounts/{accountId}</code>
<code class="method-response">
{
"id": 12,
"accountNo": "000000012",
"savingsAccountNumber": "000000002",
"clientId": 14,
"clientName": "Bheem",
"productId": 3,
"productName": "SP",
"status": {
"id": 100,
"code": "shareAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"active": false,
"closed": false
},
"timeline": {
"submittedOnDate": [
2018,
7,
31
],
"submittedByUsername": "self",
"submittedByFirstname": "self",
"submittedByLastname": "self"
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"summary": {
"id": 12,
"accountNo": "000000012",
"totalApprovedShares": 0,
"totalPendingForApprovalShares": 500,
"productId": 3,
"productName": "SP",
"status": {
"id": 100,
"code": "shareAccountStatusType.submitted.and.pending.approval",
"value": "Submitted and pending approval",
"submittedAndPendingApproval": true,
"approved": false,
"rejected": false,
"active": false,
"closed": false
},
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"inMultiplesOf": 1,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"timeline": {
"submittedOnDate": [
2018,
7,
31
],
"submittedByUsername": "self",
"submittedByFirstname": "self",
"submittedByLastname": "self"
}
},
"purchasedShares": [
{
"id": 13,
"accountId": 12,
"purchasedDate": [
2018,
7,
31
],
"numberOfShares": 500,
"purchasedPrice": 1,
"status": {
"id": 100,
"code": "purchasedSharesStatusType.applied",
"value": "Pending Approval"
},
"type": {
"id": 500,
"code": "purchasedSharesType.purchased",
"value": "Purchase"
},
"amount": 502,
"chargeAmount": 2,
"amountPaid": 500
}
],
"savingsAccountId": 2,
"currentMarketPrice": 1,
"lockPeriodTypeEnum": {
"id": 4,
"code": "sharePeriodFrequencyType.invalid",
"value": "Invalid"
},
"minimumActivePeriodTypeEnum": {
"id": 4,
"code": "sharePeriodFrequencyType.invalid",
"value": "Invalid"
},
"allowDividendCalculationForInactiveClients": false,
"charges": [
{
"id": 9,
"chargeId": 2,
"accountId": 12,
"name": "Activation fee",
"chargeTimeType": {
"id": 14,
"code": "chargeTimeType.sharespurchase",
"value": "Share Purchase"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 2,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 2,
"amountOrPercentage": 2,
"isActive": true
}
],
"dividends": []
}
</code>
</div>
</div>
<!-- end of Customer Self Service APIs-->
</div>
<!-- main-content-wrapper -->