当我使用Rest API创建模板时,一切看起来都很好,但是,如果我尝试使用update API,提供templateId来删除tabItems,那么tabItems仍然存在。更新是否只添加和编辑,而不删除?如果能够在现有模板中添加和删除项目,而不是一直在创建/删除项目,那就太好了。
初始创建,然后是更新请求
"requestBody": {
"data": {
"attributes": {
"recipients": {
"signers": [
{
"roleName": "PrimaryInvestor",
"recipientId": "1",
"routingOrder": "1",
"tabs": {
"textTabs": [
{
"locked": true,
"xPosition": "379",
"tabLabel": "test1",
"pageNumber": "1",
"width": "20",
"required": false,
"documentId": "1",
"yPosition": "120"
},
{
"locked": true,
"xPosition": "379",
"tabLabel": "test2",
"pageNumber": "1",
"width": "20",
"required": false,
"documentId": "1",
"yPosition": "140"
},
{
"locked": true,
"xPosition": "379",
"tabLabel": "test3",
"pageNumber": "1",
"width": "20",
"required": false,
"documentId": "1",
"yPosition": "160"
}
]
}
}
]
},
"documents": [
{
"fileName": "non-prod/localhost/templates/bc1e82ca-978b-4c45-9e08-bf78d62e7408/sF4UIknZTQysIFUKd0sO_1pgPDF.pdf",
"order": "1",
"documentId": "1",
"name": "Hi there doc name",
"bucket": "wfh-longterm-filestore-non-prod"
}
],
"envelopeTemplateDefinition": {
"name": "delete test",
"description": "asdfasdf",
"folderName": "Altigo"
}
}
}
}
}
{
"requestBody": {
"data": {
"attributes": {
"recipients": {
"signers": [
{
"roleName": "PrimaryInvestor",
"recipientId": "1",
"routingOrder": "1",
"tabs": {
"textTabs": [
{
"locked": true,
"xPosition": "379",
"tabLabel": "test1",
"pageNumber": "1",
"width": "20",
"required": false,
"documentId": "1",
"yPosition": "120"
}
]
}
}
]
},
"documents": [
{
"fileName": "non-prod/localhost/templates/bc1e82ca-978b-4c45-9e08-bf78d62e7408/sF4UIknZTQysIFUKd0sO_1pgPDF.pdf",
"order": "1",
"documentId": "1",
"name": "Hi there doc name",
"bucket": "wfh-longterm-filestore-non-prod"
}
],
"envelopeTemplateDefinition": {
"name": "delete test",
"description": "asdfasdf",
"folderName": "Altigo"
}
}
}
}
}
发布于 2020-03-23 16:46:04
上面的调用不会删除选项卡,它只会更新它们。您可以使用此调用从模板中删除选项卡:
DELETE /restapi/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs
其中主体具有指定要删除的选项卡的JSON。
https://developers.docusign.com/esign-rest-api/reference/Templates/TemplateRecipientTabs/delete
https://stackoverflow.com/questions/60816574
复制相似问题