Amit K Bist
Amit K Bist

Reputation: 6818

How to add PDFs to a draft envelope with "transformPdfFields": "true", so that DS assigns the tabs to the existing envelope recipients?

The customer wants to add multiple documents to an envelope. We need to add the documents one at a time due to their large size. The PDFs have Adobe fields in them

• We create a draft envelope with 2 signers

• We then use PUT /restapi/v2/accounts/{accountId}/envelopes/{envelopeId}/documents for the PDF documents with "transformPdfFields": "true", but on transformation, DocuSign is creating new recipients as the placeholder recipients. The pdf fields are getting assigned to the placeholder recipients.

• Problem: we want to use the recipients already present in the draft envelope. • Is there a way to add a document to a draft envelope with "transformPdfFields": "true", so that DocuSign assigns the new tabs to the recipients already present in the draft envelope?

Upvotes: 1

Views: 123

Answers (1)

Praveen Reddy
Praveen Reddy

Reputation: 7383

During addition of the document. the transformed fields cannot be assigned to an existing recipient.

However you can make additional calls and reassign the tabs.

  1. Get all the recipients and tabs using the listEnvelopeRecipients api. Specify the include_tabs = true query string parameter.

    • From the above call get all the Tab ID's that were created from the Transformed Fields. Also note the RecipientId of the main recipient and Placeholder recipient.
  2. Use the UpdateEnvelopeRecipientTabs api to reassign the recipients.

    PUT /v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/tabs

RecipientId should be that of the main recipient to whom you want to assign the transformed fields.

Json Request

{
    "textTabs": [
      {
        "tabId": "1c8ff655-d8c3-4354-b4f2-0bbc4ed73148"
      },
      {
        "tabId": "b861f00e-7f08-4e2f-ab67-c7ea36641aae"
      }
    ]
}
  1. Delete the place holder recipient that was created during the addition of the document using the DeleteEnvelopeRecipients api.

    DELETE /v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}

Upvotes: 1

Related Questions