> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/sign/digital-signature/poa-sign-inline-api/api-reference/poa-sign-api.md).

# POA Sign API

This API is used to digitally sign a PDF Template on behalf of a user.

{% hint style="info" %}
This endpoint requires different credentials than those used for non-POA endpoints

Example email for CVV and keyId

![](/files/ktk0dhhGa1NmULrvJ8Sa)
{% endhint %}

<mark style="color:green;">`POST`</mark> `https://services-sandbox.vida.id/signer/v2/services/esign/poa`

#### Query Parameters

| Name    | Type   | Description                                                                                                                                                                                                                                                                                             |
| ------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| docType | String | <p>Document source.</p><p> </p><p><strong><code>nontemplate</code></strong> : Document is supplied by Client in request body. </p><p><strong><code>hash</code></strong> : hash of Document is supplied by Client in request body. </p><p></p><p>Default value when empty is ‘<code>template</code>’</p> |

#### Headers

| Name          | Type   | Description                                  |
| ------------- | ------ | -------------------------------------------- |
| Authorization | String | Bearer \<Token received from Authentication> |
| Content-Type  |        | application/json                             |

{% tabs %}
{% tab title="200: OK Unique ID per api call to track status updates" %}

```json
{
 "data":{
  "id":"8efa9d73-c7df-4aa8-8705-29ca45b0ef32"
 }
}
```

{% endtab %}
{% endtabs %}

### Request Body

```json
{
	"partnerTrxId": "467ad6af-3fb2-41f7-8fc5-0d1b29c308fa",
	"signer": {
		"email": "user.123@email.com",
		"keyId": "3236e3a81faf3dd68d515dc5414b22e54347b78e",
		"apiKey": "w0HtHVPBT9v32uFK",
		"encCVV": "sxLodFAWknPD8HjrWKIkfDEmRQ=="
	},
	"requestInfo": {
		"userAgent": "Mozilla/5.0 (X11;Linux x86_64) AppleWebKit / 537.36",
		"srcIp": "172.217.22.14",
		"consentTimestamp": "1702362951"		
	},
	"device": {
		"os": "R",
		"model": "KB2001",
		"uniqueId": "AF7KI0bly3aPIsYJ4+O+2QE",
		"networkProvider": "IND idea"
	},
  	"signingInfo": [{
	        "pdfFile": "<base64>",
      		"pageNo": "1",
      		"xPoint": "10",
	      	"yPoint": "10",
	      	"height": "10",
	      	"width": "20",
	      	"clientFilename": "File Name 123",
	      	"qrEnable": true,
	      	"appearance": {
	        	"type": "standard",
	        	"signImage": ""
	        }
	}]
}
```

