diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index 3139b1a5b..a6320c815 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -10,7 +10,7 @@ QueryParameters = (function() { var result = {}; if (window.location.search) { - // split up the query string and store in an associative array + // split up the query string and store in an associaative array var params = window.location.search.slice(1).split("&"); for ( var i = 0; i < params.length; i++) { var tmp = params[i].split("="); @@ -938,6 +938,149 @@ +
+
|
+
|
+
|
+
|
+
|
+ ||||||||||
| Share Accounts | +shareaccounts | +Submit new share application | +List share application/accounts | ++ | + | |||||||||
| + | accounts/share/{accountId} | ++ | Retrieve a share application/account | +Modify a share application | +||||||||||
| + | accounts/share/{accountId}?command=approve | +Approve a share application | ++ | + | + | |||||||||
| + | accounts/share/{accountId}?command=undoApproval | +Undo share application approval | ++ | + | + | |||||||||
| + | accounts/share/{accountId}?command=reject | +Reject a share application | ++ | + | + | |||||||||
| + | accounts/share/{accountId}?command=activate | +Activate a share account | ++ | + | + | |||||||||
| + | accounts/share/{accountId}?command=close | +Close a share account | ++ | + | + | |||||||||
| + | accounts/share/{accountId}?command=applyadditionalshares | +Apply additional shares on a share account | ++ | + | + | |||||||||
| + | accounts/share/{accountId}?command=approveadditionalshares | +Approve additional shares request on a share account | ++ | + | + | |||||||||
| + | accounts/share/{accountId}?command=rejectadditionalshares | +Reject additional shares request on a share account | ++ | + | + | |||||||||
| + | accounts/share/{accountId}?command=redeemshares | +Redeem shares on a share account | ++ | + | + | |||||||||
Mandatory Fields |
| name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, locale, + totalShares, unitPrice, nominalShares,allowDividendCalculationForInactiveClients,accountingRule | +
Mandatory Fields for Cash based accounting (accountingRule = 2) |
| shareReferenceId, shareSuspenseId, shareEquityId, incomeFromFeeAccountId | +
Optional Fields |
| sharesIssued, minimumShares, maximumShares, minimumActivePeriodForDividends, minimumactiveperiodFrequencyType, + lockinPeriodFrequency, lockinPeriodFrequencyType, marketPricePeriods, chargesSelected |
POST https://Domain Name/api/v1/products/share
+ POST shareproducts
+Content-Type: application/json
+Request Body:
+{
+"name": "Share Product",
+"shortName": "SP",
+"description": "Description",
+"currencyCode": "USD",
+"digitsAfterDecimal": 2,
+"inMultiplesOf": "1",
+"locale": "en",
+"totalShares": "1000",
+"sharesIssued": "1000",
+"unitPrice": "1",
+"minimumShares": "10",
+"nominalShares": "20",
+"maximumShares": "30",
+"minimumActivePeriodForDividends": "1",
+"minimumactiveperiodFrequencyType": 0,
+"lockinPeriodFrequency": "1",
+"lockinPeriodFrequencyType": 1,
+"allowDividendCalculationForInactiveClients": "true",
+"marketPricePeriods": [{
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
+ "fromDate": "04 May 2016",
+ "shareValue": "2"
+}],
+"chargesSelected": [{
+ "id": 20
+}],
+"accountingRule": "1"
+}
+
+
+
+{
+ "resourceId": 1
+}
+
+ POST shareproducts
+Content-Type: application/json
+Request Body:
+{
+"name": "Share Product",
+"shortName": "SP",
+"description": "Description",
+"currencyCode": "USD",
+"digitsAfterDecimal": 2,
+"inMultiplesOf": "1",
+"locale": "en",
+"totalShares": "100000",
+"sharesIssued": "100000",
+"unitPrice": "1",
+"minimumShares": "1000",
+"nominalShares": "2000",
+"maximumShares": "5000",
+"minimumActivePeriodForDividends": "1",
+"minimumactiveperiodFrequencyType": 0,
+"lockinPeriodFrequency": "1",
+"lockinPeriodFrequencyType": 1,
+"allowDividendCalculationForInactiveClients": "true",
+"marketPricePeriods": [{
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
+ "fromDate": "04 May 2016",
+ "shareValue": "2"
+}],
+"chargesSelected": [{
+ "id": 20
+}],
+"accountingRule": "2",
+"shareReferenceId": 5,
+"shareSuspenseId": 8,
+"shareEquityId": 66,
+"incomeFromFeeAccountId": 2
+}
+
+
+{
+ "resourceId": 1
+}
+
+ Example Requests:
+GET https://Domain Name/api/v1/products/share/1
+
+{
+ "id": 1,
+ "name": "Share Product",
+ "shortName": "SP",
+ "description": "SP",
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "inMultiplesOf": 100,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "totalShares": 100,
+ "totalSharesIssued": 50,
+ "unitPrice": 1.00,
+ "shareCapital": 50.00,
+ "minimumShares": 1,
+ "nominalShares": 10,
+ "maximumShares": 50,
+ "marketPrice": [
+ {
+ "id": 4,
+ "fromDate": "Feb 1, 2016",
+ "shareValue": 1.00
+ },
+ {
+ "id": 5,
+ "fromDate": "May 3, 2016",
+ "shareValue": 5.00
+ }],
+ "charges": [{
+ "id": 20,
+ "name": "Share Account Activation Flat",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 1.000000,
+ "chargeTimeType": {
+ "id": 13,
+ "code": "chargeTimeType.activation",
+ "value": "Share Account Activate"
+ },
+ "chargeAppliesTo": {
+ "id": 4,
+ "code": "chargeAppliesTo.shares",
+ "value": "Shares"
+ },
+ "chargeCalculationType": {
+ "id": 1,
+ "code": "chargeCalculationType.flat",
+ "value": "Flat"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ }],
+ "allowDividendCalculationForInactiveClients": true,
+ "lockinPeriod": 1,
+ "lockPeriodTypeEnum": {
+ "id": 0,
+ "value": "Days"
+ },
+ "minimumActivePeriod": 1,
+ "minimumActivePeriodForDividendsTypeEnum": {
+ "id": 0,
+ "value": "Days"
+ },
+ "accountingRule": {
+ "id": 2,
+ "code": "accountingRuleType.cash",
+ "value": "CASH BASED"
+ },
+ "accountingMappings": {
+ "shareReferenceId": {
+ "id": 1,
+ "name": "ACCOUNT_NAME_1FJBQ",
+ "glCode": "ASSET_ED1461237837829"
+ },
+ "incomeFromFeeAccountId": {
+ "id": 14,
+ "name": "ACCOUNT_NAME_1FJBQ",
+ "glCode": "INCOME_OY1461237869836"
+ },
+ "shareEquityId": {
+ "id": 66,
+ "name": "Equity Account",
+ "glCode": "EQUITY1"
+ },
+ "shareSuspenseId": {
+ "id": 8,
+ "name": "ACCOUNT_NAME_1FJBQ",
+ "glCode": "LIABILITY_MA1461237860198"
+ }
+ },
+ "currencyOptions": [{
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ }],
+ "chargeOptions": [{
+ "id": 20,
+ "name": "Share Account Activation Flat",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 1.000000,
+ "chargeTimeType": {
+ "id": 13,
+ "code": "chargeTimeType.activation",
+ "value": "Share Account Activate"
+ },
+ "chargeAppliesTo": {
+ "id": 4,
+ "code": "chargeAppliesTo.shares",
+ "value": "Shares"
+ },
+ "chargeCalculationType": {
+ "id": 1,
+ "code": "chargeCalculationType.flat",
+ "value": "Flat"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ },
+ {
+ "id": 21,
+ "name": "Share Purchase %",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 0.500000,
+ "chargeTimeType": {
+ "id": 14,
+ "code": "chargeTimeType.sharespurchase",
+ "value": "Share Purchase"
+ },
+ "chargeAppliesTo": {
+ "id": 4,
+ "code": "chargeAppliesTo.shares",
+ "value": "Shares"
+ },
+ "chargeCalculationType": {
+ "id": 2,
+ "code": "chargeCalculationType.percent.of.amount",
+ "value": "% Amount"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ }
+ ],
+ "minimumActivePeriodFrequencyTypeOptions": [{
+ "id": 0,
+ "code": "savings.lockin.sharePeriodFrequencyType.days",
+ "value": "Days"
+ }],
+ "lockinPeriodFrequencyTypeOptions": [{
+ "id": 0,
+ "code": "savings.lockin.sharePeriodFrequencyType.days",
+ "value": "Days"
+ },
+ {
+ "id": 1,
+ "code": "savings.lockin.sharePeriodFrequencyType.weeks",
+ "value": "Weeks"
+ },
+ {
+ "id": 2,
+ "code": "savings.lockin.sharePeriodFrequencyType.months",
+ "value": "Months"
+ },
+ {
+ "id": 3,
+ "code": "savings.lockin.sharePeriodFrequencyType.years",
+ "value": "Years"
+ }],
+ "accountingMappingOptions": {
+ "liabilityAccountOptions": [{
+ "id": 4,
+ "name": "ACCOUNT_NAME_1FJBQ",
+ "glCode": "LIABILITY_2T1461237838897",
+ "disabled": false,
+ "manualEntriesAllowed": true,
+ "type": {
+ "id": 2,
+ "code": "accountType.liability",
+ "value": "LIABILITY"
+ },
+ "usage": {
+ "id": 1,
+ "code": "accountUsage.detail",
+ "value": "DETAIL"
+ },
+ "description": "DEFAULT_DESCRIPTION",
+ "nameDecorated": "ACCOUNT_NAME_1FJBQ",
+ "tagId": {
+ "id": 0,
+ "isActive": false
+ }
+ }],
+ "assetAccountOptions": [{
+ "id": 1,
+ "name": "ACCOUNT_NAME_1FJBQ",
+ "glCode": "ASSET_ED1461237837829",
+ "disabled": false,
+ "manualEntriesAllowed": true,
+ "type": {
+ "id": 1,
+ "code": "accountType.asset",
+ "value": "ASSET"
+ },
+ "usage": {
+ "id": 1,
+ "code": "accountUsage.detail",
+ "value": "DETAIL"
+ },
+ "description": "DEFAULT_DESCRIPTION",
+ "nameDecorated": "ACCOUNT_NAME_1FJBQ",
+ "tagId": {
+ "id": 0,
+ "isActive": false
+ }
+ }],
+ "incomeAccountOptions": [{
+ "id": 2,
+ "name": "ACCOUNT_NAME_1FJBQ",
+ "glCode": "INCOME_9O1461237838422",
+ "disabled": false,
+ "manualEntriesAllowed": true,
+ "type": {
+ "id": 4,
+ "code": "accountType.income",
+ "value": "INCOME"
+ },
+ "usage": {
+ "id": 1,
+ "code": "accountUsage.detail",
+ "value": "DETAIL"
+ },
+ "description": "DEFAULT_DESCRIPTION",
+ "nameDecorated": "ACCOUNT_NAME_1FJBQ",
+ "tagId": {
+ "id": 0,
+ "isActive": false
+ }
+ }],
+ "equityAccountOptions": [{
+ "id": 66,
+ "name": "Equity Account",
+ "glCode": "EQUITY1",
+ "disabled": false,
+ "manualEntriesAllowed": true,
+ "type": {
+ "id": 3,
+ "code": "accountType.equity",
+ "value": "EQUITY"
+ },
+ "usage": {
+ "id": 1,
+ "code": "accountUsage.detail",
+ "value": "DETAIL"
+ },
+ "nameDecorated": "Equity Account",
+ "tagId": {
+ "id": 0,
+ "isActive": false
+ }
+ }]
+ }
+}
+
+ PUT https://Domain Name/api/v1/products/share/{productId}
+ POST shareproducts/1
+Content-Type: application/json
+Request Body:
+{
+ "description": "Share Product Description.",
+ "locale": "en",
+ "unitPrice": "5.0"
+}
+
+
+{
+ "resourceId": 1,
+ "changes": {
+ "description": "Share Product Description.",
+ "unitPrice": 5.0,
+ "locale": "en"
+ }
+}
+
+ Mandatory Fields |
| limit, offset | +
Example Requests:
+GET https://Domain Name/api/v1/products/share?limit=10&offset=0
+
+
+{
+ "totalFilteredRecords": 1,
+ "pageItems": [{
+ "id": 1,
+ "name": "Share Product",
+ "shortName": "Share Product Description",
+ "totalShares": 100
+ }]
+}
+
+ Share accounts are instances of a praticular share product created for an individual. + An application process around the creation of accounts is also supported.
+ +| Starting State | +Action | +Resultant State | +
| - | +Submit | +Submitted and pending approval | +
| Submitted and pending approval | +Reject | +Closed - Rejected | +
| Submitted and pending approval | +Approve | +Approved | +
| Approved | +Undo Approval | +Submitted and pending approval | +
| Approved | +Activate | +Active | +
Field Descriptions |
| clientId |
| The client you are creating the share account for. clientId must be provided. |
| productId |
| The id of the product used for this share account. The share account inherits the selected currency of the product and possibly other details if not overridden in the share account creation request. |
| accountNo |
| The account no. associated with this account. Is auto generated if not provided at creation time. |
| externalId |
| A place to put an external reference for this share account useful in migrations e.g. The ID another system uses. If provided, it must be unique. |
| submittedOnDate |
| submittedOnDate must be provided when initially creating share account application. locale and dateFormat parameters must be provided with this. |
| savingsAccountId |
| The saving account id in which dividend amount should be posted. |
| minimumActivePeriod |
| Optional: If provided, used along with minimumActivePeriodFrequencyType to indicate the length of time that the share account for considering dividends. e.g. 60 Days |
| minimumActivePeriodFrequencyType |
| Optional: If provided, used along with minimumActivePeriod to indicate the length of time that the share account for considering dividends. 0=Days + e.g. 60 Days |
| lockinPeriodFrequency |
| Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the shares is 'locked in' and redeems are not allowed. e.g. 6 Months |
| lockinPeriodFrequencyType |
| Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the shares is 'locked in' and redeems are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 6 Months |
| applicationDate |
| Application date on which the first shares purchase should be considerd. |
| requestedShares |
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: +
Example Requests:
+GET https://Domain Name/api/v1/accounts/share/template?clientId={clientId}
+
+{
+ "clientId": 7,
+ "clientName": "Client Name",
+ "productOptions": [{
+ "id": 1,
+ "name": "Share Product",
+ "shortName": "SP",
+ "totalShares": 100
+ }]
+}
+
+ GET https://Domain Name/api/v1/accounts/share/template?clientId={clientId}&productId={productId}
+
+{
+ "clientId": 7,
+ "clientName": "Client Name",
+ "defaultShares": 100,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "inMultiplesOf": 100,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "currentMarketPrice": 5.00,
+ "charges": [{
+ "chargeId": 20,
+ "name": "Share Account Activation Flat",
+ "chargeTimeType": {
+ "id": 13,
+ "code": "chargeTimeType.activation",
+ "value": "Share Account Activate"
+ },
+ "chargeCalculationType": {
+ "id": 1,
+ "code": "chargeCalculationType.flat",
+ "value": "Flat"
+ },
+ "amount": 1.000000,
+
+ }],
+ "lockinPeriodFrequencyTypeOptions": [{
+ "id": 0,
+ "code": "savings.lockin.sharePeriodFrequencyType.days",
+ "value": "Days"
+ },
+ {
+ "id": 1,
+ "code": "savings.lockin.sharePeriodFrequencyType.weeks",
+ "value": "Weeks"
+ },
+ {
+ "id": 2,
+ "code": "savings.lockin.sharePeriodFrequencyType.months",
+ "value": "Months"
+ },
+ {
+ "id": 3,
+ "code": "savings.lockin.sharePeriodFrequencyType.years",
+ "value": "Years"
+ }],
+ "minimumActivePeriodFrequencyTypeOptions": [{
+ "id": 0,
+ "code": "savings.lockin.sharePeriodFrequencyType.days",
+ "value": "Days"
+ }],
+ "clientSavingsAccounts": [{
+ "id": 13,
+ "accountNo": "000000013",
+ "depositType": {
+ "id": 100,
+ "code": "depositAccountType.savingsDeposit",
+ "value": "Savings"
+ }
+ }]
+}
+
+ Mandatory Fields |
| clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate |
Optional Fields |
| accountNo, externalId |
Inherited from Product (if not provided) |
| minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType | +
Minimal request: accountNo auto generated, remaining details inherited from savings product.
+POST https://Domain Name/api/v1/accounts/share
+ POST savingsaccount
+Content-Type: application/json
+Request Body:
+{
+ "clientId": "7",
+ "productId": 1,
+
+ "requestedShares": 100,
+ "externalId": "1",
+ "submittedDate": "01 May 2016",
+ "minimumActivePeriod": "1",
+ "minimumActivePeriodFrequencyType": 0,
+ "lockinPeriodFrequency": "1",
+ "lockinPeriodFrequencyType": 0,
+ "applicationDate": "01 May 2016",
+ "allowDividendCalculationForInactiveClients": true,
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
+ "charges": [{
+ "chargeId": 20,
+ "amount": 1
+ },
+ {
+ "chargeId": 21,
+ "amount": 0.5
+ },
+ {
+ "chargeId": 23,
+ "amount": 2
+ }],
+
+ "savingsAccountId": 13
+}
+
+
+{
+ "resourceId": 1
+}
+
+ Approves share application so long as its in 'Submitted and pending approval' state.
+POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=approve
+ POST shareaccount/1?command=approve
+Content-Type: application/json
+Request Body:
+{
+"note":"notes",
+"approvedDate":"01 May 2016",
+"locale":"en",
+"dateFormat":"dd MMMM yyyy"
+}
+
+
+{
+
+ "resourceId": 1,
+ "changes": {
+ "status": {
+ "id": 200,
+ "code": "shareAccountStatusType.approved",
+ "value": "Approved",
+ "submittedAndPendingApproval": false,
+ "approved": true,
+ "rejected": false,
+ "active": false,
+ "closed": false
+ },
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
+ "approvedDate": "01 May 2016"
+ }
+}
+
+ Will move 'approved' share application back to 'Submitted and pending approval' state.
+POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=undoApproval
+ POST shareaccount/1?command=undoApproval
+Content-Type: application/json
+Request Body:
+{
+}
+
+
+{
+
+ "resourceId": 1,
+ "changes": {
+ "status": {
+ "id": 100,
+ "code": "shareAccountStatusType.submitted.and.pending.approval",
+ "value": "Submitted and pending approval",
+ "submittedAndPendingApproval": true,
+ "approved": false,
+ "rejected": false,
+ "active": false,
+ "closed": false
+ },
+ "approvedOnDate": ""
+ }
+}
+
+ Rejects share application so long as its in 'Submitted and pending approval' state.
+POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=reject
+ POST shareaccount/1?command=reject
+Content-Type: application/json
+Request Body:
+{
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
+ "rejectedDate": "03 March 2013"
+}
+
+
+{
+
+ "resourceId": 1,
+ "changes": {
+ "status": {
+ "id": 500,
+ "code": "shareAccountStatusType.rejected",
+ "value": "Rejected",
+ "submittedAndPendingApproval": false,
+ "approved": false,
+ "rejected": true,
+ "active": false,
+ "closed": true
+ },
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
+ "rejectedDate": "03 March 2013",
+ "closedDate": "03 March 2013"
+ }
+}
+
+ Results in an approved share application being converted into an 'active' share account.
+POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=activate
+ POST shareaccount/1?command=activate
+Content-Type: application/json
+Request Body:
+{
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
+ "activatedDate": "01 March 2013"
+}
+
+
+{
+ "resourceId": 1,
+ "changes": {
+ "status": {
+ "id": 300,
+ "code": "shareAccountStatusType.active",
+ "value": "Active",
+ "submittedAndPendingApproval": false,
+ "approved": false,
+ "rejected": false,
+ "active": true,
+ "closed": false
+ },
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
+ "activatedDate": "01 March 2013"
+ }
+}
+
+ Results in an Activated share application being converted into an 'closed' share account.
+closedDate is closure date of share account
+Mandatory Fields |
+
| dateFormat,locale,closedDate | +
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=close
+ POST shareaccount/5?command=close
+Content-Type: application/json
+Request Body:
+{
+ "dateFormat":"dd MMMM yyyy",
+ "locale":"en",
+ "closedDate":"26 August 2013",
+ "note":"close note"
+}
+
+
+{
+
+ "resourceId":5,
+ "changes":{
+ "status":{
+ "id":600,
+ "code":"shareAccountStatusType.closed",
+ "value":"Closed",
+ "submittedAndPendingApproval":false,
+ "approved":false,
+ "rejected":false,
+ "active":false,
+ "closed":true
+ },
+ "locale":"en",
+ "dateFormat":"dd MMMM yyyy",
+ "closedOnDate":"26 August 2013",
+ "note":"close note"
+ }
+}
+
+
+ requestedDate is requsted date of share purchase
+requestedShares is number of shares to be purchase
+ +Mandatory Fields |
+
| dateFormat,locale,requestedDate, requestedShares | +
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=applyadditionalshares
+ POST shareaccount/5?command=applyadditionalshares
+Content-Type: application/json
+Request Body:
+{
+ "requestedDate": "04 May 2016",
+ "requestedShares": "10",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy"
+}
+
+
+{
+
+ "resourceId":5,
+}
+
+
+ requestedShares is Share purchase transaction ids
+ +Mandatory Fields |
+
| requestedShares | +
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=approveadditionalshares
+ POST shareaccount/5?command=approveadditionalshares
+Content-Type: application/json
+Request Body:
+{
+ "requestedShares": [{
+ "id": 34
+ }]
+}
+
+
+{
+
+ "resourceId":5,
+}
+
+
+ requestedShares is Share purchase transaction ids
+ +Mandatory Fields |
+
| requestedShares | +
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=rejectadditionalshares
+ POST shareaccount/5?command=rejectadditionalshares
+Content-Type: application/json
+Request Body:
+{
+ "requestedShares":[{"id":35}]
+}
+
+
+{
+
+ "resourceId":5,
+}
+
+
+ Results redeem some/all shares from share account.
+requestedDate is requsted date of shares redeem
+requestedShares is number of shares to be redeemed
+ +Mandatory Fields |
+
| dateFormat,locale,requestedDate,requestedShares | +
POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=redeemshares
+ POST shareaccount/5?command=redeemshares
+Content-Type: application/json
+Request Body:
+{
+ "requestedDate": "04 May 2016",
+ "requestedShares": "4",
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy"
+}
+
+
+{
+
+ "resourceId":5,
+}
+
+
+ Example Requests:
+GET https://Domain Name/api/v1/accounts/share
+
+{
+ "totalFilteredRecords": 1,
+ "pageItems": [
+ {
+ "id": 1,
+ "accountNo": "000000001",
+ "clientId": 1,
+ "clientName": "Client Name",
+ "productId": 1,
+ "productName": "Share Product Name",
+
+ "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": [
+ 2013,
+ 3,
+ 1
+ ]
+ },
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "purchasedShares" : [
+ {"id":1,
+ "purchasedDate":"01 May 2013",
+ "numberOfShares": 10,
+ "purchasedPrice": 5
+ }
+ ],
+
+ "summary": {
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ }
+ }
+ ]
+}
+
+ Example Requests :
+GET https://DomainName/api/v1/accounts/share/{accountId}
+
+{
+ "id": 2,
+ "accountNo": "000000002",
+ "savingsAccountNumber": "000000013",
+ "clientId": 7,
+ "clientName": "Client_FirstName_2KX8C Client_LastName_NWNG",
+ "productId": 1,
+ "productName": "Share Product",
+ "status": {
+ "id": 300,
+ "code": "shareAccountStatusType.active",
+ "value": "Active",
+ "submittedAndPendingApproval": false,
+ "approved": false,
+ "rejected": false,
+ "active": true,
+ "closed": false
+ },
+ "timeline": {
+ "submittedOnDate": [2016,
+ 4,
+ 1],
+ "submittedByUsername": "mifos",
+ "submittedByFirstname": "App",
+ "submittedByLastname": "Administrator",
+ "approvedDate": [2016,
+ 4,
+ 1],
+ "approvedByUsername": "mifos",
+ "approvedByFirstname": "App",
+ "approvedByLastname": "Administrator",
+ "activatedDate": [2016,
+ 4,
+ 1]
+ },
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "inMultiplesOf": 100,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "summary": {
+ "id": 2,
+ "accountNo": "000000002",
+ "totalApprovedShares": 1,
+ "totalPendingForApprovalShares": 0,
+ "productId": 1,
+ "productName": "Conflux Share Product",
+ "status": {
+ "id": 300,
+ "code": "shareAccountStatusType.active",
+ "value": "Active",
+ "submittedAndPendingApproval": false,
+ "approved": false,
+ "rejected": false,
+ "active": true,
+ "closed": false
+ },
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "inMultiplesOf": 100,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "timeline": {
+ "submittedOnDate": [2016,
+ 4,
+ 1],
+ "submittedByUsername": "mifos",
+ "submittedByFirstname": "App",
+ "submittedByLastname": "Administrator",
+ "approvedDate": [2016,
+ 4,
+ 1],
+ "approvedByUsername": "mifos",
+ "approvedByFirstname": "App",
+ "approvedByLastname": "Administrator",
+ "activatedDate": [2016,
+ 4,
+ 1]
+ }
+ },
+ "purchasedShares": [{
+ "id": 6,
+ "accountId": 2,
+ "purchasedDate": [2016,
+ 4,
+ 1],
+ "numberOfShares": 10,
+ "purchasedPrice": 0.50,
+ "status": {
+ "id": 300,
+ "code": "purchasedSharesStatusType.approved",
+ "value": "Approved"
+ },
+ "type": {
+ "id": 500,
+ "code": "purchasedSharesType.purchased",
+ "value": "Purchase"
+ },
+ "amount": 5.05,
+ "chargeAmount": 0.05,
+ "amountPaid": 5.05
+ },
+ {
+ "id": 7,
+ "accountId": 2,
+ "purchasedDate": [2016,
+ 4,
+ 21],
+ "status": {
+ "id": 300,
+ "code": "purchasedSharesStatusType.approved",
+ "value": "Approved"
+ },
+ "type": {
+ "id": 700,
+ "code": "charge.payment",
+ "value": "Charge Payment"
+ },
+ "amount": 1.00,
+ "chargeAmount": 0,
+ "amountPaid": 1.00
+ },
+ {
+ "id": 8,
+ "accountId": 2,
+ "purchasedDate": [2016,
+ 4,
+ 2],
+ "numberOfShares": 5,
+ "purchasedPrice": 0.50,
+ "status": {
+ "id": 300,
+ "code": "purchasedSharesStatusType.approved",
+ "value": "Approved"
+ },
+ "type": {
+ "id": 600,
+ "code": "purchasedSharesType.redeemed",
+ "value": "Redeem"
+ },
+ "amount": 2.45,
+ "chargeAmount": 0.05,
+ "amountPaid": 2.45
+ },
+ {
+ "id": 9,
+ "accountId": 2,
+ "purchasedDate": [2016,
+ 4,
+ 3],
+ "numberOfShares": 10,
+ "purchasedPrice": 0.50,
+ "status": {
+ "id": 300,
+ "code": "purchasedSharesStatusType.approved",
+ "value": "Approved"
+ },
+ "type": {
+ "id": 500,
+ "code": "purchasedSharesType.purchased",
+ "value": "Purchase"
+ },
+ "amount": 5.05,
+ "chargeAmount": 0.05,
+ "amountPaid": 5.05
+ },
+ {
+ "id": 10,
+ "accountId": 2,
+ "purchasedDate": [2016,
+ 4,
+ 4],
+ "numberOfShares": 5,
+ "purchasedPrice": 0.50,
+ "status": {
+ "id": 300,
+ "code": "purchasedSharesStatusType.approved",
+ "value": "Approved"
+ },
+ "type": {
+ "id": 500,
+ "code": "purchasedSharesType.purchased",
+ "value": "Purchase"
+ },
+ "amount": 2.52,
+ "chargeAmount": 0.02,
+ "amountPaid": 2.52
+ },
+ {
+ "id": 11,
+ "accountId": 2,
+ "purchasedDate": [2016,
+ 4,
+ 5],
+ "numberOfShares": 15,
+ "purchasedPrice": 0.50,
+ "status": {
+ "id": 300,
+ "code": "purchasedSharesStatusType.approved",
+ "value": "Approved"
+ },
+ "type": {
+ "id": 600,
+ "code": "purchasedSharesType.redeemed",
+ "value": "Redeem"
+ },
+ "amount": 7.35,
+ "chargeAmount": 0.15,
+ "amountPaid": 7.35
+ },
+ {
+ "id": 31,
+ "accountId": 2,
+ "purchasedDate": [2016,
+ 5,
+ 4],
+ "numberOfShares": 4,
+ "purchasedPrice": 5.00,
+ "status": {
+ "id": 300,
+ "code": "purchasedSharesStatusType.approved",
+ "value": "Approved"
+ },
+ "type": {
+ "id": 600,
+ "code": "purchasedSharesType.redeemed",
+ "value": "Redeem"
+ },
+ "amount": 19.60,
+ "chargeAmount": 0.40,
+ "amountPaid": 19.60
+ }],
+ "savingsAccountId": 13,
+ "currentMarketPrice": 5.00,
+ "lockinPeriod": 1,
+ "lockPeriodTypeEnum": {
+ "id": 0,
+ "code": "savings.lockin.sharePeriodFrequencyType.days",
+ "value": "Days"
+ },
+ "minimumActivePeriod": 1,
+ "minimumActivePeriodTypeEnum": {
+ "id": 0,
+ "code": "savings.lockin.sharePeriodFrequencyType.days",
+ "value": "Days"
+ },
+ "allowDividendCalculationForInactiveClients": true,
+ "charges": [{
+ "id": 9,
+ "chargeId": 20,
+ "accountId": 2,
+ "name": "Share Account Activation Flat",
+ "chargeTimeType": {
+ "id": 13,
+ "code": "chargeTimeType.activation",
+ "value": "Share Account Activate"
+ },
+ "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": 1.000000,
+ "amountPaid": 1.000000,
+ "amountWaived": 0,
+ "amountWrittenOff": 0,
+ "amountOutstanding": 0.000000,
+ "amountOrPercentage": 1.000000,
+ "isActive": true
+ },
+ {
+ "id": 7,
+ "chargeId": 21,
+ "accountId": 2,
+ "name": "Share Purchase %",
+ "chargeTimeType": {
+ "id": 14,
+ "code": "chargeTimeType.sharespurchase",
+ "value": "Share Purchase"
+ },
+ "chargeCalculationType": {
+ "id": 2,
+ "code": "chargeCalculationType.percent.of.amount",
+ "value": "% Amount"
+ },
+ "percentage": 1.000000,
+ "amountPercentageAppliedTo": 12.500000,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 0.120000,
+ "amountPaid": 0.120000,
+ "amountWaived": 0,
+ "amountWrittenOff": 0,
+ "amountOutstanding": 0.000000,
+ "amountOrPercentage": 1.000000,
+ "isActive": true
+ },
+ {
+ "id": 8,
+ "chargeId": 23,
+ "accountId": 2,
+ "name": "Share Redeem %",
+ "chargeTimeType": {
+ "id": 15,
+ "code": "chargeTimeType.sharesredeem",
+ "value": "Share Redeem"
+ },
+ "chargeCalculationType": {
+ "id": 2,
+ "code": "chargeCalculationType.percent.of.amount",
+ "value": "% Amount"
+ },
+ "percentage": 2.000000,
+ "amountPercentageAppliedTo": 30.000000,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 0.600000,
+ "amountPaid": 0.600000,
+ "amountWaived": 0,
+ "amountWrittenOff": 0,
+ "amountOutstanding": 0.000000,
+ "amountOrPercentage": 2.000000,
+ "isActive": true
+ }],
+ "dividends": []
+}
+
+ Share application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc
+PUT https://Domain Name/api/v1/accounts/share/{accountsId}
+ PUT shareaccount/1
+Content-Type: application/json
+No Request Body:
+{
+ "locale": "en",
+ "dateFormat": "dd MMMM yyyy",
+ "applicationDate": "01 April 2016",
+ "requestedShares": "20",
+}
+
+
+{
+
+ "resourceId": 1,
+ "changes": {
+ "dateFormat": "dd MMMM yyyy",
+ "applicationDate": "01 April 2016",
+ "requestedShares": "20",
+ "locale": "en"
+ }
+}
+
+