#Aadhaar eSign

#What is eSign?

Our eSign APIs enable easy collection of Aadhaar based electronic signatures that are legally enforceable. This is built on top of NSDL and emudra infrastructure and is fully privacy compliant.

We also provide ready-to-use screens built on top of NSDL/emudra. These can be easily themed as per your brand colours and logo, and can be loaded inside your app as a webview or redirected to via your website.


#What can I do with this product?

Offer your customers a seamless experience of Aadhaar based electronic signatures. eSign APIs can be used to collect legally binding signatures on a document, for upto 6 signers.

Whichever industry you belong to—banking, insurance, finance, law and more—you can provide smooth onboarding experiences for your customers and enable contracts to be closed digitally.


Was this page helpful?

#Aadhaar eSign integration

eSign APIs can be used to collect legally binding signatures on a document, for upto 6 signers.

Here’s a quick run through of the APIs—

  1. Upload document—Upload a PDF document to be signed.
  2. Create signature request—Create a signature request with defined signer(s) and a redirect url. You get an id in response, which you can use to track the signature request.
  3. Get status of signature request—Get details against a signature request by passing the signature request id.
  4. Download document—Download a signed document by passing the signature request id.

If using flexible esign, you need to first upload the signing config and then the flow of API calls remains the same as above. Uploading signing config is a one time task, if config does not change.

You can also delete a signature request—if required—by passing the requestid.


Additionally, here are the URLs you would need for these APIs—

  • Sandbox—https://dg-sandbox.(website name).co
  • Production—https://dg.(website name).co
  • Headers—Contact (website name) for providing the credentials required to successfully call (website name) APIs. This contains:
    • x-client-id
    • x-client-secret
    • x-product-instance-id

#Upload document

Call this API to upload the document that has to be signed. The document and the document name would be passed as a multipart/form-data upload of the files and name parameters respectively.


(website name) has processed your request successfully.


Request
POST /api/documents
payload= {
"name": "name_your_file"
}
files= [
("document", ("sample.pdf", open("/Users/path/Sample.pdf", "rb"), "application/pdf"))
]

Response

You will get a unique id which is the documentId from (website name) for usage in signature request creation.

{
"id": "67e0ca30-49e4-4883-86f9-3762f0e6798c",
"name": "name_your_file"
}

#Create signature request

Create a signature request with defined signer(s) and a redirect url. You get an id in response, which you can use to track the signature request.

In case you want to validate a customer’s name and year of birth, pass the values for displayName and birthYear in create signature request. If there is a mismatch in name or birth year (based on data from Aadhaar OTP based verification), we will display an error and the customer will not be able to sign the document.

Request to enable validation of customer name and birth year by writing to us at (website name) Support. Also specify threshold of fuzzy match for name.


Here is a quick description of the values required to call this API—

  • documentId the unique id of the document, which you get from the Upload document API response.
  • signers can be used to specify details of up to 6 signers for a document, each with an identifier, displayName and birthYear (optional).
  • Additionally, the signature object can be used to specify page numbers with onPages and position for signatures to be collected on the document’s UI, uniquely for each signer. By default, the height and width of the signature, are set to 60 and 180 pixels respectively. If only height OR width is provided, the other one is automatically calculated with a default height : width ratio of 1 : 3.

We strongly recommend 60 and 180 for height and width values. In case you choose custom values for height and width, we recommend 1:3 ratio to avoid signature distortion.


Usage of the redirect URL

You have to provide a redirectUrl in the request, which has to be a valid publicly hosted URL—the signer gets redirected to this URL after going through (website name)’s eSign screens.

It will also be used by (website name) to send back relevant information about a signer. By default (website name) includes the signature request id, the signer’sidentifier and success flag of the signature attempt.

  • For a failed signature, we will send back—(redirectUrl)?id={signature_request.id}&success={false}&signerIdentifier={signer.id}&errCode={code}&errorMessage={message}
  • For a successful signature—(redirect_url)?id={signature_request.id}&success={true}&signerIdentifier={signer.id}

You can also add custom query params such as session id from your end. You would append this to the provided URL, like so—(redirectUrl)?sessionId=XYZ


#Create Signature request with configID

Create signature request can also be created by using configId in case of flexible signature placement. Please refer to the 201 with configId tab below for request and response sample.


