Skip to main content

Export Customer Statement

GET 

/api/customers/:customer/statement/export

Downloads the customer's statement of account as a file. format=pdf (default) returns a branded PDF document (application/pdf); format=csv returns comma-separated rows (text/csv).

Accepts the same statement parameters as the JSON statement endpoint: type (open_item default, or activity), from/to (required when type=activity), and as_at (open_item only).

The response is a file download named customer-statement-{customer-name}-{date}.pdf (or .csv) — not JSON.

CSV columns:

  • activity: Date, Type, Reference, Description, Debit, Credit, Running Balance — with opening and closing balance rows.
  • open_item: Type, Document, Date, Due Date, Status, Document Currency, Total (Document Currency), Outstanding (base currency) — one row per open order, one negative row per open credit, and a final net_receivable row.

Authentication: Requires Bearer token (PAT). Requires permissions customers.show and sales_orders.index, and a token with the orders scope.

Request

Responses

OK

Response Headers
    Content-Type