FTOS_CB_AddUpdateContractCovenant
Adds or updates a record in the FTOS_CB_ContractCovenant entity representing a contract covenant. The set of parameters sent via the request body determines the operation performed at the database level.
Syntax
The FTOS_CB_AddUpdateContractCovenant 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_AddUpdateContractCovenant
Content-Type: application/json
{
"contractNo": "<contract_number>",
"covenantName": "<covenant_name>",
"covenantId": "<covenant_id>",
"value": <covenant_value>,
"endDate": "<covenant_end_date>",
"reviewDate": "<covenant_review_date>",
"reviewFrequency": <review_frequency>,
"startEarlyTermination": <true_or_false>,
"gracePeriod": <number_of_grace_periods_for_covenant>,
"resolveDate": "<covenant_resolve_date>",
"blockDisbursement": <true_or_false>,
"covenantResolution": "<covenant_resolution>"
}
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. |
| covenantName | Mandatory. The name of the covenant. |
| value | The value of the covenant. |
| endDate | The last date when the product/ account is available. |
| reviewDate | Mandatory. The date of the review for the covenant. |
| reviewFrequency | Mandatory. The frequency of the review (in months). |
| startEarlyTermination | Possible values: true or false. If true, then the system starts the early termination of the contract. |
| gracePeriod | The grace period in months. |
| resolveDate | The date when the covenant is achieved. |
| blockDisbursement | Possible values: true or false. If true, the system blocks any further disbursements if the covenant is not achieved after end date. |
| covenantResolution | The resolution of the covenant for the review process. Check the Dependencies page for possible values. |
Response
The response indicates the result of the code execution, specifically the result of creating or updating a record in the FTOS_CB_ContractCovenant entity. If the record is created or updated successfully, then contractCovenant is returned as true.
Example
If the covenantName sent along with the request is already added for the specified contractNo, the existing record is updated. If the specified covenantName does not exist for this contractNo, a new record is created.
Request
POST https://FintechOSStudio/ftosapi/automation-processors/actions/FTOS_CB_AddUpdateContractCovenant
Content-Type: application/json
{
"contractNo": "8585",
"covenantName": "Borrowers should perform tax obligations",
"covenantId": "7cacab40-a0f7-43dd-ba06-88a2b26d2e3f",
"value": 90000,
"endDate": "2025-03-22",
"reviewDate": "2023-02-15",
"reviewFrequency": 12,
"startEarlyTermination": false,
"gracePeriod": 0,
"resolveDate": "2025-03-22",
"blockDisbursement": false,
"covenantResolution": ""
}
Response
{
"ContractCovenant": {
"Id": "7cacab40-a0f7-43dd-ba06-88a2b26d2e3f",
"IsSuccess": true
}
}