Normal esign (without configID)

(website name) has processed your request successfully.


Request

Response

You will get a unique signature request id from (website name)—to track this signature request. Additionally, you will get an array of signers, each with their own signer id, status and url.

The url from this response should be used to redirect your customer to complete a signature. The session of the url is activated once the user is redirected to it, and remains active for 15 minutes by default. Note that if one of the signers is signing the document, other signers have to wait until the active signer has finished signing.

When the session of a url is active, the status of the signature request is sign_in_progress and no other signer will be able to sign the document at that point of time.

Flexi esign (with configID)

(website name) has processed your request successfully.


When passiing a configID, width, height, position and on pages field are not required as they are picked from the config associated with the id.

Request with configId

Response

You will get a unique signature request id from (website name)—to track this signature request. Additionally, you will get an array of signers, each with their own signer id, status and url.

{
"documentId": "67e0ca30-49e4-4883-86f9-3762f0e6798c",
"id": "cb80bfb4-d163-426e-ad57-1fd8889e62d4",
"redirectUrl": "your-redirect-url.com?other_keys=youcandefinehere",
"signers": [{
"displayName": "Rahul R",
"birthYear": "1988", //included if specified in Create signature request API
"id": "34f94af1-a8b9-4797-b287-c5ef7bff99a1",
"identifier": "7002484002",
"signatureDetails": null,
"status": "pending",
"url": "https://dg-uat.(website name).co/signature/preview?requestId=6bae9d1f-0fa6-44e5-a801-3ad4a5f10a12&signerId=34f94af1-a8b9-4797-b287-c5ef7bff99a1"
},
{
"displayName": "chetri R",
"birthYear": "1988", //included if specified in Create signature request API
"id": "34f94af1-a8b9-4797-b287-c5ef7bff99a1",
"identifier": "9811412438",
"signatureDetails": null,
"status": "pending",
"url": "https://dg-uat.(website name).co/signature/preview?requestId=6bae9d1f-0fa6-44e5-a801-3ad4a5f10a12&signerId=34f94af1-a8b9-4797-b287-c5ef7bff90a2"
}
],
"status": "sign_initiated"
}

The url from this response should be used to redirect your customer to complete a signature. The session of the url is activated once the user is redirected to it, and remains active for 15 minutes by default. Note that if one of the signers is signing the document, other signers have to wait until the active signer has finished signing.

When the session of a url is active, the status of the signature request is sign_in_progress and no other signer will be able to sign the document at that point of time.


#Get signature request status

Call this API to get the details of a signature request by passing its unique signature request id.

The following table lists the possible values of status of the signature request and corresponding possible values of the status of signer(s)—

Signature request status Possible signer statuses
sign_initiated—No signer has signed the document yet pending
sign_pending—At least one of the signers has signed the document pending | signed
sign_in_progress—When one of the signers is signing the document. No other signer will be able to sign at this stage. pending | in_progress | signed
sign_complete—All signers have completed signing the document signed


Type 1

(website name) has processed your request successfully and no signer has signed the document yet.


Request

Pass the signature request id as a URL parameter

GET /api/signature/:id

Response

You will get the details associated with the provided signature request id like—

  • documentId , points to the document to be signed.
  • id is the signature request id associated with this signature.
  • redirectUrl is publicly hosted URL, provided by you while creating a signature request. You will get the following query params by default—signature request id, a particular signer’s id and status
  • signers is an array of upto 6 signers, each with an independent signer id and status
  • status, the overall status for the signature request. It will change to sign_complete, once all signers have completed signatures.
{
"documentId": "67e0ca30-49e4-4883-86f9-3762f0e6798c",
"id": "cb80bfb4-d163-426e-ad57-1fd8889e62d4",
"redirectUrl": "(website name).co/careers",
"signers": [
{
"displayName": "John Doe",
"birthYear": "1988", //included if specified in Create signature request API
"id": "9d9e47f7-9c24-4587-8775-f01b17e6fc4d"
"identifier": "9876543210",
"signatureDetails":null,
"status": "pending", // ENUM values—pending | in_progress | signed
"url": "sign.(website name).co"
}
],
"status": "sign_initiated" // ENUM values—sign_initiated | sign_pending | sign_in_progress | sign_complete
}

Type 2

(website name) has processed your request successfully and at least one of the signers has signed the document.


