FTOS_CB_AddUpdateContractDocument
Adds or updates a contract document record. The set of parameters sent via the request body determines the operation performed at the database level.
This endpoint is available starting with Core Banking v3.2.
Syntax
The FTOS_CB_AddUpdateContractDocument 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_AddUpdateContractDocument",
"Data": "{
"ContractName":"<contract_number>",
"DocumentName":"<document_name_Only_for_Updates>",
"DocumentType":"<document_type>",
"Status":"",
"Description":"<document_description>",
"FileName":"<file_name_with_extension_.pdf,.doc,.docx,.els,.jpg,.jpeg,.xlsx,.dll,.ppt,.pptx,.txt,.png,.ttf,.xml>",
"Number":"<external_document_identifier_number>",
"Document":"<file_converted_to_base64>",
"DocumentSigned":"<signed_document_file_converted_to_base64>",
"FileNameSigned":"<signed_document_file_name_with_extension_.pdf,.doc,.docx,.els,.jpg,.jpeg,.xlsx,.dll,.ppt,.pptx,.txt,.png,.ttf,.xml>"
}"
},
"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, string. The contract to which the document is added. |
| DocumentType | Mandatory, string. The type of the document. Possible options from option set: FTOS_BNKAP_DocumentType. |
| DocumentName | Mandatory update requests, string. The name of the document. If you send this parameter, then Core Banking performs an update of the record with this document name. |
| Status | String. The status of the document record. |
| Description | String. The description of the document. |
| FileName | String. The name of the file containing the original document. |
| Number | String. An external identifier number of the document, if needed. |
| Document | File. The file containing the original document, converted to base64. |
| DocumentSigned | Mandatory only if the document record's status should change to Signed, file. The file containing the signed document, converted to base64. |
| FileNameSigned | Mandatory only if the document record's status should change to Signed, string. The name of the file containing the signed document. |
Response
The response indicates the result of the code execution, specifically the result of creating or updating a document record, along with the document name documentName.
Example
To create a new contract document record, the parameters should not identify a contract document already in the system. If the request also contains values for DocumentSigned and FileNameSigned, then the document's status changes to Signed.
Request
POST https://FintechOSStudio/api/openApi/CallAction
Content-Type: application/json
{
"Request":{
"ActionName":"FTOS_CB_AddUpdateContractDocument",
"Data": "{
"ContractName":"5248",
"DocumentType":"Others",
"Status":"",
"Description":"Document description",
"FileName":"Document.pptx",
"Number":"123",
"Document":"<document_file_converted_to_base64>",
"DocumentSigned":"<signed_document_file_converted_to_base64>",
"FileNameSigned":"SignedDocument.pptx"
}"
},
"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": "{"documentName":"5248 - Others"}",
"NavigateToPageNo": null
},
"Message": "[development]
=== begin message ====
Log event=[Information] source=[FTOS_CB_AddUpdateContractDocument]
UploadValidator configured values:
- IsWhiteListConfigured: True
- IsFileTypeCheckOn: False
- ValidExtensions: .pdf,.doc,.docx,.els,.jpg,.jpeg,.xlsx,.dll,.ppt,.pptx,.txt,.png,.ttf,.xml
- MaximumContentBytes:
- IsMalwareDetectionOn: False
=== end message ====
=== begin message ====
Log event=[Information] source=[FTOS_CB_AddUpdateContractDocument]
INFO [CID=9f6b4ee5-8f08-4441-ba34-79e86cc0f855] UploadValidator initialized successfully.
=== end message ====
",
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0
}
To update an existing record, send the request used for adding the document, this time mentioning the DocumentName parameter with the value returned by the add request.
Request
POST https://FintechOSStudio/api/openApi/CallAction
Content-Type: application/json
{
"Request":{
"ActionName":"FTOS_CB_AddUpdateContractDocument",
"Data": "{
"ContractName":"5248",
"DocumentName":"5248 - Others",
"DocumentType":"Others",
"Status":"",
"Description":"Document description",
"FileName":"Document.pptx",
"Number":"123",
"Document":"<file_converted_to_base64>"
}"
},
"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": "{"documentName":"5248 - Others"}",
"NavigateToPageNo": null
},
"Message": "[development]
=== begin message ====
Log event=[Information] source=[FTOS_CB_AddUpdateContractDocument]
UploadValidator configured values:
- IsWhiteListConfigured: True
- IsFileTypeCheckOn: False
- ValidExtensions: .pdf,.doc,.docx,.els,.jpg,.jpeg,.xlsx,.dll,.ppt,.pptx,.txt,.png,.ttf,.xml
- MaximumContentBytes:
- IsMalwareDetectionOn: False
=== end message ====
=== begin message ====
Log event=[Information] source=[FTOS_CB_AddUpdateContractDocument]
INFO [CID=9f6b4ee5-8f08-4441-ba34-79e86cc0f855] UploadValidator initialized successfully.
=== end message ====
",
"IsSuccess": true,
"ClientScript": null,
"Serialized": null,
"ErrorCode": 0
}