Reputation: 23
Im trying to fill some custom fields on my template. And send the value of the custom field on the JSON.
So what I did is this:
Log in to https://appdemo.docusign.com
Now, using the api Im try to create an envalope with this template.
According to one question that I found:
If the fields that you're trying to fill are data fields that
you've placed on the
documents within the Template, then these aren't "custom fields" -- they're "tabs".
docusign template custom field not being filled
So for create an envalope Im sending this json:
{
"emailSubject":"This is a DocuSign Test from Mauricio",
"status":"sent",
"templateId":"a0847413-35ac-48ed-9ed6-9b7f96019eda",
"templateRoles":[
{
"email":"[email protected]",
"name":"Mauricio Taranto",
"roleName":"Test",
"routingOrder":"1",
"tabs": {
"textTabs": [
{
"name": "Custom",
"value": "This is a custom value"
}
]
}
}
],
}
I dont have any issues on the creation in terms of the api response. I get the email and also the name field and email name get filed on the PDF.
But the custom field I added to the template does not populate.
The square under my email is the custom field (see the image.)
What Im doing wrong?
Thanks for your help!
Upvotes: 0
Views: 347
Reputation: 5029
You'll need to use the "tabLabel" parameter instead of the "name" parameter for your tag names. Everything else looks correct.
As a side note, the API docs say if you're going to have the same tag more than once on the document, you'll want to add \\*
before the tag's name so that all are populated.
Changing your example to this should work:
{
"emailSubject": "This is a DocuSign Test from Mauricio",
"status": "sent",
"templateId": "a0847413-35ac-48ed-9ed6-9b7f96019eda",
"templateRoles": [{
"email": "[email protected]",
"name": "Mauricio Taranto",
"roleName": "Test",
"routingOrder": "1",
"tabs": {
"textTabs": [{
"tabLabel": "\\*Custom",
"value": "This is a custom value"
}]
}
}],
}
Upvotes: 1