Skip to main content

categorySummary

Requires permission categories:category:list.

Returns category statistics for your organization: counts of total, active, inactive, root, parent and child categories and those with or without active products, the tree depth, recent and most used categories, and the category tree. Requires permission to list categories.

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:

query CategorySummary {
categorySummary {
activeCategories
categoriesWithProducts
categoriesWithoutProducts
childCategories
inactiveCategories
lastUpdated
categoryTree {
id
code
name
createdAt
childrenCount
deletedAt
}
}
}

Response:

{
"data": {
"categorySummary": {
"activeCategories": 0,
"categoriesWithProducts": 0,
"categoriesWithoutProducts": 0,
"childCategories": 0,
"inactiveCategories": 0,
"lastUpdated": "2025-01-15T00:00:00Z",
"categoryTree": [
{
"id": "id",
"code": "string",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"childrenCount": 0,
"deletedAt": "2025-01-15T00:00:00Z"
}
]
}
}
}
categorySummary: CategorySummary!

Type​

CategorySummary object​

Headline category figures.