DocuSign API嵌入式签名集成 [英] DocuSign API Embedded Signing Integration

查看:252
本文介绍了DocuSign API嵌入式签名集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在进行注册过程,要求新用户对文档进行签名。我正在为此使用DocuSign嵌入签名工作流

I working on signup process that require new user to sign on documents. I am using DocuSign embed signing workflow for that

我已经在docusign管理面板中使用pdf文档创建了模板,并添加了1条测试路线:

I have created template with pdf document in docusign admin panel and added 1 test route:

在后端,我正在执行以下api调用:

and in the backend I am performing following api calls:


  1. 第1步-登录API调用(用于检索您的baseUrl)-restapi / v2 / login_information

  2. 第2步-从模板创建信封并发送-baseURL + / envelopes

  3. 第3步-启动嵌入式签名视图(又称为收件人视图)-baseURL + uri + / views / recipient

作为电子邮件的参数,如果我发送的是test@mail.com,请输入用户名test2(例如在路由中) )然后
,当我转到检索到的收件人视图url时,我看到该表单已经具有Sign和Initials的占位符,因为我已经在管理面板中为test2用户添加了这些标签,并且表单看起来像:

and as parameters for email, username if I am sending test@mail.com, test2 (like in route) then when I go to the retrieved recipient view url I see that form already has the placeholder for Sign and Initials since I have added these tags for test2 user in admin panel and form looks like:

哪个很棒!

但是在这种情况下,如果我将test3和test3@mail.com作为用户名和电子邮件参数发送,则不会这样:

But not if I will send test3 and test3@mail.com as username and email params in this case I see form like this:

用户可以在此处将其标志和其他元素放置在想要的位置(这是错误的

Here user can place his sign and other elements where he wants(which is BAD)

我需要所有将要注册的新用户的用户名和电子邮件的行为(就像所有用户都将看到这些标记一样, )我无法将它们添加到管理面板中进行路由,因为我不知道会有新用户来此站点发送电子邮件。

I need that behavior for all usernames and emails of new users that will signup(like all user will see these tags to sign and initial) I can't add them into admin panel to route since I don't know emails of new users that will came to site.

有没有一种方法可以做到这一点?

Is there a way to accomplish that ?

"<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" +
"<status>sent</status>" +
"<emailSubject>DocuSign API - Embedded Signing example</emailSubject>" +
"<templateId>" + TEMPLATE_ID + "</templateId>" +
"<templateRoles>" +
"<templateRole>" +
"<email>" + recipientEmail + "</email>" +
"<name>" + recipientName + "</name>" +
"<roleName>test2</roleName>" +
"<clientUserId>1</clientUserId>"
"</templateRole>" +
"</templateRoles>" +
"</envelopeDefinition>";

recipientEmail,收件人名称将是动态的,doc的templateId常量

recipientEmail, recipientName it will be dynamic, templateId constant for doc

推荐答案

以下是一个示例调用,该调用将在RoleName为 Awesome Role 的模板上填写收件人信息,而 email name 都为空

Here is a sample call that would fill out your recipient information on a template that has roleName of Awesome Role, while email and name are both blank

{
    "emailSubject": "Super Awesome DocuSign Integration",
    "templateId": "{templateId}",
    "status": "sent",
    "templateRoles": [
        {
            "email": "person@email.com",
            "name": "First Last",
            "roleName": "Awesome Role",
            "clientUserId": 123456
        }
    ]
}

如果要开始动态添加其他标签,您想开始使用 compositeTemplates ,这些会增加调用的难度,但这是使用相同模板但添加了Signatu的示例调用重新标记收件人。

If you want to start adding additional tags dynamically, you'd want to start using compositeTemplates, these increase the difficulty of the call, but here is a sample call using the same template but adding a Signature tag for the recipient.

{
    "emailSubject": "Super Awesome DocuSign Integration",
    "status": "sent",
    "templateId": "{templateId}",
    "templateRoles": [
        {
            "email": "person@email.com",
            "name": "First Last",
            "roleName": "Awesome Role",
            "clientUserId":123456
        }
    ],
    "compositeTemplates": [
        {
            "inlineTemplates": [
                {
                    "sequence": "1",
                    "recipients": {
                        "signers": [
                            {
                                "email": "person@email.com",
                                "name": "First Last",
                                "clientUserId":123456,
                                "recipientId": "1",
                                "defaultRecipient": "true",
                                "tabs": {
                                    "signHereTabs": [
                                        {
                                            "xPosition": "200",
                                            "yPosition": "200",
                                            "documentId": "1",
                                            "pageNumber": "1"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            ]
        }
    ]
}

DocuSign REST API指南中的有关复合模板的更多信息

这篇关于DocuSign API嵌入式签名集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