brandSummary
Requires permission products:brand:read.
Returns brand counts for your organization: total, active, inactive and brands that have products, plus the five most recently created brands. Needs the brands 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 BrandSummary {
brandSummary {
activeBrands
brandsWithProducts
inactiveBrands
totalBrands
recentBrands {
id
code
name
createdAt
deletedAt
deletedBy
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query BrandSummary {\n brandSummary {\n activeBrands\n brandsWithProducts\n inactiveBrands\n totalBrands\n recentBrands {\n id\n code\n name\n createdAt\n deletedAt\n deletedBy\n }\n }\n}"
}
EOF
Response:
{
"data": {
"brandSummary": {
"activeBrands": 0,
"brandsWithProducts": 0,
"inactiveBrands": 0,
"totalBrands": 0,
"recentBrands": [
{
"id": "id",
"code": "string",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"deletedAt": "2025-01-15T00:00:00Z",
"deletedBy": "string"
}
]
}
}
}
brandSummary(
filter: BrandFilterInput
): BrandSummary!
Arguments
brandSummary.filter ● BrandFilterInput input
Optional filters. Only the creation date range is used; the counts and the recent brands are limited to brands created in it.
Type
BrandSummary object
Headline brand figures.