FTOS_CB_AddUpdateContract

Adds or updates a record in the FTOS_CB_Contract entity representing a customer's contract. The set of parameters sent via the request body determines the operation performed at the database level.

Syntax

The FTOS_CB_AddUpdateContract custom endpoint is called from within the callAction endpoint. Visit the callAction page for more details.

Copy
POST <host_address>/api/openApi/CallAction
Content-Type: application/json
            
{
    "Request":{
        "ActionName":"FTOS_CB_AddUpdateContract",
        "Data": "{ 
            "ContractInfo":
                {"contractId":"<contract_id>",
                "customerNo":"<customer_number>",
                "productCode":"<banking_product_code>",
                "startDate":"<contract_start_date>",
                "totalInterestRate":"<total_interest_rate>",
                "firstDueDate":"<first_due_date>",
                "maturityDate":"<contract_maturity_date>"
                }
        }",
    "ApiInfo":{
        "UserName":"<user_name>",
        "Token":"<access_token>"
    }
}

Here's a list of the available parameters:

Parameter Description
host_address URL of the High Productivity Fintech Infrastructure server.
access_token Access token used to connect to the API endpoint. For details, see GetToken.
user_name The username of an existing user account on the High Productivity Fintech Infrastructure, previously used to get the access token.
Data Key-value pairs of any input parameters to be passed to the internal endpoint in JSON format. Double quotes that enclose string parameter values must be escaped with backslash characters, eg.: \"string value\".
contractNo The number of the contract. If you fill and send this parameter, the existing contract is updated.
contractId The identifier of the contract. If you fill and send this parameter, the existing contract is updated.
customerNo Mandatory. The number of the customer, customerNo in the Account entity.

