简体   繁体   English

DocuSign API从Power Form获取响应(签名)文档

[英]DocuSign API to obtain the response (signed) documents from Power Form

We are using Power Form to create a signing document in an envelop for our clients to sign our contract. 我们正在使用Power Form在信封中创建签名文档,以便我们的客户签署我们的合同。

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? 客户完成对文档的签名(响应)后,是否可以获取任何回调事件并从docSign获取客户签名(完成)的文档(流或URL)?

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. 我试图使用下面的示例代码下载文档,但它仅从信封中获取模板PDF(无数据),而不是从客户端获得的文档。

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. 如果您为使用Powerform创建的每个信封都提供了信封ID,则上述调用可以很好地检索签名的文档。

There are different ways to get EnvelopeIds back from DocuSign for Powerform scenario: 有多种方法可以从DocuSign for Powerform场景中获取EnvelopeIds:

  • If you are using Direct Powerform (no Email validation) and one 如果您使用的是Direct Powerform(不使用电子邮件验证),
    signer scenario, then you need to Create In-Session landing page in 签名者方案,那么您需要在
    DS Account as explained in Configure In-Session landing DS帐户,如配置会话中着陆中所述
    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: 页面 ,配置返回/回调URL,例如https://www.google.com ?,其中www.google.com是您的回调应用程序URL,发生回调时,您将看到一些查询参数,如下所示:

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

    where env is the envelopeId and now you can use this envelopeId to get the signed document 其中,env是envelopeId,现在您可以使用此envelopeId来获取签名的文档

  • 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 如果您将Direct PowerForm与多个签名者一起使用,或者使用电子邮件Powerform(在Powerform配置中选中了“需要电子邮件验证”复选框),则需要按此处所述使用返回/回调URL(如https:// www)在Branding中配置目标URL 。 google.com ,其中www.google.com是您的回调应用程序URL,作为响应,DocuSign还将在查询参数中发送信封ID,现在您可以使用此信封ID来获取签名的文档

  • 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. 推荐的最后一种方法是使用DocuSign Connect ,它类似于Pub-Sub架构,您将在其中开发和托管一个WebService,该WebService可以接受POST调用和XML输入。 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. 并且,您将在DocuSign中配置相同的WebService,并且还将在DocuSign中配置触发器事件,当您希望DocuSign将XML通知推送到WebService时,通知DocuSign您感兴趣的事件是什么。 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. 一旦触发事件在您的信封上发生,DocuSign将推送带有信封ID和信封状态的XML消息,在收到XML消息后,您可以调用带有信封ID的/ documents API以下载签名的文档。 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以XML作为Base64格式发送已签名的文档,这是在配置Web服务时DocuSign Connect设置中的配置之一。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM