FTOS_CB_AddUpdateContractFee
Adds or updates a record in the FTOS_CB_ContractFee entity representing a contract fee, depending on the parameters received from the API call. The set of parameters sent via the request body determines the operation performed at the database level.
Syntax
The FTOS_CB_AddUpdateContractFee custom endpoint is called from within the Endpoint API endpoint. Visit the Endpoint API page for more details.
POST <host_address>/ftosapi/automation-processors/actions/FTOS_CB_AddUpdateContractFee
Content-Type: application/json
{
"contractNo": "<contract_number>",
"contractID": "<contract_id>",
"feeName": "<fee_name>",
"feeValue": <fee_value>,
"feePercent": <fee_percent>,
"feeDate": "<fee_date>"
}
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. |
| feeName | Mandatory. The name of the fee. Check the Dependencies page for more information. |
| feeValue | Mandatory only when the commission definition is marked as Value commission. The value of the fee. |
| feePercent | Mandatory only when the commission definition is marked as Percentage commission. The percent of the fee. |
| feeDate | Mandatory only when the commission is marked as One Time Payment (the commission's periodicityType = Once). The date of the fee. |
Response
The response indicates the result of the code execution, specifically the result of creating or updating a record in the FTOS_CB_ContractFee entity.
Example
To create a new fee for a specified contractNo:
-
send a
feeNamethat does not exist already on the samefeeDatefor one time payment commissions (commissions withperiodicityType = Once);
OR -
send a
feeNamethat does not exist already for a commission included in the repayment schedule.
To update an existing fee for a specified contractNo:
-
send a
feeNamethat already exists on the samefeeDatefor one time payment commissions (commissions withperiodicityType = Once);
OR -
send a
feeNamethat already exists for a commission included in the repayment schedule.
Request
POST https://FintechOSStudio/ftosapi/automation-processors/actions/FTOS_CB_AddUpdateContractFee
Content-Type: application/json
{
"contractNo": "8582",
"contractID": "",
"feeName": "Flat Up-Front",
"feeValue": 17,
"feePercent": 0.25,
"feeDate": "2022-06-24"
}
Response
{
"ContractFee": {
"FeeId": "2fcf2648-bd55-4178-8803-995432b05e8b",
"IsSuccess": true
}
}