After a DDS generation job completes, you can retrieve its full XML payload at any point in its lifecycle using the DDS reference identifier. This is useful for storing a local copy in your ERP, presenting the declaration to auditors, or verifying the contents before or after submission to TRACES NT. The payload returned is the exact TRACES NT V3 XML body that was — or will be — transmitted to EU customs authorities, together with the Hedera consensus timestamp that anchors the record on the public ledger.
Endpoint
GET /api/v1/enterprise/eudr/declarations/dds/{referenceId}
Path Parameters
The unique reference identifier of the DDS whose XML payload you want to retrieve. This ID is returned in the job result after successful DDS generation via the POST /api/v1/enterprise/eudr/declarations/dds endpoint.
Response Fields
The AgriBackup reference identifier for this DDS record.
The batch identifier embedded in the DDS payload, confirming which commodity lot the declaration covers.
The complete, finalized XML payload conforming to the TRACES NT V3 schema for Due Diligence Statements. This is the authoritative legal document representing the declaration.
The Hedera consensus timestamp or transaction ID confirming the DDS was anchored on the distributed ledger. Use this to independently verify the record on the Hedera Mirror Node.
The current submission status of the DDS. One of PENDING, GENERATED, or SUBMITTED.
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)
reference_id = "DDS-AB12CD34"
response = declarations_api.get_dds_payload(reference_id=reference_id)
print("Reference ID:", response.reference_id)
print("Submission Status:", response.traces_submission_status)
print("Hedera Timestamp:", response.hedera_consensus_timestamp)
print("XML Payload:", response.traces_nt_xml)
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 getDdsPayload() {
try {
const referenceId = 'DDS-AB12CD34';
const response = await client.declarations.getDdsPayload(referenceId);
console.log('Reference ID:', response.referenceId);
console.log('Submission Status:', response.tracesSubmissionStatus);
console.log('Hedera Timestamp:', response.hederaConsensusTimestamp);
console.log('XML Payload:', response.tracesNtXml);
} catch (error) {
console.error('Error retrieving DDS payload:', error.message);
}
}
getDdsPayload();
curl --request GET \
--url https://live.agribackup.com/api/v1/enterprise/eudr/declarations/dds/DDS-AB12CD34 \
--header 'X-API-Key: sk_live_YOUR_API_KEY'
Example Response
{
"referenceId": "DDS-AB12CD34",
"batchId": "batch_a1b2c3d4e5",
"tracesNtXml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><DueDiligenceStatement xmlns=\"urn:eu:traces:dds:v3\">...</DueDiligenceStatement>",
"hederaConsensusTimestamp": "0.0.12345@1234567890.123456789",
"tracesSubmissionStatus": "GENERATED"
}
The XML payload is stable and does not change after generation. You can safely cache the response in your document management system or ERP using the referenceId as the cache key.