Andres Vasquez
Andres Vasquez

Reputation: 3

Is there a way to get a enveloped document with all custom fields populated on it, using Docusign Rest API?

I am working in a implementation using Docusign to e-sing some documents , I am able to create the envelope successfully a, but when I use the API to get the document in order to show to the user the document before to be signed the document is empty without the custom fields (tabs) that I have set in the template, so my question is : is there any way to get a document with all custom fields populated even is the document had not been signed?

I have tried using the Docusign REST-APIS to get the document:

GET/v2/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId} That works I am able to get the PDF file but I dont know why the custom fields are not present in the document

Upvotes: 0

Views: 536

Answers (2)

Amit K Bist
Amit K Bist

Reputation: 6818

If you want to get PDF with the prepopulated tabs data and want to send for review to Sales Officer then you can achieve it by two ways:

  • If envelope is created with sent status, then you can add Sales Officer as the first Recipient as Signer Type and add a Approve Tab for that signer, that way if Sales Officer approves then DocuSign will move to next recipient in the workflow and if Sales Officer declines then workflow will stop. So with this approach, everything is handled by DocuSign and you do not need to get PDF copy and then get approval via Email by sending PDF as an attachment, also approval or decline is captured in the audit trail and also in CoC.
  • If envelope is created with draft status, then you can download the PDF with prepopulated tab data by using below API call,

    https://{{EnvironmentVal}}/restapi/v2/accounts/{{AccountIdVal}}/envelopes/{{envelopeId}}/documents/{{documentId}}?show_changes=true

to make any of the above solution work, you need to need to enable a Sending Setting under Admin at an Account Level which will show the Tab Value on the document for everyone.

enter image description here

Upvotes: 1

Drew
Drew

Reputation: 5029

There's an account-wide setting for this.

Navigate to Go to Admin > Sending Settings > When an envelope is sent, write the initial value of the field for all recipients.

As far as I know this can't be toggled at the envelope level by the API.

Upvotes: 1

Related Questions