> For the complete documentation index, see [llms.txt](https://docs.uaepass.ae/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uaepass.ae/feature-guides/signature-integration-guide/hash-signing/hash-signing-single-document/hash-signing-java-sdk-set-up/hash-signing-process/5.-sign-pdf-document.md).

# 3. Sign PDF Document

## Obtain Access Token:

1- The url obtained from the above API call needs to be invoked in the browser to obtain the access token.

![](/files/JvLBrcN4Dxv06905nsDw)

2- Pass the access token as a part of header **(X-SIGN-ACCESSTOKEN= Access Token)** with the along with the signing identity and transaction id in the next call as shown below

## This API call will create signing process

<mark style="color:green;">`POST`</mark> `http://localhost:8089/v2/signature/sign`

#### Headers

| Name               | Type   | Description                      |
| ------------------ | ------ | -------------------------------- |
| Content-Type       | string | multipart/form-data;             |
| X-SIGN-ACCESSTOKEN | string | value received from the API call |

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

````xml
​```
PK
```‌
````

{% endtab %}

{% tab title="400" %}

```javascript
{
   
  "error": "Invalid request"


}
```

{% endtab %}

{% tab title="412: Precondition Failed If you are trying to sign document with either a txId that is being already used to sign a document or txId is wrong." %}

```javascript
{
    Precondition Failed
}
```

{% endtab %}
{% endtabs %}

![](/files/yUY7exfdXS9QzRI9P4xt)

```
{
  "digestAlgorithm": "SHA256",
  "signIdentityId": "string",
  "txId": "string"
}
```

**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                                                                                                                                     |
