Other operations
Introduction
In addition to the operations for creating evidence, other operations can also be performed, such as: embedding a company seal in a PDF, etc.
Operations
Embed company seal to pdf
HTTP Request
POST /api/v1/private/sign-file
With the following information provided as JSON:
{
"fileId": "UUID",
"filename": "string",
"custodyType": "string",
"hash": "SHA256 hash",
"signName": "string"
}
Request body parameters
| Parameter | Mandatory | Datatype | Description |
|---|---|---|---|
| fileId | yes | UUID | The UUID of the document to seal. |
| filename | yes | String | The filename with extension of the document to seal. |
| custodyType | yes | String | If the status is marked as "INTERNAL", the resulting document will remain permanently sealed. If marked as "EXTERNAL", the document will remain sealed for a duration of 24 hours only. |
| hash | yes | String | The sha256 hash of the file to be sealed. |
| signName | no | String | The name of the provider responsible for sealing the document. Currently, "EADTrust" is used by default. However, the system supports configuring different providers for each tenant. If no value is provided, the system uses the default value assigned to the tenant. |
Upon request, you will receive a pre-signed upload URL to facilitate the document upload process. To upload the document, follow these steps:
1.- Include the file hash encoded in base64.
2.- Specify the file name along with its extension.
As shown in the example, the x-amz-checksum-sha256 field should contain the base64-encoded file hash, followed by the file name with its extension.
curl -v -H "x-amz-checksum-sha256: 3EMnNvppVhJqpPMcZPTtglG+3aNS4cWMrLzNEsToNUY=" -T "example.png" "https://garrigues-int-gocertius-v2-doc-manager.s3.eu-west-1.amazonaws.com/G-CERTIUS/evidences/29ef49f1-9259-41d8-b6d3-876f53e9f681/resource/example.png?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEC4aCWV1LXd..."
Get sealed PDF
HTTP Request
GET /api/v1/private/sign-file/{fileId}/download-url
In this request, there is one primary resource fileId.
As response, you will get the temporary download URL.