Exporting orders

This page is a short one today. Unlike Products and Customers, there is no CSV export button on the Orders page right now. Building it is tracked but not shipped.

In the meantime, you have three options for getting order data out.

Option 1 — The REST API

The most flexible path. GET /api/v1/orders returns every order with full line items, customer reference, status, and totals as JSON. Paginate through with ?page=N&perPage=M — the max is 100 per page.

curl https://your-domain.com/api/v1/orders \
  -H "Authorization: Bearer dk_YOUR_API_KEY"

From there, pipe the JSON into jq, a script, a Zapier/n8n workflow, a Google Sheets import — whatever fits your reporting setup. Most distributors set up a one-time script that writes out a CSV in whatever format their accounting package wants.

See REST API — Orders endpoints for the full schema, filter parameters, and example responses. The same filters that work in the dashboard UI (date range, status, customer) are supported as query params on the API.

Option 2 — Invoice PDFs

For one-off situations where you just need a printable record of an order, download the invoice PDF from the order detail page. See Invoice PDFs.

Not useful for bulk reporting, but useful for customer paperwork.

Option 3 — Webhooks

If you want every new order pushed to you as it happens (instead of polling), subscribe to the order.created and order.status_changed webhook events in Settings → Webhooks. Each event sends a signed JSON payload to your endpoint.

See Webhooks → Event types for payload details.

Webhooks are the right tool if you want orders landing in an external system in real time — an ERP, a shipping tool, a data warehouse. For historical backfills, use the API.

Coming soon — CSV export

A one-click Export CSV button on /dashboard/orders is on the roadmap. When it ships, it'll:

  • Respect whatever filters you have active on the list (status, date range, etc.) so you can export "April's confirmed orders" in one click.
  • Include one row per order with a flattened item count, total, and customer email. A separate flattened line-items export is also planned.
  • Follow the same format documented in CSV Formats → Orders export.

If this would unblock you now, email support@distribu.app — we can provide a one-time export of your data in whatever format you need while we finish the self-serve version.

Getting individual orders out

For ad-hoc exports of a single order, the fastest path is the REST API's single-order endpoint:

curl https://your-domain.com/api/v1/orders/{id} \
  -H "Authorization: Bearer dk_YOUR_API_KEY"

Returns the full order with line items as JSON. See REST API — Orders endpoints.


That wraps up the Orders section. Next up: Storefront covers the customer-facing side — setup, customization, and how your customers actually place orders.