Skip to main content
Once your bulk archive generation job has completed — confirmed by the report.ready webhook event — you can download the resulting ZIP file using the report identifier. The archive is a cryptographically sealed package containing DDS XML payloads, Hedera state proofs, Merkle evidence bundles, and land tenure document hashes for all records included in the generation request. The response is a binary application/zip stream that you can pipe directly to disk, an object storage bucket, or a document management system for long-term retention.

Endpoint

GET /api/v1/enterprise/eudr/reports/archive/{reportId}/download

Path Parameters

reportId
string
required
The unique identifier of the completed archive report you want to download. This ID is returned in the report.ready webhook payload and in the 202 Accepted response when you triggered the generation job. Attempting to download a report whose job is still processing will return a 404 Not Found error.

Response

This endpoint returns a binary application/zip file stream rather than a JSON object. The Content-Disposition response header will contain the suggested filename for the archive (e.g., agribackup-archive-2026-Q1.zip). The ZIP archive contains the following structure:
agribackup-archive-{reportId}/
├── manifest.json              # Index of all included records with SHA-256 hashes
├── declarations/
│   ├── dds_{id}.xml           # TRACES NT XML payload for each DDS
│   └── ...
├── evidence/
│   ├── batch_{id}_proof.json  # Hedera state proof for each batch
│   ├── polygon_{id}_proof.json
│   ├── shipment_{id}_proof.json
│   └── ...
└── documents/
    ├── doc_{id}_metadata.json # Land tenure document metadata and hashes
    └── ...

Code Examples

import agribackup
from agribackup.rest import ApiException

configuration = agribackup.Configuration(host="https://live.agribackup.com/api/v1")
configuration.api_key['ApiKeyAuth'] = 'sk_live_YOUR_API_KEY'

with agribackup.ApiClient(configuration) as api_client:
    try:
        archival_api = agribackup.EnterpriseArchivalApi(api_client)

        report_id = "rep_9a8b7c"

        # download_archive returns the binary ZIP content
        zip_content = archival_api.download_archive(report_id=report_id)

        output_path = f"agribackup-archive-{report_id}.zip"
        with open(output_path, "wb") as f:
            f.write(zip_content)

        print(f"Archive saved to {output_path}")

    except ApiException as e:
        print("Exception when calling EnterpriseArchivalApi: %s\n" % e)
import { AgriBackupClient } from '@agribackup/sdk';
import fs from 'fs';
import { pipeline } from 'stream/promises';

const client = new AgriBackupClient({
  apiKey: 'sk_live_YOUR_API_KEY',
  baseUrl: 'https://live.agribackup.com/api/v1'
});

async function downloadArchive() {
  try {
    const reportId = 'rep_9a8b7c';

    // Returns a readable stream of the ZIP binary
    const archiveStream = await client.archival.downloadArchive(reportId);

    const outputPath = `agribackup-archive-${reportId}.zip`;
    const writeStream = fs.createWriteStream(outputPath);

    await pipeline(archiveStream, writeStream);
    console.log(`Archive saved to ${outputPath}`);
  } catch (error) {
    console.error('Error downloading archive:', error.message);
  }
}

downloadArchive();
curl --request GET \
  --url https://live.agribackup.com/api/v1/enterprise/eudr/reports/archive/rep_9a8b7c/download \
  --header 'X-API-Key: sk_live_YOUR_API_KEY' \
  --output agribackup-archive-rep_9a8b7c.zip
Archive download links are valid for 72 hours after the report.ready webhook is fired. After this window, the report is purged from temporary storage and you will need to trigger a new archive generation job to regenerate the package. For long-term retention, download the archive promptly and store it in your own object storage.
After downloading, verify the integrity of the archive by checking the SHA-256 hashes in manifest.json against the individual files contained in the ZIP. This ensures no data corruption occurred during transmission and provides an additional layer of audit assurance.