Chris C
Chris C

Reputation: 53

POSTMan sample - creating envelope from a template is not populating the user tags

I created a DocuSign template that contains two roles: Provider and Recipient. I did this via the DocuSign Sandbox UI.

In my template, I have one document, with four tabs on it: 1. ProviderName 2. ProviderAddress1 3. RecipientName 4. RecipientAddress

Should I be using CustomFields vs. Tabs?

What's the API call(s) that I should be making to do the following, given a template with a document in it:

  1. create an envelope for specific users
  2. update the text within the document in the template for the specific users
  3. send it out?

In the POSTMan sample, I tried using this URL, doing a POST:

{{baseUrl}}/envelopes

passing in a templateId, and the following JSON below in the POST body:

JSON:

{
  "templateRoles": [{
        "email": "{{signer1Email}}",
        "name": "The Provider",
        "roleName": "Provider",
        "tabs": {
            "textTabs": [{
                "tabLabel": "ProviderName",
                "value": "This is the provider!"
            }, 
            {
                "tabLabel": "ProviderAddress1",
                "value": "10 Provider Street, Baltimore, MD 21212"
            }]
        }
    },
    {
        "email": "{{otherEmail}}",
        "name": "Test Recipient",
        "roleName": "Recipient",
        "tabs": {
            "textTabs": [{
                "tabLabel": "RecipientName",
                "value": "This is the recipient!"
            }, 
            {
                "tabLabel": "RecipientAddress",
                "value": "10 Main Street, Baltimore, MD 21212"
            }]
        }
    }],

  "emailSubject": "DocuSign API - Signature Request on Document Call",
  "templateId": "<<template ID>>",
  "status": "sent"
}

This does return an Envelope Id in the response, and I do receive the email with the DocuSign document to sign.

However, the tabs are NOT populated, they're blank.

Upvotes: 0

Views: 130

Answers (2)

Inbar Gazit
Inbar Gazit

Reputation: 14050

Try to add the documentId and pageNumber properties to your tabs. Also, ensure the label matches what is in the original template. Lastly, you may need to add recipientId as well to each of the recipients to match what is in the template (this one may not be required since you have the roleName but just in case)

Upvotes: 0

Drew
Drew

Reputation: 5029

Are the roles in the Template empty placeholders? If a name/email is defined on the template, the API call won't populate them as you might expect.

Upvotes: 0

Related Questions