CANNOT_EXCLUDE_DOCUMENT:无法为该收件人排除该文档

CANNOT_EXCLUDE_DOCUMENT: This document cannot be excluded for this recipient

我发现此测试 eSign 交易有一个奇怪的行为:

{
    "compositeTemplates": [
        {
            "inlineTemplates": [
                {
                    "documents": [
                        {
                            "documentBase64": "BASE64STRING",
                            "documentId": "7",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT7"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "10",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT10"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "12",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT12"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "17",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT17"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "18",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT18"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "19",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT19"
                        }, {
                            "documentBase64": "BASE64STRING",
                            "documentId": "20",
                            "fileExtension": "PDF",
                            "name": "DOCUMENT20"
                        }
                    ],
                    "recipients": {
                        "signers": [
                            {
                                "email": "SIGNER1@mailinator.com",
                                "excludedDocuments": [
                                    "20"
                                ],
                                "name": "SIGNER1",
                                "recipientId": "2",
                                "tabs": {
                                    "signHereTabs": [
                                        {
                                            "documentId": "7",
                                            "pageNumber": "1",
                                            "recipientId": "2",
                                            "xPosition": "45",
                                            "yPosition": "628"
                                        }
                                    ]
                                }
                            }, {
                                "email": "SIGNER2@mailinator.com",
                                "excludedDocuments": [
                                "7"
                            ],
                                "name": "SIGNER2",
                                "recipientId": "3",
                                "tabs": {
                                    "signHereTabs": [
                                        {
                                            "documentId": "20",
                                            "pageNumber": "1",
                                            "recipientId": "3",
                                            "xPosition": "45",
                                            "yPosition": "628"
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "sequence": "1"
                }
            ]
        }, {
            "serverTemplates": [
                {
                    "sequence": "1",
                    "templateId": "f7e03095-8fd0-4c0a-9ec4-50d8fcee9b17"
                }
            ]
        }
    ],
    "emailSubject": "Test eSign",
    "enforceSignerVisibility": "True",
    "status": "sent"
}

当我将它发送到 DocuSign v2.1 时 api {{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes 我收到以下错误:

{
    "errorCode": "CANNOT_EXCLUDE_DOCUMENT",
    "message": "This document cannot be excluded for this recipient. Recipient: SIGNER2 cannot be excluded from Document:DOCUMENT20"
}

但是,正如您在收件人“SIGNER2”中看到的那样,排除的文档列表不包含文档 20,而是包含此文档:

"excludedDocuments": [
    "7"

],

如果我从 excludedDocuments 列表中删除文档“7”,则交易将通过。 我已经用任何模板进行了测试,但都一样失败了。 如果我不使用CompositeTemplate结构,它就成功了。

有什么我遗漏或没看到的吗?

提前致谢

转到“设置”>“发送设置”>“文档可见性” 并将文档可见性更改为“必须签名才能查看,除非发件人” 如果这不起作用,请打开案例并确保包含 API 请求日志。

在我创建一个 DocuSign 案例 4 个多月后,它终于被审查并被认为是 DocuSign API 上的一个错误。 此错误已宣布将在未来修复。

This issue is currently open and in the hands of our engineering team that have come with a workaround. This issue is due to the compositeTemplate call re-generated document Ids, so instead of honoring the values provided for document id the documents are renumbered, in the created envelope DOCUMENT20 does have an ID of 7, so that's where the error is coming from. To remove DOCUMENT20 you would have to send exclude document 7 in your call body.