Download Order Export
GET {{BASE_HABITAT_URL}}/api/v3/orders/export/{{ORDER_EXPORT_ID}}/download?token={{ORDER_EXPORT_DOWNLOAD_TOKEN}}
Required scope: reports:read
Download the generated orders export file.
When to use
Section titled “When to use”After Get Order Export returns status: "ready", download the file using either:
- the full
download_urlreturned in the status response (recommended), or - this endpoint with the
tokenquery parameter from that URL.
You can also call this endpoint with only your bearer token (no token query param) while logged in as the user who created the export, as long as the export is still ready and not expired.
Authentication
Section titled “Authentication”One of:
- Bearer token — same API key used for other Platform API requests, as the export owner.
tokenquery param — short-lived token fromdownload_url(15 minute TTL). Useful for email links and browser downloads without storing API credentials.
Path parameters
Section titled “Path parameters”| Parameter | Description |
|---|---|
exportId |
Export UUID from Create Order Export. |
Query parameters
Section titled “Query parameters”| Parameter | Required | Description |
|---|---|---|
token |
No* | Download token from download_url. Required for unauthenticated browser/email downloads. |
Response
Section titled “Response”Returns the raw file bytes with headers:
Content-Disposition: attachment; filename=orders-export-{id}.{format}Content-Typematching the export format
Errors
Section titled “Errors”404— export not found, not owned by caller, not ready, expired, or invalid token.
- Prefer the
download_urlfrom Get Order Export — it includes a fresh token. - Export files expire 24 hours after completion.
Examples
Section titled “Examples”curl --request GET '${BASE_HABITAT_URL}/api/v3/orders/export/${ORDER_EXPORT_ID}/download?token=${ORDER_EXPORT_DOWNLOAD_TOKEN}'const response = await fetch("${BASE_HABITAT_URL}/api/v3/orders/export/${ORDER_EXPORT_ID}/download?token=${ORDER_EXPORT_DOWNLOAD_TOKEN}", { "method": "GET", "headers": {}})const data = await response.json()import requests
response = requests.request( "GET", "${BASE_HABITAT_URL}/api/v3/orders/export/${ORDER_EXPORT_ID}/download?token=${ORDER_EXPORT_DOWNLOAD_TOKEN}", headers={},)response.raise_for_status()
