returnsSummary
Requires at least one of the permissions purchase:debit_note:list or sales:credit_note:list.
Returns summary totals for the same filters as returns, covering every matching return rather than one page. Limited to the directions your list permissions allow.
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 ReturnsSummary {
returnsSummary {
awaitingApprovalCount
doneCount
openCount
totalCount
totalValue
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query ReturnsSummary {\n returnsSummary {\n awaitingApprovalCount\n doneCount\n openCount\n totalCount\n totalValue\n }\n}"
}
EOF
Response:
{
"data": {
"returnsSummary": {
"awaitingApprovalCount": 0,
"doneCount": 0,
"openCount": 0,
"totalCount": 0,
"totalValue": 0
}
}
}
returnsSummary(
filters: ReturnFilterInput
): ReturnListSummary!
Arguments
returnsSummary.filters ● ReturnFilterInput input
Filter criteria for return records. Omit to match all.
Type
ReturnListSummary object
Totals for the returns list, counted over the whole filtered set rather than one page.