dashboardStats
Requires permission dashboard:main:read.
Headline dashboard statistics for your organization. Limited to the customers you may see. Needs the dashboard 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 DashboardStats {
dashboardStats {
activeCustomers
averageOrderValue
conversionRate
customerCreditUtilization
inventoryTurnover
lowStockItems
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query DashboardStats {\n dashboardStats {\n activeCustomers\n averageOrderValue\n conversionRate\n customerCreditUtilization\n inventoryTurnover\n lowStockItems\n }\n}"
}
EOF
Response:
{
"data": {
"dashboardStats": {
"activeCustomers": 0,
"averageOrderValue": 0,
"conversionRate": 0,
"customerCreditUtilization": 0,
"inventoryTurnover": 0,
"lowStockItems": 0
}
}
}
dashboardStats: DashboardStats!
Type
DashboardStats object
Headline figures for the dashboard.