Docusign嵌入式签名

new*_*528 3 envelope docusignapi

我们正在使用docusign人们签署在我们网站上注册的同意书,有人指出了嵌入式签名API。

据我了解,我不得不创建一个信封。

我为此使用.Net示例。

可以通过API正常登录,但是在尝试从API取回URL时出现以下错误:

ENVELOPE_IS_INCOMPLETE The Envelope is not Complete. A Complete Envelope Requires Documents, Recipients, Tabs, and a Subject Line.
Run Code Online (Sandbox Code Playgroud)

这是我的envelopeDefinition xml:

 string requestBody = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" +
            "<accountId>" + accountId + "</accountId>" +
            "<status>sent</status>" +
            "<emailSubject>API Call for Embedded Sending</emailSubject>" +
            "<emailBlurb>This comes from C#</emailBlurb>" +
            "<templateId>[TEMPLATE ID FROM DOCUSIGN]</templateId>" +
            "<templateRoles>" +
            "<email>testregister@notrealurl.com</email>" +  // NOTE: Use different email address if username provided in non-email format!
            "<name>testregister@notrealurl.com</name>" + // username can be in email format or an actual ID string
            "<roleName>Signer</roleName>" +
            "</templateRoles>" +
            "</envelopeDefinition>";
Run Code Online (Sandbox Code Playgroud)

我在这里看到了另一个有关需要clientUserId的帖子:

http://community.docusign.com/t5/DocuSign-API-Integration-NET/REST-API-net-Error-message-when-creating-the-envelope-from-a/mp/18121#M1791

但是我不确定如何在envelopeDefinition中实现。

请帮忙!

Erg*_*gin 5

要使用嵌入功能,您确实确实需要为每个将使用URL令牌访问信封的收件人设置clientUserId属性。诀窍是,在创建信封时,需要为收件人设置clientUserId属性,然后在请求URL令牌时,需要将其连同其电子邮件,名称和收件人ID一起包括在请求中。

DocuSign的开发人员中心有一个专门用于嵌入的整个页面,它讨论了clientUserId属性的用法。请看这里:

http://www.docusign.com/developer-center/explore/features/embedding-docusign

他们的API演练也是一个很好的资源。他们有6种语言的代码,向您展示如何完成常见的DocuSign任务。查看底部的三个嵌入功能:

http://iodocs.docusign.com/APIWalkthroughs

[更新]好的,我能够重现您的问题,并更新您要解决的要点。如果您照原样复制并输入凭据,它现在应该可以正常工作,但基本上,请求正文中缺少两部分。这是它的外观,请注意额外的templateRole(单数)标记和clientUserId标记:

string requestBody = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" + 
                "<accountId>" + accountId + "</accountId>" + 
                    "<status>sent</status>" + 
                    "<emailSubject>API Call for Embedded Sending</emailSubject>" + 
                    "<emailBlurb>This comes from C#</emailBlurb>" + 
                    "<templateId>" + templateId + "</templateId>" + 
                    "<templateRoles>" + 
                    "<templateRole>" + 
                    "<email>" + username + "</email>" + // NOTE: Use different email address if username provided in non-email format!
                    "<name>Name</name>" +               // username can be in email format or an actual ID string
                    "<roleName>" + roleName + "</roleName>" +
                    "<clientUserId>1</clientUserId>" +
                    "</templateRole>" + 
                    "</templateRoles>" + 
                    "</envelopeDefinition>";
Run Code Online (Sandbox Code Playgroud)