Reputation: 1
As outlined in the API documentation linked below
We are trying to populate custom fields (textTabs with the same tabLabel) throughout an existing envelope for a recipient on all documents using the update method (PUT). Note: We are testing this in our Dev environment
When sending the JSON body data
{
"textTabs": [
{
"value": "test",
"tabLabel": "\\*firstName"
}
]
}
Without specifying a tabID as this does not seem to be required in the included documentation provided. We are receiving this JSON body error response.
{
"textTabs": [
{
"requireAll": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"localePolicy": {},
"recipientId": "1",
"errorDetails": {
"errorCode": "INVALID_TABID",
"message": "Invalid TabId specified. TabId:not specified."
},
"tabType": "text"
}
]
}
If we do specify a tabID (which appears to be unique per DocuSign envelope) it does work for that single specified textTab within the envelope and nothing else - See below JSON body response.
{
"textTabs": [
{
"isPaymentAmount": "false",
"validationPattern": "",
"validationMessage": "",
"shared": "true",
"requireInitialOnSharedChange": "false",
"senderRequired": "false",
"requireAll": "false",
"value": "test",
"required": "false",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"maxLength": "4000",
"tabLabel": "\\*firstName",
"font": "lucidaconsole",
"bold": "false",
"italic": "false",
"underline": "false",
"fontColor": "black",
"fontSize": "size10",
"localePolicy": {},
"documentId": "2",
"recipientId": "1",
"xPosition": "20",
"yPosition": "165",
"width": "84",
"height": "22",
"tabId": "d31e1587-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"templateLocked": "false",
"templateRequired": "false",
"tabOrder": "0",
"tabType": "text"
}
]
}
Additionally if we are to use the \\* prefix as suggested in the documentation, the tabLabel is updated to "\\*firstname"
This does not seem like the correct behavior. Is anyone able to point me in the right direction? or am I interpreting something wrong here?
Upvotes: 0
Views: 110
Reputation: 14050
You have to specify a specific tab when setting tab values, there's no mechanism that I know of to do wildcard or set all tabs in one swoop.
You could make GET call(s) first to retrieve all the tabs and then set up a single call that sets them all (by iterating through all the tabs and fetching the tabId for each)
There may be one way to do this differently, but it requires that the tabs have tabLabel and if it's the same, you can set it for all tab with the same tabLabel in one call (without specifying tabId) but not sure that would work for you because I don't see that in the response when you created the tabs.
Upvotes: 0