BizKitHub
DocsAPI ReferenceProduct Category/bff/product-category/list-with-counts
getProduct CategoryAdmin BFF

/bff/product-category/list-with-counts

Returns categories that have at least one non-deleted product assigned as their main category, sorted by product count DESC (then name ASC). Also returns the count of products with no main category and the grand total. Intended for the product-list filter dropdown.

Product CategorygetBffProduct-categoryList-with-counts

Parameters

No parameters required

This endpoint takes no path, query, header or body parameters.

Response schema

1 status code documented

200Success
itemsobject[]Required

Categories with at least one product, sorted by count DESC.

Each array item:
codestringRequired

Category code (used as filter value).

namestringRequired

Category display name.

productCountnumberRequired

Number of non-deleted products with this main category.

noCategoryCountnumberRequired

Number of non-deleted products with main_category_id IS NULL.

totalCountnumberRequired

Total number of non-deleted products in the organisation.

Response example

application/json
{
  "items": [
    {
      "code": "example_code",
      "name": "example_name",
      "productCount": 0
    }
  ],
  "noCategoryCount": 0,
  "totalCount": 0
}

Request example

GET /bff/product-category/list-with-counts

get
curl -X GET "https://api.bizkithub.com/bff/product-category/list-with-counts" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key