Request

Pass the signature request id as a URL parameter

GET /api/signature/:id

Response

You will get the details associated with the provided signature request id like—

  • documentId , points to the document to be signed.
  • id is the signature request id associated with this signature.
  • redirectUrl is publicly hosted URL, provided by you while creating a signature request. You will get the following query params by default—signature request id, a particular signer’s id and status
  • signers is an array of upto 6 signers, each with an independent signer id and status
  • signatureDetails is a JSON object, which has details of the signer as per Aadhaar—aadhaarName, aadhaarSuffix, birthYear, gender and postalCode.
  • status, the overall status for the signature request. It will change to sign_complete, once all signers have completed signatures.
{
"documentId": "67e0ca30-49e4-4883-86f9-3762f0e6798c",
"id": "cb80bfb4-d163-426e-ad57-1fd8889e62d4",
"redirectUrl": "(website name).co/careers",
"signers": [
{
"displayName": "John Doe",
"birthYear": "1988", //included if specified in Create signature request API
"id": "9d9e47f7-9c24-4587-8775-f01b17e6fc4d"
"identifier": "9876543210",
"signatureDetails": {
"aadhaarName": "John Doe",
"aadhaarSuffix": "XXXX",
"birthYear": "1988",
"gender": "M",
"postalCode": "560001"
},
"status": "signed", // ENUM values—pending | in_progress | signed
"url": "sign.(website name).co"
}
],
"status": "sign_complete" // ENUM values—sign_initiated | sign_pending | sign_in_progress | sign_complete
}

#Download signed document

Call this API to download a signed document.


Signature request is in sign_complete state and available for download.


Request

Pass the signature request id as a URL parameter

GET /api/signature/:id/download/

Response
{
"downloadUrl": "https://s3.amazonaws.com/downloadfolderpath",
"id": "cb80bfb4-d163-426e-ad57-1fd8889e62d4", //signature request id
"validUpto": "2021-10-28T14:09:14+05:30" //validity of downloadUrl in ISO 8601 timestamp
}

#Delete a signature request

Call this API to delete a signature request. You can choose to do so once you have downloaded the signed document, or you may even delete it before.

Deleting a signature request also deletes the document associated with it.


You will get a success 204 status post deletion.


Request

Pass the signature request id as a URL parameter

POST /api/signature/:id/delete/

Was this page helpful?

#Signing config creation

The signing config is a JSON that specifies on which pages and at what coordinates the specific user has to sign. The size of the signer's rectangle.

  • Signing config allows you to sign at multiple places on same page.
  • Sign at multiple places on different pages.
  • Sign at any coordinate on a page.

#Understanding the config schema

{
"signers": [
{
"optional": false,
"signRectangles": [
{
"coordinate": {
"lowerLeftX": 402,
"lowerLeftY": 53,
"upperRightX": 542,
"upperRightY": 93
},
"pages": [0,1]
},
{
"coordinate": {
"lowerLeftX": 358,
"lowerLeftY": 232,
"upperRightX": 498.53009106595096,
"upperRightY": 272.52901734104046
},
"pages": [2]
}
]
}
]
}
  • The signers array specifies the config for each signer. Each signer config has information about what pages and coordinates the specific signer has to sign.
  • The above example indicates there is one signer. Who should sign at (x1:402, y1:53, x2:542, y2:93) on pages 0 and 1. Assuming starting index as 0. On coordinate (x1:358, y1:232, x2:498.53, y2:272) on page 2.
  • The coordinates are the lower left and upper right of the diagonal of the sign rectangle.
  • The config can be used to get flexible configurations like one signer signs on multiple places on the same page with multiple signers in the overall configuration.
  • The optional field indicates whether the sign by that signer is required for completion of document.

#Examples

#Multiple signers, different pages and same coordinates

Signer 1 signs at (x1:402, y1:53, x2:542, y2:93) on pages 0 and 1.

Signers 2 signs at (x1:402, y1:53, x2:542, y2: 93) on pages 2 and 3.


{
"signers": [
{
"optional": false,
"signRectangles": [
{
"coordinate": {
"lowerLeftX": 402,
"lowerLeftY": 53,
"upperRightX": 542,
"upperRightY": 93
},
"pages": [0,1]
}
]
},
{
"optional": false,
"signRectangles": [
{
"coordinate": {
"lowerLeftX": 402,
"lowerLeftY": 53,
"upperRightX": 542,
"upperRightY": 93
},
"pages": [2,3]
}
]
}
]
}


