1
votes

I've read thru a few SO posts about using the Docusign REST API & populating fields (tabs?), but fields are still not getting populated.

From the Docusign UI, I made a template that has a few roles, including "sender". I uploaded a PDF file that has a few fields. When prompted, I assigned all of them to "sender" role. One of the fields is called "Landlord" (Data Label of this Text field). I POST'd this JSON to the /envelopes REST endpoint, but the "Landlord" field/tab doesn't get populated! What's going on? Am I confusing field & tabs? What's missing?

{
    'status': 'sent',
    'emailSubject': "Some Document",
    'templateId': 'XXXXXXXX-XXXX-4809-a825-1f05a91853e8',
    'accountId': 'XXXXXXX',
    'templateRoles': [{
        'email': 'me@mymail.com',
        'tabs': {
            'textTabs': [{
                'tabLabel': 'Landlord',
                'name': 'Landlord',
                'value': 'John Doe'
            }]
        },
        'name': 'Frank Sinatra',
        'roleName': 'sender'
    }]
}
1

1 Answers

3
votes

I made a quick template with a "Landlord" data field, used your code and my tab populated no problem

{
    'status': 'sent',
    'emailSubject': "Some Document",
    'templateId': 'xxxxxxx-6A28-4257-8DAF-1FDDD5920289',
    'templateRoles': [{
        'email': '~testemail~',
        'tabs': {
            'textTabs': [{
                'tabLabel': 'Landlord',
                'name': 'Landlord',
                'value': 'John Doe'
            }]
        },
        'name': 'Frank Sinatra',
        'roleName': 'sender'
    }]
}

enter image description here

Can you confirm there are no trailing spaces at the end of your datafield name?

**EDIT: There were multiple of the same text tab and only the second was populating, for this curious. This can be resolved by adding "//*" before the tab label.