FTOS_CB_AddUpdateContractInterestRate

Adds or updates a record in the Contract Interest Rate entity representing one or more contract interest rates, depending on the parameters received from the API call. First, it performs a series of validations. If passed, then it deletes all the un-notified interest rates (and penalty rates, if such penalties were sent) for the contract and inserts the interest rates (and the penalty rates) sent with the request.

This endpoint is available starting with Loan Management v4.1.

Syntax

The FTOS_CB_AddUpdateContractInterestRate 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_AddUpdateContractInterestRate
Content-Type: application/json

{
    "contractNo": "<contract_number>",
    "contractID": "<contract_identifier>",
    "interestRates"
        [
            {
            "interestName": "<interest_name>",
            "interestCode": "<interest_code>",
            "startDate":"<interest_start_date_yyyy_mm_dd>",
            "jsonInputFormula": {
              "interestInput": {
                    "<formula_Input1>": "<formula_input1_value>",
                    "<formula_Input2>": <formula_input2_value>,
                    "<formula_Input3>": <formula_input3_value>
              }
                },
            "endDate":"<interest_end_date_yyyy_mm_dd>",
            "startTenor":<interest_applicable_starting_with_tenor_number>,
            "endTenor":<interest_applicable_until_tenor_number>,
            "fixedRate":<interest_fixed_rate_value>,
            "margin":<interest_margin_value>,
            "isForOverdraft":<true_or_false>,
            "isPenalty":<true_or_false>
          }
      ]
}

Here's a list of the available parameters:

Parameter Description
host_address URL of the FintechOS Platform server.
contractNo Mandatory if contractID is not filled. The number of the contract.
contractID Mandatory if contractNo is not filled. The identifier of the contract.
interestRates Mandatory. Array of Interest Rates details (JSON) Object. It contains the following parameters:
-- interestName Mandatory, string. The name of the interest rate.
-- interestCode Mandatory, string. The code of the interest rate.
-- startDate Mandatory, string. The start date of the interest rate, in yyyy-mm-dd format.
-- endDate Mandatory, string. The end date of the interest rate, in yyyy-mm-dd format.
-- startTenor Mandatory, integer. The interest rate is applicable starting with this installment number.
-- endTenor Mandatory, integer. The interest rate is applicable until this installment number.
-- fixedRate Mandatory if margin was not specified, numeric. The fixed rate of the interest, if it's a fixed interest.
-- margin Mandatory if fixedRate was not specified, numeric. The margin of the interest, if it's a variable interest.
-- isPenalty Optional, boolean. If true, then the interest rate is a penalty interest.
-- isForOverdraft Optional, boolean. If true, then the interest rate is an overdraft interest.
-- jsonInputFormula Mandatory only if the formula mapping was not configured in the Banking Product Factory within the Product Formula Engine tab and the Interest is Not Negotiable. If the mapping exists, then the calculations are performed using the configured input parameters.
If the interest is Negotiable, the value of the interest = fixedRate and no calculations are performed.

Response

The response indicates the result of the code execution, specifically the result of creating or updating a record in the Contract Interest Rate entity, as well as array of Interest Rates overview json objects, with some information about the created / updated interest rates on the contract.

Copy
{
  "ContractInterestRates": [
    {
      "InterestName": "<interest_name>",
      "TotalInterestRate": <calculated_total_interest_rate>,
      "IsForOverdraft": <true_or_false>,
      "IsPenalty": <true_or_false>
    }
  ],
  "IsSuccess": <true_or_false>
}

Example

Validations

The endpoint performs the add / update operation for the interest rates at the contract level if all the following conditions are met:

Error Messages