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 callAction endpoint. Visit the callAction page for more details.
POST <host_address>/api/openApi/CallAction
Content-Type: application/json
{
"Request":{
"ActionName":"FTOS_CB_AddUpdateContractCovenant",
"Data": "{ \"ContractCovenantInfo\": {\"contractNo\":\"<contract_number>\",\"covenantName\":\"<covenant_name>\", \"value\" : <covenant_value>, \"endDate\":null, \"reviewDate\": \"<review_date>\", \"reviewFrequency\": <review_frequency>, \"startEarlyTermination\":false, \"gracePeriod\": null, \"resolveDate\": null, \"blockDisbursement\": false, \"covenantResolution\":\"\"} }"
},
"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 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/api/openApi/CallAction
Content-Type: application/json
{
"Request":{
"ActionName":"FTOS_CB_AddUpdateContractCovenant",
"Data": "{ \"ContractCovenantInfo\": {\"contractNo\":\"2074 FiscoLine\",\"covenantName\":\"Borrowers should perform tax obligations\", \"value\" : 120000, \"endDate\":null, \"reviewDate\": \"2022-02-15\", \"reviewFrequency\": 12, \"startEarlyTermination\":false, \"gracePeriod\": null, \"resolveDate\": null, \"blockDisbursement\": false, \"covenantResolution\":\"\"} }"
},
"ApiInfo":{
"UserName":"host",
"Token":"e4fa9110-4cd4-46e0-a6bb-86e6de919590"
}
}
Response
{
"UIResult": {
"NavigateToEntityPage": false,
"NavigateToEntityPageOnEdit": false,
"NavigateToEntityFormName": null,
"NavigateToEntityName": null,
"NavigateToEntityId": null,
"NavigateToEntityInsertDefaults": null,
"NavigateToUrl": null,
"DownloadFile": null,
"ReloadPage": false,
"Message": null,
"IsSuccess": false,
"Data": "{\"contractCovenant\":true}",
"NavigateToPageNo": null
},
"Message": null,
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0
}