gpt4 book ai didi

java - 是否可以通过 Java API 检索 Docusign 模板或 Power Form 字段

转载 作者:行者123 更新时间:2023-12-01 13:34:59 27 4
gpt4 key购买 nike

我尝试了一下 Docusign API,但只能找到有关请求签名或检索文档的信息。

我有许多从模板创建的 powerforms,这些模板是从一些 pdf 生成的。我想做的是以某种方式检索模板或 powerform,以便我可以提取字段并将它们映射到另一个系统。通过这种方式,当提交 powerform 时,我通过 connect 获取文档,然后可以根据映射将字段存储在单独的系统中。所有这些都是我通过一组 java 服务完成的。

这对于 API 来说是可能的吗?如果可以的话,之前是否有人做过类似的事情,或者您能给我指出任何示例或文档的方向吗?

预先感谢您的任何帮助或建议,真皮

编辑

作为对此的更新,我确实尝试使用

https://demo.docusign.net/restapi/v2/accounts/xxxxxx/templates

获取我所有的模板 ID,然后

https://demo.docusign.net/restapi/v2/accounts/xxxxxx/templates/{template-id}

获取模板定义。在 REST 开发人员指南中,示例响应看起来有一个自定义字段部分

"customFields":{
"listCustomFields":[{
"name":"String content",
"required":"String content",
"show":"String content",
"value":"String content",
"listItems":["String content"]
}],
"textCustomFields":[{
"name":"String content",
"required":"String content",
"show":"String content",
"value":"String content"
}]
},

但是,我在回复中没有看到任何此类部分(下面的示例中数据已被删除)。我确实在模板中添加了一些示例自定义字段,所以我想知道为什么没有返回,或者我是否没有正确指定它们?

