3. Create Signer Process

Creating the Document Signature Process

The portal requests the creation of the PDF document batch signature process by sending the following message to the UAE PASS using the signature services API. This API call will create a signing process at UAE PASS end.

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

HTTP/1.1

Headers

NameTypeDescription

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

Response

{
    "process_type": "urn:safelayer:eidas:processes:document:sign:esigp",
    "id": "hrcmc4pr78dt4s35jlbi4nmdrler4nn2",
    "self": "https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/signer_processes/hrcmc4pr78dt4s35jlbi4nmdrler4nn2",
    "tasks": {
        "pending": [
            {
                "type": "UserBrowserTask",
                "id": "dtvnbg6pbmaec4a35tlpnt1krs27hve1",
                "url": "https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/ui?signerProcessId=hrcmc4pr78dt4s35jlbi4nmdrler4nn2"
            }
        ]
    },
    "documents": [
        {
            "id": "c7mrogv8sqersqfj4sj7q21ucs1d3t4r",
            "url": "https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/documents/c7mrogv8sqersqfj4sj7q21ucs1d3t4r",
            "content": "https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/documents/c7mrogv8sqersqfj4sj7q21ucs1d3t4r/content"
        },
        {
            "id": "afa9gmord6dh6vhlvp1s533fs5fn8tui",
            "url": "https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/documents/afa9gmord6dh6vhlvp1s533fs5fn8tui",
            "content": "https://stg-id.uaepass.ae/trustedx-resources/esignsp/v2/documents/afa9gmord6dh6vhlvp1s533fs5fn8tui/content"
        }
    ]
}

Request Body

{
              "process_type": "urn:safelayer:eidas:processes:document:sign:esigp",
              "labels": [
                             [
                                           "digitalid",
                                           "server",
                                           "qualified"
                             ]
              ],
"documents": [
        {
            "id":"c7mrogv8sqersqfj4sj7q21ucs1d3t4r"
        },
        {
            "id":"afa9gmord6dh6vhlvp1s533fs5fn8tui"
        }
        ]
        ,
"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": {
                                                                                      "font": {
                                                                                                     "size":   10,
                                                                                                     "style": "italic",                                                                                        
                                                                                                     "embed": true
                                                                                      },
                                                                                      "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"
              }
}
                   

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