purchaseOutstandingSummary
Requires at least one of the permissions purchase:purchase_invoice:list or purchase:purchase_invoice:read.
Returns the summary of unpaid purchase invoices: total outstanding, current and overdue amounts, average days outstanding, aging, and the suppliers owed. Needs the purchase invoices list or read permission and the purchase invoices feature on your plan.
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 PurchaseOutstandingSummary {
purchaseOutstandingSummary {
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 PurchaseOutstandingSummary {\n purchaseOutstandingSummary {\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": {
"purchaseOutstandingSummary": {
"averageDaysOutstanding": 0,
"currentAmount": 0,
"overdueAmount": 0,
"totalCustomers": 0,
"totalInvoices": 0,
"totalOutstanding": 0,
"aging": [
{
"bucket": "string",
"count": 0,
"value": 0
}
]
}
}
}
purchaseOutstandingSummary: 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.