DEV Community

Cover image for Use BoldSign API to Download Signed Documents Effortlessly
Vijay Amalan for BoldSign

Posted on • Originally published at boldsign.com

Use BoldSign API to Download Signed Documents Effortlessly

Whether you’re initiating a transaction, appending your signature, or simply monitoring the progress as a CC’d recipient, accessing your finalized documents should be seamless and hassle-free. Today, we’ll explore how to download a completed eSignature document using BoldSign’s API. Let’s get started.

Initiating Document Download Using BoldSign API

The first step in downloading a completed eSignature document via the BoldSign API is to initiate the download request. This requires the document ID of the specific document you wish to download. BoldSign supports REST API, which means you can use any server-side programming language to call the BoldSign APIs. Let’s look at how to initiate the download process using different programming languages.

Code Snippets

Curl

    curl -X GET 'https://api.boldsign.com/v1/document/download?documentId={Your document Id}' 
    -H 'accept: application/json' 
    -H 'X-API-KEY: {your-api-key}'
Enter fullscreen mode Exit fullscreen mode

C#

    var apiClient = new ApiClient("https://api.boldsign.com", "Your API-KEY");
    var documentClient = new DocumentClient(apiClient);
    var documentStream = documentClient.DownloadDocument("{Your document Id}");
Enter fullscreen mode Exit fullscreen mode

Python

    import requests
    url = "https://api.boldsign.com/v1/document/download?documentId={Your document Id}"
    payload={}
    headers = {
      'accept': 'application/json',
      'X-API-KEY': '{your API key}'
    }
    response = requests.request("GET", url, headers=headers, data=payload)
    print(response.text)     
Enter fullscreen mode Exit fullscreen mode

Node js

    const axios = require('axios');
    const response = axios.get('https://api.boldsign.com/v1/document/download', {
        params: {
            'documentId': '{Your document Id}'
        },
        responseType: "stream",
        headers: {
            'accept': 'application/json',
            'X-API-KEY': '{your API key}'
        }
    });

Enter fullscreen mode Exit fullscreen mode

PHP

    <?php
    require_once "vendor/autoload.php";
    use GuzzleHttp\Client;
    use GuzzleHttp\Psr7\Request;
    $client = new Client();
    $headers = [
      'accept' => 'application/json',
      'X-API-KEY' => '{your-api-key}'
    ];
    $request = new Request('GET', 'https://api.boldsign.com/v1/document/download?documentId={Your document Id}', $headers);
    $res = $client->sendAsync($request)->wait();
    echo $res->getBody();
Enter fullscreen mode Exit fullscreen mode

Handling the Document Stream

After you’ve initiated the document download request, BoldSign’s API returns the document stream, which contains the completed eSignature document. You can then process the document stream depending on your application’s requirements. For instance, you may choose to save the document to a local file system, integrate it into another system, or display it to the user for further action.

Conclusion

In conclusion, downloading completed eSignature documents via the BoldSign API is convenient. By leveraging BoldSign’s API, you can seamlessly integrate document retrieval capabilities into your applications, streamlining workflow processes and enhancing the user experience.

Whether you’re a developer looking to integrate eSignature functionalities or a business seeking to streamline document handling, BoldSign’s API provides the necessary tools and resources to achieve your goals. Refer to the BoldSign API documentation to get started with integrating BoldSign APIs into your application.

Begin your 30-day, free BoldSign trial today to see the full potential of BoldSign. We highly value your feedback, so please share your thoughts with us in the comments section. For any inquiries or to explore our services further, don’t hesitate to schedule a demo or reach out to our dedicated support team through our support portal. We’re here to assist you every step of the way.

Related blogs

Note: This blog was originally published at boldsign.com

Top comments (0)