#Multiple signers and one signer signs in multiple places on the same page

Signer 1 signs at (x1:402, y1:53, x2:542, y2:93) on pages 0 and 1.

Signer 1 signs at (x1:358, y1:232, x2:498, y2:272) on pages 0 and 1.

Signer 2 signs at (x1:402, y1: 53, x2: 542, y2:93) on pages 2 and 3.

{
"signers": [
{
"optional": false,
"signRectangles": [
{
"coordinate": {
"lowerLeftX": 402,
"lowerLeftY": 53,
"upperRightX": 542,
"upperRightY": 93
},
"pages": [0,1]
},
{
"coordinate": {
"lowerLeftX": 358,
"lowerLeftY": 232,
"upperRightX": 498,
"upperRightY": 272
},
"pages": [0,1]
}
]
},
{
"optional": false,
"signRectangles": [
{
"coordinate": {
"lowerLeftX": 402,
"lowerLeftY": 53,
"upperRightX": 542,
"upperRightY": 93
},
"pages": [2,3]
}
]
}
]
}

#Upload signing config


(website name) has processed your request successfully.


Upload the signing config to get the config id in response.
The request body should be a continuos string. To achieve that, remove line breaks from the JSON before uploading. (remove line break)

Request
POST /api/signature/config
{
"signers": [
{
"optional": false,
"signRectangles": [
{
"coordinate": {
"lowerLeftX": 402,
"lowerLeftY": 53,
"upperRightX": 542,
"upperRightY": 93
},
"pages": [0, 1]
},
{
"coordinate": {
"lowerLeftX": 358,
"lowerLeftY": 232,
"upperRightX": 498.53009106595096,
"upperRightY": 272.52901734104046
},
"pages": [2]
}
]
}
]
}

Response

You will get the following details—

  • Unique configId id which can be used to create signature request.
  • The same configId can be used across multiple signature request using doc of one type.
{
"configId": "825169c7-08a4-4739-94d5-0d8c4ef5e4f1",
"traceId": "5de9b52d-1252-409b-9bc5-063fa67f8191"
}

#Flow of API calls

Read more about the flow of API calls here

#Aadhaar eSign Name Match

If you require the capability to match the name and year of birth of the signer with the Aadhaar data received from UIDAI, we can offer that feature during your onboarding process.

No changes will be required on your end. Raise a ticket at (website name) Support to enable this feature.

This name match feature is performed by means of fuzzy matching, so you can set a percentage threshold for name matching. Any name match that falls below this threshold will be automatically rejected during the signing process.

The error reason will be displayed to the end user on the final eSign page prior to redirection.

You can refer to the error codes listed to see the specific error code and message that will be displayed.

Below are some sample accept and reject scenarios:

#Accepted scenarios:

  1. If both names are in the right/same order (name1 = Rakesh Kumar Singh, name2 = Rakesh Kumar Singh)
  2. If both names are in a different/jumbled order (name1 = Rakesh Kumar Singh, name2 = Singh Rakesh Kumar)
  3. If the match percentage of both names is above the threshold
  4. Names having honorifics such as Mr., Mrs. etc
  5. If one or both names contain initials (name1 = Rakesh Kumar Singh, name2 = R K Singh [OR] name1 = Rakesh K Singh, name2 = R K Singh)

#Rejected scenarios:

  1. If both names have a match percentage below the set threshold
  2. If the number of words in each name do not match (i.e, first/middle/last name missing in one of the names) (name1 = Rakesh Kumar Singh, name2 = Rakesh Singh)
  3. If one name contains only initials (name1 = Rakesh Kumar Singh, name2 = R K S)
  4. If in the case of initials, the non-initial parts of the name do not match (name1 = Rakesh Kumar Singh, name2 = R K Sngh)

Please note that this feature is independent, and should you not opt for it, there will be no changes to the normal eSign flow.


Was this page helpful?

#Error codes and messages for Aadhaar eSign APIs

Below is a table which contains the error codes and corresponding error messages, for errors that may occur during the eSign flow.

