FTOS_CB_NewContractVersion

Creates a new version in Contract Version Draft status of an approved record in the FTOS_CB_Contract entity, representing a new version of an existing contract. The new repayment schedule is also calculated and returned along with the response of the call. The set of parameters sent via the request body determines the operation performed at the database level.

NOTE  
You can only create new versions for contracts with the Approved status.

You can choose to send within the request only the parameters of the contract which must be changed, not all the existing parameters whose values remain unchanged.

Syntax

The FTOS_CB_NewContractVersion 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"
    { "contractNo":"<contract_number>"
      "internalId":"<internal_contract_id>",
      "totalInterestRate":"<total_interest_rate_of_the_contract>",
      "bankAccountNo":"<bank_account_number>",
      "amountDue":"<contract_due_amount>",
      "productInterest":"<banking_product_interest_rate>",
      "referenceRateDate":"<date_of_interest_reference_rate_yyyy_mm_dd>",
      "referenceRate":"<interest_reference_rate>",
      "margin":"<contract_margin>",
      "paymentScheduleType":"<contract_repayment_schedule_type>",
      "periodicityType":"<contract_schedule_periodicity_type>",
      "contractPeriod":"<contract_period>",
      "installmentDay":"<installement_day_specified_in_schedule>",
      "installmentMethod":"<installment_method>",
      "tenor":"<contract_tenor>",
      "destinationBankAccount":"<destination_bank_account_number>",
      "reviewInterestDate":"<date_for_reviewing_interest_rate_yyyy_mm_dd>",
      "maxDisburseDate":"<maximum_disbursement_date_yyyy_mm_dd>",
      "startDateForUnusage":"<starting_date_for_unusage_yyyy_mm_dd>",
      "unusageCommissionPercent":"<percentage_for_unusage_commission>",
      "principalGracePeriod":"<pricipal_grace_period>",
      "interestGracePeriod":"<interest_grace_period>",
    } 
}"
    },
    "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 Mandatory if you have not completed the internalId. The number of the contract. If you fill and send this parameter with a value that already exists in the system, the current contract version is updated.
internalId Mandatory if you have not completed the contractNo. The internal identifier of the contract. If you fill and send this parameter with a value that already exists in the system, the current contract version is updated.
totalInterestRate Mandatory. The total interest rate of the contract.
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 or Current Account with Overdraft. The contract's repayment schedule type.
periodicityType Mandatory only when productType = Term Loan or Mortgage or Overdraft or Current Account with Overdraft. The contract's schedule periodicity type.
contractPeriod Mandatory only when productType = Term Loan or Mortgage or Overdraft or Current Account with Overdraft. The contract period.
installmentDay Mandatory only when productType = Term Loan or Mortgage or Overdraft or Current Account with Overdraft. The installment day specified in the repayment schedule.
installmentMethod Mandatory only when productType = Term Loan or Mortgage or Overdraft or Current Account with Overdraft. The installment method specified in the repayment schedule.
tenor Mandatory only when productType = Term Loan or Mortgage or Overdraft or Current Account with Overdraft. The length of time remaining before the contract expires.
advanceAmountPercentage For productType = Term Loan, specify the advance amount percentage, if it should be changed and you haven't specified the advanceAmountValue.
advanceAmountValue For productType = Term Loan, specify the specify the advance amount value, if it should be changed and you haven't specified the advanceAmountPercentage.
destinationBankAccount The destination bank account number.
reviewInterestDate The date when the interest should be reviewed.
maxDisburseDate The maximum disbursement date for the money.
startDateForUnusage The date when the unused amount starts to be calculated.
unusageCommissionPercent The percent of the unusage commission.
principalGracePeriod The principal's grace period.
interestGracePeriod The interest's grace period.
expireDateForOverdraft For productType = Current Account with Overdraft, specify the expiry date for the overdraft associated to the current account, if it should be changed.
overdraftLimitAmount For productType = Current Account with Overdraft, specify the limit amount for the overdraft associated to the current account, if it should be changed.
overdraftInterest For productType = Current Account with Overdraft, specify the interest applicable to the amount of the overdraft associated to the current account, if it should be changed.
overdraftReferenceRateDate For productType = Current Account with Overdraft, specify the overdraft interest's reference rate date, if it should be changed.
overdraftReferenceRate For productType = Current Account with Overdraft, specify the overdraft interest's reference rate, if it should be changed.
overdraftMargin For productType = Current Account with Overdraft, specify the overdraft interest's margin, if it should be changed.
overdraftTotalInterestRate For productType = Current Account with Overdraft, specify the overdraft total interest rate, if it should be changed.

Response

The response indicates the result of the code execution, specifically the result of creating a new contract version in Contract Version Draft status of a record in the FTOS_CB_Contract entity. If the record is created or updated successfully, its contractIdentifier is returned. The recalculated payment schedule is also returned when productType = Term Loan or Mortgage, Overdraft and Current Account with Overdraft.

Example