FTOS_CB_ApproveContract
Changes the business status of a record from the FTOS_CB_Contract entity representing a contract to Approved.
Syntax
The FTOS_CB_ApproveContract custom endpoint is called from within the callAction endpoint. Visit the callAction page for more details.
Copy
POST <host_address>/api/openApi/CallAction
Content-Type: application/json
{
"Request":{
"ActionName":"FTOS_CB_ApproveContract",
"Data": "{ \"ContractInfo\":{ \"contractID\":\"<contract_id>\", \"contractNo\":\"<contract_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\". |
| contractNo | Mandatory if contractId is not filled. The number of the contract. |
| contractId | Mandatory if contractNo is not filled. The identifier of the contract. |
Response
The response indicates the result of the code execution, specifically the result of approving a contract, as well as the contract number, contract id, its main bank account, and its approval status.
Example
To approve a contract, send the following request, changing the parameter values with your desired values.
Request
Copy
POST https://FintechOSStudio/api/openApi/CallAction
Content-Type: application/json
{
"Request":{
"ActionName":"FTOS_CB_ApproveContract",
"Data": "{ \"ContractInfo\":{ \"contractID\":\"SomeIntern06\", \"contractNo\":\"3249\"}}"
},
"ApiInfo":{
"UserName":"host",
"Token":"5b445502-f776-4e11-8b9b-8562b23b01aa"
}
}
Response
Copy
{
"UIResult": {
"NavigateToEntityPage": false,
"NavigateToEntityPageOnEdit": false,
"NavigateToEntityFormName": null,
"NavigateToEntityName": null,
"NavigateToEntityId": null,
"NavigateToEntityInsertDefaults": null,
"NavigateToUrl": null,
"DownloadFile": null,
"ReloadPage": false,
"Message": null,
"IsSuccess": false,
"Data": "{"isSuccess":true,"contractNo":"3249","contractId":"5b1ebd64-6deb-4b9d-946c-e850386d9c70","mainBankAccountNo":"FIN000001735","isApproved":true}",
"NavigateToPageNo": null
},
"Message": null,
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0
}