简体   繁体   English

如何使用Docusignapi为所有文档下载完整的文档字段数据

[英]How can I download completed document field data with Docusignapi for all documents

I've yet to find the answer to this question after hours of searching, but I'm using the docusign api to pull information about certain envelopes from our account. 经过数小时的搜索,我尚未找到该问题的答案,但是我正在使用docusign api从我们的帐户中提取有关某些信封的信息。

I've used the api example here: http://iodocs.docusign.com/APIWalkthrough/getEnvelopeDocuments 我在这里使用了api示例: http : //iodocs.docusign.com/APIWalkthrough/getEnvelopeDocuments

What I'm actually looking to do is download the field data within each of the completed documents. 我实际上要做的是在每个完成的文档中下载字段数据。

Any guidance on how I could download the field data from all completed documents would be greatly appreciated. 我将如何从所有完成的文档中下载现场数据的任何指导将不胜感激。

Thanks! 谢谢!

Al

一些选项:1)DocuSign connect可以向您发送包含所有收件人的所有标签数据的XML有效负载2)您可以使用API​​(在本示例中为REST)基于每个收件人查询标签详细信息: https:// www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST%20API%20References/Get%20Tab%20Information%20for%20a%20Recipient.htm%3FTocPath%3DREST%2520API%2520References%7C_____87

As @LuisScott said, you don't need DocuSign API to do this. 正如@LuisScott所说,您不需要DocuSign API就能做到这一点。 You would be better suited using DocuSign Connect. 您将更适合使用DocuSign Connect。 Much easier, you do not need to get code approval from DocuSign either. 轻松得多,您也不需要获得DocuSign的代码批准。

DocuSign API is for modifying how DocuSign displays or modifies documents. DocuSign API用于修改DocuSign显示或修改文档的方式。 In other words, pre-processing the envelope. 换句话说,对信封进行预处理。

DocuSign Connect is for post-processing the envelope - which is what you want to do by your own account. DocuSign Connect用于后处理信封 -这是您想通过自己的帐户执行的操作。

I had a similar question not too long ago that was answered here: 我不久前也有类似的问题,在这里得到了回答:

DocuSign Custom Connect - How to make a listener in php example? DocuSign自定义连接-如何在php示例中创建侦听器?

Sample listener code: 样本侦听器代码:

https://github.com/docusign/docusign-soap-sdk/blob/master/PHP/Connect/index.php https://github.com/docusign/docusign-soap-sdk/blob/master/PHP/Connect/index.php

My sample code to pull out form data: 我的示例代码提取表单数据:

// Figure out the URL of this server
// NOTE: DocuSign only pushes status to HTTPS!
$postBackPath = empty($_SERVER['HTTPS']) ? 'http://' : 'https://';
$postBackPath .= ($_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'] );
$postedXml = @file_get_contents('php://input');

if(!empty($postedXml)) {
    // see if this is a post to this page if it is then we have to save it.
    $xml = simplexml_load_string($postedXml);
    $post = $xml;
    print 'Got Envelope ID: ' . $xml->EnvelopeStatus->EnvelopeID . '<br />';
}

foreach($post->EnvelopeStatus->RecipientStatuses->RecipientStatus->FormData->xfdf->fields->children() as $element) {
        foreach($element->attributes() as $a) {
            $fieldArray[(string)$a] = (string)$element->value;
        }
    }

From there, you can do whatever you want with the data. 从那里,您可以随心所欲地处理数据。

However, you do have to play around with some settings in DocuSign to get this to work. 但是,您必须在DocuSign中进行一些设置才能使它起作用。 In particular, in the settings menu there is a DocuSign connect menu, where you can specify where your listener script is, what information you want passed (field data in your case) , and when do you want data sent to the script (when envelope is completed) . 特别是在设置菜单中,有一个DocuSign连接菜单,您可以在其中指定侦听器脚本的位置,要传递的信息(在您的情况下为字段数据)以及何时要将数据发送到脚本(何时包含信封)已完成)

Also, you have to have DocuSign Connect enabled for your account. 另外,您必须为您的帐户启用DocuSign Connect。 If you have API access, you will have access to it as well but sometimes they need to turn it on for you. 如果您具有API访问权限,那么您也将有权访问它,但有时他们需要为您打开它。

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

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