Get Signed Document
This document highlights the Get Signed Document API details.
API Description
Objective
The Get Signed Document API retrieves the signed or unsigned document's URL, along with its signing status, expiry status, and any failure reason. It is used to check the status and validity of a document in the signing process.
| Input | Output |
|---|---|
| The document ID and skipBase64 flag to determine the document's base64 encoding status | The document URL (signed/unsigned), signing status, expiry status, and failure reason (if any) |
Inputs
The following table provides the complete information on all the input parameters for the module.
| Parameter | Description | Mandatory or Optional | Allowed Values | Default Value |
|---|---|---|---|---|
documentId | A unique document ID for each signer | Mandatory | Not Applicable | Not Applicable |
skipBase64 | Mandatory field - true to be passed for all cases | Mandatory | true | Not Applicable |
Success Response
The following is a success response from the API:
{
"status": "success",
"statusCode": "200",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
},
"result": {
"data": {
"documentId": "<Document_ID>",
"s3Url": "<Signed_Document_URL>",
"signed": true,
"expired": false,
"userCertDetails": {
"name": "<Name_of_the_User>",
"pincode": "<Pincode>",
"gender": "<Gender>",
"state": "<State>",
"title": "<Title>",
"yob": "<Year_of_Birth>"
},
"inviteeDetails": {
"inviteeName": "<Invitee_Name>",
"inviteeEmail": "<Invitee_Email>"
}
}
}
}
Success Response Details
The following table highlights the details of the success response from the API:
| Parameter | Type | Description |
|---|---|---|
| status | string | The status of the request |
| statusCode | integer | The status code of the request |
| metaData | object | Metadata related to the request |
| metaData.requestId | string | A unique identifier for the request |
| metaData.transactionId | string | A unique identifier for the transaction |
| documentId | string | The unique identifier for the document |
| s3Url | string | The S3 URL containing the signed document |
| signed | boolean | Indicates whether the document has been signed |
| expired | boolean | Indicates whether the signed document has expired |
| name | string | The name of the signer as per Aadhaar |
| pincode | string | The pincode of the signer as per Aadhaar |
| gender | string | The gender of the signer as per Aadhaar |
| state | string | The state of the signer as per Aadhaar |
| title | string | The last four digits of the signer's Aadhaar number |
| yob | string | The year of birth of the signer as per Aadhaar |
| inviteeName | string | The name of the invitee |
| inviteeEmail | string | The email address of the invitee |
| failureReason | string | The reason for failure if the status code is not 200 |
Failure and Error Response Details
A failure or error response from the module contains a failure status, with a relevant status code and error message.
The following table lists all error responses.
| Status Code | Error Message | Error Description |
|---|---|---|
| 400 | Required file input is missing | The request is missing the mandatory file input |
| 400 | Error while parsing file input | An error occurred while parsing the provided file input |
| 400 | Document ID not found | The requested document ID could not be found |
| 400 | Document Deleted | The requested document has been deleted |
| 404 | Document not found | The document could not be found on Leegality's end |
| 500 | Unknown error while parsing inputs | The request encountered an unknown error while parsing the inputs |
| 500 | Internal Server Error | Please check the request headers or contact support for resolution |
| 500 | PDF generation failed | The process of generating the PDF failed |
| 503 | External vendor downtime | The external vendor is currently experiencing downtime |