salesOutstandingSummary
Requires permission payments:invoice:list.
Returns what customers owe: outstanding and overdue receivables, with their aging. It covers the whole organization, or only the caller's own customers for a sales rep. Requires permission to list invoices.
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 SalesOutstandingSummary {
salesOutstandingSummary {
averageDaysOutstanding
currentAmount
overdueAmount
totalCustomers
totalInvoices
totalOutstanding
aging {
bucket
count
value
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query SalesOutstandingSummary {\n salesOutstandingSummary {\n averageDaysOutstanding\n currentAmount\n overdueAmount\n totalCustomers\n totalInvoices\n totalOutstanding\n aging {\n bucket\n count\n value\n }\n }\n}"
}
EOF
Response:
{
"data": {
"salesOutstandingSummary": {
"averageDaysOutstanding": 0,
"currentAmount": 0,
"overdueAmount": 0,
"totalCustomers": 0,
"totalInvoices": 0,
"totalOutstanding": 0,
"aging": [
{
"bucket": "string",
"count": 0,
"value": 0
}
]
}
}
}
salesOutstandingSummary: OutstandingSummary!
Type
OutstandingSummary object
Outstanding and aging totals over the whole open invoice set, in the organization's base currency. Cancelled, voided and draft invoices are left out.