productCode The code of the banking product.
startDate Mandatory. The start date of the contract.
totalInterestRate Mandatory. The total interest rate of the contract.
firstDueDate Mandatory when productType = Term Loan or Mortgage or Overdraft, and if installmentDay and contractPeriod are not sent within the request. The first due date of the contract's repayment schedule. If you select the Due Day, then this field is automatically completed as calculated based on the information within the Due Date, Periodicity Type and Installment Method, and it is not editable.
maturityDate Mandatory only when productType = Term Loan or Mortgage or Overdraft, and if installmentDay and contractPeriod are not sent within the request. The contract's maturity date.
bankAccountNo Mandatory only when productType = Term Loan or Mortgage or Overdraft. The bank account number specified in the contract.
amountDue Mandatory only when productType = Term Loan or Mortgage or Overdraft. The contract's due amount.
productInterest Mandatory only when productType = Term Loan or Mortgage or Overdraft. The banking product's interest rate.
referenceRateDate Mandatory only when interestType = Variable. The interest's reference rate date.
referenceRate Mandatory only when interestType = Variable. The interest's reference rate.
margin Mandatory only when interestType = Variable. The interest's margin.
paymentScheduleType Mandatory only when productType = Term Loan or Mortgage or Overdraft. The contract's repayment schedule type.
periodicityType Mandatory only when productType = Term Loan or Mortgage or Overdraft. The contract's schedule periodicity type.
contractPeriod Mandatory only when productType = Term Loan or Mortgage or Overdraft. The contract period.
installmentDay Mandatory only when productType = Term Loan or Mortgage or Overdraft. The installment day specified in the repayment schedule.
installmentMethod Mandatory only when productType = Term Loan or Mortgage or Overdraft. The installment method specified in the repayment schedule.
tenor Mandatory only when productType = Term Loan or Mortgage or Overdraft, and if installmentDay and contractPeriod are not sent within the request. The length of time remaining before the contract expires.
managingBranch The branch of the bank which manages the contract.
destinationBankAccount The destination bank account number.
reviewInterestDate The date when the interest should be reviewed. This date must be between Activation Date and Maturity Date, otherwise, an error is displayed.
maxDisburseDate The maximum disbursement date for the money.
startDateForUnusage The date when the unused amount starts to be calculated.
unusageCommissionPercent The percent of the commission applicable for unused amount.
principalGracePeriod The principal's grace period.
interestGracePeriod The interest's grace period.
minInterestRate The minimum interest rate applicable for the contract.
overdraftLimitAmount Mandatory only when productType = Bank Account and allowOverdraft = True. The overdraft limit amount of the contract. The minimum value can be 0.
expireDateForOverdraft Mandatory only when productType = Bank Account and allowOverdraft = True. The expiration date of the overdraft functionality for the current account.
overdraftReviewInterestDate Optional, for contracts with productType = Bank Account and allowOverdraft = True, if overdraftLimitAmount >0. The date for reviewing the overdraft interest rate.
overdraftInterest Mandatory only when productType = Bank Account and allowOverdraft = True. The interest applicable to the overdraft amount of the contract.
overdraftTotalInterestRate Mandatory only when productType = Bank Account and allowOverdraft = True. The total interest rate applicable to the overdraft amount of the contract.
overdraftMargin Mandatory only when productType = Bank Account and allowOverdraft = True and InterestTypeId = Variable. The margin of the overdraft.
overdraftReferenceRateDate Mandatory only when productType = Bank Account and allowOverdraft = True and InterestTypeId = Variable. The date of the overdraft reference rate.
overdraftReferenceRate Mandatory only when productType = Bank Account and allowOverdraft = True and InterestTypeId = Variable. The reference rate of the overdraft.
startDateForUnusage Mandatory only when productType = Bank Account and allowOverdraft = True. The date when the unused amount from the overdraft starts to accumulate penalty interest.
advanceAmountValue The advance amount value for a loan contract. If the advance amount is not sent within the request, then at the contract level the advance value is taken from the Minimum Advance field at the banking product level. This parameter is available starting with Core Banking version 21.1.1001.
advanceAmountPercentage The advance percentage for a loan contract. If the advance percentage is not sent within the request, then at the contract level the advance value is taken from the Minimum Advance field at the banking product level. This parameter is available starting with Core Banking version 21.1.1001.
autoDisbursement A boolean value that specifies whether a contract is with automatic disbursement (for True value) or not (for False value). Not mandatory, used for productType = Term Loan or Mortgage or Overdraft. If you don't send a value for this parameter via the request, its value is taken from the contract's banking product level, using the product's autoDisbursement attribute. The parameter's value is automatically set to True for contracts with advanceAmountValue or advanceAmountPercentage >0, regardless of the value you send via the request.
This parameter is available starting with Core Banking version 3.1.
interestCommissionItem It represents the interests & commissions item's name attached to the banking product within the Dimensions tab's > Interests & Commissions section. Mandatory if the banking product has more than one such item.
This parameter is available starting with Core Banking version 3.1.
isCloseAutomatic A boolean value that specifies whether a contract is with automatic closure or not. This can only be used for contracts based on banking products with closingFlexible - Tue.
This parameter is available starting with Core Banking version 3.2.
isCloseRealTime A boolean value that specifies whether a contract should be closed in real-time or not. This can only be used for contracts based on banking products with closingFlexible - Tue.
This parameter is available starting with Core Banking version 3.2.
bufferDays The number of days set up as buffer to close the contract. This can only be used for contracts based on banking products with closingFlexible - Tue.
This parameter is available starting with Core Banking version 3.2.
isManualValue Not mandatory, used for productType = Term Loan. A boolean value that specifies whether the values are manually entered for royalty or principal, thus overriding the values automatically calculated by Core Banking (for True value) or not (for False value). If the parameter is not sent or sent without value, its value is set to False by default.
If isManualValue = True, installmentValue or principalValue must have a value >0, but not greater than the loan amount. If isManualValue = False, don't send any value for installmentValue or principalValue.
This parameter is available starting with Core Banking version 3.3.

Response

The response indicates the result of the code execution, specifically the result of creating or updating a record in the FTOS_CB_Contract entity. If the record is created or updated successfully, the contract number and id are returned.

Example