grnSummary
Requires permission purchase:grn:list.
Returns summary figures for goods receipts: counts and values by status, plus purchase order value that is approved, unreceivable or received without a purchase order. Needs the goods receipt (GRN) 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 GrnSummary {
grnSummary {
acceptedGRNs
acceptedValue
approvedPoValue
draftGRNs
receivedGRNs
receivedValue
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query GrnSummary {\n grnSummary {\n acceptedGRNs\n acceptedValue\n approvedPoValue\n draftGRNs\n receivedGRNs\n receivedValue\n }\n}"
}
EOF
Response:
{
"data": {
"grnSummary": {
"acceptedGRNs": 0,
"acceptedValue": 0,
"approvedPoValue": 0,
"draftGRNs": 0,
"receivedGRNs": 0,
"receivedValue": 0
}
}
}
grnSummary: GRNSummary!
Type
GRNSummary object
Totals for the goods receipt list, in the organization's base currency. A receipt's value includes its share of the purchase order's shipping and surcharge.