Error code Error message
session_expired The session has expired. Please try again.
document_already_signed The document has already been signed successfully.
document_not_found This document is not available anymore.
signature_creation_failure Failed to generate signature.
exceeded_otp_retries Exceeded OTP failure attempts.
otp_not_entered OTP was not entered.
signer_declined Document signing was declined.
otp_expired OTP expired.
aadhaar_not_linked Aadhaar not linked with mobile.
service_down ESP service down.
name_match_error Your name does not match with the data received from Aadhaar.
yob_match_error Your year of birth does not match with the data received from Aadhaar.

Was this page helpful?

#Notifications

Below is the summary of the notifications which need to be processed on your server by exposing an endpoint for (website name) to send an HTTP POST request.

These notifications are sent by (website name) when the end user completes the eSign flow and we receive a callback from our ESP regarding the status of the signature request.

Please send back an HTTP 200 status code if the request sent was processed correctly to avoid receiving multiple notifications for the same eSign event. Response body is ignored.


The base_url is the server URL you share with us to receive notifications.

To get started quickly, you can setup a mock API endpoint using Beeceptor. Once configured, (website name) will send notifications to that URL.

This will help you understand the notification flow before you start to implement it on your server.

#Notification Samples

Here’s a sample of a successful document signing by a signer, with the corresponding signature request id as well as the signing status for all signers associated with a signature request.

{
"data": {
"esign": {
"id": "460b4de8-a240-4803-9a5a-51a0cb37a865",
"documentId": "c79fbf38-392f-4a57-b871-52b5b8f6ee59",
"status": "sign_pending",
"signers": [
{
"displayName": "John Doe",
"id": "cb504cc9-3c10-4847-9282-19cf23b49c40",
"identifier": "898925663920",
"status": "signed",
"errCode": "",
"signatureDetails": {
"aadhaarName": "John Doe",
"aadhaarSuffix": "1234",
"postalCode": "123456",
"gender": "M",
"birthYear": "1990"
}
},
{
"displayName": "Jane Doe",
"id": "7899d1b2-79c3-4878-907f-44136bf44298",
"identifier": "898925663929",
"status": "pending",
"errCode": "",
"signatureDetails": {}
}
]
}
},
"event": "ESIGN_WEBHOOK_NOTIFICATION",
"timeStamp": "2023-03-08T23:45:25.989694+05:30"
}

Here is a sample notification of a failed eSign attempt by a signer, for a given signature request id, as well as the error code for the failure.

{
"data": {
"esign": {
"id": "460b4de8-a240-4803-9a5a-51a0cb37a865",
"documentId": "c79fbf38-392f-4a57-b871-52b5b8f6ee59",
"status": "sign_pending",
"signers": [
{
"displayName": "Jane Doe",
"id": "7899d1b2-79c3-4878-907f-44136bf44298",
"identifier": "898925663929",
"status": "pending",
"errCode": "otp_not_entered",
"signatureDetails": {}
},
{
"displayName": "John Doe",
"id": "cb504cc9-3c10-4847-9282-19cf23b49c40",
"identifier": "898925663920",
"status": "signed",
"errCode": "",
"signatureDetails": {
"aadhaarName": "John Doe",
"aadhaarSuffix": "1234",
"postalCode": "123456",
"gender": "M",
"birthYear": "1990"
}
}
]
}
},
"event": "ESIGN_WEBHOOK_NOTIFICATION",
"timeStamp": "2023-03-08T23:49:12.743012+05:30"
}

Here is a sample notification of an eSign request that's been completely signed by all signers, for a given signature request id.

{
"data": {
"esign": {
"id": "460b4de8-a240-4803-9a5a-51a0cb37a865",
"documentId": "c79fbf38-392f-4a57-b871-52b5b8f6ee59",
"status": "sign_complete",
"signers": [
{
"displayName": "Jane Doe",
"id": "7899d1b2-79c3-4878-907f-44136bf44298",
"identifier": "898925663929",
"status": "signed",
"errCode": "",
"signatureDetails": {
"aadhaarName": "Jane Doe",
"aadhaarSuffix": "1235",
"postalCode": "123457",
"gender": "F",
"birthYear": "1989"
}
},
{
"displayName": "John Doe",
"id": "cb504cc9-3c10-4847-9282-19cf23b49c40",
"identifier": "898925663920",
"status": "signed",
"errCode": "",
"signatureDetails": {
"aadhaarName": "John Doe",
"aadhaarSuffix": "1234",
"postalCode": "123456",
"gender": "M",
"birthYear": "1990"
}
}
]
}
},
"event": "ESIGN_WEBHOOK_NOTIFICATION",
"timeStamp": "2023-03-08T23:51:36.164321+05:30"
}

