Reputation: 661
I've created a docusign template that includes multiple documents. The template declares 3 signing roles. I then create an envelope from that template that has 3 recipients. The template, and our account, have document visibility enabled, such that signers can only view the documents that they must sign. After the envelope is completed by all three signatures, I need to store a PDF of each completed envelope under the different recipient's accounts on our site. Because document visibility is enabled, there cannot be a single PDF for all 3 signers. This would break the visibility feature, and they would be able to see each other's private information. Instead, there must be a separate PDF generated for each signer/recipient.
How do I request the completed document/PDF for a specific recipient in a completed envelope?
Upvotes: 1
Views: 1370
Reputation: 661
After consultation with DocuSign engineers I decided to follow Rob's advice below, which is simple, but more manual. After the multiple signing sessions have taken place and the envelope is completed, you can extract the documents out individually using the following REST API method:
Get Envelope Document
v2/accounts/:accountId/envelopes/:envelopeId/documents/:documentId
I say this is manual, because rather than allowing document visibility to seamlessly return a combined and correct view of what the user saw and signed in PDF, you have to duplicate that intelligence in code, and will most likely end up with multiple documents per recipient. This isn't a perfect solution, and they noted that it was somewhat of a hole in their api/offering. So to recap:
Template A contains 4 documents A,B,C,D and 3 signers, Buyer, Seller, and Manager.
It uses document visibility to ensure that the buyer sees documents {A,B,C,D}, the Seller sees documents {A}, and the manager sees documents {A,B}.
An envelope is created from Template A and sent to the Buyer, Seller, and Manager.
Each sign the envelope and it is completed, but because it was an embedded signing, no emails were sent. Additionally, we would like to download and store their documents on our site under their user accounts.
Next, the code downloads the documents for each user by simulating the simple logic involved with document visibility. More specifically:
Documents {A,B,C,D} are downloaded separately and stored in the Buyer's account. Documents {A} are downloaded separately and stored in the Seller's account. Documents {A,B} are downloaded separately and stored in the Manager's account.
We could even optimize it by realizing that the Buyer sees ALL the documents, and therefore they can be downloaded as a single document by using the following REST API call:
Get Envelope Documents Combined
v2/accounts/:accountId/envelopes/:envelopeId/documents/combined
I hope this will be helpful in the future to somebody.
Upvotes: 0
Reputation: 211
Document Visibility will control what signers can see in the signing ceremony as well as what they can see/download after the envelope is completed and they review the documents then.
If you are looking to save individual pdf/documents for storage in your system, there is a call to get individual documents rather than a combined document/pdf. Take a look at the REST call for Get Document from Envelope. The URL is /accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}.
Rob
Upvotes: 2