creditNoteSummary
Requires permission sales:credit_note:list.
Returns summary figures for credit notes, such as counts by status.
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 CreditNoteSummary {
creditNoteSummary {
appliedNotes
appliedValue
draftNotes
expiredNotes
issuedNotes
remainingValue
byType {
type
count
value
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CreditNoteSummary {\n creditNoteSummary {\n appliedNotes\n appliedValue\n draftNotes\n expiredNotes\n issuedNotes\n remainingValue\n byType {\n type\n count\n value\n }\n }\n}"
}
EOF
Response:
{
"data": {
"creditNoteSummary": {
"appliedNotes": 0,
"appliedValue": 0,
"draftNotes": 0,
"expiredNotes": 0,
"issuedNotes": 0,
"remainingValue": 0,
"byType": [
{
"type": "string",
"count": 0,
"value": 0
}
]
}
}
}
creditNoteSummary: CreditNoteSummary!
Type
CreditNoteSummary object
Totals for the credit note list.