是否可以通过Java API检索Docusign模板或Power表单字段
我一直在使用docusignapi,但我只能找到有关请求签名或检索文档的信息 我用一些PDF生成的模板创建了许多powerforms。我想做的是以某种方式检索模板或powerforms,这样我就可以提取字段并将它们映射到另一个系统。这样,当提交powerform时,我通过connect获得文档,然后可以根据映射将字段存储在单独的系统中。所有这些都是通过一组java服务实现的 这在API中是可能的吗?如果可能的话,以前有人做过类似的事情吗?或者你能告诉我一些例子或文档的方向吗 提前感谢您的帮助或建议, 真皮 编辑 作为对此的更新,我尝试使用是否可以通过Java API检索Docusign模板或Power表单字段,java,docusignapi,Java,Docusignapi,我一直在使用docusignapi,但我只能找到有关请求签名或检索文档的信息 我用一些PDF生成的模板创建了许多powerforms。我想做的是以某种方式检索模板或powerforms,这样我就可以提取字段并将它们映射到另一个系统。这样,当提交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部分
"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"
}]
},
然而,我在我的回答中没有看到任何这样的部分(下面的示例中数据为x'd)。我确实在模板中添加了一些示例自定义字段,所以我想知道为什么没有返回,或者我可能没有正确指定它们
{ "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部分,那就太好了。目前,我将尝试下面的Kims方法(谢谢Kim!),看看这是否涵盖了我正在尝试做的事情……DocuSign开发者中心()包含了大量关于使用DocuSign API的信息——当然也可以查看一下(除了您已经找到的REST API指南) 关于您描述的场景——即,希望使用API来确定DocuSign模板中定义了哪些字段——这当然是可能的。只需执行一个Get Recipients请求,查询参数include_tabs设置为true,并将模板ID包含在请求URL中信封ID的正常位置。例如:
GET https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes/{{templateId}}/recipients?include_tabs=true&include_extended=true
响应将包括为模板指定的所有收件人角色,以及对于每个收件人角色,属于收件人角色的选项卡(字段)。下面是一个模板的响应示例,该模板包含两个收件人角色(均为type=signer),每个收件人角色拥有多个不同类型的选项卡(字段):
{
"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指南(您在评论中链接到该指南)包含关于各种选项卡类型以及每个选项卡类型包含的属性的信息。我知道这篇文章的回复很晚,但它可能会帮助其他需要的人。我正在使用RESTAPI从docusing帐户检索已签名的文档 //获取文档详细信息
$email = "enter your associated docusign account email";
$password = "enter your associated docusign account password";
$integratorKey = "enter your associated docusign account integrated key";
//将您的帐户信息传递到标题中
$header = "<DocuSignCredentials><Username>" . $email . "</Username><Password>" . $password . "</Password><IntegratorKey>" . $integratorKey . "</IntegratorKey></DocuSignCredentials>";
//您可以在这里打印您的回复,或者如果您想另存为pdf,则可以添加以下代码
$path = APPLICATION_PATH . 'your path';
$filename ="your file name";
chmod("$path", 0777);
file_put_contents("$path/$filename", $json_response);
啊,我觉得自己很愚蠢!我一定找错地方了/看错文件了。。。看这里,我看到了更多的服务,谢谢Kim!那项服务正好满足了我的需求。
$path = APPLICATION_PATH . 'your path';
$filename ="your file name";
chmod("$path", 0777);
file_put_contents("$path/$filename", $json_response);