Skip to main content
Driftstack DRIFTSTACK

Admin CSV export

The Driftstack admin API exposes a CSV export of crypto orders for bookkeeping, finance reconciliation, and audit. This page documents the request shape, the column contract, and the practical limits.

Endpoint

GET /v1/admin/crypto-orders.csv
Authorization: Bearer $ADMIN_KEY
Accept: text/csv

Requires an API key with the driftstack_internal_admin scope. A key without that scope receives 403 Forbidden.

Filters

The CSV endpoint accepts the same filter query params as the JSON list endpoint:

Filters compose with AND semantics. Omitting them all returns every order the caller's scope can see, up to limit.

Columns

The first row is a header row; subsequent rows are one order per row in the order documented below. The header is stable — new columns are appended to the right; existing columns are not removed or reordered without a deprecation window.

  1. order_id — Driftstack order ID (ord_*).
  2. account_id — owning account, or empty for pre-signup checkouts.
  3. product — SKU paid for.
  4. price_cents — fiat-equivalent price at order creation, in minor units.
  5. price_currency — three-letter currency (e.g. USD, EUR).
  6. status — terminal or in-flight status.
  7. payment_id — NowPayments invoice ID, empty if no IPN has hit.
  8. customer_note — customer-supplied note, empty if unset.
  9. internal_note — admin-only ops note, empty if unset.
  10. created_at — ISO-8601 UTC timestamp.
  11. updated_at — ISO-8601 UTC timestamp of the last state transition.

Quoting + encoding

The exporter follows RFC 4180:

Limits

The CSV endpoint exports up to 1000 rows per request. If the filtered scan would return more than 1000 rows, the export is truncated to the most-recently-updated 1000 and a warning header is set:

X-Driftstack-Export-Truncated: 1

For full-history exports beyond 1000 rows, walk the cursor-paginated JSON list and stream rows yourself; the CSV endpoint is a convenience for ad-hoc reconciliation, not a bulk-export channel.

GUI download

The admin GUI (Crypto orders (admin) view) has a Download CSV button that calls this endpoint with whatever status and search filters are currently active. The button mints a blob URL client-side so the download honours the Bearer auth header.

Related