Skip to main content

Communicate with E-Signature API

Prerequisites

  • Postman

Instructions

In order to communicate with E-Signature Rest API the following postman components should both be imported on Postman platform.

Postman Environment Postman Collection

Postman Environment

Into Postman Environment, you can find the variables which are important in order to communicate with the API of GRNET.

The following variables are predefined and should not be changed.

		{
"key": "base_url",
"value": "eseal.devel.einfra.grnet.gr",
"enabled": true
},
{
"key": "port",
"value": "443",
"enabled": true
},
{
"key": "protocol",
"value": "https",
"enabled": true
}

The username, password and key will be provided by GRNET.

		{
"key": "username",
"value": "",
"enabled": true
},
{
"key": "password",
"value": "",
"enabled": true
},
{
"key": "key",
"value": "",
"enabled": true
}

Postman Collection

Into Postman Collection, you can find the variables which are important in order to execute requests on API.

The following variables are predefined and should not be changed.

		{
"key": "signing_path",
"value": "api/v1/signing"
},
{
"key": "signing_endpoint",
"value": "remoteSignDocumentDetached"
},
{
"key": "validation_path",
"value": "api/v1/validation"
},
{
"key": "validation_endpoint",
"value": "validateDocument"
},
{
"key": "timestamp_path",
"value": "api/v1/timestamping"
},
{
"key": "timestamp_endpoint",
"value": "remoteTimestampDocument"
}

The following variables are empty and should be filled in appropriately.

		{
"key": "pdf_base64_to_sign",
"value": ""
},
{
"key": "pdf_base64_to_validate",
"value": ""
},
{
"key": "pdf_base64_to_timestamp",
"value": ""
}

The following variables are optional and has already been predefined. These variables can be changed freely.

		{
"key": "pdf_name_to_sign",
"value": "to_sign.pdf"
},
{
"key": "pdf_name_to_validate",
"value": "to_validate.pdf"
},
{
"key": "pdf_name_to_timestamp",
"value": "to_timestamp.pdf"
}

Finally , you can find the following 3 POST requests :

  1. PDF Signing

  2. PDF Timestamp

  3. PDF Validation

PDF Signing

In order to sign a pdf :

  1. Convert the pdf to Base64 format

  2. Fill in the variable pdf_base64_to_sign

  3. Execute the PDF Signing request

Response Body :

{ "signedDocumentBytes": "JVBER..==" }

In order to convert the signedDocumentBytes to PDF you can use the following platform Base64 to PDF.

PDF Timestamp

In order to timestamp a pdf :

  1. Convert the pdf to Base64 format

  2. Fill in the variable pdf_base64_to_timestamp

  3. Execute the PDF Timestamp request

Response body :

{ "timestampedDocumentBytes": "JVBERi0xL..." }

In order to convert the timestampedDocumentBytes to PDF you can use the following platform Base64 to PDF.

PDF Validation

In order to validate a signed/timestamped pdf :

  1. Get the signedDocumentBytes/timestampedDocumentBytes response parameter respectively

  2. Fill in the variable pdf_base64_to_validate

  3. Execute the PDF Validation request