Browse categories
You can view all categories in the system with pagination support.By default, the category list returns 20 categories per page sorted by ID. You can customize pagination using the
page, size, and sort query parameters.View category details
You can retrieve detailed information about a specific category using its ID.Future versions may include additional category information such as descriptions, book counts, and subcategories.
Add a new category
Administrators can create new categories to organize books in the library.Prepare category information
Decide on a clear, descriptive name for your category. Category names should be specific enough to be useful but broad enough to contain multiple books.
Send create request
Make a POST request to
/api/management/categories with the Authorization header:Category creation requirements
- Name: 2-100 characters, required
Category names must be between 2 and 100 characters long. Choose names that will be meaningful to library users.
Update a category
Administrators can update existing category names to improve clarity or fix spelling.Updating a category name automatically updates the category name for all books in that category.
Delete a category
Administrators can remove categories from the system when they’re no longer needed.Check for associated books
Before deleting a category, ensure no books are currently assigned to it.
Using categories in book management
When creating or updating books, you reference the category by its ID. Each book belongs to exactly one category:Related workflows
Learn how to create and manage books with categories
Category organization strategies
Here are some strategies for organizing your library with categories:Subject-based categories
Organize books by academic or professional subjects:- Programming
- Mathematics
- Physics
- History
- Psychology
Genre-based categories
Organize fiction books by literary genre:- Science Fiction
- Mystery & Thriller
- Romance
- Fantasy
- Historical Fiction
Hybrid approach
Combine subject and genre categories to cover both fiction and non-fiction:- Fiction: Science Fiction
- Fiction: Mystery
- Non-Fiction: Technology
- Non-Fiction: Biography
- Non-Fiction: Business
Choose a categorization strategy that makes sense for your library’s collection and users. Consistency is more important than the specific system you choose.
Category workflow best practices
Follow these best practices when managing categories:Plan your taxonomy
Before creating categories, plan out your organizational structure. Consider how users will browse and search for books.
Keep it simple
Don’t create too many categories. Users can become overwhelmed with too many options. Aim for 10-20 well-defined categories.
Use clear names
Category names should be immediately understandable. Avoid abbreviations or jargon unless they’re widely recognized.
Be consistent
If you use plural forms for some categories (“Sciences”), use plural forms for all categories. If you use singular forms (“Science”), stick to that pattern.
Common category management errors
You may encounter these errors when managing categories:- Category not found: The specified category ID doesn’t exist in the database
- Duplicate category name: A category with this exact name already exists
- Category in use: Cannot delete this category because it contains books
- Invalid name length: The category name must be between 2 and 100 characters
- Unauthorized: You must be an administrator to manage categories
If you need to delete a category that contains books, first update those books to move them to a different category, then delete the empty category.