docusignapi - 如何创建带有signingGroup 收件人的信封?
问题描述
我正在使用这个 uri 创建一个信封:
POST https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/envelopes
标题:
Content-Type : application/json
X-DocuSign-Authentication: {"Username" : *****, "Password" : ******, "IntegratorKey" : *********}
身体:
{
"status": "sent",
"emailSubject": "Signing Request for Doc2.docx",
"signerCanSignOnMobile": "true",
"documents": [
{
"documentId": "384098342",
"name": "Doc2.docx",
"fileExtension": "docx",
"documentBase64": *****,
"tabs": {
"textTabs": [
{
"xPosition": "2",
"yPosition": "3",
"documentId": "384098342",
"pageNumber": "1",
"value": "Fill in name.",
"locked": "false",
"anchorString": "sign5",
"anchorXOffset": "1.75",
"anchorYOffset": "0",
"anchorUnits": "inches",
"anchorIgnoreIfNotPresent": "true"
}
]
}
}
],
"recipients": {
"signers": [
{
"name": "Tom Ford",
"email": "tom.ford@email.com",
"recipientId": "64000",
"clientUserId": "c7052b97-f9a7-4af4-85de-8c64371467b1"
},
{
"name": "Demand Approvers",
"email": "approvers@email.com",
"signingGroupId": "true",
"signingGroupName": "Demand Approvers",
"recipientId": "626000",
"clientUserId": "123c6d15-1d25-4595-9878-5cbda4ba2823",
"signingGroupUsers": [
{
"userName": "John Smith",
"userId": "9c328221-1e86-41db-a3e7-bde9b4b4a50d",
"email": "josmith@example.com"
}
]
}
]
}
}
并且请求成功。但是,当我尝试查询返回的信封时,“需求批准者”被列为单个收件人,而不是作为签名组。这是一个示例输出:
{
"status": "sent",
"documentsUri": "/envelopes/063454a6-dee6-4e86-8d38-56d85e66c61e/documents",
"recipientsUri": "/envelopes/063454a6-dee6-4e86-8d38-56d85e66c61e/recipients",
"attachmentsUri": "/envelopes/063454a6-dee6-4e86-8d38-56d85e66c61e/attachments",
"envelopeUri": "/envelopes/063454a6-dee6-4e86-8d38-56d85e66c61e",
"emailSubject": "Signing Request for Doc2.docx",
"envelopeId": "063454a6-dee6-4e86-8d38-56d85e66c61e",
"signingLocation": "online",
"customFieldsUri": "/envelopes/063454a6-dee6-4e86-8d38-56d85e66c61e/custom_fields",
"notificationUri": "/envelopes/063454a6-dee6-4e86-8d38-56d85e66c61e/notification",
"enableWetSign": "true",
"allowMarkup": "false",
"allowReassign": "true",
"createdDateTime": "2021-02-17T00:43:28.7070000Z",
"lastModifiedDateTime": "2021-02-17T00:43:28.7230000Z",
"initialSentDateTime": "2021-02-17T00:43:29.2570000Z",
"sentDateTime": "2021-02-17T00:43:29.2570000Z",
"statusChangedDateTime": "2021-02-17T00:43:29.2570000Z",
"documentsCombinedUri": "/envelopes/********************/documents/combined",
"certificateUri": "/envelopes/********************/documents/certificate",
"templatesUri": "/envelopes/********************/templates",
"expireEnabled": "true",
"expireDateTime": "2021-06-17T00:43:29.2570000Z",
"expireAfter": "120",
"sender": {
"userName": "********",
"userId": "********",
"accountId": "********",
"email": "sender@email.com"
},
"recipients": {
"signers": [
{
"creationReason": "sender",
"isBulkRecipient": "false",
"recipientSuppliesTabs": "true",
"requireUploadSignature": "false",
"name": "Demand Approvers",
"firstName": "",
"lastName": "",
"email": "approvers@email.com",
"recipientId": "626000",
"recipientIdGuid": "365b2f4d-0968-42d1-805e-55eece700246",
"requireIdLookup": "false",
"userId": "891a3891-f49d-4f14-8bc8-959524e2445a",
"clientUserId": "123c6d15-1d25-4595-9878-5cbda4ba2823",
"routingOrder": "1",
"status": "sent",
"completedCount": "0",
"deliveryMethod": "email",
"recipientType": "signer"
},
{
"creationReason": "sender",
"isBulkRecipient": "false",
"recipientSuppliesTabs": "true",
"requireUploadSignature": "false",
"name": "Tom Ford",
"firstName": "",
"lastName": "",
"email": "tom.ford@email.com",
"recipientId": "64000",
"recipientIdGuid": "c60c5ccd-e49f-4b63-9745-5f283b8520eb",
"requireIdLookup": "false",
"userId": "4a78d305-43bf-4d78-a844-2bdc15e63770",
"clientUserId": "c7052b97-f9a7-4af4-85de-8c64371467b1",
"routingOrder": "1",
"status": "sent",
"completedCount": "0",
"deliveryMethod": "email",
"recipientType": "signer"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"seals": [],
"witnesses": [],
"notaries": [],
"recipientCount": "2",
"currentRoutingOrder": "1"
},
"purgeState": "unpurged",
"envelopeIdStamping": "true",
"is21CFRPart11": "false",
"signerCanSignOnMobile": "true",
"autoNavigation": "true",
"isSignatureProviderEnvelope": "false",
"hasFormDataChanged": "false",
"allowComments": "true",
"hasComments": "false",
"allowViewHistory": "true",
"envelopeMetadata": {
"allowAdvancedCorrect": "true",
"enableSignWithNotary": "true",
"allowCorrect": "true"
},
"anySigner": null,
"envelopeLocation": "current_site",
"isDynamicEnvelope": "false"
}
需求审批者的signingGroup 相关信息缺失。如何构建我的请求,以便将需求批准者列为签名组?
解决方案
我找到了原因。所以似乎在处理 Signing Groups 时,这 2 点必须是真的:
- 签名组必须在 DocuSign 中注册。然后可以将生成的signingGroupId 用作接收者。将signingGroupId 设置为“true”或任何随机值都不起作用。
- 不得提供 clientUserId
推荐阅读
- r - 使用 VennDiagram 包在 R 中制作 VennDiagram 时输出相交基因/值的列表
- python - 在 Pandas 中使用子查询进行选择
- r - Generating summary table at bottom of dataframe
- python - 时间序列中的周期性:我有周期本身,我怎么知道周期从哪里开始?
- c# - 多边形到线串覆盖路径
- php - 拒绝访问 SQL 数据库 (wamp)
- docker - 无法连接到正在运行的 docker 容器(minikube docker daemon)
- javascript - 删除元素后如何刷新离子4列表项
- ruby - 将文档上传到 FSCrawler 以在 Elasticsearch 中建立索引的正确方法
- python - 将 Pandas Dataframe 写入 MySQL 数据仓库时出现 SQL 错误