> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agribackup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List All Generated Due Diligence Statements

> Retrieve a paginated list of all Due Diligence Statements generated within your organization, including their current lifecycle status and TRACES NT references.

You can retrieve the full history of Due Diligence Statements generated by your organization at any time. This endpoint returns a cursor-paginated collection of DDS records, each carrying its current lifecycle status — from `GENERATED` through `SUBMITTED` to `VALIDATED` or `REVOKED` — giving you a complete audit trail of all declarations filed on behalf of your enterprise.

## Endpoint

`GET /api/v1/enterprise/eudr/declarations/dds`

## Query Parameters

<ParamField query="limit" type="integer">
  Maximum number of records to return per page. Defaults to `100`.
</ParamField>

<ParamField query="starting_after" type="string">
  Cursor-based pagination parameter. Pass the `referenceId` of the last record from the previous page to retrieve the next set of results.
</ParamField>

## Response Fields

<ResponseField name="data" type="array">
  An array of DDS record objects.

  <Expandable title="DDS record fields">
    <ResponseField name="data[].referenceId" type="string">
      The unique AgriBackup reference identifier for this DDS. Use this ID in subsequent calls to submit, retrieve, or revoke the statement.
    </ResponseField>

    <ResponseField name="data[].batchId" type="string">
      The batch ID this DDS was generated against.
    </ResponseField>

    <ResponseField name="data[].tracesNtXml" type="string">
      The complete TRACES NT V3-compliant XML payload for this DDS.
    </ResponseField>

    <ResponseField name="data[].hederaConsensusTimestamp" type="string">
      The Hedera consensus timestamp or transaction ID associated with the DDS anchoring event.
    </ResponseField>

    <ResponseField name="data[].tracesSubmissionStatus" type="string">
      The current submission status of the DDS. One of `PENDING`, `GENERATED`, or `SUBMITTED`.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="hasMore" type="boolean">
  Indicates whether additional records exist beyond the current page. Use the `referenceId` of the last item in `data` as the `starting_after` cursor to retrieve the next page.
</ResponseField>

<ResponseField name="nextCursor" type="string">
  The cursor value to pass as `starting_after` in the next request to retrieve the following page of results. `null` when `hasMore` is `false`.
</ResponseField>

## Code Examples

<CodeGroup>
  ```python Python theme={null}
  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)

          response = declarations_api.list_dds_payloads(limit=50)

          for dds in response.data:
              print(f"Reference ID: {dds.reference_id} | Status: {dds.traces_submission_status} | Batch: {dds.batch_id}")

          print("Has more pages:", response.has_more)

      except ApiException as e:
          print("Exception when calling EnterpriseDeclarationsApi: %s\n" % e)
  ```

  ```javascript Node.js theme={null}
  import { AgriBackupClient } from '@agribackup/sdk';

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

  async function listDds() {
    try {
      const response = await client.declarations.listDdsPayloads({ limit: 50 });

      response.data.forEach(dds => {
        console.log(`Reference ID: ${dds.referenceId} | Status: ${dds.tracesSubmissionStatus} | Batch: ${dds.batchId}`);
      });

      console.log('Has more pages:', response.hasMore);
    } catch (error) {
      console.error('Error listing DDS records:', error.message);
    }
  }

  listDds();
  ```

  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://live.agribackup.com/api/v1/enterprise/eudr/declarations/dds?limit=50' \
    --header 'X-API-Key: sk_live_YOUR_API_KEY'
  ```
</CodeGroup>

## Example Response

```json theme={null}
{
  "data": [
    {
      "referenceId": "DDS-AB12CD34",
      "batchId": "batch_a1b2c3d4e5",
      "tracesNtXml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><DueDiligenceStatement>...</DueDiligenceStatement>",
      "hederaConsensusTimestamp": "0.0.12345@1234567890.123456789",
      "tracesSubmissionStatus": "SUBMITTED"
    }
  ],
  "hasMore": false,
  "nextCursor": null
}
```

<Tip>
  To build a full compliance audit export, paginate through all records using `starting_after` and combine them with the cryptographic evidence records available from the Evidence endpoints.
</Tip>
