Reputation: 13
I generate an envelope of 10-15 documents. There are two end users, the user that will sign should not see document 1 with the data of the second user. The second is to see all the documents.
I tried to use "excludedDocuments", but I come across the error "ACCOUNT_LACKS_PERMISSIONS".
The example I am generating (incomplete)
{"compositeTemplates": [
{
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"email": "[email protected]",
"name": "Albert Einstein",
"recipientId": "1",
"clientUserId": "[email protected]",
"routingOrder": "1",
"tabs": {
"textTabs": [],
"radioGroupTabs": [],
"checkboxTabs": []
}
}
]
}
}
],
"document": {
"documentId": 1,
"name": "FirstFile",
"transformPdfFields": "true"
}
},
{
"inlineTemplates": [
{
"sequence": "1",
"recipients": {
"signers": [
{
"email": "[email protected]",
"name": "Albert Einstein",
"recipientId": "1",
"clientUserId": "[email protected]",
"routingOrder": "1",
"tabs": {
"textTabs": [],
"radioGroupTabs": [],
"checkboxTabs": []
}
}
]
}
}
],
"document": {
"documentId": 2,
"name": "SecondFile",
"transformPdfFields": "true"
}
}
]}
Please tell me how to solve this problem. Thank you in advance
upd PHP7 code:
$compositeTemplates[] = [
'inlineTemplates' => [
[
'sequence' => '1',
'recipients' => [
'signers' => [
[
'email' => $userData['email'],
'name' => $userData['name'],
'recipientId' => '1',
'clientUserId' => $userData['email'],
'routingOrder' => '1',
"excludedDocuments" => ['1'],
'tabs' => [
'textTabs' => Template::fileTextTabs($sendData[$withoutExtension]['text'] ?? false), //here the simple formation of tabs according to what is
'radioGroupTabs' => Template::fileRadioGroupTabs($sendData[$withoutExtension]['radio'] ?? false),
'checkboxTabs' => Template::fileCheckboxTabs($sendData[$withoutExtension]['checkbox'] ?? false),
],
],
],
"carbonCopies" => [
[
"email" => '[email protected]',
"name" => 'copies',
"recipientId" => "2",
"routingOrder" => '1',
],
],
],
],
],
'document' => [
'documentId' => $id,
'name' => $filename,
'transformPdfFields' => 'true',
],
];
$id++;
Upvotes: 0
Views: 163
Reputation: 2065
This error means that the Admin account is not properly configured to have the document visibility enabled.
To do so, go to your DocuSign Admin Account and scroll down to Sending Settings.
Make sure that one of the below options is selected instead of Off
For more information on the Document Visibility drop-down options, see the official documentation
Upvotes: 1