Returns the document — the sealed PDF once it is complete.
Returns the document — the sealed PDF once it is complete. It answers the document's current PDF as base64 with a sealed flag and a filename.
GET /v1/esign/documents/{id}/download
| Address | https://api.hanzo.ai/v1/esign/documents/{id}/download |
| Method | GET |
| Operation | get_esign_documents_by_id_download |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the document — the sealed PDF once it is complete.
It answers the document's current PDF as base64 with a sealed flag and a filename. Before completion that is the original upload; once every signer has finished it is the SEALED artifact, with the field values rendered onto the page and a real x509 PKCS#7 digital signature applied. There is one pdfBase64 field either way, so sealed is what tells you which you are holding.
The id is resolved in the caller's OWN tenant store, so another org's document id is a 404.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the document to act on. It is the path segment: the URL is the addressing authority, and the org it is resolved in comes from the caller's principal, so… |
Response
| Status | Body | Meaning |
|---|---|---|
200 | esignPDF | ok |
200 body — 5 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
filename | body | string | — | Filename is the name to save it under, built from the title and marked _signed once it is sealed. |
id | body | string | — | ID is the document. |
pdfBase64 | body | string | — | PdfBase64 is the PDF itself, base64-encoded. |
sealed | body | boolean | — | Sealed is whether this is the SEALED artifact — the field values rendered onto the page and a real x509 PKCS#7 signature applied — rather than the original… |
status | body | string | — | Status is the document's state at the moment it was read. |
Failure carries the platform error shape — see Errors.
Examples
hanzo esign documents download <id>import { Configuration, EsignApi } from 'hanzoai';
const api = new EsignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getEsignDocumentsByIdDownload({ id: 'id' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import EsignApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = EsignApi(client).get_esign_documents_by_id_download(id='id')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.EsignAPI.GetEsignDocumentsByIdDownload(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, esign_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = esign_api::get_esign_documents_by_id_download(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EsignApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new EsignApi(client).getEsignDocumentsByIdDownload();curl https://api.hanzo.ai/v1/esign/documents/<id>/download \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches esign through the esign tool, which names its 9 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_esign_documents"
}
}
}'How is this guide?