FTOS_CB_AddContractTopUp
Adds a new record to the FTOS_CB_ContractEvent entity representing a contract top up event.
Syntax
The FTOS_CB_AddContractTopUp 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_AddContractTopUp",
"Data": "{ "ContractTopUp": { "contractNo":"<contract_number>","contractID":null,"eventValue":"<top_up_event_value>","sourceAccount":"<source_account_number>","externalIdentifier":"<the_external_identifier_of_the_transaction>","transactionTypeGLIdentifier":"<the_GL_transaction_type_identifier>"} }"
},
"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. |
| eventValue | Mandatory. The value of the top up event. |
| sourceAccount | Mandatory. The source account number for the top up amount. This can be the self account number from the banking product definition. |
| externalIdentifier | Optional, string. The external identifier of the transaction. This parameter is available starting with version 3.2. |
| transactionTypeGLIdentifier | Optional, string. Used to differentiate between GL transactions returned for a specific contract event process type. If not set, its default value is Top Up Account. This parameter is available starting with version 3.2. |
Response
The response indicates the result of the code execution, specifically the result of creating a record in the FTOS_CB_ContractEvent entity . If the record is created successfully, its ContractTopUpIdentifier is returned.
Example
To create a new record, fill the eventValue and sourceAccount parameters and one of the contractNo or contractId parameters.
Request
Copy
POST https://FintechOSStudio/api/openApi/CallAction
Content-Type: application/json
{
"Request":{
"ActionName":"FTOS_CB_AddContractTopUp",
"Data": "{ "ContractTopUp": { "contractNo":"2252 TL_EUR","contractID":null,"eventValue":900.00, "sourceAccount": "12345678","externalIdentifier":"TR99990077693"} }"
},
"ApiInfo":{
"UserName":"host",
"Token":"e4fa9110-4cd4-46e0-a6bb-86e6de919590"
}
}
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": "{\"ContractTopUpIdentifier\":\"ECB 2233\"}",
"NavigateToPageNo": null
},
"Message": null,
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0
}