2.Create Documents

After obtaining the access token in previous step, the portal/application lets the user choose the documents to be signed. Either by letting them upload the documents to the portal or select documents that the portal already has access to. Next, the portal creates each of the Document resources of the API by sending the PDF document. The portal must send a request to create a document signature process operation for each of the documents.

POST https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/documents

HTTP/1.1

Headers

Name
Type
Value

Auhtorization

String

Bearer fd1d9c5fc74fad4acc02eed62a81caf3d5d5a2017a18a253380fc18f2918574

Content-Type

String

multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

Postman-Token*

String

0cb4e517-8db9-473c-7b14-0ca2555bc199

Body

Name
Type
Value

signers

String

[{ "signature_policy_id": "urn:safelayer:eidas:policies:sign:document:pdf", "parameters": { "type": "pades-baseline", "signature_field": { "name": "Sign1", "location": { "page": { "number": "2" }, "rectangle": { "x": 100, "y": 50, "height": 150, "width": 400 } }, "appearance": { "signature_details": { "font": { "size": 15, "style": "italic", "embed": true }, "details": [{ "type": "subject", "title": "Signer Name: " }, { "type": "date", "title": "Signature Date: " }] } } } } }]

document

String

file1.pdf

[{ "signature_policy_id": "urn:safelayer:eidas:policies:sign:document:pdf", "parameters": {
 "type": "pades-baseline",
 "signature_field": 
 {
  "name": "Sign1", 
  "location": {
   "page": {
    "number": "2" 
    }, 
    "rectangle":
     {
      "x": 100, "y": 50, "height": 150, "width": 400 
      } 
      },
   "appearance":
    { 
    "signature_details": 
    {
     "font": 
    {
     "size": 15, "style": "italic",
"embed": true 
},
 "details":
 [{ 
 "type": "subject", "title": "Signer Name: "
  },
  { 
  "type": "date", "title": "Signature Date: " 
  }]
   } 
   }
    }
     } 
     }]

In response to each request, the server responds with a message like the following:

Response

{
    "id": "t2mtk7bsp5vq8i1e3rqb6aejab1ivia5",
    "self": "https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/documents/t2mtk7bsp5vq8i1e3rqb6aejab1ivia5",
    "signers": [
        {
            "id": "65lrfbflu2uilclpmvvv0nmucdadsgsg",
            "self": "https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/documents/t2mtk7bsp5vq8i1e3rqb6aejab1ivia5/signers/65lrfbflu2uilclpmvvv0nmucdadsgsg"
        }
    ]
}

Last updated