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

# Get Export

> Retrieve a previously generated compliance export by ID.

## Endpoint

```
GET /v1/dpdp/exports/:exportId
```

## Authentication

Requires a developer API key in the `Authorization` header.

## Request Headers

| Header | Value |
| - | - |
| `Authorization` | `Bearer <api_key>` |

## Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `exportId` | `string` | Yes | The export ID |

## Example Request

```bash theme={null}
curl https://api.grantex.dev/v1/dpdp/exports/exp_01HXYZ... \
  -H "Authorization: Bearer gx_..."
```

## Response -- 200 OK

```json theme={null}
{
  "exportId": "exp_01HXYZ...",
  "type": "dpdp-audit",
  "dateFrom": "2026-01-01T00:00:00.000Z",
  "dateTo": "2026-04-01T00:00:00.000Z",
  "format": "json",
  "status": "complete",
  "recordCount": 42,
  "truncated": false,
  "auditLogLimit": 1000,
  "dataPrincipalId": null,
  "data": {
    "exportType": "dpdp-audit",
    "dateRange": {
      "from": "2026-01-01T00:00:00.000Z",
      "to": "2026-04-01T00:00:00.000Z"
    },
    "generatedAt": "2026-04-05T14:00:00.000Z",
    "developerId": "dev_01HXYZ...",
    "consentRecords": [...],
    "auditLog": [...],
    "grievances": [...]
  },
  "expiresAt": "2026-04-12T14:00:00.000Z",
  "createdAt": "2026-04-05T14:00:00.000Z"
}
```

## Response Fields

| Field | Type | Description |
| - | - | - |
| `exportId` | `string` | Unique export ID |
| `type` | `string` | Export type: `dpdp-audit`, `gdpr-article-15`, or `eu-ai-act-conformance` |
| `dateFrom` | `string` | ISO-8601 start date of the export window |
| `dateTo` | `string` | ISO-8601 end date of the export window |
| `format` | `string` | Output format |
| `status` | `string` | Export status: `complete` |
| `recordCount` | `number` | Total number of records in the export |
| `truncated` | `boolean` | Whether the audit log hit the 1000-entry cap |
| `auditLogLimit` | `number` | The audit log cap (1000) |
| `dataPrincipalId` | `string \| null` | The principal the export is filtered to, if any |
| `data` | `object` | The export data payload |
| `expiresAt` | `string` | ISO-8601 expiry timestamp (exports expire after 7 days) |
| `createdAt` | `string` | ISO-8601 creation timestamp |

## Error Responses

| Status | Code | Description |
| - | - | - |
| 401 | `UNAUTHORIZED` | Invalid or missing API key |
| 404 | `NOT_FOUND` | Export not found (or deleted by an erasure) |
| 410 | `GONE` | The export has expired; its data was purged and is not served |

## SDK Examples

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { Grantex } from '@grantex/sdk';

  const grantex = new Grantex({ apiKey: 'gx_...' });

  const report = await grantex.dpdp.getExport('exp_01HXYZ...');
  // report.status → "complete"
  // report.data → { consentRecords: [...], auditLog: [...] }
  ```

  ```python Python theme={null}
  from grantex import Grantex

  grantex = Grantex(api_key="gx_...")

  report = grantex.dpdp.get_export("exp_01HXYZ...")
  print(report.status, report.record_count)
  ```
</CodeGroup>

## Ownership

Grantex is owned by Orchestrum Technologies LLP. Inventor and owner: Sanjeev Kumar. Ownership contact: [sanjeev@orchestrum.in](mailto:sanjeev@orchestrum.in) or [mishra.sanjeev@gmail.com](mailto:mishra.sanjeev@gmail.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.