<table><thead><tr><th width="308">Parameter</th><th width="106">Type</th><th width="85">Req</th><th width="82" data-type="number">Length</th><th>Description</th></tr></thead><tbody><tr><td>partnerTrxId</td><td>string</td><td>M</td><td>255</td><td>Unique transaction identifier in a UUID format</td></tr><tr><td>signer</td><td>object</td><td>M</td><td>null</td><td>Object containing information about the signer</td></tr><tr><td>signer.email</td><td>string</td><td>M</td><td>null</td><td>Email address of the signer</td></tr><tr><td>signer.keyId</td><td>string</td><td>M</td><td>null</td><td>Secret key identifier obtained via email, used for authentication</td></tr><tr><td>signer.apiKey</td><td>string</td><td>M</td><td>null</td><td>API key provided for signer authentication</td></tr><tr><td>signer.encCVV</td><td>string</td><td>M</td><td>null</td><td>Base64 encoded string of the encrypted CVV, using AES encryption</td></tr><tr><td>requestInfo</td><td>object</td><td>M</td><td>null</td><td>Object holding data about the user request</td></tr><tr><td>requestInfo.userAgent</td><td>string</td><td>M</td><td>null</td><td>Identifies the browser and operating system used by the user</td></tr><tr><td>requestInfo.srcIp</td><td>string</td><td>M</td><td>128</td><td>Source IP address from which the request originated</td></tr><tr><td>requestInfo.consentTimestamp</td><td>string</td><td>M</td><td>null</td><td>Timestamp indicating when the user gave consent in Unix time format</td></tr><tr><td>device</td><td>object</td><td>M</td><td>null</td><td>Object detailing the user's device information, including operating system, model, unique ID, and network provider</td></tr><tr><td>device.os</td><td>string</td><td>M</td><td>64</td><td>Operating system of the user's device</td></tr><tr><td>device.model</td><td>string</td><td>M</td><td>64</td><td>Model identifier of the user's device</td></tr><tr><td>device.uniqueId</td><td>string</td><td>M</td><td>128</td><td>Unique identifier for the user's device</td></tr><tr><td>device.networkProvider</td><td>string</td><td>M</td><td>64</td><td>Name of the network provider for the user's device</td></tr><tr><td>signingInfo</td><td>array</td><td>M</td><td>5</td><td>Array of objects containing information about the signing process</td></tr><tr><td>signingInfo.pdfFile</td><td>string</td><td>M</td><td>null</td><td>Base64 encoded string of the PDF file to be used in the signing</td></tr><tr><td>signingInfo.pageNo</td><td>string</td><td>M</td><td>null</td><td>Page number in the PDF document where the signing or action is to occur</td></tr><tr><td>signingInfo.xPoint</td><td>string</td><td>M</td><td>null</td><td>X-coordinate on the PDF page to position the signature</td></tr><tr><td>signingInfo.yPoint</td><td>string</td><td>M</td><td>null</td><td>Y-coordinate on the PDF page to position the signature</td></tr><tr><td>signingInfo.height</td><td>string</td><td>M</td><td>null</td><td>Height of the signature</td></tr><tr><td>signingInfo.width</td><td>string</td><td>M</td><td>null</td><td>Width of the signature</td></tr><tr><td>signingInfo.clientFileName</td><td>string</td><td>O</td><td>null</td><td>Document name to be displayed on link from QR</td></tr><tr><td>signingInfo.qrEnable</td><td>boolean</td><td>O</td><td>null</td><td>Boolean indicating whether a QR code is to be included in the signed document<br><br>Default <code>false</code></td></tr><tr><td>signingInfo.appearance</td><td>object</td><td>O</td><td>null</td><td>Object specifying the appearance settings for the signing</td></tr><tr><td>signingInfo.appearance.type</td><td>string</td><td>C</td><td>null</td><td><ul><li><strong><code>provided</code></strong>: Visual signature featuring a client-provided image.</li><li><strong><code>standard</code></strong>: Visual signature using the VIDA standard logo.</li><li><strong><code>non_visual</code></strong>: Signature without any visual elements.</li></ul></td></tr><tr><td>signingInfo.appearance.signImage</td><td>string</td><td>C</td><td>null</td><td>Base64 encoded string of the signature image</td></tr></tbody></table>

{% hint style="info" %}
**M** = Mandatory | **O** = Optional | **C** = Conditional

`requestInfo` and `device` parameters are required by VIDA for regulatory and audit purposes.
{% endhint %}

### Response

```json
{
    "data":{
        "id":"8efa9d73-c7df-4aa8-8705-29ca45b0ef32"
    }
}
```

**`id`** : Unique ID per api call to track status updates

#### Error Handling

Non-success status code responses will have a body with error details

```json
{
	"errors": [{
		"code": 31003,
		"title": "Invalid template id ",
		"detail": "Invalid template id "
	}]
}
```

#### Error Codes

| code  | Description                                            |
| ----- | ------------------------------------------------------ |
| 1000  | An unknown error occurred while processing the request |
| 1001  | Unable to generate certificate                         |
| 1006  | The request is missing a required parameter            |
| 21001 | Requested method not allowed                           |
| 21003 | The requested resource was not found                   |
| 31002 | No Templates configured for the partner                |
| 31003 | Provided template Id is invalid                        |
| 31004 | Name contains invalid characters                       |
| 31005 | Product attributes not found                           |
| 31007 | Failed to validate certificate                         |
| 31008 | PDF file provided in the request body is not valid     |
| 31009 | ekycEventId not found                                  |
| 31010 | Invalid transaction id                                 |
| 31011 | Invalid ApiKey                                         |
| 31012 | Invalid Encryption CVV                                 |
| 31013 | Expired Encryption CVV                                 |
| 31014 | Invalid Verify Signature                               |
| 31015 | Invalid Token                                          |
| 31016 | Invalid Request DocType                                |
| 31017 | Certificate profile not found                          |
