hierarchyNodeSummary
Requires at least one of the permissions customers:customer:read, settings:user:read or users:user:read.
Aggregate cards for any node: team composition, customers, orders, revenue. Needs the users read, user settings read or customers read permission.
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 HierarchyNodeSummary($userId: String!) {
hierarchyNodeSummary(userId: $userId) {
name
customerCount
directReports
orderCount
orgWide
ownCustomerCount
descendantsByRole {
count
role
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query HierarchyNodeSummary($userId: String!) {\n hierarchyNodeSummary(userId: $userId) {\n name\n customerCount\n directReports\n orderCount\n orgWide\n ownCustomerCount\n descendantsByRole {\n count\n role\n }\n }\n}",
"variables": {
"userId": "string"
}
}
EOF
Variables:
{
"userId": "string"
}
Response:
{
"data": {
"hierarchyNodeSummary": {
"name": "string",
"customerCount": 0,
"directReports": 0,
"orderCount": 0,
"orgWide": true,
"ownCustomerCount": 0,
"descendantsByRole": [
{
"count": 0,
"role": "string"
}
]
}
}
}
hierarchyNodeSummary(
dateFrom: DateTime
dateTo: DateTime
userId: String!
): HierarchyNodeSummary!
Arguments
hierarchyNodeSummary.dateFrom ● DateTime scalar
Only activity on or after this date.
hierarchyNodeSummary.dateTo ● DateTime scalar
Only activity on or before this date.
hierarchyNodeSummary.userId ● String! non-null scalar
The ID of the user whose summary is returned.
Type
HierarchyNodeSummary object
Headline figures for one selected node, counting the node and everyone below it.