0
votes

I'm currently filling a docusign template using the C# docusign nuget package. I'm creating an envelope with a document containing custom tabs and send it afterwards.

I'm wondering if it's possible to programmatically retrieve the updated document as a stream or a byte array with the already filled tabs without having the document to be signed.

I'm currently calling the /v2/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId} endpoint api with the created envelope id and document id but i'm only getting the original template without the filled tabs as a stream.

var envelope = new EnvelopeDefinition
{
      EmailSubject = "Signature",
      EmailBlurb = "",
      TemplateId = templateId,
      TemplateRoles = new List<TemplateRole> { templateRole }, // containing filled tabs
      Status = "created"
};

var envelopesApi = new EnvelopesApi(apiClient.Configuration);
var envelopeSummary = envelopesApi.CreateEnvelope(defautAccount.AccountId, envelope);
...
...
...
var memoryStream = (MemoryStream) envelopesApi.GetDocument(defautAccount.AccountId, envelopeSummary.EnvelopeId, "combined"); // returning blank template
1

1 Answers

0
votes

You mean you want the pdf version of the document with the fields filled in before it was updated or completed (signed) by the signer recipient?

You could create a cc recipient with a routing order before the signer recipient. If the tabs are visible to the cc recipient then you should be able to download the doc after the cc recipient "completes." -- Give DocuSign a couple of seconds to "complete" the cc recipient after you send the envelope.

The cc recipient can be a blackhole or real email address.