This tutorial explains how to retrieve data that people entered by filling out and signing your forms using our eSignature API.
Identify Fields
You can only retrieve data entered by signers in some fields. You also need a way identify the fields you add to your form, otherwise you won’t be able determine what data was entered in which particular field.
We offer a way to specify identifiers for your fields while sending out a signature request, and later retrieve all the data that signers have entered in these fields. This data will come with the field identifiers that you specified, so you will know what data has been entered in which field.
To identify your fields, for each of them you would need to specify the api_id parameter. The value for this parameter can be any non-empty string.
It makes sense to select unique api_ids for your fields within each signature request (though it is not a requirement), otherwise you won’t be able to differentiate between different fields later.
In the code above we have two text fields, one for the signer’s name, the other for the title. We selected title as api_id for the title field, and name for the name field.
You can use any scheme to generate your api_ids, like e.g. Universally Unique Identifiers.
Get Submitted Data
After the document will be filled out and submitted by the signer, your system will be notified about this event via a callback. Here you can find more info about it Signature Request Completed Callback.
In your callback handler you will need to make the following request to retrieve the entered data.
The response will contain more information about your document fields but in your case you will need only two attributes: api_id to identify the field and submitted_content, which is the value entered in this field by the signer.
The document_id parameter that you need for the request can be extracted from the content that DigiSigner will send you via the callback.
Get Document Attachments
If you are using fields for accepting attachments in your forms you may need to automatically download the attachments uploaded by the signer.
To do this you would need to iterate over the document fields (see the previous section), identify the filled in attachment fields (status FILLED and type ATTACHMENT) and for each of them call the API request to download the corresponding attachment (see Download Document Attachment).
See below the sample code how to do this.