Export Purchase Order Cash Flow
GET/api/purchase-orders/:purchaseOrder/cash-flow/export
Download one purchase order's dated cash flows as a CSV: one row per payment, payout, fee, sale and the remaining stock at cost, on the chosen basis and cost variant. Same columns as the purchase order list's content_mode=cash_flows export, which runs in the background for many orders; this returns the file directly.
purchase-orders:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Columns. Purchase Order, Supplier, Destination Warehouse, Basis, Date (YYYY-MM-DD), Type, Category, Detail, Units (blank for payments and fees), Amount (negative = cash out, positive = cash back, tenant currency), Estimated (Yes for remaining stock at cost, capital inferred from received cost, or an Amazon payout not yet disbursed), Source, Source ID.
The file is UTF-8 with a byte-order mark, named cash-flow-<po-number>-<date>.csv. Computed on request; nothing is stored.
Requires a Bearer token with permission to export purchase orders.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.