2014-12-01 90 views

回答

2

实现此目的有多种方法。 Reinkesm的文章是最终用户可以获得一组在指定时间范围内变为某种特定状态的信封的一种方式。另一种方法是使用DocuSign Retrieve模块,尽管这又是针对最终用户的。

如果你正在寻找通过API调用有一个现有的呼叫,使得这个简单的编程方式实现这一目标。您可以按日期和/或更改状态过滤信封。

你是否看到DocuSign API Walkthroughs?第5个演练通过调用/envelopes URI来调用GET来演示如何检索。我不知道你使用所以检查出的演练的语言,你会看到6个不同的语言样本包括PHPNode.jsC#JavaPythonObjective-C

http://iodocs.docusign.com/APIWalkthrough/getEnvelopeStatus

例如,这里是PHP代码示例:

<?php 

    // Input your info here: 
    $email = "***";   // your account email 
    $password = "***";  // your account password 
    $integratorKey = "***";  // your account integrator key, found on (Preferences -> API page) 

    // construct the authentication header: 
    $header = "<DocuSignCredentials><Username>" . $email . "</Username><Password>" . $password . "</Password><IntegratorKey>" . $integratorKey . "</IntegratorKey></DocuSignCredentials>"; 

    ///////////////////////////////////////////////////////////////////////////////////////////////// 
    // STEP 1 - Login (retrieves baseUrl and accountId) 
    ///////////////////////////////////////////////////////////////////////////////////////////////// 
    $url = "https://demo.docusign.net/restapi/v2/login_information"; 
    $curl = curl_init($url); 
    curl_setopt($curl, CURLOPT_HEADER, false); 
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("X-DocuSign-Authentication: $header")); 

    $json_response = curl_exec($curl); 
    $status = curl_getinfo($curl, CURLINFO_HTTP_CODE); 

    if ($status != 200) { 
     echo "error calling webservice, status is:" . $status; 
     exit(-1); 
    } 

    $response = json_decode($json_response, true); 
    $accountId = $response["loginAccounts"][0]["accountId"]; 
    $baseUrl = $response["loginAccounts"][0]["baseUrl"]; 
    curl_close($curl);  

    //--- display results 
    echo "\naccountId = " . $accountId . "\nbaseUrl = " . $baseUrl . "\n"; 

    ///////////////////////////////////////////////////////////////////////////////////////////////// 
    // STEP 2 - status retrieval using filters 
    ///////////////////////////////////////////////////////////////////////////////////////////////// 
    echo "Performing status retrieval using filters...\n"; 
    date_default_timezone_set('America/Los_Angeles'); 
    $from_date = date("m") . "%2F" . (date("d")-7) . "%2F". date("Y"); 

    $curl = curl_init($baseUrl . "/envelopes?from_date=$from_date&status=created,sent,delivered,signed,completed"); 
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
    curl_setopt($curl, CURLOPT_HTTPHEADER, array(                   
     'Accept: application/json', 
     "X-DocuSign-Authentication: $header")                  
    ); 

    $json_response = curl_exec($curl); 
    $status = curl_getinfo($curl, CURLINFO_HTTP_CODE); 
    if ($status != 200) { 
     echo "error calling webservice, status is:" . $status . "\nerror text is --> "; 
     print_r($json_response); echo "\n"; 
     exit(-1); 
    } 

    $response = json_decode($json_response, true); 

    //--- display results 
    echo "Received " . count($response["envelopes"]) . " envelopes\n"; 
    foreach ($response["envelopes"] as $envelope) { 
     echo "envelope: " . $envelope["envelopeId"] . " " . $envelope["status"] . " " . $envelope["statusChangedDateTime"] . "\n"; 
    }  
?> 
2

您可以使用DocuSign控制台上的Envelope Publish功能。
首选项 - >信封发布(在帐户管理) 在你的情况设置搜索条件为2014年1月1日 - 2014年12月31日信封状态完成。获得结果后,您可以使用“将数据另存为.CSV文件”按钮,以使其更易于使用。