Get Customer Statement
GET/api/customers/:customer/statement
Returns the customer's statement of account as JSON, in one of two views selected by type:
open_item(default) — every open sales order plus open sales credits with an unallocated balance, and atotalsblock (open,credits,net_receivable).as_atoptionally limits the statement to documents dated on or before that date (balances remain current values).activity— a chronological ledger for thefrom/towindow (both required for this view): an opening balance carried from before the period, then every receivable-affecting event with a running balance — orders (debits), payments (credits), refunds (debits), and issued sales credits (credits) — satisfying opening + debits - credits = closing. Linetypeis one oforder,payment,refund,credit_issued; each line links its source document vialink.entity(sales_orderorsales_credit) andlink.id.
All amounts are in the account's base currency; foreign-currency documents are converted at each order's snapshot exchange rate. Both views also include the customer header, the aging buckets, and the account's configured payment_instructions.
Use the export endpoint for a PDF or CSV download of the same statement.
Authentication: Requires Bearer token (PAT). Requires permissions customers.show and sales_orders.index, and a token with the orders scope.
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 Entity
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.