This tutorial explains how to send signature requests for your documents using our eSignature API (Application Programming Interface).
Send Out Documents for Signing
The most simple case is when you need to send out a document for signing without specifying any fields. In this case the signer or the signers will be able to sign your document where they feel it should be done.
Please note that if you want to send a signature request from your command line using CURL, you would need to upload your document to DigiSigner first. We will show how to do it in our first code sample, but later we will skip this step each time. The upload request will return the document_id parameter of the uploaded document, which you will use as an input parameter in the signature request.
This doesn’t apply if you are using our PHP or Java client libraries. Then you will only need to perform one API call, which will automatically upload your document and send the signature request for you.
In the following code sample we demonstrate how to send such a signature request.
This was the most simple signature request that is possible. It will work, but in most cases it makes sense to specify explicitely where people should sign your document or add text to it. That makes the signing process easier for them and reduces the potential for errors. This can be done by using fields.
Send Out Documents With Fields
The following code sample demonstrates how to send out a document with specified fields.
The signers will be able to insert their signatures and enter texts only in these fields. They will be also guided from field to field, which makes the signing process easier and less error-prone.
In the above sample code we send out a document for signing and specify one signature field, where the document should be signed, and one text field, where some text should be entered.
Both fields are specified using their coordinates in the format [x1, y1, x2, y2]. We use the standard PDF coordinate system here, the origin of the document is at the bottom-left corner.
We support the following types of fields: SIGNATURE, TEXT, INITIALS, DATE, CHECKBOX. For each field you can specify also other parameters, like label or content. For the full list of parameters please see Signature Request Parameters.
Send Out Documents to Multiple Signers
You can send out one and the same document for signing to multiple signers. Here is the sample code for sending out one document to two signers.
For simplicity we haven’t specified fields for the signers, but of course you can do it.
Both signers will receive the emails with the link to the document at the same time and can sign it independent from each other.
How to Set Up Signing Order
Sometimes when you have multiple signers you don’t want to send your document to all signers at once. Let’s assume that you want to send your document to the first signer, and only when they complete it, the document should be automatically sent to the second signer.
This is how you can do it.
For each signer we specified the order in the signing queue. The signer1 will receive the link to the document as the first, and only after completion the document will be sent to the signer2.
You can use the signing order feature to build much more sophisticated workflows. For example if you have 5 signers, and two of them need to sign the document as first (doesn’t matter in which order), then the document should be sent to the third signer, and only after that to the last two (the order between them is also not essential).
Here is how you can construct your workflow by assigning each signer a corresponding order.
|signer 1||1||receives document immediately|
|signer 2||1||receives document immediately|
|signer 3||2||receives document only after both signers 1 and 2 have signed|
|signer 4||3||receives document immediately after signer 3 has signed|
|signer 5||3||receives document immediately after signer 3 has signed|
More tutorials and documentation
Signature Request Parameters – all signature request parameters
How to Send Signature Requests – code samples for sending signature requests
How to Embed Documents – how to embed documents on your web site to get them filled out and signed
How to Use Templates Via API – how to configure templates in GUI mode and use them via our eSignature API
How to Get Data Submitted By Signers – how to retrieve data signers entered while filling out your form
Don’t hesitate to contact us in case you have any questions or suggestions about using our eSignature API.