FTOS_CB_AddUpdateDepositLiquidation
Adds or updates a contract event record representing a deposit liquidation. The set of parameters sent via the request body determines the operation performed at the database level.
Syntax
The FTOS_CB_AddUpdateDepositLiquidation 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_AddUpdateDepositLiquidation
Content-Type: application/json
{
"eventName":"<event_number>",
"contractName":"<contract_number>",
"destinationAccount":"<destination_bank_account_number>",
"externalIdentifier": "<external_identifier>"
}
Here's a list of the available parameters:
| Parameter | Description |
|---|---|
| host_address | URL of the FintechOS Platform server. |
| contractName | Mandatory. The number of the contract. |
| eventName | Mandatory only for update operations. Do not send it for add operations. The number of the deposit liquidation transaction. |
| destinationAccount | Optional, string. The destination bank account number. |
| externalIdentifier | Optional, string. The external identifier of the transaction. |
Response
The response indicates the result of the code execution, specifically the result of creating or updating a contract event record, along with event number, value, and interest to recover.
Example
To create a new contract event record, do not send the eventName with the request.
Request
POST https://FintechOSStudio/ftosapi/automation-processors/actions/FTOS_CB_AddUpdateDepositLiquidation
Content-Type: application/json
"{
"eventName":"",
"contractName":"8628",
"destinationAccount":"FIN000002486",
"externalIdentifier": "FROM API"
}"
Response
{
"isSuccess":true,
"eventNo":"ECB6350",
"eventValue":5034.1,
"interestToRecover":0.0
}
To update an existing contract event record, the eventName must be sent with the request.
Request
POST https://FintechOSStudio/ftosapi/automation-processors/actions/FTOS_CB_AddUpdateDepositLiquidation
Content-Type: application/json
"{
"eventName":"ECB6350",
"contractName":"8628",
"destinationAccount":"FIN000009999",
"externalIdentifier": "Updated-FROM API"
}"
Response
{
"isSuccess":true,
"eventNo":"ECB6350",
"eventValue":5034.1,
"interestToRecover":0.0
}
Error Responses
-
Bad Request - event must be in status draft- you cannot update already approved contract event records, the sent event must be inDraftstatus; -
Bad Request - contractName is null- the request does not contain a contract number; -
Bad Request - destinationAccount is null- the request does not contain a destination account number; -
Bad Request - no bank account found for specified name:- the destination account number sent along with the request was not found in the system; -
Bad Request - no contract found for name:- the contract number sent along with the request was not found in the system.