> ## 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.

# Retrieve Polygon Cryptographic Evidence

> Fetch Hedera DLT-anchored cryptographic evidence for a farm boundary polygon, including transaction IDs, consensus timestamp, Merkle root hash, and state proofs.

Each farm boundary polygon that passes satellite deforestation screening is individually anchored to the Hedera Hashgraph ledger, creating an immutable record of its geographic coordinates and compliance status at the moment of verification. You can retrieve this cryptographic evidence package at any time by supplying the polygon's identifier. The resulting evidence bundle is suitable for inclusion in regulatory submissions, third-party audits, and due diligence documentation as tamper-proof evidence that the polygon's deforestation-free status was independently verified and recorded on a public distributed ledger.

## Endpoint

`GET /api/v1/enterprise/eudr/evidence/ledger/polygon/{polygonId}`

## Path Parameters

<ParamField path="polygonId" type="string" required>
  The unique identifier of the farm boundary polygon whose cryptographic evidence you want to retrieve. This ID is returned when you ingest polygons via the Polygons API. Evidence is only available after the polygon's verification job has completed, signalled by the `polygon.verified` webhook event.
</ParamField>

## Response Fields

<ResponseField name="entityId" type="string">
  The polygon identifier for which this evidence bundle was generated.
</ResponseField>

<ResponseField name="entityType" type="string">
  The type of entity for which evidence was anchored. Will be `POLYGON` for this endpoint.
</ResponseField>

<ResponseField name="hederaTransactionIds" type="array">
  An array of all Hedera consensus transaction IDs associated with this polygon across all anchoring operations. Each ID can be independently verified on the Hedera Mirror Node.
</ResponseField>

<ResponseField name="merkleRootHash" type="string">
  The Merkle root hash anchored on the Hedera ledger at the time of the polygon anchoring event.
</ResponseField>

<ResponseField name="stateProofs" type="array">
  An array of Hedera state proof objects for independent audit verification.

  <Expandable title="stateProofs fields">
    <ResponseField name="stateProofs[].hederaTransactionId" type="string">
      The Hedera HCS transaction ID for this specific state proof entry.
    </ResponseField>

    <ResponseField name="stateProofs[].consensusTimestamp" type="string">
      The Hedera consensus timestamp assigned at the moment this transaction reached finality.
    </ResponseField>

    <ResponseField name="stateProofs[].merkleProof" type="string">
      The Merkle proof path JSON for cryptographic inclusion verification.
    </ResponseField>

    <ResponseField name="stateProofs[].operationType" type="string">
      The ledger operation type recorded for this state proof entry (e.g., `CREATED`).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="consensusTimestamp" type="string">
  The primary Hedera consensus timestamp (ISO-8601) of the polygon anchoring event.
</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:
          evidence_api = agribackup.EnterpriseEvidenceApi(api_client)

          polygon_id = "poly_z9y8x7w6v5u4"
          response = evidence_api.get_polygon_evidence(polygon_id=polygon_id)

          print("Entity ID:", response.entity_id)
          print("Merkle Root Hash:", response.merkle_root_hash)
          print("Consensus Timestamp:", response.consensus_timestamp)
          print("Transaction IDs:", response.hedera_transaction_ids)
          for proof in response.state_proofs:
              print(f"  Proof TX: {proof.hedera_transaction_id} | Op: {proof.operation_type}")

      except ApiException as e:
          print("Exception when calling EnterpriseEvidenceApi: %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 getPolygonEvidence() {
    try {
      const polygonId = 'poly_z9y8x7w6v5u4';
      const response = await client.evidence.getPolygonEvidence(polygonId);

      console.log('Entity ID:', response.entityId);
      console.log('Merkle Root Hash:', response.merkleRootHash);
      console.log('Consensus Timestamp:', response.consensusTimestamp);
      console.log('Transaction IDs:', response.hederaTransactionIds);
      response.stateProofs.forEach(proof => {
        console.log(`  Proof TX: ${proof.hederaTransactionId} | Op: ${proof.operationType}`);
      });
    } catch (error) {
      console.error('Error retrieving polygon evidence:', error.message);
    }
  }

  getPolygonEvidence();
  ```

  ```bash cURL theme={null}
  curl --request GET \
    --url https://live.agribackup.com/api/v1/enterprise/eudr/evidence/ledger/polygon/poly_z9y8x7w6v5u4 \
    --header 'X-API-Key: sk_live_YOUR_API_KEY'
  ```
</CodeGroup>

## Example Response

```json theme={null}
{
  "entityId": "poly_z9y8x7w6v5u4",
  "entityType": "POLYGON",
  "hederaTransactionIds": [
    "0.0.12345@1713583100.000000000"
  ],
  "merkleRootHash": "0x9876543210fedcba9876543210fedcba9876543210fedcba9876543210fedcba",
  "stateProofs": [
    {
      "hederaTransactionId": "0.0.12345@1713583100.000000000",
      "consensusTimestamp": "2026-07-13T14:55:02",
      "merkleProof": "{\"path\":[\"0x012345...\"],\"root\":\"0x987654...\"}",
      "operationType": "CREATED"
    }
  ],
  "consensusTimestamp": "2026-07-13T14:55:02Z"
}
```

<Note>
  Only polygons with a `COMPLIANT` status are eligible for inclusion in a batch that can proceed to DDS generation. `HIGH_RISK` polygon evidence is preserved on-ledger but will prevent the associated batch from advancing through the compliance pipeline.
</Note>
