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 Endpoint API endpoint. Visit the Endpoint API page for more details.

Copy
POST <host_address>/ftosapi/automation-processors/actions/FTOS_CB_AddUpdateContract
Content-Type: application/json
            
{
            "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>"
}

Here's a list of the available parameters:

Parameter Description
host_address URL of the FintechOS Platform server.
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, numeric. 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.
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.
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.
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.
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 - True.
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 - True.
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 - True.
isManualValue Optional, 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 Loan Management (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.
salesChannel Optional. The name of the sales channel. If null, then its value is populated with the default value stored in the DefaultSalesChannelAPI Loan Management system parameter. If a value that doesn't exist in the FTOS_CB_SallesChannel dictionary is sent, then the response displays an error message.

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