Get Order Export
GET {{BASE_HABITAT_URL}}/api/v3/orders/export/{{ORDER_EXPORT_ID}}
Required scope: reports:read
Poll the status of an asynchronous orders export started with Create Order Export.
Call this endpoint every few seconds while status is queued or processing, until it becomes ready, failed, or expired.
Authentication
Section titled “Authentication”Requires admin, partner, or vendor role. Only the user who created the export can read it (others receive 404).
Path parameters
Section titled “Path parameters”| Parameter | Description |
|---|---|
exportId |
UUID returned from Create Order Export (export_id). |
Response fields
Section titled “Response fields”| Field | Description |
|---|---|
status |
queued, processing, ready, failed, or expired. |
format |
Export format (csv, json, xlsx). |
progress_pct |
Rough completion percentage while processing. |
rows_exported |
Rows written so far. |
total_hits |
Total matching orders (when known). |
file_name |
Suggested filename when ready (e.g. orders-export-{id}.csv). |
download_url |
Present when status is ready. Includes a time-limited token query param. |
error |
Error message when status is failed. |
expires_at |
When the export file expires (24 hours after completion). |
Example ready response
Section titled “Example ready response”{ "type": "success", "id": "93d85472-021c-4e77-aedf-ad0e1b06dd0a", "status": "ready", "format": "csv", "progress_pct": 100, "file_name": "orders-export-93d85472-021c-4e77-aedf-ad0e1b06dd0a.csv", "download_url": "https://api.firstdelivery.com/api/v3/orders/export/93d85472-021c-4e77-aedf-ad0e1b06dd0a/download?token=..."}Real-time updates (optional)
Section titled “Real-time updates (optional)”Dispatch listens on websocket room order-export:{exportId} for event orders-export:update with the same payload shape.
Examples
Section titled “Examples”curl --request GET '${BASE_HABITAT_URL}/api/v3/orders/export/${ORDER_EXPORT_ID}'const response = await fetch("${BASE_HABITAT_URL}/api/v3/orders/export/${ORDER_EXPORT_ID}", { "method": "GET", "headers": {}})const data = await response.json()import requests
response = requests.request( "GET", "${BASE_HABITAT_URL}/api/v3/orders/export/${ORDER_EXPORT_ID}", headers={},)response.raise_for_status()
