# 2. Initiate Signing Process

Invoke the above URL (as shown in the screenshot) in browser to obtain the sign identities and transaction id value. The transaction id remains valid for 10 mins.

![](https://4217816688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MekZ3RZxqIxNNSkEFZ1%2Fuploads%2FiYEfoQV6SpCijLWivgvN%2Fimage.png?alt=media\&token=4819001f-98e3-4e13-b26a-d7458a81a30d)

## Invoke the API:

The above obtained signing identity and txId needs to be passed in the next API call along with the document.

## Initiate Signing Request

<mark style="color:orange;">`PUT`</mark> `http://localhost:8089/v2/signature/request`

#### Headers

| Name         | Type   | Description          |
| ------------ | ------ | -------------------- |
| Content-Type | string | multipart/form-data; |

{% tabs %}
{% tab title="200 " %}

```
{
https://stg-id.uaepass.ae/trustedx-authserver/oauth/main-as?response_type=code&client_id={client_id}&redirect_uri=http://localhost:8689/uaepass/token&scope=urn:safelayer:eidas:sign:identity:use:server&state=1910298837&digests_summary=bW78y7Ul9ilVfxniWU8ZSeacWzlXjUvq8NY4XHzjrKGRPIYdGShWdaHaHT6K4szy&digests_summary_algorithm=SHA384&sign_identity_id=tec7vgkfc0dmmeu5bvhv9lh394
}
```

{% endtab %}

{% tab title="400" %}
{&#x20;

"error": "Invalid request"&#x20;

}
{% endtab %}
{% endtabs %}

![](https://4217816688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MekZ3RZxqIxNNSkEFZ1%2Fuploads%2Fv98Ve4OUdAg5YCSTyxeO%2FMicrosoftTeams-image%20\(32\).png?alt=media\&token=33e1403b-c77a-498b-8ae8-1ac31607645d)

**List of attributes for request body:**

| Attributes                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| txId(mandatory)                                | <p>Transaction id for signing request</p><p><strong>Note</strong>: Transaction ID is valid for only 10 minutes and operation should end within the same period.</p>                                                                                                                                                                                                                                                                                                                                 |
| digestAlgorithm(mandatory)                     | <p>Entity can use one of the digest algorithms from below according to their requirement:</p><p>SHA256</p><p>SHA384</p><p>SHA512</p>                                                                                                                                                                                                                                                                                                                                                                |
| signIdentityId(mandatory)                      | User’s qualified certificate id                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| file(mandatory)                                | Pdf file which is to be signed                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| sigRect(optional)                              | <p>Default values: \[36,748,108,32]</p><p>First two values are X and Y co-ordinates, second two values are width and height of the signature dimensions.</p>                                                                                                                                                                                                                                                                                                                                        |
| sigPageNo(optional)                            | <p>Default page: 1</p><p>Page number where signature is to be appeared</p><p>Example: 1</p>                                                                                                                                                                                                                                                                                                                                                                                                         |
| SPCustomerIdRef  – passed as query parameters. | <p>The value of this header should represent unique extended customer identification.</p><p>If Service provider is consuming hash signing API’s for their own organization then this value should be passed as “self”.</p><p>If Service provider is consuming hash signing API’s for other organizations or for selling the application then this value should be passed as “Organization name”.</p><p>Example: Organization name is : Dubai Health Authority : Value should be passed as “DHA”</p> |
