2. Create Signer Process

Creating the Document Signature Process

After obtaining the access token in previous step, the portal/application requests the creation of the PDF document signature process by sending the following message to UAEPASS using the signature services API.

API call will create a signing process at UAEPASS end

POST stg-id.uaepass.ae/trustedx-resources/esignsp/v2/signer_processes

HTTP/1.1

Headers

Name
Type
Description

Authorization*

string

Bearer <token>

Cache-Control*

string

no-cache

Postman-Token*

string

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

Content-Type*

string

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

{ 
    "id" : "sp_c4eed0a1f478f72454803695d53c4c52", 
    "self" : "Location: https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/signer_processes/sp_c4eed0a1f478f72454803695d53c4c52", 
    "process_type" : "urn:safelayer:eidas:processes:document:sign:esigp", 
    "tasks" : { 
        "pending" : [ 
            { 
                "type" : "UserBrowserTask", 
                "id" : "tk_fde244b585cd2feb54c3039b1498e4a4",
                "url" : "https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/ui?signerProcessId=sp_c4eed0a1f478f72454803695d53c4c5"
            }
        ]
    }, 
    "documents" : [ 
        { 
            "url" : "https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/documents/dc_9ee0990055818516249f28558e1b256b" 
            } 
        ] 
    }
------WebKitFormBoundary7MA4YWxkTrZu0gW 
Content-Disposition: form-data; name="process"
{
  "process_type": "urn:safelayer:eidas:processes:document:sign:esigp",
  "labels": [
    [
      "digitalid",
      "server",
      "qualified"
    ]
  ],
  "signer": {
    "signature_policy_id": "urn:safelayer:eidas:policies:sign:document:pdf",
    "parameters": {
      "type": "pades-baseline",
      "signature_field": {
        "name": "Sign1",
        "location": {
          "page": {
            "number": "last"
          },
          "rectangle": {
            "x": 100,
            "y": 110,
            "height": 150,
            "width": 400
          }
        },
        "appearance": {
          "signature_details": {
            "details": [
              {
                "type": "subject",
                "title": "Signer Name: "
              },
              {
                "type": "date",
                "title": "Signature Date: "
              }
            ]
          }
        }
      }
    }
  },
  "ui_locales": [
    "en_US"
  ],
  "finish_callback_url": "http://localhost:8080/test",
  "views": {
    "document_agreement": {
      "skip_server_id": "true"
    }
  },
  "timestamp": {
    "provider_id": "urn:uae:tws:generation:policy:digitalid"
  }
}
                        
------WebKitFormBoundary7MA4YWxkTrZu0gW 
Content-Disposition: form-data; name="document"; filename="{pdf to be signed}"
Content-Type: application/pdf 
------WebKitFormBoundary7MA4YWxkTrZu0gW--                   

List of Attributes for POST Body.

Multiple signatures in a document

signature_field

Mandatory

If there is an use case to put multiple signature by multiple user , then Value of the “name” has to be changed in the above request body. In the above example, it’s now as follows for first user who sign the document. For 2nd user , it should be with different name. such as “Sign2” or any.

View the document before signing

skip_server_id

Mandatory

If there is an use case of viewing or downloading the PDF document, then Change the value of attributes “skip_server_id” to “false” in stead of “true” what it is mentioned in the above example.

Getting signature appeared on Emirate ID and put it in Digital Signature.

background_image

Optional

To get the signature from emirate Id card and put it in the Digital Signature. Attributes “background_image” to be used as follows under appearance attributes.

Value of Attribute “cardHolderSignatureImage” from user profile information to be used as value of “background_image” for the signature. "appearance": {

"background_image": {

"binary": "<<base64 image>>"

},

Putting fore ground image in digital Signature

foreground_image

Optional

"appearance": {

"foreground_image": {

"binary": "{base64 image}"

},

Digital Signature with both foreground and back ground image

background_image foreground_image

Optional

"appearance" : {

"background_image" : {

"binary" : {base64}

},

"foreground_image" : {

"binary" : {base64}

},

Which page to put the Signature

Page

Mandatory

By default, Signature can be put in last page as mentioned in above request body "page" : { "number" : "last" … },

To display the signature image or to hide the signature image on the document

appearance

Optional

If SP needs to display the signature image on the document, they can use the below.

"appearance": {

"signature_details": {

"details": [{

"type": "subject",

"title": "Signer Name: "

},

{

"type": "date",

"title": "Signature Date: "

}]

}

If SP needs to hide the signature image, they can use the below as passing the appearance parameter as blank:

"appearance": {

}

If SP needs to hide the EID from the signature image, they can use the following.

"appearance":

{ "signature_details":

{ "details":

[ {

"type": "date",

"title": "Signature Date: "

}]

}

}

UAEPASS communicates with the signature portal, that successfully creates the signature process and that must redirects the user's browser to https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/ui?signerProcessId=sp_c4eed0a1f478f72454803695d53c4c5 (tasks.pending.url) for this process to continue.

It also communicates to the signature portal that obtain the signed document it must access https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/documents/dc_9ee0990055818516249f28558e1b256b/content (i.e., the URL resulting from concatenating /content to the URL specified in documents[0].

If signing the same document twice, make sure that unique value is passed for the name parameter in process type of request body as below:

"name": "Sign1" for the first signature

"name": "Sign2" for the second signature

"cardHolderSignatureImage"- Retrieval of this attribute from UAE PASS is subject to approvals from ICP team.

Last updated