DocuSign API从Power Form获取响应(签名)文档 [英] DocuSign API to obtain the response (signed) documents from Power Form

查看:228
本文介绍了DocuSign API从Power Form获取响应(签名)文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Power Form在信封中创建一个签名文档,以便我们的客户签署我们的合同。

We are using Power Form to create a signing document in an envelop for our clients to sign our contract.

在我们的客户完成文档的签名(响应)之后,我们可以从docSign中获取任何回调事件并获取客户端签名(完成)的文档(流或URL)吗?

After our client completed signing (response to) the document, can we get any call back event and get the client signed(completed) document (either Stream or URL) from docSign?

我正尝试使用下面的示例代码可以下载文档,但只能从信封中获取模板PDF(无数据),而不是从客户端获取的文档。

I was trying to use the sample code below to download the document, but it only gets the template PDF (no data) from the envelop not the client completed document.

EnvelopesApi envelopesApi = new EnvelopesApi(apiClient.Configuration);

var docStream = envelopesApi.GetDocument(accountId, envelopeId, "combined");

using (var stream = File.Create(@"c:\temp\docu38.pdf"))
      {
           docStream.CopyTo(stream);
      }

任何帮助将不胜感激。谢谢:-)

Any help would be appreciated. Thank you :-)

推荐答案

如果每个信封都有可使用的信封编号,则上述调用可以很好地检索签名的文档

Above call will work fine to retrieve signed document if you have the envelopeId available with you for each envelope created using Powerform.

有多种方法可以从DocuSign中为Powerform场景获取EnvelopeIds:

There are different ways to get EnvelopeIds back from DocuSign for Powerform scenario:


  • 如果使用直接Powerform(无电子邮件验证)和一个

    签名者方案,则需要在

    DS中创建会话中登录页面配置会话中登陆


    配置返回/回调URL,例如 https://www.google.com ?,其中
    www.google.com是您的回调应用程序URL,当回调发生
    时,您会看到一些查询参数,如下所示:

  • If you are using Direct Powerform (no Email validation) and one
    signer scenario, then you need to Create In-Session landing page in
    DS Account as explained in Configure In-Session landing
    pages
    , configure return/callback URL like https://www.google.com?, where www.google.com is your callback App URL and when callback will happen you will see some query parameters like below:

https://www.google.com/?env=b807a0fc-fc80-445f-9740-38e0e5f0200c&pf=c4b09cfb-8264-4fe7-a35d-554294f99445&r=50dd1f38-4242-4d47-8ddb- f73c03db929e

其中env是信封ID,现在您可以使用此信封ID来
获取签名的文档

where env is the envelopeId and now you can use this envelopeId to get the signed document

如果您使用具有多个签名者的Direct PowerForm,或者如果您使用电子邮件Powerform(
Powerform配置中选中了需要电子邮件验证复选框)是
,则需要在以下位置配置目标URL
品牌说明,如
此处
,其中包含返回/回调网址,例如 https://www.google.com ,其中
www.google.com是您的回调应用程序URL,作为响应,DocuSign将
也在查询参数中发送信封ID,现在您可以使用
这个信封ID到
来获取签名的文件

If you are using Direct PowerForm with multiple Signers or if you are using Email Powerform (Selected Require Email Validation checkbox in Powerform Configuration) then you need configure Destination URLs in Branding as explained here with the return/callback URL like https://www.google.com, where www.google.com is your callback App URL and in response DocuSign will also send envelopeId in the query parameter and now you can use this envelopeId to get the signed document

最后一种,最推荐的方法是使用 DocuSign
Connect

类似于Pub-Sub架构,您将在其中开发和托管一个
WebService,该服务可以接受POST调用和XML输入。然后,您
将在DocuSign中配置相同的WebService,并且您还将
在DocuSign中配置触发器事件,当您希望DocuSign推送XML通知
时,通知DocuSign您感兴趣的
事件是什么到您的WebService。一旦触发事件在您的信封
上发生,DocuSign就会推送一个带有信封ID和状态为
的XML消息,在您收到XML消息后,您可以调用/ documents具有信封ID的
API进行下载签名文件。另外,如果您的
文档不是很大,那么您也可以通过DocuSign将XML格式的
文档也以Base64格式发送给您,这是DocuSign Connect设置中的
配置之一,
Web服务。

Last way and the most recommended is to use DocuSign Connect, its like a Pub-Sub Architecture where you will develop and host a WebService which can accept a POST call and an XML input. And you will configure the same WebService in DocuSign and also you will configure Trigger Events in DocuSign, informing DocuSign whats your interested events when you want DocuSign to push an XML notification to your WebService. Once that trigger events happen on your envelope then DocuSign will push an XML message with envelopeId and status of the envelope, upon receiving the XML message you can call /documents API with envelopeId to download the Signed document. Also if your documents are not huge then you can DocuSign to send you signed Document in the XML as Base64 format as well, this is one of the configuration in DocuSign Connect settings while configuring your Webservice.

这篇关于DocuSign API从Power Form获取响应(签名)文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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