Was this page helpful?

Data Gateway - eSign


Base URL

https://dg-sandbox.(website name).co

Authentication

HTTP authentication - bearer

Description

Collect legally binding digital signatures. Upload a document and create a signature request for one or more signers.

Create Signature Request with configId

https://dg-sandbox.(website name).co/api/signature


Request

Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Body

documentId

string

Required

redirectUrl

string

Required

configId

string

Required

signers

array

Required

Response

Body

documentId

string

Required

id

string

Required

redirectUrl

string

Required

signers

array

Required

status

string

Required

Language

curl

Node

Python

Go

Response sample


{
"documentId": "91fba655-95d3-4ffd-a47f-5e122024b00c",
"id": "6bae9d1f-0fa6-44e5-a801-3ad4a5f10a12",
"redirectUrl": "http://(website name).co",
"signers": [
{
"displayName": "Rahul Roy",
"id": "34f94af1-a8b9-4797-b287-c5ef7bff99a1",
"identifier": "7042484922",
"signatureDetails": null,
"errCode": null,
"status": "pending",
"url": "https://dg-uat.(website name).co/signature/preview?requestId=6bae9d1f-0fa6-44e5-a801-3ad4a5f10a12&signerId=34f94af1-a8b9-4797-b287-c5ef7bff99a1"
},
{
"displayName": "Karan singh",
"id": "34f94af1-a8b9-4797-b287-c5ef7bff99b1",
"identifier": "7042484933",
"signatureDetails": null,
"errCode": null,
"status": "pending",
"url": "https://dg-uat.(website name).co/signature/preview?requestId=6bae9d1f-0fa6-44e5-a801-3ad4a5f10a12&signerId=34f94af1-a8b9-4797-b287-c5ef7bff99b1"
}
],
"status": "sign_initiated"
}

Upload Signing Config

https://dg-sandbox.(website name).co/api/signature/config


Request

Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Body

signers

array

Required

Response

Body

configId

string

Required

traceId

string

Required

Language

curl

Node

Python

Go

201 CREATED

Response sample


{
"configId": "825169c7-08a4-4739-94d5-0d8c4ef5e4f1",
"traceId": "5de9b52d-1252-409b-9bc5-063fa67f8191"
}

Upload eSign document template

https://dg-sandbox.(website name).co/api/templates


Request

Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Body

template

string

Required

parameters

object

Required

Response

Body

downloadUrl

string

Required

id

string

Required

parameters

object

Required

Language

curl

Node

Python

Go

default

Response sample


{
"downloadUrl": "https://s3-link-goes-here.com",
"id": "6ff6abc2-3306-4133-885a-245d5d9f69dc",
"parameters": {
"account": [
410,
462
],
"accountHolderRelationship": [
270,
437
],
"amount": [
350,
487
],
"beneficiaryName": [
210,
540
],
"beneficiaryRelationship": [
250,
515
],
"date": [
90,
487
],
"fundraiser": [
100,
565
],
"name": [
100,
590
]
}
}

Render eSign document template

https://dg-sandbox.(website name).co/api/templates/{id}/render


Request

Path parameters

id

string

Required


Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Body

name

string

Required

parameters

object

Required

Response

Body

documentType

string

Required

downloadUrl

string

Required

id

string

Required

name

string

Required

Language

curl

Node

Python

Go

default

Response sample


{
"documentType": "application/pdf",
"downloadUrl": "https://s3-link-goes-here.com",
"id": "d784d36c-88c8-4670-b320-d164cad73d8c",
"name": "random name"
}

Get Template

https://dg-sandbox.(website name).co/api/templates/{id}


Request

Path parameters

id

string

Required


Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Response

Body

downloadUrl

string

Required

id

string

Required

parameters

object

Required

Language

curl

Node

Python

Go

Request sample


