FTOS_CB_ApproveEarlyRepayment
Changes the business status of a record from the FTOS_CB_ContractEvent entity representing an early repayment event to Approved.
Syntax
The FTOS_CB_ApproveEarlyRepayment 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_ApproveEarlyRepayment",
"Data": {
"contractName":"<contract_number>",
"eventName":"<event_number>"
}
},
"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\". |
| contractName | Mandatory. The number of the contract, from the FTOS_CB_Contract entity (attribute: FTOS_CB_ContractId). |
| eventName | Mandatory. The number of the event. |
Response
The response indicates the result of the code execution, specifically the result of approving a contract early repayment event.
Example
To approve a contract early repayment event, a record in the FTOS_CB_ContractEvent entity, send the following request, changing the parameter values with your desired values.
Request
POST https://FintechOSStudio/api/openApi/CallAction
Content-Type: application/json
{
"Request": {
"ActionName":"FTOS_CB_ApproveEarlyRepayment",
"Data": {
"contractName":"2488 TL_EUR",
"eventName":"ECB 1669"
}
}
"ApiInfo":{
"UserName":"host",
"Token":"5b445502-f776-4e11-8b9b-8562b23b01aa"
}
}
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": {
"Response": "Business status changed to approved"
},
"NavigateToPageNo": null
},
"Message": "",
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0
}
Error Responses
-
Bad Request - Contract name is null- the request does not contain a contract number; -
Bad Request - Event name is null- the request does not contain a repayment amount; -
Mismatch between contract and event. Please check that event belongs to specified contract- the request contains aneventIdvalue which does not belong to the contract specified in thecontractNamevalue; -
Event is null or there are multiple events for event name- the request does not contain an event or the system contains more than one event with the same id; -
Contract is null or there are multiple contracts for contract name- the request does not contain a contract or the system contains more than one contracts with the same id.