Use BoldSign API to Download Signed Documents Effortlessly
Source: Dev.to
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 a REST API, so you can use any server‑side programming language to call the endpoints.
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}'
C#
var apiClient = new ApiClient("https://api.boldsign.com", "Your API-KEY");
var documentClient = new DocumentClient(apiClient);
var documentStream = documentClient.DownloadDocument("{Your document Id}");
Python
import requests
url = "https://api.boldsign.com/v1/document/download?documentId={Your document Id}"
headers = {
"accept": "application/json",
"X-API-KEY": "{your API key}"
}
response = requests.get(url, headers=headers)
print(response.text)
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}'
}
});
PHP
'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();
Handling the Document Stream
After initiating the download request, BoldSign’s API returns a document stream containing the completed eSignature document. You can process this stream according to your application’s needs—for example, saving it to a local file system, integrating it into another system, or displaying it to the user.
Conclusion
Downloading completed eSignature documents via the BoldSign API is straightforward and can be seamlessly integrated into your workflows. By leveraging the API, you can automate document retrieval, streamline processes, and improve the overall user experience.
Refer to the BoldSign API documentation to get started with integrating BoldSign APIs into your application.
Begin your 30‑day free BoldSign trial today, or schedule a demo to explore the platform further. For additional assistance, visit the BoldSign support portal.