signdoc
The signdoc
API is used in the context of SEID-SDO electronic signing. For a quick-start, please refer to our Get started with electronic signing guide for electronic signing.
Overview
URL | https://<signdoc-baseurl>/signdoc |
---|---|
Authorization | Access Token as Bearer Token in Authorization Header |
Upload sign order to SignDoc resource server
POST [signdoc-baseurl]/signdoc
Request
Headers
Key | Value |
---|---|
Authorization | Bearer access_token |
Content-Type | application/json |
Request body
Key | Type / Description | Example JSON | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
signProperties | JSON object:
| "signProperties": { | ||||||||||||||||||||||||
documents | JSON array of documents to be signed (minimum one). The document to be signed is represented as a JSON object:
*Each document must provide a value for either "text", "pdf" or the pair "xml" and "xsl". | "documents": [ | ||||||||||||||||||||||||
resultContent | JSON array of string. The string values will determine the content result when retrieving a completed sign order:
| ["basicSignature", "documentHash", "sdo"] |
Example request
POST [signdoc-base-url]/signdoc Request body: { |
Response
Content-Type: application/json
Code | Description | Example JSON response content |
---|---|---|
201 Created | Successfully created sign order. | { |
400 Bad request | Could not create order due to error in request. | An order must have a name - Please provide reference: GHIjKl if reporting the problem. |
| Access token is invalid or missing. | AccessToken is invalid - Please provide reference: GHIjKl if reporting the problem. |
Check status of sign order
GET [signdoc-baseurl]/signdoc
Request
Headers
Key | Value |
---|---|
Authorization | Bearer access_token |
Query parameters
Parameter | Type | Description |
---|---|---|
sign_id | string | The sign_id that was returned when creating the sign order. |
Example request
GET [signdoc_baseurl]/signdoc/pades?sign_id=2a8d69ba-2607-9a1e-9e60-bdb6cc67eacf |
Response
Code | Description | Example JSON response content |
---|---|---|
200 OK | Sign order was found. Returns the order state. Possible values are:
| |
204 No Content | Sign order was not found | |
400 Bad Request | The query parameter sign_id was not provided. | |
403 Forbidden | Access token is invalid or missing. |
Delete sign order and download signing results
DELETE [signdoc-baseurl]/signdoc
The sign order will be deleted if this request is made, regardless of sign order state.
Request
Headers
Key | Value |
---|---|
Authorization | Bearer access_token |
Query parameters
Parameter | Type | Description |
---|---|---|
sign_id | string | The sign_id that was returned when creating the sign order. |
Example request
DELETE [signdoc-baseurl]/signdoc?sign_id=2a8d69ba-2607-9a1e-9e60-bdb6cc67eacf |
Response
Code | Description | Example JSON response content | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 OK | Sign order was found. The claims returned in the signing results depends on the values pass to the
If order is not completed, i.e. order state is not | { | |||||||||||||||||||||||||||
204 No Content | Sign order was not found. This could be caused by timeout or an invalid | (empty) | |||||||||||||||||||||||||||
400 Bad Request | The query parameter sign_id was not provided. | signId should not be empty - Please provide reference: GHIjKl if reporting the problem. | |||||||||||||||||||||||||||
403 Forbidden | Access token is invalid or missing. | Could not find accessToken - Please provide reference: GHIjKl if reporting the problem. |
Additional examples of sign order upload requests to SignDoc resource server
Simplified sign flow expressed like a full flow
The signing order below behaves identically to the simplified flow given by sign_txt=VGhlIHNpbmdfdHh0IGdpdmVuIGlzIHBsYWNlZCBoZXJl
{ |
SEID-SDO: Two texts and one XML
{ |