> 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/other-services/sign-inline-api/transaction-status-and-download-document.md).

# Transaction Status & Download Document

To get the status of the eSign process, you can make an API call to the below endpoint provided by the eSign service

<mark style="color:blue;">`GET`</mark> `https://services-sandbox.vida.id/signer/v2/services/esign/{esign-id}`

#### Query Parameters

| Name     | Type   | Description                                           |
| -------- | ------ | ----------------------------------------------------- |
| esign-id | String | Transaction ID that is produced on eSignOnly request. |

#### Headers

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

{% tabs %}
{% tab title="200: OK Returns the status of the specified request." %}

```json
{
	"data": {
		"partnerTrxId": "2aad04a7-fded-4dbd-8fe4",
		"code": 2,
		"lastUpdateAt": "2021-09-22T18:05:31",
		"signedDocs": [{
				"pdfTemplateId": "xxxxx-01",
				"documentUrl": "https://vida-cloudstore.s3.ap-southeast-1.amazonaws.com/ ...",
				"code": 0,
				"errMsg": ""
			},
			{
				"pdfTemplateId": "xxxxx-01",
				"documentUrl": "https://vida-cloudstore.s3.ap - southeast - 1. amazonaws.com / ...",
				"code": 0,
				"errMsg": ""
			}
		]
	}
}
```

{% endtab %}
{% endtabs %}

### Response Body

```json
{
	"data": {
		"partnerTrxId": "2aad04a7-fded-4dbd-8fe4",
		"code": 2,
		"lastUpdateAt": "2021-09-22T18:05:31",
		"signedDocs": [{
				"pdfTemplateId": "xxxxx-01",
				"documentUrl": "https://vida-cloudstore.s3.ap-southeast-1.amazonaws.com/ ...",
				"code": 0,
				"errMsg": ""
			},
			{
				"pdfTemplateId": "xxxxx-01",
				"documentUrl": "https://vida-cloudstore.s3.ap - southeast - 1. amazonaws.com / ...",
				"code": 0,
				"errMsg": ""
			}
		]
	}
}
```

Returns the status of the specified request.&#x20;

`0` - Created \
`1` - Certificate Generated \
`2` - Signing Task complete \
`3` - Request Failed&#x20;

When there is failure, there will be a `failureReason` included in the response&#x20;

Code - Under SignedDocs indicates the status of specific template-id

`0` - Signing success \
`1` - Signing failed (generic error)

errMsg - Will include the failure reason in Text

#### Error Handling

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

```json
{
	"data": {
		"partnerTrxId": "eb3d046a-5f61-41cc-af4c-d6868d398cac",
		"code": 3,
		"signedDocs": [],
		"lastUpdateAt": "2022-08-03T05:52:37Z",
		"errorCode": 31006,
		"failureReason": "Invalid CVV"
	}
}
```

#### Error Codes

| Error Code | Error Code Description                                 |
| ---------- | ------------------------------------------------------ |
| 31001      | Failure to generate certificate                        |
| 31004      | keyID not found                                        |
| 31006      | CVV is not valid                                       |
| 31007      | Certificate already expired / revoked                  |
| 31008      | PDF file provided in the request body is not valid     |
| 21003      | The requested resource was not found                   |
| 1006       | The request is missing a required parameter            |
| 1000       | An unknown error occurred while processing the request |
