'DocuSign Templates - Populate values for Subset of Tabs

I'm sending an envelope successfully that uses a DocuSign Template. I'm not supplying any tabs data with the request as that is all setup in the DocuSign Template and this guide mentions that "Because all tab, routing, and document information is set within the template, you do not need to set it within the envelope body".

I now need to populate one of the text tabs on the Template with a value from our end. There are 3 text tabs but I only want to populate 1 of these. Here's the current JSON for my request:

    {
    "disableResponsiveDocument" : false,
    "emailBlurb" : "",
    "emailSubject" : "Please Sign the Agreement",
    "recipients" : 
    "status" : "sent",
    "templateId" : "xxxxxxxxxxxxxxxxxxxx",
    "templateRoles" : 
    [
        {
            "email" : "[email protected]",
            "name" : "John Jeffries",
            "roleName" : "Landlord",
            "routingOrder" : "1",
            "tabs" : {}
        },
        {
            "email" : "[email protected]",
            "name" : "Sally Smith",
            "roleName" : "Tenant",
            "routingOrder" : "2",
            "tabs" : {}
        }
    ]
}

I've tried adding the text tab to the tabs object but this results in only that tab appearing when you view the document via the email link that is sent. Is there a way to just pre-populate a subset of Template tabs without having to specify all the tab details when sending the request?



Solution 1:[1]

This was kind of answered here already but I'll re-summarize what Inbar said. Pre-filled tabs cannot be associated with a user so there are two options to do this

  1. Create the fields to the template directly and fill them out in your API Call. Every envelope created using this template will have this field then
  2. Add the pre-filled tabs in a second call after the envelope has already been created using a call to /restapi/v2.1/accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/tabs with
{  
"prefillTabs": {  
"textTabs": [
      {
        "value": "a prefill text tab",
        "pageNumber": "1",
        "documentId": "1",
        "xPosition": 316,
        "yPosition": 97
      }
    ]
  }
}

something similar based on what you need

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Karan Kaushik