# Get a data export

```http
GET https://secure.yoprint.com/v1/api/store/{team_slug}/data_export/{id}
```

- API version: v1
- Operation ID: `v1_public_data_export_show`
- Section: Imports and exports › [Data exports](https://developer.yoprint.com/reference/data-exports.md)
- Web page: https://developer.yoprint.com/reference/data-exports/v1-data-export-show/
- Authentication: `Authorization: Bearer YOUR_API_KEY`

Returns one export. Poll it after you create an export: when `status` is `ready`, download the file; when it is `failed`, `error_code` says why.

`pending` and `generating` mean it is still running. `progress.completed` counts rows written so far.

## Permission

Any member of the team, for any of the team's exports.

## Path parameters

- `team_slug` (string, required): Your team slug, shown as Team ID next to your API key in Profile. Example `your-team`.
- `id` (string, required): The export's `id`, from the create answer. A hash id; unique keys and document numbers are refused with 404. Example `G59hl28azOL22k`.

## Request body

This operation takes no request body.

### Example request

```bash
curl 'https://secure.yoprint.com/v1/api/store/your-team/data_export/G59hl28azOL22k' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'X-Yoprint-Decimal-Format: exact-v1'
```

## Response

`200` Successful response.

Fields:

- `data` (object, required)
  - `config` (object | null, required): What you asked for: the dates (and `date_field`) as you sent them, and the `columns` you chose, without repeats, with `schema_version`. Null for customer and product exports sent without `columns`.
    - `columns` (array of strings, optional): Only when you chose columns.
    - `date_field` (string, optional): Sales order exports only.
    - `end_date` (string, optional)
    - `schema_version` (integer, optional): Only when you chose columns.
    - `start_date` (string, optional)
  - `created_at` (string (date-time), required)
  - `created_by` (integer | null, required): A plain number for the person who created it. It is not a hash id and no operation takes it; show `creator.name` instead.
  - `creator` (object | null, required): The person who created it; null if their account was deleted. More of their account fields may appear; rely only on these.
    - `email` (string, optional)
    - `id` (integer, optional): The same plain number as `created_by`, not a hash id.
    - `name` (string, optional)
  - `error_code` (string | null, required): Why it failed. `export_generation_failed`: the file could not be built; create a new export. `export_attempt_expired`: it did not finish in time. `export_queue_failed`: it could not be queued. Null unless `status` is `failed`. One of: `"export_generation_failed"`, `"export_attempt_expired"`, `"export_queue_failed"`.
  - `expires_at` (string (date-time) | null, required): When the download stops working: 3 days after the export became ready. The file is then deleted; the export stays in the list but can't be downloaded.
  - `file_size` (integer | null, required): File size in bytes, once ready.
  - `id` (string, required): The export id. Use it to poll and to download.
  - `progress` (object, required)
    - `completed` (integer, required): Rows written so far, not counting the header row. Updated every 500 rows; product exports update only at the end.
    - `total` (integer | null, required): Rows in the file, not counting the header row. Null until the export is ready: there is no total to show a percentage against while it runs.
  - `status` (string, required): `pending`: queued. `generating`: running. `ready`: the file can be downloaded. `failed`: see `error_code`. One of: `"pending"`, `"generating"`, `"ready"`, `"failed"`.
  - `type` (string, required): One of: `"customer_list"`, `"sales_order_list"`, `"invoice_list"`, `"invoice_item_list"`, `"payment_list"`, `"purchase_order_list"`, `"tax_list"`, `"simple_product_list"`, `"variant_product_list"`.
  - `updated_at` (string (date-time), required)
- `status` (integer, required)
- `success` (boolean, required)

Example response:

```json
{
  "data": {
    "config": {
      "date_field": "issue_date",
      "end_date": "2026-10-31T23:59:59.999Z",
      "start_date": "2026-10-01T00:00:00Z"
    },
    "created_at": "2026-11-03T09:30:00+00:00",
    "created_by": 1001,
    "creator": {
      "email": "alex@example.com",
      "id": 1001,
      "name": "Alex Rivera"
    },
    "error_code": null,
    "expires_at": "2026-11-06T09:30:40+00:00",
    "file_size": 482113,
    "id": "G59hl28azOL22k",
    "progress": {
      "completed": 1250,
      "total": 1250
    },
    "status": "ready",
    "type": "sales_order_list",
    "updated_at": "2026-11-03T09:30:40+00:00"
  },
  "status": 200,
  "success": true
}
```

## Errors

- `401` The API key is missing or wrong (`unauthenticated`).
- `403` You are not allowed to do this. `api_access_not_in_plan`: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only `{"message": "Insufficient Permission"}`. Other refusals use the error envelope, with `unauthorized` or `user_is_not_authorized`.
- `404` Not found. `page_not_found`: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. `code: null`, with a message that starts "No query results for": there is no record with that id.
  - When: The id is not one of this team's exports. Fix: Use the `id` the create operation returned.

## Notes

- An export still `pending` or `generating` about an hour after it was queued is marked `failed` with `export_attempt_expired` the next time YoPrint checks: when someone on your team creates an export, or at the regular cleanup. Create it again (the same `idempotency_key` queues the same export again); a smaller date range or fewer columns finishes sooner.

## Related

- [Download a data export's file](https://developer.yoprint.com/reference/data-exports/v1-data-export-download.md): `GET /v1/api/store/{team_slug}/data_export/{id}/download`
- [List data exports](https://developer.yoprint.com/reference/data-exports/v1-data-export-index.md): `GET /v1/api/store/{team_slug}/data_export`
