# Download a Shopify customer data export

```http
GET https://secure.yoprint.com/v1/api/store/{team_slug}/setting/compliance/shopify-data-request/{id}/download
```

- Status: internal: built for YoPrint's own apps, don't build on it
- API version: v1
- Operation ID: `v1_public_compliance_shopify_data_request_download`
- Section: Team settings › [Compliance requests](https://developer.yoprint.com/reference/compliance-requests.md)
- Web page: https://developer.yoprint.com/reference/compliance-requests/v1-compliance-shopify-data-request-download/
- Authentication: `Authorization: Bearer YOUR_API_KEY`

> **Internal.** Built for YoPrint's own apps, not for integrations. Don't build on it; use the other operations in this section.

Built for YoPrint's web app: it downloads the file YoPrint prepared for a Shopify customer data request, a ZIP of what YoPrint holds about that customer. The `{id}` identifies the data request.

**Through this API it always answers 403.** The download is for the team owner, and it looks for the owner's web sign-in, which an API key doesn't carry. So even the owner's key gets 403 "Only the team owner can access this compliance export." Download the file as the owner in the YoPrint web app.

## Permission

Meant for the team owner only, but no API key passes the owner check (see the description). It is a GET, so the Manage Settings check on its route doesn't apply.

## 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 Shopify data request. Its hash id from an earlier answer; there is no unique key for it. Example `PwbV3hrunm1NZ8`.

## Request body

This operation takes no request body.

### Example request

```bash
curl 'https://secure.yoprint.com/v1/api/store/your-team/setting/compliance/shopify-data-request/PwbV3hrunm1NZ8/download' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'X-Yoprint-Decimal-Format: exact-v1' \
  -o download
```

## Response

`200` Binary download response.

The answer is a file (`application/octet-stream`), not JSON. The example saves it with `curl -o`.

## 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`.
  - When: Every call with an API key whose data request belongs to your team. The body is `{"message": "Only the team owner can access this compliance export."}`, without the error envelope. Fix: Download it as the owner in the YoPrint web app.
  - When: The data request belongs to another team. The body is `{"message": "You do not have permission to access this compliance export."}`, without the error envelope. Fix: Use your own team's data request.
- `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: No data request has this id. `error.code` is null. Fix: Use the data request's id.

## Notes

- AI apps (MCP connections) can't call it either: they get 403 `agent_operation_not_available`.