curl --request GET \
--url https://dg-sandbox.(website name).co/api/templates/{id} \
--header 'x-client-id: test-client' \
--header 'x-client-secret: 891707ee-d6cd-4744-a28d-058829e30f12' \
--header 'x-product-instance-id: 891707ee-d6cd-4744-a28d-058829e30f13'
default

Response sample


{
"downloadUrl": "https://s3-link-goes-here.com",
"id": "6ff6abc2-3306-4133-885a-245d5d9f69dc",
"parameters": {
"account": [
410,
462
],
"accountHolderRelationship": [
270,
437
],
"amount": [
350,
487
],
"beneficiaryName": [
210,
540
],
"beneficiaryRelationship": [
250,
515
],
"date": [
90,
487
],
"fundraiser": [
100,
565
],
"name": [
100,
590
]
}
}

Upload Document

https://dg-sandbox.(website name).co/api/documents


Request

Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Body

document

string

Required

name

string

Required

password

string

Required

Response

Body

id

string

Required

name

string

Required

Language

curl

Node

Python

Go

201 Created

Response sample


{
"id": "67e0ca30-49e4-4883-86f9-3762f0e6798c",
"name": "sample.pdf"
}

Create Signature Request

https://dg-sandbox.(website name).co/api/signature


Request

Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Body

documentId

string

Required

redirectUrl

string

Required

signers

array

Required

Response

Body

documentId

string

Required

id

string

Required

redirectUrl

string

Required

signers

array

Required

status

string

Required

Language

curl

Node

Python

Go

201 CREATED

Response sample


{
"documentId": "91fba655-95d3-4ffd-a47f-5e122024b00c",
"id": "6bae9d1f-0fa6-44e5-a801-3ad4a5f10a12",
"redirectUrl": "http://(website name).co",
"signers": [
{
"displayName": "Akshay P",
"birthYear": "1991",
"id": "34f94af1-a8b9-4797-b287-c5ef7bff99a1",
"identifier": "9876543210",
"signatureDetails": null,
"errCode": null,
"status": "pending",
"url": "https://dg-uat.(website name).co/signature/preview?requestId=6bae9d1f-0fa6-44e5-a801-3ad4a5f10a12&signerId=34f94af1-a8b9-4797-b287-c5ef7bff99a1"
}
],
"status": "sign_initiated"
}

Get Signature Request by Request ID

https://dg-sandbox.(website name).co/api/signature/{requestId}


Request

Path parameters

requestId

string

Required


Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Response

Body

documentId

string

Required

id

string

Required

redirectUrl

string

Required

signers

array

Required

status

string

Required

Language

curl

Node

Python

Go

Request sample


curl --request GET \
--url https://dg-sandbox.(website name).co/api/signature/{requestId} \
--header 'x-client-id: test-client' \
--header 'x-client-secret: 891707ee-d6cd-4744-a28d-058829e30f12' \
--header 'x-product-instance-id: 891707ee-d6cd-4744-a28d-058829e30f13'
200 OK

Response sample


{
"documentId": "50ce4004-2133-4b39-8c5f-6522714ae2d0",
"id": "5f2eedb3-ef0e-4ae9-831b-8ae208a31b9b",
"redirectUrl": "http://(website name).co",
"signers": [
{
"displayName": "Akshay P",
"id": "9d9e47f7-9c24-4587-8775-f01b17e6fc4d",
"identifier": "9876543210",
"signatureDetails": null,
"errCode": null,
"status": "pending",
"url": "https://dg-uat.(website name).co/signature/preview?requestId=5f2eedb3-ef0e-4ae9-831b-8ae208a31b9b&signerId=9d9e47f7-9c24-4587-8775-f01b17e6fc4d"
}
],
"status": "sign_initiated"
}

Delete Signature Request

https://dg-sandbox.(website name).co/api/signature/{id}/delete


Request

Path parameters

id

string

Required


Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Response

Body

204 No Content

Language

curl

Node

Python

Go

Request sample


curl --request POST \
--url https://dg-sandbox.(website name).co/api/signature/{id}/delete \
--header 'x-client-id: test-client' \
--header 'x-client-secret: 891707ee-d6cd-4744-a28d-058829e30f12' \
--header 'x-product-instance-id: 891707ee-d6cd-4744-a28d-058829e30f13'
204 No Content

Response sample


{}

Download a Signed Document

https://dg-sandbox.(website name).co/api/signature/{requestId}/download


