Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

eZīmoga izveidošana

Scope

Puts organization’s electronic seal on a file.

Description

Creates electronic seal signature using organization’s electronic seal certificate, timestamp using authentication certificate and the revocation data (for example - OCSP). 

Request

The Service provider's application sends the following POST request using TLS:

...

Include Page
TIP - SignAPI Introspect access token
TIP - SignAPI Introspect access token

Body

Code Block
{
  "sessions": [
    {
      "sessionId": "string"
    }
  ],
  "signAsPdf": false,
  "createNewEdoc": false,
  "signKey": "string",
  "signKeyPassword": "string",
  "authCertificate": "string"
}

...

Code Block
byte[] signKeyPasswordBytes = Encoding.UTF8.GetBytes(req.SignKeyPassword);
byte[] signKeyPasswordBytesEncrypted = publicKey.Encrypt(signKeyPasswordBytes, RSAEncryptionPadding.Pkcs1);
req.SignKeyPassword = Convert.ToBase64String(signKeyPasswordBytesEncrypted);

Example

Code Block
POST /api-sign/v1.0/eSealCreate  HTTP/1.1
Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603
Host: signapi-prep.eparaksts.lv
{
  "sessions": [
     {
        "sessionId": "702e9106e3fe2987d04a0bf7d585050477c1c0dce4d5b76fafc1178b537bc891"
     }
  ],
  "signAsPdf": false,
  "createNewEdoc": false,
  "signKey": "gbfb43564/70OeyYmqoLJ+YAU1kl+vwGVHT0L+ywky80EO8qx/kMZ7hq1Rm9p/SjzexaS0lIH4yf0OJ74BdZCRGaeBfjZWHiQxBdQSXyeuCqDgawbcOjNMjQeLUK5s4a6T17WXjsPTqPulu8mdyhV+tPhwUE/UdtOcSrJeY+ZkGMsn1i+YcNk1cg12+A/zQZ8lWach7M7Fj7gYhNaHiNW5JUREJKGgVKU4rSEE1T2LosJ9H/b+I3Fj0AVR3Cw57W+VSxn8bXqQG8kq+MWdeomaprRvFQoSwY+MFUedqXgVNOioO8lARJNcd2duMLiy4PKEheqq6rZFftSlYulv+o9nPsbZXMO7H",
  "signKeyPassword": "6hCV2AEjVdTW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IU7cdKydPMCyTjvGSMvfGZ2/3J1ggvdQm7uO93PJyu9V/D5raLXm4tPnIng9/VRc8SSdFcdks4PjUoKew=="}

Response

JSON object:

Code Block
{
    "results": "string"[
        {
            "sessionId": "string",
            "error": {
                "code": "string",
                "message": "string"
            }
        }
    ]
}

...

PropertyDescription
results
Signing results: success if error == null or omitted
results.sessionId
File processing session identifier
results.error
Session error if any
results.error.code
Session error code
results.error.message
Session error message

Example

Code Block
{
  "data": {
	 "results": [
		{
		   "sessionId": "76fa04d8e5e2451b867af6ae667558395459fb9d082d31dadb9f22222f80a3d2"
		}
	 ]
  }
}

...