diff --git a/api-docs/apiLive.htm b/api-docs/apiLive.htm index 9a87171cc..052ba098c 100644 --- a/api-docs/apiLive.htm +++ b/api-docs/apiLive.htm @@ -3667,10 +3667,26 @@
Mandatory Fields |
| clientId, productId, submittedOnDate |
Optional Fields |
| accountNo, externalId, fieldOfficerId |
Inherited from Product (if not provided) |
| nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, allowOverdraft, overdraftLimit, withHoldTax | +
Minimal request: accountNo auto generated, remaining details inherited from savings product.
+POST https://Domain Name/api/v1/self/savingsaccounts
+ POST self/savingsaccount
+Content-Type: application/json
+Request Body:
+{
+ "productId":3,
+ "clientId":"14",
+ "locale":"en",
+ "dateFormat":"dd MMMM yyyy",
+ "submittedOnDate":"09 July 2018"
+}
+
+
+{
+ "officeId":1,
+ "clientId":14,
+ "savingsId":10,
+ "resourceId":10
+}
+
+
+ Full request:Below details override details from savings product (except currency).
+POST self/savingsaccount
+Content-Type: application/json
+Request Body:
+{
+ "productId":1,
+ "nominalAnnualInterestRate":9.5,
+ "minRequiredOpeningBalance":1000,
+ "lockinPeriodFrequency":1,
+ "withdrawalFeeForTransfers":true,
+ "allowOverdraft":true,
+ "overdraftLimit":"10000",
+ "nominalAnnualInterestRateOverdraft":"5",
+ "minOverdraftForInterestCalculation":"1000",
+ "enforceMinRequiredBalance":false,
+ "withHoldTax":false,
+ "interestCompoundingPeriodType":1,
+ "interestPostingPeriodType":4,
+ "interestCalculationType":1,
+ "interestCalculationDaysInYearType":365,
+ "lockinPeriodFrequencyType":1,
+ "fieldOfficerId":1,
+ "externalId":"126",
+ "submittedOnDate":"11 July 2018",
+ "locale":"en",
+ "dateFormat":"dd MMMM yyyy",
+ "monthDayFormat":"dd MMM",
+ "charges":[
+ {
+ "chargeId":3,
+ "amount":2
+ }
+ ],
+ "clientId":"14"
+}
+
+
+{
+ "officeId":1,
+ "clientId":14,
+ "savingsId":9,
+ "resourceId":9
+}
+
+ Savings 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/self/savingsaccounts/{accountsId}
+ PUT self/savingsaccounts/1
+Content-Type: application/json
+No Request Body:
+{
+ "productId":1,
+ "clientId":14
+}
+
+
+{
+ "officeId": 1,
+ "clientId": 14,
+ "savingsId": 11,
+ "resourceId": 11,
+ "changes": {
+ "productId": 1
+ }
+}
+
+ Example Requests:
+GET https://Domain Name/api/v1/self/savingsaccounts/template?clientId={clientId}
+
+{
+ "clientId": 14,
+ "clientName": "Bheem",
+ "withdrawalFeeForTransfers": false,
+ "allowOverdraft": false,
+ "enforceMinRequiredBalance": false,
+ "withHoldTax": false,
+ "isDormancyTrackingActive": false,
+ "productOptions": [
+ {
+ "id": 1,
+ "name": "Voluntary savings",
+ "withdrawalFeeForTransfers": false,
+ "allowOverdraft": false,
+ "enforceMinRequiredBalance": false,
+ "withHoldTax": false
+ },
+ {
+ "id": 2,
+ "name": "Savings",
+ "withdrawalFeeForTransfers": false,
+ "allowOverdraft": false,
+ "enforceMinRequiredBalance": false,
+ "withHoldTax": false
+ },
+ {
+ "id": 3,
+ "name": "Savings Product",
+ "withdrawalFeeForTransfers": false,
+ "allowOverdraft": false,
+ "enforceMinRequiredBalance": false,
+ "withHoldTax": false
+ }
+ ],
+ "chargeOptions": [
+ {
+ "id": 3,
+ "name": "Saving Accounts Processing Fee",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 2,
+ "chargeTimeType": {
+ "id": 3,
+ "code": "chargeTimeType.savingsActivation",
+ "value": "Savings Activation"
+ },
+ "chargeAppliesTo": {
+ "id": 2,
+ "code": "chargeAppliesTo.savings",
+ "value": "Savings"
+ },
+ "chargeCalculationType": {
+ "id": 1,
+ "code": "chargeCalculationType.flat",
+ "value": "Flat"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ }
+ ]
+}
+
+ GET https://Domain Name/api/v1/self/savingsaccounts/template?clientId={clientId}&productId={productId}
+
+{
+ "clientId": 14,
+ "clientName": "Bheem",
+ "savingsProductId": 2,
+ "savingsProductName": "Savings",
+ "timeline": {},
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "inMultiplesOf": 1,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "nominalAnnualInterestRate": 5,
+ "interestCompoundingPeriodType": {
+ "id": 1,
+ "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
+ "value": "Daily"
+ },
+ "interestPostingPeriodType": {
+ "id": 4,
+ "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
+ "value": "Monthly"
+ },
+ "interestCalculationType": {
+ "id": 1,
+ "code": "savingsInterestCalculationType.dailybalance",
+ "value": "Daily Balance"
+ },
+ "interestCalculationDaysInYearType": {
+ "id": 365,
+ "code": "savingsInterestCalculationDaysInYearType.days365",
+ "value": "365 Days"
+ },
+ "minRequiredOpeningBalance": 1000,
+ "withdrawalFeeForTransfers": false,
+ "allowOverdraft": false,
+ "enforceMinRequiredBalance": false,
+ "withHoldTax": false,
+ "isDormancyTrackingActive": false,
+ "charges": [],
+ "productOptions": [
+ {
+ "id": 1,
+ "name": "Voluntary savings",
+ "withdrawalFeeForTransfers": false,
+ "allowOverdraft": false,
+ "enforceMinRequiredBalance": false,
+ "withHoldTax": false
+ },
+ {
+ "id": 2,
+ "name": "Savings",
+ "withdrawalFeeForTransfers": false,
+ "allowOverdraft": false,
+ "enforceMinRequiredBalance": false,
+ "withHoldTax": false
+ },
+ {
+ "id": 3,
+ "name": "Savings Product",
+ "withdrawalFeeForTransfers": false,
+ "allowOverdraft": false,
+ "enforceMinRequiredBalance": false,
+ "withHoldTax": false
+ }
+ ],
+ "fieldOfficerOptions": [
+ {
+ "id": 1,
+ "firstname": "Aliya",
+ "lastname": "A",
+ "displayName": "A, Aliya",
+ "officeId": 1,
+ "officeName": "Head Office",
+ "isLoanOfficer": true,
+ "isActive": true
+ }
+ ],
+ "interestCompoundingPeriodTypeOptions": [
+ {
+ "id": 1,
+ "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily",
+ "value": "Daily"
+ },
+ {
+ "id": 4,
+ "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly",
+ "value": "Monthly"
+ },
+ {
+ "id": 5,
+ "code": "savings.interest.period.savingsCompoundingInterestPeriodType.quarterly",
+ "value": "Quarterly"
+ },
+ {
+ "id": 6,
+ "code": "savings.interest.period.savingsCompoundingInterestPeriodType.biannual",
+ "value": "Semi-Annual"
+ },
+ {
+ "id": 7,
+ "code": "savings.interest.period.savingsCompoundingInterestPeriodType.annual",
+ "value": "Annually"
+ }
+ ],
+ "interestPostingPeriodTypeOptions": [
+ {
+ "id": 4,
+ "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly",
+ "value": "Monthly"
+ },
+ {
+ "id": 5,
+ "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly",
+ "value": "Quarterly"
+ },
+ {
+ "id": 6,
+ "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.biannual",
+ "value": "BiAnnual"
+ },
+ {
+ "id": 7,
+ "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual",
+ "value": "Annually"
+ }
+ ],
+ "interestCalculationTypeOptions": [
+ {
+ "id": 1,
+ "code": "savingsInterestCalculationType.dailybalance",
+ "value": "Daily Balance"
+ },
+ {
+ "id": 2,
+ "code": "savingsInterestCalculationType.averagedailybalance",
+ "value": "Average Daily Balance"
+ }
+ ],
+ "interestCalculationDaysInYearTypeOptions": [
+ {
+ "id": 360,
+ "code": "savingsInterestCalculationDaysInYearType.days360",
+ "value": "360 Days"
+ },
+ {
+ "id": 365,
+ "code": "savingsInterestCalculationDaysInYearType.days365",
+ "value": "365 Days"
+ }
+ ],
+ "lockinPeriodFrequencyTypeOptions": [
+ {
+ "id": 0,
+ "code": "savings.lockin.savingsPeriodFrequencyType.days",
+ "value": "Days"
+ },
+ {
+ "id": 1,
+ "code": "savings.lockin.savingsPeriodFrequencyType.weeks",
+ "value": "Weeks"
+ },
+ {
+ "id": 2,
+ "code": "savings.lockin.savingsPeriodFrequencyType.months",
+ "value": "Months"
+ },
+ {
+ "id": 3,
+ "code": "savings.lockin.savingsPeriodFrequencyType.years",
+ "value": "Years"
+ }
+ ],
+ "withdrawalFeeTypeOptions": [
+ {
+ "id": 1,
+ "code": "savingsWithdrawalFeesType.flat",
+ "value": "Flat"
+ },
+ {
+ "id": 2,
+ "code": "savingsWithdrawalFeesType.percent.of.amount",
+ "value": "% of Amount"
+ }
+ ],
+ "chargeOptions": [
+ {
+ "id": 3,
+ "name": "Saving Accounts Processing Fee",
+ "active": true,
+ "penalty": false,
+ "currency": {
+ "code": "USD",
+ "name": "US Dollar",
+ "decimalPlaces": 2,
+ "displaySymbol": "$",
+ "nameCode": "currency.USD",
+ "displayLabel": "US Dollar ($)"
+ },
+ "amount": 2,
+ "chargeTimeType": {
+ "id": 3,
+ "code": "chargeTimeType.savingsActivation",
+ "value": "Savings Activation"
+ },
+ "chargeAppliesTo": {
+ "id": 2,
+ "code": "chargeAppliesTo.savings",
+ "value": "Savings"
+ },
+ "chargeCalculationType": {
+ "id": 1,
+ "code": "chargeCalculationType.flat",
+ "value": "Flat"
+ },
+ "chargePaymentMode": {
+ "id": 0,
+ "code": "chargepaymentmode.regular",
+ "value": "Regular"
+ }
+ }
+ ]
+}
+
+