Skip to main content
When a batch clears satellite deforestation screening and its polygons are confirmed compliant, you can generate a Due Diligence Statement (DDS) — the formal XML declaration required by EU Regulation 2023/1115 before a shipment can legally enter the EU market. This endpoint accepts your batch ID and the SHA-256 hashes of your uploaded land tenure documents, then asynchronously compiles the cryptographic evidence into a TRACES NT-ready XML payload. Because generation involves Hedera DLT anchoring, the endpoint returns a 202 Accepted with a jobId. Use the Jobs API to track progress, then retrieve the finalized payload once processing completes.

Endpoint

POST /api/v1/enterprise/eudr/declarations/dds

Request Parameters

batchId
string
required
The unique identifier of the verified and risk-assessed batch for which you are generating the DDS. The batch must have a COMPLIANT status before this call will succeed.
An array of SHA-256 hashes representing the land tenure and legality documents associated with this batch. Each hash should correspond to a document previously uploaded via the Upload Legal Land Tenure Document endpoint. These hashes are anchored to the Hedera ledger as cryptographic proof of land rights at the time of DDS generation.

Response Fields

jobId
string
The unique identifier of the asynchronous DDS generation job. Use this ID to monitor progress via the Jobs API. Once the job reaches COMPLETED status, call GET /api/v1/enterprise/eudr/declarations/dds/{referenceId} to retrieve the finalized XML payload.
status
string
The initial status of the job. Always PENDING immediately after acceptance.
estimatedDurationSec
integer
An advisory estimate of how many seconds the generation job is expected to take before completing.
createdAt
string
ISO 8601 timestamp indicating when the DDS generation job was accepted and enqueued.

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:
        declarations_api = agribackup.EnterpriseDeclarationsApi(api_client)

        request = agribackup.DdsGenerationRequest(
            batch_id="batch_a1b2c3d4e5",
            legal_document_hashes=[
                "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "a3f1b2c4d5e6f7089abcdef0123456789abcdef0123456789abcdef012345678"
            ]
        )

        response = declarations_api.generate_dds(dds_generation_request=request)

        print("Job ID:", response.job_id)
        print("Status:", response.status)
        print("Estimated duration:", response.estimated_duration_sec, "seconds")

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

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

async function generateDds() {
  try {
    const response = await client.declarations.generateDds({
      batchId: 'batch_a1b2c3d4e5',
      legalDocumentHashes: [
        'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
        'a3f1b2c4d5e6f7089abcdef0123456789abcdef0123456789abcdef012345678'
      ]
    });

    console.log('Job ID:', response.jobId);
    console.log('Status:', response.status);
    console.log('Estimated duration:', response.estimatedDurationSec, 'seconds');
  } catch (error) {
    console.error('Error generating DDS:', error.message);
  }
}

generateDds();
curl --request POST \
  --url https://live.agribackup.com/api/v1/enterprise/eudr/declarations/dds \
  --header 'X-API-Key: sk_live_YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "batchId": "batch_a1b2c3d4e5",
    "legalDocumentHashes": [
      "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "a3f1b2c4d5e6f7089abcdef0123456789abcdef0123456789abcdef012345678"
    ]
  }'

Example Response

{
  "jobId": "job_998877",
  "status": "PENDING",
  "estimatedDurationSec": 3,
  "createdAt": "2026-07-15T09:42:00Z"
}
DDS generation is asynchronous. After receiving a 202 Accepted, poll GET /api/v1/enterprise/eudr/jobs/{jobId} to track the job phase. Once it reaches COMPLETED, retrieve the finalized XML payload using GET /api/v1/enterprise/eudr/declarations/dds/{referenceId}. The referenceId is returned in the job’s result metadata.
The batch referenced by batchId must have completed satellite deforestation screening and hold a COMPLIANT risk status before a DDS can be generated. Attempting to generate a DDS for a PENDING or HIGH_RISK batch will return a 422 Unprocessable Entity error.