Categories
Catalog categories (categorias), including tree traversal.
📄️ Get category by ID
Returns a single category by its primary key. The response carries a strong `ETag` header with the current version.
📄️ Update category
Full replacement of an existing category. Send the `If-Match` header with the current ETag for optimistic concurrency control.
📄️ Delete category
Deletes a category. Send the `If-Match` header with the current ETag for optimistic concurrency control.
📄️ Merge-patch category
RFC 7396 merge-patch over `application/merge-patch+json`. Send only the fields you want to change; include a field with value `null` to remove it. Use the `If-Match` header for optimistic concurrency control.
📄️ List categories
Returns a paginated list of categories with envelope `{data, totalCount, skip, limit, hasMore}`. Default sort is `treeLeft:asc` so the result is naturally tree-ordered. Use `filter=parentId=null=` to fetch roots, or `filter=parentId==42` to fetch the direct children of a given parent.
📄️ Create category
Creates a new category. Use `parentId` to attach it under an existing parent (omit for a root). Business logic runs in the legacy WAR via the internal commands gateway.
📄️ Prototype category for a creation form
Returns a non-persisted category pre-populated with backend defaults for the authenticated user. Optional hints include `companyId`, `parentId`, `articleTypeId`, `vatTypeId`, `expenseAccountId`, `incomeAccountId` and `copyFromId`. The response has no `id`, `version` or audit fields; call `POST /api/v2/categories` afterwards to persist it.