Radha
Radha

Reputation: 7

create envelope using composite template and set values for custom tabs

I have recorded below video to explain what I am trying to achieve.

https://www.awesomescreenshot.com/video/23765847?key=c6107a99bee1285ea91f533a1e52b1f6

Please help me if someone knows how to create envelope with composite template and fill information for tabs using API V2.1

I am sending below request to create envelope with composite template but its not selected the value for listitems

ENDPOINT : /restapi/v2.1/accounts/e52b70de-**************-dd90c61f9eac/envelopes

REQUEST : 
{
  "status": "sent",
  "compositeTemplates": [
    {
      "compositeTemplateId": "1",
      "serverTemplates": [
        {
          "templateId": "a975e66**********************68f3fb0d19",
          "sequence": "1"
        }
      ],
      "inlineTemplates": [
        {
          "sequence": "1",
          "recipients": {
            "signers": [
              {
                "email": "[email protected]",
                "name": "test user",
                "clientUserId": "15623477",
                "roleName": "Tester",
                "recipientId": "76987934",
                "tabs": {
                  "listTabs": [
                    {
                      "value": "ONE",
                      "tabLabel": "Dropdown",
                      "tabType": "list",
                      "documentId": "1"
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  ]
}

RESPONSE : enter image description here

When I tried with below REQUEST its not working for this one as well

{
 "status": "sent",
 "compositeTemplates": [
   {
     "compositeTemplateId": "1",
     "serverTemplates": [
       {
         "templateId": "a975e66**********************68f3fb0d19",
         "sequence": "1"
       }
     ],
     "inlineTemplates": [
       {
         "sequence": "1",
         "recipients": {
           "signers": [
             {
               "email": "[email protected]",
               "name": "test user",
               "clientUserId": "15623477",
               "roleName": "Tester",
               "recipientId": "76987934",
               "tabs": {
                 "listTabs": [
                   {
                     "tabId": "fd07f90c-e98c-4ee9-bcd8-8a46dcbace1f",
                     "value": "ONE"
                   }
                 ]
               }
             }
           ]
         }
       }
     ]
   }
 ]
}

Still its not working.

Below is my listtabs data which I received from
/restapi/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs API call

"listTabs": [
    {
      "listItems": [
        {
          "text": "ONE",
          "value": "ONE",
          "selected": "false"
        },
        {
          "text": "TWO",
          "value": "TWO",
          "selected": "false"
        }
      ],
      "value": "",
      "originalValue": "",
      "shared": "false",
      "required": "true",
      "locked": "false",
      "requireAll": "false",
      "tabLabel": "Dropdown",
      "font": "lucidaconsole",
      "fontColor": "black",
      "fontSize": "size9",
      "localePolicy": {},
      "documentId": "1",
      "recipientId": "76987934",
      "pageNumber": "1",
      "xPosition": "236",
      "yPosition": "229",
      "width": "78",
      "height": "0",
      "tabId": "fd07f90c-e98c-4ee9-bcd8-8a46dcbace1f",
      "templateLocked": "false",
      "templateRequired": "false",
      "tabType": "list"
    }
  ]

Upvotes: 0

Views: 32

Answers (1)

Inbar Gazit
Inbar Gazit

Reputation: 14050

Try this:

{
  "status": "sent",
  "compositeTemplates": [
    {
      "compositeTemplateId": "1",
      "serverTemplates": [
        {
          "templateId": "a975e66**********************68f3fb0d19",
          "sequence": "1"
        }
      ],
      "inlineTemplates": [
        {
          "sequence": "1",
          "recipients": {
            "signers": [
              {
                "email": "[email protected]",
                "name": "test user",
                "clientUserId": "15623477",
                "roleName": "Tester",
                "recipientId": "76987934",
                "tabs": {
                  "listTabs": [
                    {
                      "listItems": [
                        {
                          "text": "ONE",
                          "value": "ONE",
                          "selected": "true"
                        },
                        {
                          "text": "TWO",
                          "value": "TWO",
                          "selected": "false"
                        }
                      ],
                      "value": "",
                      "originalValue": "",
                      "shared": "false",
                      "required": "true",
                      "locked": "false",
                      "requireAll": "false",
                      "tabLabel": "Dropdown",
                      "font": "lucidaconsole",
                      "fontColor": "black",
                      "fontSize": "size9",
                      "localePolicy": {},
                      "documentId": "1",
                      "recipientId": "76987934",
                      "pageNumber": "1",
                      "xPosition": "236",
                      "yPosition": "229",
                      "width": "78",
                      "height": "0",
                      "tabId": "fd07f90c-e98c-4ee9-bcd8-8a46dcbace1f",
                      "templateLocked": "false",
                      "templateRequired": "false",
                      "tabType": "list"
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  ]
}

Upvotes: 0

Related Questions