FTOS_CB_UpdateContractAfterApproval
Updates the contract's information (the direct debit settlement account behavior, for now, turning on or off the automated settlement functionality) after the contract was approved. The update is not performed if the contract has any contract versions in Draft status.
This endpoint is available starting with version 3.3.
Syntax
The FTOS_CB_UpdateContractAfterApproval 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_UpdateContractAfterApproval",
"Data": "{"contractInfo" : {
"contractNo":"<contract_number>",
"contractId": "<contract_id>",
"directDebitSettlementAcc": "<true_or_false>"}
}"
},
"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 the value for contractId is not specified. The number of the contract. |
| contractId | Mandatory if the value for contractNo is not specified. The internal id of the contract. |
| contractNo | Mandatory. The number of the contract. |
Response
The response indicates the result of the code execution, specifically the result of updating a contract record.
Example
To update an approved contract's direct debit settlement account's behavior, turning on or off the automated settlement functionality, send the desired contractNo or contractId, following this example:
Request
POST https://FintechOSStudio/api/openApi/CallAction
Content-Type: application/json
{
"Request":{
"ActionName":"FTOS_CB_UpdateContractAfterApproval",
"Data": "{
"ContractInfo": {
"contractNo": "7044",
"contractId": "",
"directDebitSettlementAcc": "false"
}
}"
},
"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": {
"contractIdentifier":"7044"
},
"NavigateToPageNo": null
},
"Message": null,
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0
}
Errors Messages
Bad Request - directDebitSettlementAcc value must be 'true' or 'false'! - The directDebitSettlementAcc parameter's value is incorrect, it must be either true or false.
Bad Request - contract has draft version. Update is not possible! - The update is not performed because the contract has a contract version in Draft status.