Get form data (including concealed values) via API? - docusignapi

I'm working on a Form that contains various fields for adding values (texttabs/ listtabs/ etc).
The form goes to two recipients, one of whom has access to half the fields which have been set to "concealed" (true) to prevent other recipients from viewing personal information.
My question is, is it possible to retrieve the Form Data (concealed values) via API? I'd like to reattach these concealed values to the final product in my API script once the form is completed in Docusign. I searched everywhere but could not find an answer.
Thanks,
Dan

Yes this is possible to do through the DocuSign REST API. It's not very intuitive but there's an API call you can make to retrieve the recipient entered values.
Have a look at the Get Envelope Recipient Status API call, and more importantly, it's one optional parameter. Details of the call are:
URL:
/accounts/{accountId}/envelopes/{envelopeId}/recipients
HTTP Method:
GET
Parameters:
The only required parameter is the envelope ID. If the optional query include_tabs is set to true, the tabs associated with the recipient are returned. If the optional query include_extended is set to true, the extended properties are returned.
-Example (from documentation)-
GET https://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes/{envelopeId}/recipients?include_tabs=true
X-DocuSign-Authentication: <DocuSignCredentials><Username>{name}</Username><Password>{password}</Password><IntegratorKey>{integrator_key}</IntegratorKey></DocuSignCredentials>
Accept: application/json
Content-Type: application/json
See the REST API Guide page 192 for more info on the call.

Related

Custom document metadata when using DocuSign REST API

Is there a way that I can provide any custom document metadata when adding documents to my DocuSign envelopes when using the REST API?
DocuSign appear to enforce the use of a positive integer for the DocumentId's we provide in the envelope. Whilst we are indeed using a positive integer, sometimes, there is some additional info that we need to supply, which we would like to come back in the DocuSign webhook events for specific documents.
I've had a look at the Document object but can't see anything obvious that I could use. An example would be simply providing a true/false along with a specific document, which I can inspect when I receive the DS webhook events.
At the moment, the only workaround I can think of is to add an Envelope Custom Field which contains any of my DocumentId's where 'true' is applicable, which feels like a bit of a shoddy solution, and I don't know if there's a character limit in those Envelope Custom Fields, which could break such a workaround.
Custom envelope text fields give you complete flexibility on providing meta-data that you can get back from the webhook. Here is some information about this:
This is how you create a custom field for an envelope:
https://developers.docusign.com/docs/esign-rest-api/reference/Envelopes/EnvelopeCustomFields/create/
This article shows code examples in 7 languagues on how to get the custom fields values :
https://developers.docusign.com/docs/esign-rest-api/how-to/get-envelope-custom-field-values/

Envelopes get - how to get a Generic JSON Response

When using the DocuSign REST V2 API, doing a GET /v2/accounts/{accountId}/envelopes/{envelopeId} returns an object with 24 properties, mostly URIs, IDs and timestamps.
The documentation for this call (https://docs.docusign.com/esign/restapi/Envelopes/Envelopes/get/) in Examples section has a sub-section called "Get Status About a Specific Envelope " that shows this (24 properties), but it also has a sub-section called "Generic JSON Response" that has a lot more properties and data.
I would like to get a response like the "Generic JSON Response" but I cannot figure out how. Any help would be appreciated.
The Generic JSON Response shows the response that would be returned for an envelope object that has every parameter/feature in use.
In addition, the Generic Response includes some secondary and tertiary data that may not be returned for the standard call.
What data do you want?
If you need an envelope's recipients, use the EnvelopeRecipients::list method. If you want the envelope's documents, there is a separate call for that. Et cetera.
The problem is that returning everything known about an envelope would be a very expensive call for the platform to process. Therefore the data is provided to you in different calls.

API to display filled in tags in PNG format

We are looking for a way to have functionality similar to the following api method which returns a requested page in PNG format (non editable format):
https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST API References/Get a Page Image.htm
but with the ability to display the values for any custom, etc. tags that have been filled in. Currently, no tags or values are displayed regardless of whether they have been filled in.
Does any know a way to do this?
I don't believe you can bring back the tab values with the page image when the envelope is still in process, I think only completed envelopes will show that info.
You'll most likely have to make a separate API call to retrieve the recipient entered tab values. Have a look at the Get Envelope Recipient Status API call, and more importantly, it's one optional parameter. Details of the call are:
URL:
/accounts/{accountId}/envelopes/{envelopeId}/recipients
HTTP Method:
GET
Parameters:
The only required parameter is the envelope ID. If the optional query include_tabs is set to true, the tabs associated with the recipient are returned. If the optional query include_extended is set to true, the extended properties are returned.

DocuSign Customize Email in Brand To Use [[EnvelopeId]] in a link

I am trying to customize the brand resource file so that it uses the EnvelopeId within a query parameter in a custom html link so that the destination site can filter rows based on the Envelope.
For example, when using the following in the DocuSign XML Email resources file for the brand (e.g. in envelope completed email):
View Rows
DocuSign escapes the [[EnvelopeId]] (presumably because its within a link), causing the resulting html for the email to be
View Rows
instead of
View Rows
Is there a way to prevent the EnvelopeId from being escaped or another way to use the EnvelopeId with a custom link in the envelope completion email?
Whenever you see [[ ]] that refers to something called a DocuSign Merge Field. As you are referring to, these are dynamic variables which get replaced with expected values at runtime. I do not believe that EnvelopeID is a valid merge field in this context. The closest thing you have to referencing a link to the envelope is the [[QuickURL]] merge field.
If you were going down an API integrated route, you could specify the entire email message body contents via the API, and you would know the envelopeID at that point and could pass it in w/your logic.

Retrieving Recipient Status via REST API

There appears to be two ways I can gather status information about individual recipients on an envelope:
GET - v2/accounts/:accountId/envelopes/:envelopeId/recipients
GET - v2/accounts/:accountId/envelopes/:envelopeId/audit_events
Unfortunately, each of these suffers from a separate limitation that is making it difficult for me to use either.
This API call returns two DateTime values of interest: deliveredDateTime and signedDateTime. I am able to call and use this API successfully. However, it appears to me that deliveredDateTime is not specified until the user actually clicks the email link AND clicks the review documents button on the signer view. Since what I was actually interested in might be better described as sentDateTime, deliveredDateTime doesn't appear to work for my needs.
This API call returns a detailed list of all events that have transpired on the envelope, including individual receipient status updates. However, the data format is such that in order to tie the result data back to recipients, I have to do string matches on the recipient name. I'd prefer to do the match based on email or, better still, recipientID, but the audit log entries for "sent invitations" and "signed" don't contain these fields. Here is an example (click here to view larger):
Is there an API call other than these two that I can use? Is there a way to get additional data in the audit event API call?
Thank you in advance,
Andrew
I don't believe there's a way to get additional data from the audit_events call since the DocuSign API documentation (which is up to date) indicates that call has no parameters (other than the envelopeId in the URL).
I think you're stuck with doing a string comparison on the userName value to identify/link your recipients, however I want to point out that once you do that you can then link to their unique recipientGuid through the first api call you've highlighted here.
For instance, the /audit_events API call seems to achieve what you want and has all the info you need, however it identifies the recipients through their userNames. If you then make a call on the same envelope and check the response from the /recipients URI, it contains the name, email, recipientId, and recipientGuid for each and every recipient in the envelope. Match the user names and you now have access to their IDs, etc.
So in the end I don't believe there's one API call to achieve this but you can solve by doing one string compare and combining the results from the API calls you've highlighted.

Resources