Request

Path parameters

requestId

string

Required


Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Response

Body

downloadUrl

string

Required

id

string

Required

validUpto

string

Required

Language

curl

Node

Python

Go

Request sample


curl --request GET \
--url https://dg-sandbox.(website name).co/api/signature/{requestId}/download \
--header 'x-client-id: test-client' \
--header 'x-client-secret: 891707ee-d6cd-4744-a28d-058829e30f12' \
--header 'x-product-instance-id: 891707ee-d6cd-4744-a28d-058829e30f13'
200 OK

Response sample


{
"downloadUrl": "download_url_goes_here",
"id": "29e5a985-7d40-4b42-8260-9d9f4ef60aa1",
"validUpto": "2021-10-28T14:09:14+05:30"
}

Get Esign Audit Report

https://dg-sandbox.(website name).co/api/signature/{requestId}/audit

Get esign sudit report in pdf/json format against a signature request Id.


Request

Path parameters

requestId

string

Required


Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required

Accept

string

Required


Response

Body

id

string

Required

document

object

Required

events

array

Required

Language

curl

Node

Python

Go

Request sample


curl --request GET \
--url https://dg-sandbox.(website name).co/api/signature/{requestId}/audit \
--header 'Accept: application/json' \
--header 'x-client-id: test-client' \
--header 'x-client-secret: 891707ee-d6cd-4744-a28d-058829e30f12' \
--header 'x-product-instance-id: 891707ee-d6cd-4744-a28d-058829e30f13'
200

Response sample


{
"id": "805b326f-e38c-4908-8592-0d3c7200a6b4",
"document": {
"id": "c3eaecdd-db27-4d9b-b9bb-ed7f7771b1c6",
"name": "vaccine"
},
"events": [
{
"createdAt": "2021-11-22 11:43:39.161115",
"activity": "uploaded",
"initator": {
"name": "Test client",
"type": "apiClient",
"userAgent": "PostmanRuntime/7.28.4",
"IP": "223.179.144.102, 172.31.28.227"
},
"metaData": {}
},
{
"createdAt": "2021-11-22 11:44:32.468027",
"activity": "notified",
"initator": {
"name": "Test client",
"type": "apiClient",
"userAgent": "PostmanRuntime/7.28.4",
"IP": "223.179.144.102, 172.31.28.227"
},
"metaData": {
"signers": [
{
"identifier": "9876543210",
"displayName": "Akshay P"
},
{
"identifier": "7042484922",
"displayName": "Rahul"
}
]
}
},
{
"createdAt": "2021-11-22 11:44:55.497584",
"activity": "opened",
"initator": {
"name": "Akshay P",
"type": "signer",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",
"IP": "172.31.42.133"
},
"metaData": {}
},
{
"createdAt": "2021-11-22 11:46:41.198454",
"activity": "signed",
"initator": {
"name": "Akshay P",
"type": "signer",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",
"IP": "172.31.4.118"
},
"metaData": {
"signatureDetails": {
"gender": "M",
"issuer": "NSDL e-Governance Infrastructure Limited",
"birthYear": "1993",
"validFrom": "2021-11-22 11:50:47",
"validUpto": "2021-11-22 12:20:46",
"postalCode": "201300",
"aadhaarName": "Rahul Roy",
"serialNumber": "1784230000",
"aadhaarSuffix": "5340"
}
}
}
]
}

Download document

https://dg-sandbox.(website name).co/api/documents/{id}


Request

Path parameters

id

string

Required


Header parameters

x-client-id

string

Required

x-client-secret

string

Required

x-product-instance-id

string

Required


Response

Body

documentType

string

Required

downloadUrl

string

Required

id

string

Required

name

string

Required

Language

curl

Node

Python

Go

Request sample


curl --request GET \
--url https://dg-sandbox.(website name).co/api/documents/{id} \
--header 'x-client-id: test-client' \
--header 'x-client-secret: 891707ee-d6cd-4744-a28d-058829e30f12' \
--header 'x-product-instance-id: 891707ee-d6cd-4744-a28d-058829e30f13'
default

Response sample


{
"documentType": "application/pdf",
"downloadUrl": "https://s3-link-goes-here.com",
"id": "d784d36c-88c8-4670-b320-d164cad73d8c",
"name": "random name"
}