customerStatement
Requires a customer (portal or buyer app) session.
Per-currency account statement over a window: opening + invoices − payments/credits == closing; Σ rows == the invoices-screen KPI tiles. screen 11.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query CustomerStatement($from: DateTime!, $to: DateTime!) {
customerStatement(from: $from, to: $to) {
from
to
sections {
closingBalance
currency
openingBalance
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerStatement($from: DateTime!, $to: DateTime!) {\n customerStatement(from: $from, to: $to) {\n from\n to\n sections {\n closingBalance\n currency\n openingBalance\n }\n }\n}",
"variables": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
}
EOF
Variables:
{
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
Response:
{
"data": {
"customerStatement": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z",
"sections": [
{
"closingBalance": 0,
"currency": "string",
"openingBalance": 0
}
]
}
}
}
customerStatement(
from: DateTime!
to: DateTime!
): CustomerStatement!
Arguments
customerStatement.from ● DateTime! non-null scalar
The first day of the statement.
customerStatement.to ● DateTime! non-null scalar
The last day of the statement.
Type
CustomerStatement object
Customer account statement over a date window. screen 11.