Download a data export's file
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/data-exports/v1-data-export-download.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
GET/
Sends the export's CSV file itself, not JSON and not a link. The file is named yoprint_<type>_export-<YYYY-MM-DD>.csv, with the date (UTC) the export was created (in Content-Disposition).
It works only while the export is ready and not expired, which is 3 days after it became ready. You can download it as many times as you like in that time.
Save the answer to a file. The Accept: application/json header every request sends is fine here: the file still comes back as CSV.
curl -o export.csv -H "Authorization: Bearer YOUR_API_KEY" -H "Accept: application/json" \
https://secure.yoprint.com/v1/api/store/your-team/data_export/G59hl28azOL22k/download
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
The export's
id, from the create answer. A hash id; unique keys and document numbers are refused with 404.- Example
G59hl28azOL22k
- Example
Request body
This operation takes no request body.
Response
200Binary download response.
The answer is a file (application/octet-stream), not JSON. The example saves it with curl -o.
Errors
401The API key is missing or wrong (
unauthenticated).403You 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, withunauthorizedoruser_is_not_authorized.404Not 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 export is not ready yet, failed, expired, or its file was removed. All of these answer the same 404 (
page_not_found). - Fix
- Read the export first: download only when
statusisreadyandexpires_atis in the future. If it expired, create a new export. - When
- The id is not one of this team's exports.
- Fix
- Use the
idthe create operation returned.
Notes
- The response has
Cache-Control: private, no-store. Save the file; do not rely on caches. - The file is UTF-8 with a byte order mark, so spreadsheet apps read accents correctly. Strip the first three bytes if your CSV reader does not expect it.
Related
- GETGet a data export
/v1/ api/ store/ {team_slug}/ data_export/ {id}