{  "envelopeTemplateDefinition": 
{ "templateId": "xxx",
"name": "xxx",
"shared": "true",
"password": "",
"description": "",
"lastModified": "xxx",
"pageCount": x,
"uri": "xxx",
"folderName": "xxx",
"folderId": "xxx",
"folderUri": "xxx",
"owner": {
"userName": "xxx",
"email": "xxx",
"userId": "xxx"
}
},
"documents": [
{
"documentId": "xxx",
"uri": "xxx",
"name": "xxx",
"order": "xxx",
"pages": "xxx"
}
],
"recipients":
{
"signers": [
{
"defaultRecipient": "xxx",
"signInEachLocation": "xxx",
"name": "",
"email": "",
"recipientId": "xxx",
"accessCode": "",
"requireIdLookup": "xxx",
"routingOrder": "1",
"note": "",
"roleName": "xxx",
"templateLocked": "xxx",
"templateRequired": "xxx",
"inheritEmailNotificationConfiguration": "xxx"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"recipientCount": "1"
},
"notification":
{
"reminders":
{
"reminderEnabled": "xxx",
"reminderDelay": "0",
"reminderFrequency": "0"
},
"expirations":
{
"expireEnabled": "xxx",
"expireAfter": "xxx",
"expireWarn": "0"
}
},
"emailSubject": "xxx",
"emailBlurb": "",
"signingLocation": "xxx",
"authoritativeCopy": "xxx",
"enforceSignerVisibility": "xxx",
"enableWetSign": "xxx",
"allowMarkup": "xxx"
}

如果有人知道为什么上面可能缺少 customFields 部分,那么很高兴知道。目前,我将尝试下面 Kim 的方法(谢谢 Kim!),看看这是否涵盖了我想要做的事情......

最佳答案

DocuSign 开发人员中心 ( http://www.docusign.com/developer-center ) 包含有关使用 DocuSign API 的大量信息 - 一定要查看一下(除了您已经找到的 REST API 指南之外)。

关于您描述的场景 - 即想要使用 API 来确定 DocuSign 模板中定义的字段 - 这当然是可能的。只需执行一个获取收件人请求,并将查询参数include_tabs设置为true,并在信封 ID 通常所在的位置包含模板 ID请求网址。例如:

GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{templateId}}/recipients?include_tabs=true&include_extended=true

响应将包括为模板指定的所有收件人角色,以及每个收件人角色的属于该收件人角色的选项卡(字段)。以下是包含两个收件人角色(均为签名者)的模板响应示例,每个收件人角色拥有多个不同类型的选项卡(字段):

{
"signers": [
{
"tabs": {
"signHereTabs": [
{
"name": "SignHere",
"tabLabel": "Sign Here",
"scaleValue": 1,
"optional": "false",
"documentId": "1",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "10",
"yPosition": "100",
"tabId": "15311994-b09a-4ea5-b24d-d185875ba378"
},
{
"name": "Sign Here",
"tabLabel": "Signature 8",
"scaleValue": 1,
"optional": "false",
"documentId": "2",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "71",
"yPosition": "107",
"tabId": "ff79b73d-ad5b-423c-9a37-70547e928100"
}
],
"initialHereTabs": [
{
"name": "Initial Here",
"tabLabel": "Initial 31",
"scaleValue": 1,
"optional": "false",
"documentId": "3",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "75",
"yPosition": "106",
"tabId": "6be4892d-a2d2-4f50-b0ff-0acd5108dc6d"
}
],
"textTabs": [
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Address",
"bold": "false",
"italic": "false",
"underline": "false",
"documentId": "1",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "108",
"yPosition": "142",
"tabId": "0039105d-2a47-4937-874f-00307c54bca4"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "City",
"bold": "false",
"italic": "false",
"underline": "false",
"documentId": "1",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "180",
"yPosition": "142",
"tabId": "1f071721-fe91-49cd-ab43-a316548adea6"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "State",
"bold": "false",
"italic": "false",
"underline": "false",
"documentId": "1",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "250",
"yPosition": "142",
"tabId": "687f4dc4-736d-4a45-b195-29b44b7cb8a9"
},
{
"height": 11,
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Zip",
"bold": "false",
"italic": "false",
"underline": "false",
"documentId": "1",
"recipientId": "1",
"pageNumber": "1",
"xPosition": "343",
"yPosition": "142",
"tabId": "e94a42fc-a38b-4536-a25a-008db64376a3"
}
],
"radioGroupTabs": [
{
"documentId": "1",
"recipientId": "1",
"groupName": "IsUSCitizen",
"radios": [
{
"pageNumber": "1",
"xPosition": "328",
"yPosition": "195",
"value": "Yes",
"selected": "false",
"tabId": "8cd7c1c3-41d3-4803-9a25-d4798e4f8465",
"required": "True",
"locked": "False"
},
{
"pageNumber": "1",
"xPosition": "328",
"yPosition": "217",
"value": "No",
"selected": "false",
"tabId": "c8481da7-5bf3-4648-a002-feb5b697746c",
"required": "True",
"locked": "False"
}
]
}
]
},
"signInEachLocation": "false",
"name": "",
"email": "",
"recipientId": "1",
"recipientIdGuid": "dd9dda12-13a8-4f91-ba77-f9427ce9c4c6",
"requireIdLookup": "false",
"routingOrder": "1",
"roleName": "Signer1",
"status": "created",
"templateLocked": "false",
"templateRequired": "false"
},
{
"tabs": {
"signHereTabs": [
{
"name": "Sign Here",
"tabLabel": "Signature 9",
"scaleValue": 1,
"optional": "false",
"documentId": "2",
"recipientId": "e3a92e6d-1533-4785-a814-2e4e7f96bef5",
"pageNumber": "1",
"xPosition": "71",
"yPosition": "194",
"tabId": "fd8eff65-105f-46ae-9f28-305790c9d4e7"
}
],
"initialHereTabs": [
{
"name": "Initial Here",
"tabLabel": "Initial 32",
"scaleValue": 1,
"optional": "false",
"documentId": "3",
"recipientId": "e3a92e6d-1533-4785-a814-2e4e7f96bef5",
"pageNumber": "1",
"xPosition": "75",
"yPosition": "154",
"tabId": "b01922a7-f20a-4dc4-9327-96e592733ca9"
}
],
"numberTabs": [
{
"validationPattern": "",
"validationMessage": "",
"shared": "false",
"requireInitialOnSharedChange": "false",
"name": "Text",
"value": "",
"width": 42,
"required": "true",
"locked": "false",
"concealValueOnDocument": "false",
"disableAutoSize": "false",
"tabLabel": "Quantity",
"bold": "false",
"italic": "false",
"underline": "false",
"documentId": "1",
"recipientId": "e3a92e6d-1533-4785-a814-2e4e7f96bef5",
"pageNumber": "1",
"xPosition": "43",
"yPosition": "396",
"tabId": "37cfcb7d-4357-4c6b-a9b8-500e5e9dc9b6"
}
],
"listTabs": [
{
"listItems": [
{
"text": "Regular",
"value": "Regular",
"selected": "false"
},
{
"text": "Express",
"value": "Express",
"selected": "false"
}
],
"value": "",
"width": 78,
"shared": "false",
"requireInitialOnSharedChange": "false",
"tabLabel": "ShippingMethod",
"bold": "false",
"italic": "false",
"underline": "false",
"documentId": "1",
"recipientId": "e3a92e6d-1533-4785-a814-2e4e7f96bef5",
"pageNumber": "1",
"xPosition": "121",
"yPosition": "395",
"tabId": "6f663d22-3632-486b-a1f5-7455c665b9d8"
}
]
},
"signInEachLocation": "false",
"name": "",
"email": "",
"recipientId": "e3a92e6d-1533-4785-a814-2e4e7f96bef5",
"recipientIdGuid": "e3a92e6d-1533-4785-a814-2e4e7f96bef5",
"requireIdLookup": "false",
"routingOrder": "2",
"roleName": "Signer2",
"status": "created",
"templateLocked": "false",
"templateRequired": "false"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"recipientCount": "2"
}

DocuSign REST API 指南(您在评论中链接到的)包含有关各种选项卡类型以及每个选项卡类型包含的属性的信息。

关于java - 是否可以通过 Java API 检索 Docusign 模板或 Power Form 字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21355595/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com